node-av-light 0.0.0-stage → 7.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +710 -2
  3. package/dist/api/audio-frame-buffer.d.ts +636 -0
  4. package/dist/api/audio-frame-buffer.js +1027 -0
  5. package/dist/api/audio-frame-buffer.js.map +1 -0
  6. package/dist/api/bitstream-filter.d.ts +938 -0
  7. package/dist/api/bitstream-filter.js +1427 -0
  8. package/dist/api/bitstream-filter.js.map +1 -0
  9. package/dist/api/constants.d.ts +44 -0
  10. package/dist/api/constants.js +45 -0
  11. package/dist/api/constants.js.map +1 -0
  12. package/dist/api/data/test_av1.ivf +0 -0
  13. package/dist/api/data/test_h264.h264 +0 -0
  14. package/dist/api/data/test_hevc.h265 +0 -0
  15. package/dist/api/data/test_mjpeg.mjpeg +0 -0
  16. package/dist/api/data/test_vp8.ivf +0 -0
  17. package/dist/api/data/test_vp9.ivf +0 -0
  18. package/dist/api/decoder.d.ts +1413 -0
  19. package/dist/api/decoder.js +2367 -0
  20. package/dist/api/decoder.js.map +1 -0
  21. package/dist/api/demuxer.d.ts +1295 -0
  22. package/dist/api/demuxer.js +2344 -0
  23. package/dist/api/demuxer.js.map +1 -0
  24. package/dist/api/device.d.ts +589 -0
  25. package/dist/api/device.js +964 -0
  26. package/dist/api/device.js.map +1 -0
  27. package/dist/api/encoder-pool.d.ts +262 -0
  28. package/dist/api/encoder-pool.js +397 -0
  29. package/dist/api/encoder-pool.js.map +1 -0
  30. package/dist/api/encoder.d.ts +1509 -0
  31. package/dist/api/encoder.js +2619 -0
  32. package/dist/api/encoder.js.map +1 -0
  33. package/dist/api/filter-complex.d.ts +828 -0
  34. package/dist/api/filter-complex.js +1661 -0
  35. package/dist/api/filter-complex.js.map +1 -0
  36. package/dist/api/filter-presets.d.ts +800 -0
  37. package/dist/api/filter-presets.js +1554 -0
  38. package/dist/api/filter-presets.js.map +1 -0
  39. package/dist/api/filter.d.ts +1339 -0
  40. package/dist/api/filter.js +2075 -0
  41. package/dist/api/filter.js.map +1 -0
  42. package/dist/api/fmp4-stream.d.ts +797 -0
  43. package/dist/api/fmp4-stream.js +1428 -0
  44. package/dist/api/fmp4-stream.js.map +1 -0
  45. package/dist/api/hardware.d.ts +677 -0
  46. package/dist/api/hardware.js +1300 -0
  47. package/dist/api/hardware.js.map +1 -0
  48. package/dist/api/index.d.ts +21 -0
  49. package/dist/api/index.js +38 -0
  50. package/dist/api/index.js.map +1 -0
  51. package/dist/api/io-stream.d.ts +308 -0
  52. package/dist/api/io-stream.js +358 -0
  53. package/dist/api/io-stream.js.map +1 -0
  54. package/dist/api/muxer.d.ts +1311 -0
  55. package/dist/api/muxer.js +2672 -0
  56. package/dist/api/muxer.js.map +1 -0
  57. package/dist/api/pipeline.d.ts +801 -0
  58. package/dist/api/pipeline.js +1344 -0
  59. package/dist/api/pipeline.js.map +1 -0
  60. package/dist/api/probe.d.ts +128 -0
  61. package/dist/api/probe.js +227 -0
  62. package/dist/api/probe.js.map +1 -0
  63. package/dist/api/rtp-stream.d.ts +497 -0
  64. package/dist/api/rtp-stream.js +1131 -0
  65. package/dist/api/rtp-stream.js.map +1 -0
  66. package/dist/api/scaler.d.ts +561 -0
  67. package/dist/api/scaler.js +918 -0
  68. package/dist/api/scaler.js.map +1 -0
  69. package/dist/api/types.d.ts +17 -0
  70. package/dist/api/types.js +2 -0
  71. package/dist/api/types.js.map +1 -0
  72. package/dist/api/utilities/async-queue.d.ts +149 -0
  73. package/dist/api/utilities/async-queue.js +254 -0
  74. package/dist/api/utilities/async-queue.js.map +1 -0
  75. package/dist/api/utilities/audio-sample.d.ts +117 -0
  76. package/dist/api/utilities/audio-sample.js +112 -0
  77. package/dist/api/utilities/audio-sample.js.map +1 -0
  78. package/dist/api/utilities/audio-transcode.d.ts +20 -0
  79. package/dist/api/utilities/audio-transcode.js +27 -0
  80. package/dist/api/utilities/audio-transcode.js.map +1 -0
  81. package/dist/api/utilities/channel-layout.d.ts +76 -0
  82. package/dist/api/utilities/channel-layout.js +80 -0
  83. package/dist/api/utilities/channel-layout.js.map +1 -0
  84. package/dist/api/utilities/codec-format.d.ts +87 -0
  85. package/dist/api/utilities/codec-format.js +117 -0
  86. package/dist/api/utilities/codec-format.js.map +1 -0
  87. package/dist/api/utilities/context-options.d.ts +25 -0
  88. package/dist/api/utilities/context-options.js +23 -0
  89. package/dist/api/utilities/context-options.js.map +1 -0
  90. package/dist/api/utilities/electron-shared-texture.d.ts +368 -0
  91. package/dist/api/utilities/electron-shared-texture.js +540 -0
  92. package/dist/api/utilities/electron-shared-texture.js.map +1 -0
  93. package/dist/api/utilities/image.d.ts +207 -0
  94. package/dist/api/utilities/image.js +213 -0
  95. package/dist/api/utilities/image.js.map +1 -0
  96. package/dist/api/utilities/index.d.ts +14 -0
  97. package/dist/api/utilities/index.js +27 -0
  98. package/dist/api/utilities/index.js.map +1 -0
  99. package/dist/api/utilities/live-decoding.d.ts +15 -0
  100. package/dist/api/utilities/live-decoding.js +32 -0
  101. package/dist/api/utilities/live-decoding.js.map +1 -0
  102. package/dist/api/utilities/media-type.d.ts +49 -0
  103. package/dist/api/utilities/media-type.js +53 -0
  104. package/dist/api/utilities/media-type.js.map +1 -0
  105. package/dist/api/utilities/packet-age-watchdog.d.ts +198 -0
  106. package/dist/api/utilities/packet-age-watchdog.js +594 -0
  107. package/dist/api/utilities/packet-age-watchdog.js.map +1 -0
  108. package/dist/api/utilities/pixel-format.d.ts +89 -0
  109. package/dist/api/utilities/pixel-format.js +97 -0
  110. package/dist/api/utilities/pixel-format.js.map +1 -0
  111. package/dist/api/utilities/sample-format.d.ts +129 -0
  112. package/dist/api/utilities/sample-format.js +141 -0
  113. package/dist/api/utilities/sample-format.js.map +1 -0
  114. package/dist/api/utilities/scale-size.d.ts +51 -0
  115. package/dist/api/utilities/scale-size.js +55 -0
  116. package/dist/api/utilities/scale-size.js.map +1 -0
  117. package/dist/api/utilities/scheduler.d.ts +138 -0
  118. package/dist/api/utilities/scheduler.js +98 -0
  119. package/dist/api/utilities/scheduler.js.map +1 -0
  120. package/dist/api/utilities/streaming.d.ts +186 -0
  121. package/dist/api/utilities/streaming.js +309 -0
  122. package/dist/api/utilities/streaming.js.map +1 -0
  123. package/dist/api/utilities/timestamp.d.ts +193 -0
  124. package/dist/api/utilities/timestamp.js +206 -0
  125. package/dist/api/utilities/timestamp.js.map +1 -0
  126. package/dist/api/utilities/video-transcode.d.ts +218 -0
  127. package/dist/api/utilities/video-transcode.js +624 -0
  128. package/dist/api/utilities/video-transcode.js.map +1 -0
  129. package/dist/api/utilities/whisper-model.d.ts +330 -0
  130. package/dist/api/utilities/whisper-model.js +587 -0
  131. package/dist/api/utilities/whisper-model.js.map +1 -0
  132. package/dist/api/utils.d.ts +19 -0
  133. package/dist/api/utils.js +39 -0
  134. package/dist/api/utils.js.map +1 -0
  135. package/dist/api/webrtc-stream.d.ts +294 -0
  136. package/dist/api/webrtc-stream.js +546 -0
  137. package/dist/api/webrtc-stream.js.map +1 -0
  138. package/dist/api/whisper.d.ts +326 -0
  139. package/dist/api/whisper.js +402 -0
  140. package/dist/api/whisper.js.map +1 -0
  141. package/dist/constants/bsf-options.d.ts +364 -0
  142. package/dist/constants/bsf-options.js +7 -0
  143. package/dist/constants/bsf-options.js.map +1 -0
  144. package/dist/constants/channel-layouts.d.ts +53 -0
  145. package/dist/constants/channel-layouts.js +57 -0
  146. package/dist/constants/channel-layouts.js.map +1 -0
  147. package/dist/constants/constants.d.ts +2435 -0
  148. package/dist/constants/constants.js +1989 -0
  149. package/dist/constants/constants.js.map +1 -0
  150. package/dist/constants/decoders.d.ts +651 -0
  151. package/dist/constants/decoders.js +641 -0
  152. package/dist/constants/decoders.js.map +1 -0
  153. package/dist/constants/encoders.d.ts +314 -0
  154. package/dist/constants/encoders.js +309 -0
  155. package/dist/constants/encoders.js.map +1 -0
  156. package/dist/constants/filter-options.d.ts +12099 -0
  157. package/dist/constants/filter-options.js +7 -0
  158. package/dist/constants/filter-options.js.map +1 -0
  159. package/dist/constants/format-options.d.ts +4319 -0
  160. package/dist/constants/format-options.js +7 -0
  161. package/dist/constants/format-options.js.map +1 -0
  162. package/dist/constants/formats.d.ts +18 -0
  163. package/dist/constants/formats.js +7 -0
  164. package/dist/constants/formats.js.map +1 -0
  165. package/dist/constants/hardware.d.ts +26 -0
  166. package/dist/constants/hardware.js +27 -0
  167. package/dist/constants/hardware.js.map +1 -0
  168. package/dist/constants/index.d.ts +10 -0
  169. package/dist/constants/index.js +6 -0
  170. package/dist/constants/index.js.map +1 -0
  171. package/dist/constants/options.d.ts +6217 -0
  172. package/dist/constants/options.js +7 -0
  173. package/dist/constants/options.js.map +1 -0
  174. package/dist/ffmpeg/index.d.ts +101 -0
  175. package/dist/ffmpeg/index.js +161 -0
  176. package/dist/ffmpeg/index.js.map +1 -0
  177. package/dist/ffmpeg/version.d.ts +6 -0
  178. package/dist/ffmpeg/version.js +7 -0
  179. package/dist/ffmpeg/version.js.map +1 -0
  180. package/dist/index.d.ts +4 -0
  181. package/dist/index.js +9 -0
  182. package/dist/index.js.map +1 -0
  183. package/dist/lib/audio-fifo.d.ts +399 -0
  184. package/dist/lib/audio-fifo.js +431 -0
  185. package/dist/lib/audio-fifo.js.map +1 -0
  186. package/dist/lib/binding.d.ts +242 -0
  187. package/dist/lib/binding.js +102 -0
  188. package/dist/lib/binding.js.map +1 -0
  189. package/dist/lib/bitstream-filter-context.d.ts +381 -0
  190. package/dist/lib/bitstream-filter-context.js +443 -0
  191. package/dist/lib/bitstream-filter-context.js.map +1 -0
  192. package/dist/lib/bitstream-filter.d.ts +140 -0
  193. package/dist/lib/bitstream-filter.js +154 -0
  194. package/dist/lib/bitstream-filter.js.map +1 -0
  195. package/dist/lib/codec-context.d.ts +1069 -0
  196. package/dist/lib/codec-context.js +1336 -0
  197. package/dist/lib/codec-context.js.map +1 -0
  198. package/dist/lib/codec-parameters.d.ts +664 -0
  199. package/dist/lib/codec-parameters.js +813 -0
  200. package/dist/lib/codec-parameters.js.map +1 -0
  201. package/dist/lib/codec-parser.d.ts +201 -0
  202. package/dist/lib/codec-parser.js +213 -0
  203. package/dist/lib/codec-parser.js.map +1 -0
  204. package/dist/lib/codec.d.ts +617 -0
  205. package/dist/lib/codec.js +746 -0
  206. package/dist/lib/codec.js.map +1 -0
  207. package/dist/lib/device.d.ts +294 -0
  208. package/dist/lib/device.js +326 -0
  209. package/dist/lib/device.js.map +1 -0
  210. package/dist/lib/dictionary.d.ts +333 -0
  211. package/dist/lib/dictionary.js +372 -0
  212. package/dist/lib/dictionary.js.map +1 -0
  213. package/dist/lib/error.d.ts +311 -0
  214. package/dist/lib/error.js +395 -0
  215. package/dist/lib/error.js.map +1 -0
  216. package/dist/lib/fifo.d.ts +416 -0
  217. package/dist/lib/fifo.js +453 -0
  218. package/dist/lib/fifo.js.map +1 -0
  219. package/dist/lib/filter-context.d.ts +714 -0
  220. package/dist/lib/filter-context.js +783 -0
  221. package/dist/lib/filter-context.js.map +1 -0
  222. package/dist/lib/filter-graph-segment.d.ts +161 -0
  223. package/dist/lib/filter-graph-segment.js +172 -0
  224. package/dist/lib/filter-graph-segment.js.map +1 -0
  225. package/dist/lib/filter-graph.d.ts +641 -0
  226. package/dist/lib/filter-graph.js +704 -0
  227. package/dist/lib/filter-graph.js.map +1 -0
  228. package/dist/lib/filter-inout.d.ts +202 -0
  229. package/dist/lib/filter-inout.js +261 -0
  230. package/dist/lib/filter-inout.js.map +1 -0
  231. package/dist/lib/filter.d.ts +243 -0
  232. package/dist/lib/filter.js +272 -0
  233. package/dist/lib/filter.js.map +1 -0
  234. package/dist/lib/format-context.d.ts +1335 -0
  235. package/dist/lib/format-context.js +1455 -0
  236. package/dist/lib/format-context.js.map +1 -0
  237. package/dist/lib/frame-utils.d.ts +116 -0
  238. package/dist/lib/frame-utils.js +98 -0
  239. package/dist/lib/frame-utils.js.map +1 -0
  240. package/dist/lib/frame.d.ts +1315 -0
  241. package/dist/lib/frame.js +1535 -0
  242. package/dist/lib/frame.js.map +1 -0
  243. package/dist/lib/hardware-device-context.d.ts +362 -0
  244. package/dist/lib/hardware-device-context.js +383 -0
  245. package/dist/lib/hardware-device-context.js.map +1 -0
  246. package/dist/lib/hardware-frames-context.d.ts +418 -0
  247. package/dist/lib/hardware-frames-context.js +471 -0
  248. package/dist/lib/hardware-frames-context.js.map +1 -0
  249. package/dist/lib/index.d.ts +35 -0
  250. package/dist/lib/index.js +60 -0
  251. package/dist/lib/index.js.map +1 -0
  252. package/dist/lib/input-format.d.ts +249 -0
  253. package/dist/lib/input-format.js +306 -0
  254. package/dist/lib/input-format.js.map +1 -0
  255. package/dist/lib/io-context.d.ts +698 -0
  256. package/dist/lib/io-context.js +771 -0
  257. package/dist/lib/io-context.js.map +1 -0
  258. package/dist/lib/log.d.ts +174 -0
  259. package/dist/lib/log.js +184 -0
  260. package/dist/lib/log.js.map +1 -0
  261. package/dist/lib/native-types.d.ts +1024 -0
  262. package/dist/lib/native-types.js +2 -0
  263. package/dist/lib/native-types.js.map +1 -0
  264. package/dist/lib/option.d.ts +953 -0
  265. package/dist/lib/option.js +1607 -0
  266. package/dist/lib/option.js.map +1 -0
  267. package/dist/lib/output-format.d.ts +222 -0
  268. package/dist/lib/output-format.js +259 -0
  269. package/dist/lib/output-format.js.map +1 -0
  270. package/dist/lib/packet.d.ts +521 -0
  271. package/dist/lib/packet.js +613 -0
  272. package/dist/lib/packet.js.map +1 -0
  273. package/dist/lib/rational.d.ts +251 -0
  274. package/dist/lib/rational.js +278 -0
  275. package/dist/lib/rational.js.map +1 -0
  276. package/dist/lib/software-resample-context.d.ts +552 -0
  277. package/dist/lib/software-resample-context.js +592 -0
  278. package/dist/lib/software-resample-context.js.map +1 -0
  279. package/dist/lib/software-scale-context.d.ts +344 -0
  280. package/dist/lib/software-scale-context.js +366 -0
  281. package/dist/lib/software-scale-context.js.map +1 -0
  282. package/dist/lib/stream.d.ts +383 -0
  283. package/dist/lib/stream.js +524 -0
  284. package/dist/lib/stream.js.map +1 -0
  285. package/dist/lib/sync-queue.d.ts +179 -0
  286. package/dist/lib/sync-queue.js +197 -0
  287. package/dist/lib/sync-queue.js.map +1 -0
  288. package/dist/lib/types.d.ts +34 -0
  289. package/dist/lib/types.js +2 -0
  290. package/dist/lib/types.js.map +1 -0
  291. package/dist/lib/utilities.d.ts +1198 -0
  292. package/dist/lib/utilities.js +1302 -0
  293. package/dist/lib/utilities.js.map +1 -0
  294. package/dist/utils/electron.d.ts +49 -0
  295. package/dist/utils/electron.js +63 -0
  296. package/dist/utils/electron.js.map +1 -0
  297. package/dist/utils/index.d.ts +6 -0
  298. package/dist/utils/index.js +7 -0
  299. package/dist/utils/index.js.map +1 -0
  300. package/dist/utils/libc.d.ts +11 -0
  301. package/dist/utils/libc.js +35 -0
  302. package/dist/utils/libc.js.map +1 -0
  303. package/dist/utils/variant.d.ts +26 -0
  304. package/dist/utils/variant.js +31 -0
  305. package/dist/utils/variant.js.map +1 -0
  306. package/dist/webrtc/index.d.ts +4 -0
  307. package/dist/webrtc/index.js +7 -0
  308. package/dist/webrtc/index.js.map +1 -0
  309. package/install/check.js +124 -0
  310. package/install/ffmpeg.js +66 -0
  311. package/package.json +167 -4
@@ -0,0 +1,524 @@
1
+ import { CodecParameters } from './codec-parameters.js';
2
+ import { CodecParser } from './codec-parser.js';
3
+ import { Dictionary } from './dictionary.js';
4
+ import { Packet } from './packet.js';
5
+ import { Rational } from './rational.js';
6
+ /**
7
+ * Media stream within a format context.
8
+ *
9
+ * Represents a single stream (video, audio, subtitle, etc.) within a media container.
10
+ * Contains stream-specific information including codec parameters, timing information,
11
+ * metadata, and disposition flags. Each stream in a file has a unique index and may
12
+ * contain packets of compressed data.
13
+ *
14
+ * A stream belongs to its format context. Once that context is closed or freed, the
15
+ * stream and its codecpar read their defaults (e.g. index -1) and ignore writes;
16
+ * copy what must outlive the context first.
17
+ *
18
+ * Direct mapping to FFmpeg's AVStream.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { FormatContext, FFmpegError } from 'node-av';
23
+ * import { AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO } from 'node-av/constants';
24
+ *
25
+ * // Access streams from format context
26
+ * const formatContext = new FormatContext();
27
+ * await formatContext.openInput('video.mp4');
28
+ *
29
+ * // Iterate through streams
30
+ * for (let i = 0; i < formatContext.nbStreams; i++) {
31
+ * const stream = formatContext.streams[i];
32
+ * const codecpar = stream.codecpar;
33
+ *
34
+ * if (codecpar.codecType === AVMEDIA_TYPE_VIDEO) {
35
+ * console.log(`Video stream ${stream.index}:`);
36
+ * console.log(` Codec: ${codecpar.codecId}`);
37
+ * console.log(` Resolution: ${codecpar.width}x${codecpar.height}`);
38
+ * console.log(` Frame rate: ${stream.avgFrameRate.num}/${stream.avgFrameRate.den}`);
39
+ * } else if (codecpar.codecType === AVMEDIA_TYPE_AUDIO) {
40
+ * console.log(`Audio stream ${stream.index}:`);
41
+ * console.log(` Sample rate: ${codecpar.sampleRate} Hz`);
42
+ * console.log(` Channels: ${codecpar.channels}`);
43
+ * }
44
+ * }
45
+ * ```
46
+ *
47
+ * @see [AVStream](https://ffmpeg.org/doxygen/trunk/structAVStream.html) - FFmpeg Doxygen
48
+ * @see {@link FormatContext} For container operations
49
+ * @see {@link CodecParameters} For codec configuration
50
+ */
51
+ export class Stream {
52
+ native;
53
+ _codecpar; // Cache the wrapped codecpar
54
+ /**
55
+ * @param native - The native stream instance
56
+ *
57
+ * @internal
58
+ */
59
+ constructor(native) {
60
+ this.native = native;
61
+ }
62
+ /**
63
+ * Stream index.
64
+ *
65
+ * Zero-based index of this stream in the format context.
66
+ * Used to identify packets belonging to this stream.
67
+ *
68
+ * Direct mapping to AVStream->index.
69
+ */
70
+ get index() {
71
+ return this.native.index;
72
+ }
73
+ /**
74
+ * Stream ID.
75
+ *
76
+ * Format-specific stream identifier.
77
+ * May be used by some formats for internal stream identification.
78
+ *
79
+ * Direct mapping to AVStream->id.
80
+ */
81
+ get id() {
82
+ return this.native.id;
83
+ }
84
+ set id(value) {
85
+ this.native.id = value;
86
+ }
87
+ /**
88
+ * Codec parameters.
89
+ *
90
+ * Contains essential codec configuration for this stream.
91
+ * Used to initialize decoders and describe stream properties.
92
+ * Reads defaults once the format context is closed or freed.
93
+ *
94
+ * Direct mapping to AVStream->codecpar.
95
+ */
96
+ get codecpar() {
97
+ // Return cached wrapper if we already have one
98
+ if (this._codecpar) {
99
+ return this._codecpar;
100
+ }
101
+ // Create and cache the wrapper
102
+ const params = Object.create(CodecParameters.prototype);
103
+ params.native = this.native.codecpar;
104
+ this._codecpar = params;
105
+ return params;
106
+ }
107
+ set codecpar(value) {
108
+ // Copy codec parameters to the stream
109
+ // The native binding handles the copying
110
+ this.native.codecpar = value.getNative();
111
+ // Clear the cache as the underlying parameters have changed
112
+ this._codecpar = undefined;
113
+ }
114
+ /**
115
+ * Stream time base.
116
+ *
117
+ * Unit of time for timestamps in this stream.
118
+ * All timestamps (PTS/DTS) are in units of this time base.
119
+ *
120
+ * Direct mapping to AVStream->time_base.
121
+ */
122
+ get timeBase() {
123
+ const tb = this.native.timeBase;
124
+ return new Rational(tb.num, tb.den);
125
+ }
126
+ set timeBase(value) {
127
+ this.native.timeBase = { num: value.num, den: value.den };
128
+ }
129
+ /**
130
+ * Start time.
131
+ *
132
+ * First timestamp of the stream in stream time base units.
133
+ * AV_NOPTS_VALUE if unknown.
134
+ *
135
+ * Direct mapping to AVStream->start_time.
136
+ */
137
+ get startTime() {
138
+ return this.native.startTime;
139
+ }
140
+ set startTime(value) {
141
+ this.native.startTime = value;
142
+ }
143
+ /**
144
+ * Stream duration.
145
+ *
146
+ * Total duration in stream time base units.
147
+ * AV_NOPTS_VALUE if unknown.
148
+ *
149
+ * Direct mapping to AVStream->duration.
150
+ */
151
+ get duration() {
152
+ return this.native.duration;
153
+ }
154
+ set duration(value) {
155
+ this.native.duration = value;
156
+ }
157
+ /**
158
+ * Number of frames.
159
+ *
160
+ * Total number of frames in this stream.
161
+ * 0 if unknown.
162
+ *
163
+ * Direct mapping to AVStream->nb_frames.
164
+ */
165
+ get nbFrames() {
166
+ return this.native.nbFrames;
167
+ }
168
+ set nbFrames(value) {
169
+ this.native.nbFrames = value;
170
+ }
171
+ /**
172
+ * Stream disposition flags.
173
+ *
174
+ * Combination of AV_DISPOSITION_* flags indicating stream properties
175
+ * (e.g., default, forced subtitles, visual impaired, etc.).
176
+ *
177
+ * Direct mapping to AVStream->disposition.
178
+ */
179
+ get disposition() {
180
+ return this.native.disposition;
181
+ }
182
+ set disposition(value) {
183
+ this.native.disposition = value;
184
+ }
185
+ /**
186
+ * Discard setting.
187
+ *
188
+ * Indicates which packets can be discarded during demuxing.
189
+ * Used to skip non-essential packets for performance.
190
+ *
191
+ * Direct mapping to AVStream->discard.
192
+ */
193
+ get discard() {
194
+ return this.native.discard;
195
+ }
196
+ set discard(value) {
197
+ this.native.discard = value;
198
+ }
199
+ /**
200
+ * Sample aspect ratio.
201
+ *
202
+ * Pixel aspect ratio for video streams.
203
+ * 0/1 if unknown or not applicable.
204
+ *
205
+ * Direct mapping to AVStream->sample_aspect_ratio.
206
+ */
207
+ get sampleAspectRatio() {
208
+ const sar = this.native.sampleAspectRatio;
209
+ return new Rational(sar.num || 0, sar.den || 1);
210
+ }
211
+ set sampleAspectRatio(value) {
212
+ this.native.sampleAspectRatio = { num: value.num, den: value.den };
213
+ }
214
+ /**
215
+ * Average frame rate.
216
+ *
217
+ * Average framerate of the stream.
218
+ * 0/1 if unknown or variable frame rate.
219
+ *
220
+ * Direct mapping to AVStream->avg_frame_rate.
221
+ */
222
+ get avgFrameRate() {
223
+ const fr = this.native.avgFrameRate;
224
+ // Handle 0/0 case (unknown frame rate in FFmpeg)
225
+ if (fr.den === 0) {
226
+ return new Rational(0, 1);
227
+ }
228
+ return new Rational(fr.num, fr.den);
229
+ }
230
+ set avgFrameRate(value) {
231
+ this.native.avgFrameRate = { num: value.num, den: value.den };
232
+ }
233
+ /**
234
+ * Real frame rate.
235
+ *
236
+ * Real base frame rate of the stream.
237
+ * This is the lowest common multiple of all frame rates in the stream.
238
+ *
239
+ * Direct mapping to AVStream->r_frame_rate.
240
+ */
241
+ get rFrameRate() {
242
+ const fr = this.native.rFrameRate;
243
+ // Handle 0/0 case (unknown frame rate in FFmpeg)
244
+ if (fr.den === 0) {
245
+ return new Rational(0, 1);
246
+ }
247
+ return new Rational(fr.num, fr.den);
248
+ }
249
+ set rFrameRate(value) {
250
+ this.native.rFrameRate = { num: value.num, den: value.den };
251
+ }
252
+ /**
253
+ * Number of bits for PTS wrap-around detection.
254
+ *
255
+ * Used for timestamp wrap-around correction in formats with limited timestamp bits.
256
+ * Common values: 33 (MPEG-TS), 31 (DVB), 64 (no wrapping).
257
+ *
258
+ * Direct mapping to AVStream->pts_wrap_bits.
259
+ */
260
+ get ptsWrapBits() {
261
+ return this.native.ptsWrapBits;
262
+ }
263
+ set ptsWrapBits(value) {
264
+ this.native.ptsWrapBits = value;
265
+ }
266
+ /**
267
+ * Stream metadata.
268
+ *
269
+ * Dictionary containing stream-specific metadata
270
+ * (e.g., language, title, encoder settings).
271
+ *
272
+ * Returns a copy of AVStream->metadata - mutating the returned Dictionary
273
+ * does not affect the stream. Assign it back to apply changes.
274
+ */
275
+ get metadata() {
276
+ const native = this.native.metadata;
277
+ if (!native) {
278
+ return null;
279
+ }
280
+ const dict = Object.create(Dictionary.prototype);
281
+ dict.native = native;
282
+ return dict;
283
+ }
284
+ set metadata(value) {
285
+ this.native.metadata = value?.getNative() ?? null;
286
+ }
287
+ /**
288
+ * Attached picture.
289
+ *
290
+ * For streams with AV_DISPOSITION_ATTACHED_PIC set,
291
+ * contains the attached picture (e.g., album art).
292
+ *
293
+ * Direct mapping to AVStream->attached_pic.
294
+ */
295
+ get attachedPic() {
296
+ const native = this.native.attachedPic;
297
+ if (!native) {
298
+ return null;
299
+ }
300
+ // The native getter refs the picture data into a new packet - the returned
301
+ // wrapper owns that ref (freed on GC, or free() to release earlier)
302
+ const packet = Object.create(Packet.prototype);
303
+ packet.native = native;
304
+ return packet;
305
+ }
306
+ /**
307
+ * Event flags.
308
+ *
309
+ * Flags indicating events that happened to the stream.
310
+ * Used for signaling format changes.
311
+ *
312
+ * Direct mapping to AVStream->event_flags.
313
+ */
314
+ get eventFlags() {
315
+ return this.native.eventFlags;
316
+ }
317
+ set eventFlags(value) {
318
+ this.native.eventFlags = value;
319
+ }
320
+ /**
321
+ * Get the codec parser attached to this stream.
322
+ *
323
+ * Returns the parser context if the stream has an active parser, null otherwise.
324
+ * Parsers are automatically created by FFmpeg for certain formats and codecs.
325
+ * Useful for accessing parser state like repeat_pict for interlaced video.
326
+ *
327
+ * Direct mapping to av_stream_get_parser().
328
+ *
329
+ * @returns Parser context or null if no parser attached
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * const parser = stream.parser;
334
+ * if (parser) {
335
+ * const fields = 1 + parser.repeatPict;
336
+ * console.log(`Frame uses ${fields} fields`);
337
+ * }
338
+ * ```
339
+ *
340
+ * @see {@link CodecParser} For parser details
341
+ */
342
+ get parser() {
343
+ // Not cached: the native getter returns a fresh object per access, so an
344
+ // identity-based cache can never hit
345
+ const native = this.native.parser;
346
+ if (!native) {
347
+ return null;
348
+ }
349
+ const parser = Object.create(CodecParser.prototype);
350
+ parser.native = native;
351
+ return parser;
352
+ }
353
+ /**
354
+ * Set stream event flags.
355
+ *
356
+ * Sets one or more event flags using bitwise OR. Allows setting multiple flags
357
+ * without manually performing bitwise operations.
358
+ *
359
+ * @param flags - One or more event flag values to set
360
+ *
361
+ * @example
362
+ * ```typescript
363
+ * import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED, AVSTREAM_EVENT_FLAG_NEW_PACKETS } from 'node-av/constants';
364
+ *
365
+ * // Set multiple event flags at once
366
+ * stream.setEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED, AVSTREAM_EVENT_FLAG_NEW_PACKETS);
367
+ * ```
368
+ *
369
+ * @see {@link clearEventFlags} To unset event flags
370
+ * @see {@link hasEventFlags} To check event flags
371
+ * @see {@link eventFlags} For direct event flag access
372
+ */
373
+ setEventFlags(...flags) {
374
+ for (const flag of flags) {
375
+ this.native.eventFlags = (this.native.eventFlags | flag);
376
+ }
377
+ }
378
+ /**
379
+ * Clear stream event flags.
380
+ *
381
+ * Clears one or more event flags using bitwise AND NOT. Allows clearing multiple
382
+ * flags without manually performing bitwise operations.
383
+ *
384
+ * @param flags - One or more event flag values to clear
385
+ *
386
+ * @example
387
+ * ```typescript
388
+ * import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED } from 'node-av/constants';
389
+ *
390
+ * // Clear specific event flag
391
+ * stream.clearEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED);
392
+ * ```
393
+ *
394
+ * @see {@link setEventFlags} To set event flags
395
+ * @see {@link hasEventFlags} To check event flags
396
+ * @see {@link eventFlags} For direct event flag access
397
+ */
398
+ clearEventFlags(...flags) {
399
+ for (const flag of flags) {
400
+ this.native.eventFlags = (this.native.eventFlags & ~flag);
401
+ }
402
+ }
403
+ /**
404
+ * Check if stream has specific event flags.
405
+ *
406
+ * Tests whether all specified event flags are set using bitwise AND.
407
+ *
408
+ * @param flags - One or more event flag values to check
409
+ *
410
+ * @returns true if all specified event flags are set, false otherwise
411
+ *
412
+ * @example
413
+ * ```typescript
414
+ * import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED } from 'node-av/constants';
415
+ *
416
+ * if (stream.hasEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED)) {
417
+ * console.log('Stream metadata was updated');
418
+ * }
419
+ * ```
420
+ *
421
+ * @see {@link setEventFlags} To set event flags
422
+ * @see {@link clearEventFlags} To unset event flags
423
+ * @see {@link eventFlags} For direct event flag access
424
+ */
425
+ hasEventFlags(...flags) {
426
+ for (const flag of flags) {
427
+ if ((this.native.eventFlags & flag) !== flag) {
428
+ return false;
429
+ }
430
+ }
431
+ return true;
432
+ }
433
+ /**
434
+ * Set stream disposition flags.
435
+ *
436
+ * Sets one or more disposition flags using bitwise OR. Allows setting multiple flags
437
+ * without manually performing bitwise operations.
438
+ *
439
+ * @param flags - One or more disposition flag values to set
440
+ *
441
+ * @example
442
+ * ```typescript
443
+ * import { AV_DISPOSITION_DEFAULT, AV_DISPOSITION_FORCED } from 'node-av/constants';
444
+ *
445
+ * // Set multiple disposition flags at once
446
+ * stream.setDisposition(AV_DISPOSITION_DEFAULT, AV_DISPOSITION_FORCED);
447
+ * ```
448
+ *
449
+ * @see {@link clearDisposition} To unset disposition flags
450
+ * @see {@link hasDisposition} To check disposition flags
451
+ * @see {@link disposition} For direct disposition flag access
452
+ */
453
+ setDisposition(...flags) {
454
+ for (const flag of flags) {
455
+ this.native.disposition = (this.native.disposition | flag);
456
+ }
457
+ }
458
+ /**
459
+ * Clear stream disposition flags.
460
+ *
461
+ * Clears one or more disposition flags using bitwise AND NOT. Allows clearing multiple
462
+ * flags without manually performing bitwise operations.
463
+ *
464
+ * @param flags - One or more disposition flag values to clear
465
+ *
466
+ * @example
467
+ * ```typescript
468
+ * import { AV_DISPOSITION_FORCED } from 'node-av/constants';
469
+ *
470
+ * // Clear specific disposition flag
471
+ * stream.clearDisposition(AV_DISPOSITION_FORCED);
472
+ * ```
473
+ *
474
+ * @see {@link setDisposition} To set disposition flags
475
+ * @see {@link hasDisposition} To check disposition flags
476
+ * @see {@link disposition} For direct disposition flag access
477
+ */
478
+ clearDisposition(...flags) {
479
+ for (const flag of flags) {
480
+ this.native.disposition = (this.native.disposition & ~flag);
481
+ }
482
+ }
483
+ /**
484
+ * Check if stream has specific disposition flags.
485
+ *
486
+ * Tests whether all specified disposition flags are set using bitwise AND.
487
+ *
488
+ * @param flags - One or more disposition flag values to check
489
+ *
490
+ * @returns true if all specified disposition flags are set, false otherwise
491
+ *
492
+ * @example
493
+ * ```typescript
494
+ * import { AV_DISPOSITION_DEFAULT } from 'node-av/constants';
495
+ *
496
+ * if (stream.hasDisposition(AV_DISPOSITION_DEFAULT)) {
497
+ * console.log('Stream is marked as default');
498
+ * }
499
+ * ```
500
+ *
501
+ * @see {@link setDisposition} To set disposition flags
502
+ * @see {@link clearDisposition} To unset disposition flags
503
+ * @see {@link disposition} For direct disposition flag access
504
+ */
505
+ hasDisposition(...flags) {
506
+ for (const flag of flags) {
507
+ if ((this.native.disposition & flag) !== flag) {
508
+ return false;
509
+ }
510
+ }
511
+ return true;
512
+ }
513
+ /**
514
+ * Get the underlying native Stream object.
515
+ *
516
+ * @returns The native Stream binding object
517
+ *
518
+ * @internal
519
+ */
520
+ getNative() {
521
+ return this.native;
522
+ }
523
+ }
524
+ //# sourceMappingURL=stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/lib/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,MAAM;IACT,MAAM,CAAe;IACrB,SAAS,CAAmB,CAAC,6BAA6B;IAElE;;;;OAIG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,EAAE;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,EAAE,CAAC,KAAa;QAClB,IAAI,CAAC,MAAM,CAAC,EA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