@revizly/node-av 5.2.2-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 (254) hide show
  1. package/BUILD_LINUX.md +61 -0
  2. package/LICENSE.md +22 -0
  3. package/README.md +662 -0
  4. package/build_mac_local.sh +69 -0
  5. package/dist/api/audio-frame-buffer.d.ts +205 -0
  6. package/dist/api/audio-frame-buffer.js +287 -0
  7. package/dist/api/audio-frame-buffer.js.map +1 -0
  8. package/dist/api/bitstream-filter.d.ts +820 -0
  9. package/dist/api/bitstream-filter.js +1242 -0
  10. package/dist/api/bitstream-filter.js.map +1 -0
  11. package/dist/api/constants.d.ts +44 -0
  12. package/dist/api/constants.js +45 -0
  13. package/dist/api/constants.js.map +1 -0
  14. package/dist/api/data/test_av1.ivf +0 -0
  15. package/dist/api/data/test_h264.h264 +0 -0
  16. package/dist/api/data/test_hevc.h265 +0 -0
  17. package/dist/api/data/test_mjpeg.mjpeg +0 -0
  18. package/dist/api/data/test_vp8.ivf +0 -0
  19. package/dist/api/data/test_vp9.ivf +0 -0
  20. package/dist/api/decoder.d.ts +1088 -0
  21. package/dist/api/decoder.js +1775 -0
  22. package/dist/api/decoder.js.map +1 -0
  23. package/dist/api/demuxer.d.ts +1219 -0
  24. package/dist/api/demuxer.js +2081 -0
  25. package/dist/api/demuxer.js.map +1 -0
  26. package/dist/api/device.d.ts +586 -0
  27. package/dist/api/device.js +961 -0
  28. package/dist/api/device.js.map +1 -0
  29. package/dist/api/encoder.d.ts +1132 -0
  30. package/dist/api/encoder.js +1988 -0
  31. package/dist/api/encoder.js.map +1 -0
  32. package/dist/api/filter-complex.d.ts +821 -0
  33. package/dist/api/filter-complex.js +1604 -0
  34. package/dist/api/filter-complex.js.map +1 -0
  35. package/dist/api/filter-presets.d.ts +1286 -0
  36. package/dist/api/filter-presets.js +2152 -0
  37. package/dist/api/filter-presets.js.map +1 -0
  38. package/dist/api/filter.d.ts +1234 -0
  39. package/dist/api/filter.js +1976 -0
  40. package/dist/api/filter.js.map +1 -0
  41. package/dist/api/fmp4-stream.d.ts +426 -0
  42. package/dist/api/fmp4-stream.js +739 -0
  43. package/dist/api/fmp4-stream.js.map +1 -0
  44. package/dist/api/hardware.d.ts +651 -0
  45. package/dist/api/hardware.js +1260 -0
  46. package/dist/api/hardware.js.map +1 -0
  47. package/dist/api/index.d.ts +17 -0
  48. package/dist/api/index.js +32 -0
  49. package/dist/api/index.js.map +1 -0
  50. package/dist/api/io-stream.d.ts +307 -0
  51. package/dist/api/io-stream.js +282 -0
  52. package/dist/api/io-stream.js.map +1 -0
  53. package/dist/api/muxer.d.ts +957 -0
  54. package/dist/api/muxer.js +2002 -0
  55. package/dist/api/muxer.js.map +1 -0
  56. package/dist/api/pipeline.d.ts +607 -0
  57. package/dist/api/pipeline.js +1145 -0
  58. package/dist/api/pipeline.js.map +1 -0
  59. package/dist/api/utilities/async-queue.d.ts +120 -0
  60. package/dist/api/utilities/async-queue.js +211 -0
  61. package/dist/api/utilities/async-queue.js.map +1 -0
  62. package/dist/api/utilities/audio-sample.d.ts +117 -0
  63. package/dist/api/utilities/audio-sample.js +112 -0
  64. package/dist/api/utilities/audio-sample.js.map +1 -0
  65. package/dist/api/utilities/channel-layout.d.ts +76 -0
  66. package/dist/api/utilities/channel-layout.js +80 -0
  67. package/dist/api/utilities/channel-layout.js.map +1 -0
  68. package/dist/api/utilities/electron-shared-texture.d.ts +328 -0
  69. package/dist/api/utilities/electron-shared-texture.js +503 -0
  70. package/dist/api/utilities/electron-shared-texture.js.map +1 -0
  71. package/dist/api/utilities/image.d.ts +207 -0
  72. package/dist/api/utilities/image.js +213 -0
  73. package/dist/api/utilities/image.js.map +1 -0
  74. package/dist/api/utilities/index.d.ts +12 -0
  75. package/dist/api/utilities/index.js +25 -0
  76. package/dist/api/utilities/index.js.map +1 -0
  77. package/dist/api/utilities/media-type.d.ts +49 -0
  78. package/dist/api/utilities/media-type.js +53 -0
  79. package/dist/api/utilities/media-type.js.map +1 -0
  80. package/dist/api/utilities/pixel-format.d.ts +89 -0
  81. package/dist/api/utilities/pixel-format.js +97 -0
  82. package/dist/api/utilities/pixel-format.js.map +1 -0
  83. package/dist/api/utilities/sample-format.d.ts +129 -0
  84. package/dist/api/utilities/sample-format.js +141 -0
  85. package/dist/api/utilities/sample-format.js.map +1 -0
  86. package/dist/api/utilities/scheduler.d.ts +138 -0
  87. package/dist/api/utilities/scheduler.js +98 -0
  88. package/dist/api/utilities/scheduler.js.map +1 -0
  89. package/dist/api/utilities/streaming.d.ts +186 -0
  90. package/dist/api/utilities/streaming.js +309 -0
  91. package/dist/api/utilities/streaming.js.map +1 -0
  92. package/dist/api/utilities/timestamp.d.ts +193 -0
  93. package/dist/api/utilities/timestamp.js +206 -0
  94. package/dist/api/utilities/timestamp.js.map +1 -0
  95. package/dist/api/utilities/whisper-model.d.ts +310 -0
  96. package/dist/api/utilities/whisper-model.js +528 -0
  97. package/dist/api/utilities/whisper-model.js.map +1 -0
  98. package/dist/api/utils.d.ts +19 -0
  99. package/dist/api/utils.js +39 -0
  100. package/dist/api/utils.js.map +1 -0
  101. package/dist/api/whisper.d.ts +324 -0
  102. package/dist/api/whisper.js +362 -0
  103. package/dist/api/whisper.js.map +1 -0
  104. package/dist/constants/channel-layouts.d.ts +53 -0
  105. package/dist/constants/channel-layouts.js +57 -0
  106. package/dist/constants/channel-layouts.js.map +1 -0
  107. package/dist/constants/constants.d.ts +2325 -0
  108. package/dist/constants/constants.js +1887 -0
  109. package/dist/constants/constants.js.map +1 -0
  110. package/dist/constants/decoders.d.ts +633 -0
  111. package/dist/constants/decoders.js +641 -0
  112. package/dist/constants/decoders.js.map +1 -0
  113. package/dist/constants/encoders.d.ts +295 -0
  114. package/dist/constants/encoders.js +308 -0
  115. package/dist/constants/encoders.js.map +1 -0
  116. package/dist/constants/hardware.d.ts +26 -0
  117. package/dist/constants/hardware.js +27 -0
  118. package/dist/constants/hardware.js.map +1 -0
  119. package/dist/constants/index.d.ts +5 -0
  120. package/dist/constants/index.js +6 -0
  121. package/dist/constants/index.js.map +1 -0
  122. package/dist/ffmpeg/index.d.ts +99 -0
  123. package/dist/ffmpeg/index.js +115 -0
  124. package/dist/ffmpeg/index.js.map +1 -0
  125. package/dist/ffmpeg/utils.d.ts +31 -0
  126. package/dist/ffmpeg/utils.js +68 -0
  127. package/dist/ffmpeg/utils.js.map +1 -0
  128. package/dist/ffmpeg/version.d.ts +6 -0
  129. package/dist/ffmpeg/version.js +7 -0
  130. package/dist/ffmpeg/version.js.map +1 -0
  131. package/dist/index.d.ts +4 -0
  132. package/dist/index.js +9 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/lib/audio-fifo.d.ts +399 -0
  135. package/dist/lib/audio-fifo.js +431 -0
  136. package/dist/lib/audio-fifo.js.map +1 -0
  137. package/dist/lib/binding.d.ts +228 -0
  138. package/dist/lib/binding.js +60 -0
  139. package/dist/lib/binding.js.map +1 -0
  140. package/dist/lib/bitstream-filter-context.d.ts +379 -0
  141. package/dist/lib/bitstream-filter-context.js +441 -0
  142. package/dist/lib/bitstream-filter-context.js.map +1 -0
  143. package/dist/lib/bitstream-filter.d.ts +140 -0
  144. package/dist/lib/bitstream-filter.js +154 -0
  145. package/dist/lib/bitstream-filter.js.map +1 -0
  146. package/dist/lib/codec-context.d.ts +1071 -0
  147. package/dist/lib/codec-context.js +1354 -0
  148. package/dist/lib/codec-context.js.map +1 -0
  149. package/dist/lib/codec-parameters.d.ts +616 -0
  150. package/dist/lib/codec-parameters.js +761 -0
  151. package/dist/lib/codec-parameters.js.map +1 -0
  152. package/dist/lib/codec-parser.d.ts +201 -0
  153. package/dist/lib/codec-parser.js +213 -0
  154. package/dist/lib/codec-parser.js.map +1 -0
  155. package/dist/lib/codec.d.ts +586 -0
  156. package/dist/lib/codec.js +713 -0
  157. package/dist/lib/codec.js.map +1 -0
  158. package/dist/lib/device.d.ts +291 -0
  159. package/dist/lib/device.js +324 -0
  160. package/dist/lib/device.js.map +1 -0
  161. package/dist/lib/dictionary.d.ts +333 -0
  162. package/dist/lib/dictionary.js +372 -0
  163. package/dist/lib/dictionary.js.map +1 -0
  164. package/dist/lib/error.d.ts +242 -0
  165. package/dist/lib/error.js +303 -0
  166. package/dist/lib/error.js.map +1 -0
  167. package/dist/lib/fifo.d.ts +416 -0
  168. package/dist/lib/fifo.js +453 -0
  169. package/dist/lib/fifo.js.map +1 -0
  170. package/dist/lib/filter-context.d.ts +712 -0
  171. package/dist/lib/filter-context.js +789 -0
  172. package/dist/lib/filter-context.js.map +1 -0
  173. package/dist/lib/filter-graph-segment.d.ts +160 -0
  174. package/dist/lib/filter-graph-segment.js +171 -0
  175. package/dist/lib/filter-graph-segment.js.map +1 -0
  176. package/dist/lib/filter-graph.d.ts +641 -0
  177. package/dist/lib/filter-graph.js +704 -0
  178. package/dist/lib/filter-graph.js.map +1 -0
  179. package/dist/lib/filter-inout.d.ts +198 -0
  180. package/dist/lib/filter-inout.js +257 -0
  181. package/dist/lib/filter-inout.js.map +1 -0
  182. package/dist/lib/filter.d.ts +243 -0
  183. package/dist/lib/filter.js +272 -0
  184. package/dist/lib/filter.js.map +1 -0
  185. package/dist/lib/format-context.d.ts +1254 -0
  186. package/dist/lib/format-context.js +1379 -0
  187. package/dist/lib/format-context.js.map +1 -0
  188. package/dist/lib/frame-utils.d.ts +116 -0
  189. package/dist/lib/frame-utils.js +98 -0
  190. package/dist/lib/frame-utils.js.map +1 -0
  191. package/dist/lib/frame.d.ts +1222 -0
  192. package/dist/lib/frame.js +1435 -0
  193. package/dist/lib/frame.js.map +1 -0
  194. package/dist/lib/hardware-device-context.d.ts +362 -0
  195. package/dist/lib/hardware-device-context.js +383 -0
  196. package/dist/lib/hardware-device-context.js.map +1 -0
  197. package/dist/lib/hardware-frames-context.d.ts +419 -0
  198. package/dist/lib/hardware-frames-context.js +477 -0
  199. package/dist/lib/hardware-frames-context.js.map +1 -0
  200. package/dist/lib/index.d.ts +35 -0
  201. package/dist/lib/index.js +60 -0
  202. package/dist/lib/index.js.map +1 -0
  203. package/dist/lib/input-format.d.ts +249 -0
  204. package/dist/lib/input-format.js +306 -0
  205. package/dist/lib/input-format.js.map +1 -0
  206. package/dist/lib/io-context.d.ts +696 -0
  207. package/dist/lib/io-context.js +769 -0
  208. package/dist/lib/io-context.js.map +1 -0
  209. package/dist/lib/log.d.ts +174 -0
  210. package/dist/lib/log.js +184 -0
  211. package/dist/lib/log.js.map +1 -0
  212. package/dist/lib/native-types.d.ts +946 -0
  213. package/dist/lib/native-types.js +2 -0
  214. package/dist/lib/native-types.js.map +1 -0
  215. package/dist/lib/option.d.ts +927 -0
  216. package/dist/lib/option.js +1583 -0
  217. package/dist/lib/option.js.map +1 -0
  218. package/dist/lib/output-format.d.ts +180 -0
  219. package/dist/lib/output-format.js +213 -0
  220. package/dist/lib/output-format.js.map +1 -0
  221. package/dist/lib/packet.d.ts +501 -0
  222. package/dist/lib/packet.js +590 -0
  223. package/dist/lib/packet.js.map +1 -0
  224. package/dist/lib/rational.d.ts +251 -0
  225. package/dist/lib/rational.js +278 -0
  226. package/dist/lib/rational.js.map +1 -0
  227. package/dist/lib/software-resample-context.d.ts +552 -0
  228. package/dist/lib/software-resample-context.js +592 -0
  229. package/dist/lib/software-resample-context.js.map +1 -0
  230. package/dist/lib/software-scale-context.d.ts +344 -0
  231. package/dist/lib/software-scale-context.js +366 -0
  232. package/dist/lib/software-scale-context.js.map +1 -0
  233. package/dist/lib/stream.d.ts +379 -0
  234. package/dist/lib/stream.js +526 -0
  235. package/dist/lib/stream.js.map +1 -0
  236. package/dist/lib/sync-queue.d.ts +179 -0
  237. package/dist/lib/sync-queue.js +197 -0
  238. package/dist/lib/sync-queue.js.map +1 -0
  239. package/dist/lib/types.d.ts +34 -0
  240. package/dist/lib/types.js +2 -0
  241. package/dist/lib/types.js.map +1 -0
  242. package/dist/lib/utilities.d.ts +1127 -0
  243. package/dist/lib/utilities.js +1225 -0
  244. package/dist/lib/utilities.js.map +1 -0
  245. package/dist/utils/electron.d.ts +49 -0
  246. package/dist/utils/electron.js +63 -0
  247. package/dist/utils/electron.js.map +1 -0
  248. package/dist/utils/index.d.ts +4 -0
  249. package/dist/utils/index.js +5 -0
  250. package/dist/utils/index.js.map +1 -0
  251. package/install/check.js +121 -0
  252. package/install/ffmpeg.js +66 -0
  253. package/jellyfin-ffmpeg.patch +181 -0
  254. package/package.json +129 -0
@@ -0,0 +1,704 @@
1
+ import { bindings } from './binding.js';
2
+ import { FilterContext } from './filter-context.js';
3
+ import { FilterGraphSegment } from './filter-graph-segment.js';
4
+ import { OptionMember } from './option.js';
5
+ /**
6
+ * Filter graph for audio/video processing pipelines.
7
+ *
8
+ * Manages a collection of interconnected filters forming a processing pipeline.
9
+ * Filters are connected through their input/output pads to create complex
10
+ * audio/video transformations. Supports both simple linear chains and complex
11
+ * graphs with multiple inputs/outputs. Essential for effects, format conversions,
12
+ * scaling, and other media processing operations.
13
+ *
14
+ * Direct mapping to FFmpeg's AVFilterGraph.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { FilterGraph, Filter, FilterInOut, FFmpegError } from 'node-av';
19
+ *
20
+ * // Create and configure filter graph
21
+ * const graph = new FilterGraph();
22
+ * graph.alloc();
23
+ *
24
+ * // Create filters
25
+ * const bufferSrc = graph.createFilter(
26
+ * Filter.getByName('buffer')!,
27
+ * 'src',
28
+ * 'video_size=1920x1080:pix_fmt=yuv420p'
29
+ * );
30
+ *
31
+ * const scale = graph.createFilter(
32
+ * Filter.getByName('scale')!,
33
+ * 'scale',
34
+ * '640:480'
35
+ * );
36
+ *
37
+ * const bufferSink = graph.createFilter(
38
+ * Filter.getByName('buffersink')!,
39
+ * 'sink'
40
+ * );
41
+ *
42
+ * // Link filters
43
+ * bufferSrc.link(0, scale, 0);
44
+ * scale.link(0, bufferSink, 0);
45
+ *
46
+ * // Configure graph
47
+ * const ret = await graph.config();
48
+ * FFmpegError.throwIfError(ret, 'config');
49
+ *
50
+ * // Parse filter string
51
+ * const ret2 = graph.parse2('[in]scale=640:480[out]');
52
+ * FFmpegError.throwIfError(ret2, 'parse2');
53
+ * ```
54
+ *
55
+ * @see [AVFilterGraph](https://ffmpeg.org/doxygen/trunk/structAVFilterGraph.html) - FFmpeg Doxygen
56
+ * @see {@link FilterContext} For filter instances
57
+ * @see {@link Filter} For filter descriptors
58
+ */
59
+ export class FilterGraph extends OptionMember {
60
+ constructor() {
61
+ super(new bindings.FilterGraph());
62
+ }
63
+ /**
64
+ * Number of filters in the graph.
65
+ *
66
+ * Total count of filter contexts in this graph.
67
+ *
68
+ * Direct mapping to AVFilterGraph->nb_filters.
69
+ */
70
+ get nbFilters() {
71
+ return this.native.nbFilters;
72
+ }
73
+ /**
74
+ * Array of filters in the graph.
75
+ *
76
+ * All filter contexts currently in the graph.
77
+ *
78
+ * Direct mapping to AVFilterGraph->filters.
79
+ */
80
+ get filters() {
81
+ const natives = this.native.filters;
82
+ if (!natives)
83
+ return null;
84
+ return natives.map((native) => new FilterContext(native));
85
+ }
86
+ /**
87
+ * Threading type for graph execution.
88
+ *
89
+ * Controls how filters are executed in parallel.
90
+ * Use AVFILTER_THREAD_SLICE for slice-based threading.
91
+ *
92
+ * Direct mapping to AVFilterGraph->thread_type.
93
+ */
94
+ get threadType() {
95
+ return this.native.threadType;
96
+ }
97
+ set threadType(value) {
98
+ this.native.threadType = value;
99
+ }
100
+ /**
101
+ * Number of threads for parallel processing.
102
+ *
103
+ * Number of threads used for filter execution.
104
+ * 0 means automatic detection.
105
+ *
106
+ * Direct mapping to AVFilterGraph->nb_threads.
107
+ */
108
+ get nbThreads() {
109
+ return this.native.nbThreads;
110
+ }
111
+ set nbThreads(value) {
112
+ this.native.nbThreads = value;
113
+ }
114
+ /**
115
+ * Swscale options for scale filter.
116
+ *
117
+ * Options string passed to swscale for scaling operations.
118
+ *
119
+ * Direct mapping to AVFilterGraph->scale_sws_opts.
120
+ */
121
+ get scaleSwsOpts() {
122
+ return this.native.scaleSwsOpts;
123
+ }
124
+ set scaleSwsOpts(value) {
125
+ this.native.scaleSwsOpts = value;
126
+ }
127
+ /**
128
+ * Swresample options for aresample filter.
129
+ *
130
+ * Options string passed to swresample for audio resampling operations.
131
+ *
132
+ * Direct mapping to AVFilterGraph->aresample_swr_opts.
133
+ */
134
+ get aresampleSwrOpts() {
135
+ return this.native.aresampleSwrOpts;
136
+ }
137
+ set aresampleSwrOpts(value) {
138
+ this.native.aresampleSwrOpts = value;
139
+ }
140
+ /**
141
+ * Allocate a filter graph.
142
+ *
143
+ * Allocates memory for the filter graph structure.
144
+ * Must be called before using the graph.
145
+ *
146
+ * Direct mapping to avfilter_graph_alloc().
147
+ *
148
+ * @throws {Error} If allocation fails (ENOMEM)
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * const graph = new FilterGraph();
153
+ * graph.alloc();
154
+ * // Graph is now ready for filter creation
155
+ * ```
156
+ *
157
+ * @see {@link free} To deallocate
158
+ * @see {@link config} To configure after building
159
+ */
160
+ alloc() {
161
+ this.native.alloc();
162
+ }
163
+ /**
164
+ * Free the filter graph.
165
+ *
166
+ * Releases all resources associated with the graph,
167
+ * including all contained filters.
168
+ *
169
+ * Direct mapping to avfilter_graph_free().
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * graph.free();
174
+ * // Graph is now invalid
175
+ * ```
176
+ *
177
+ * @see {@link alloc} To allocate
178
+ * @see {@link Symbol.dispose} For automatic cleanup
179
+ */
180
+ free() {
181
+ this.native.free();
182
+ }
183
+ /**
184
+ * Create and initialize a filter in the graph.
185
+ *
186
+ * Creates a new filter context, adds it to the graph,
187
+ * and initializes it with the provided arguments.
188
+ *
189
+ * Direct mapping to avfilter_graph_create_filter().
190
+ *
191
+ * @param filter - Filter descriptor to instantiate
192
+ *
193
+ * @param name - Name for this filter instance
194
+ *
195
+ * @param args - Initialization arguments (filter-specific)
196
+ *
197
+ * @returns Created filter context, or null on failure
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * // Create a scale filter
202
+ * const scale = graph.createFilter(
203
+ * Filter.getByName('scale')!,
204
+ * 'scaler',
205
+ * '640:480' // width:height
206
+ * );
207
+ *
208
+ * // Create a buffer source
209
+ * const src = graph.createFilter(
210
+ * Filter.getByName('buffer')!,
211
+ * 'source',
212
+ * 'video_size=1920x1080:pix_fmt=yuv420p:time_base=1/25'
213
+ * );
214
+ * ```
215
+ *
216
+ * @see {@link allocFilter} To allocate without initializing
217
+ * @see {@link getFilter} To retrieve by name
218
+ */
219
+ createFilter(filter, name, args = null) {
220
+ const native = this.native.createFilter(filter.getNative(), name, args ?? null);
221
+ return native ? new FilterContext(native) : null;
222
+ }
223
+ /**
224
+ * Allocate a filter in the graph.
225
+ *
226
+ * Creates a new filter context and adds it to the graph,
227
+ * but does not initialize it. Call init() on the context afterwards.
228
+ *
229
+ * Direct mapping to avfilter_graph_alloc_filter().
230
+ *
231
+ * @param filter - Filter descriptor to instantiate
232
+ *
233
+ * @param name - Name for this filter instance
234
+ *
235
+ * @returns Allocated filter context, or null on failure
236
+ *
237
+ * @example
238
+ * ```typescript
239
+ * import { FFmpegError } from 'node-av';
240
+ *
241
+ * const filter = graph.allocFilter(
242
+ * Filter.getByName('scale')!,
243
+ * 'scaler'
244
+ * );
245
+ * if (filter) {
246
+ * // Initialize separately
247
+ * const ret = filter.initStr('640:480');
248
+ * FFmpegError.throwIfError(ret, 'initStr');
249
+ * }
250
+ * ```
251
+ *
252
+ * @see {@link createFilter} To allocate and initialize
253
+ */
254
+ allocFilter(filter, name) {
255
+ const native = this.native.allocFilter(filter.getNative(), name);
256
+ return native ? new FilterContext(native) : null;
257
+ }
258
+ /**
259
+ * Get a filter by name from the graph.
260
+ *
261
+ * Retrieves an existing filter context by its instance name.
262
+ *
263
+ * Direct mapping to avfilter_graph_get_filter().
264
+ *
265
+ * @param name - Name of the filter instance
266
+ *
267
+ * @returns Filter context if found, null otherwise
268
+ *
269
+ * @example
270
+ * ```typescript
271
+ * // Find a previously created filter
272
+ * const scaler = graph.getFilter('scaler');
273
+ * if (scaler) {
274
+ * console.log('Found scaler filter');
275
+ * }
276
+ * ```
277
+ *
278
+ * @see {@link createFilter} To create new filters
279
+ */
280
+ getFilter(name) {
281
+ const native = this.native.getFilter(name);
282
+ return native ? new FilterContext(native) : null;
283
+ }
284
+ /**
285
+ * Configure the filter graph.
286
+ *
287
+ * Validates and finalizes the graph configuration.
288
+ * Must be called after all filters are created and linked.
289
+ *
290
+ * Direct mapping to avfilter_graph_config().
291
+ *
292
+ * @returns 0 on success, negative AVERROR on error:
293
+ * - AVERROR_EINVAL: Invalid graph configuration
294
+ * - AVERROR_ENOMEM: Memory allocation failure
295
+ *
296
+ * @example
297
+ * ```typescript
298
+ * import { FFmpegError } from 'node-av';
299
+ *
300
+ * // Build graph...
301
+ * // Link filters...
302
+ *
303
+ * // Configure the complete graph
304
+ * const ret = await graph.config();
305
+ * FFmpegError.throwIfError(ret, 'config');
306
+ * // Graph is now ready for processing
307
+ * ```
308
+ *
309
+ * @see {@link validate} To check configuration
310
+ */
311
+ async config() {
312
+ return await this.native.config();
313
+ }
314
+ /**
315
+ * Configure the filter graph synchronously.
316
+ * Synchronous version of config.
317
+ *
318
+ * Validates and finalizes the graph structure after all filters
319
+ * have been added and connected. Must be called before processing.
320
+ *
321
+ * Direct mapping to avfilter_graph_config().
322
+ *
323
+ * @returns 0 on success, negative AVERROR on error:
324
+ * - AVERROR_EINVAL: Invalid graph structure
325
+ * - AVERROR_ENOMEM: Memory allocation failure
326
+ *
327
+ * @example
328
+ * ```typescript
329
+ * import { FFmpegError } from 'node-av';
330
+ *
331
+ * // Configure graph after building
332
+ * const ret = graph.configSync();
333
+ * FFmpegError.throwIfError(ret, 'configSync');
334
+ * // Graph is now ready for processing
335
+ * ```
336
+ *
337
+ * @see {@link config} For async version
338
+ */
339
+ configSync() {
340
+ return this.native.configSync();
341
+ }
342
+ /**
343
+ * Parse a filter graph description.
344
+ *
345
+ * Parses a textual representation of a filter graph and adds
346
+ * filters to this graph. Handles labeled inputs and outputs.
347
+ *
348
+ * Direct mapping to avfilter_graph_parse().
349
+ *
350
+ * @param filters - Filter graph description string
351
+ *
352
+ * @param inputs - Linked list of graph inputs
353
+ *
354
+ * @param outputs - Linked list of graph outputs
355
+ *
356
+ * @returns 0 on success, negative AVERROR on error:
357
+ * - AVERROR_EINVAL: Parse error
358
+ * - AVERROR_ENOMEM: Memory allocation failure
359
+ *
360
+ * @example
361
+ * ```typescript
362
+ * import { FFmpegError, FilterInOut } from 'node-av';
363
+ *
364
+ * const inputs = FilterInOut.createList([
365
+ * { name: 'in', filterCtx: bufferSrc, padIdx: 0 }
366
+ * ]);
367
+ * const outputs = FilterInOut.createList([
368
+ * { name: 'out', filterCtx: bufferSink, padIdx: 0 }
369
+ * ]);
370
+ *
371
+ * const ret = graph.parse(
372
+ * '[in]scale=640:480,format=yuv420p[out]',
373
+ * inputs,
374
+ * outputs
375
+ * );
376
+ * FFmpegError.throwIfError(ret, 'parse');
377
+ * ```
378
+ *
379
+ * @see {@link parse2} For simpler syntax
380
+ * @see {@link parsePtr} For alternative parsing
381
+ */
382
+ parse(filters, inputs, outputs) {
383
+ return this.native.parse(filters, inputs ? inputs.getNative() : null, outputs ? outputs.getNative() : null);
384
+ }
385
+ /**
386
+ * Parse a filter graph description (simplified).
387
+ *
388
+ * Parses a textual filter description with automatic input/output handling.
389
+ * Simpler than parse() but less flexible.
390
+ *
391
+ * Direct mapping to avfilter_graph_parse2().
392
+ *
393
+ * @param filters - Filter graph description string
394
+ *
395
+ * @returns 0 on success, negative AVERROR on error:
396
+ * - AVERROR_EINVAL: Parse error
397
+ * - AVERROR_ENOMEM: Memory allocation failure
398
+ *
399
+ * @example
400
+ * ```typescript
401
+ * import { FFmpegError } from 'node-av';
402
+ *
403
+ * // Parse a simple filter chain
404
+ * const ret = graph.parse2(
405
+ * 'scale=640:480,format=yuv420p'
406
+ * );
407
+ * FFmpegError.throwIfError(ret, 'parse2');
408
+ * ```
409
+ *
410
+ * @see {@link parse} For labeled inputs/outputs
411
+ */
412
+ parse2(filters) {
413
+ return this.native.parse2(filters);
414
+ }
415
+ /**
416
+ * Parse a filter graph description with pointer.
417
+ *
418
+ * Alternative parsing method with different parameter handling.
419
+ *
420
+ * Direct mapping to avfilter_graph_parse_ptr().
421
+ *
422
+ * @param filters - Filter graph description string
423
+ *
424
+ * @param inputs - Optional linked list of inputs
425
+ *
426
+ * @param outputs - Optional linked list of outputs
427
+ *
428
+ * @returns 0 on success, negative AVERROR on error:
429
+ * - AVERROR_EINVAL: Parse error
430
+ * - AVERROR_ENOMEM: Memory allocation failure
431
+ *
432
+ * @example
433
+ * ```typescript
434
+ * import { FFmpegError } from 'node-av';
435
+ *
436
+ * const ret = graph.parsePtr(
437
+ * '[in]scale=w=640:h=480[out]'
438
+ * );
439
+ * FFmpegError.throwIfError(ret, 'parsePtr');
440
+ * ```
441
+ *
442
+ * @see {@link parse} For standard parsing
443
+ * @see {@link parse2} For simplified parsing
444
+ */
445
+ parsePtr(filters, inputs, outputs) {
446
+ return this.native.parsePtr(filters, inputs ? inputs.getNative() : null, outputs ? outputs.getNative() : null);
447
+ }
448
+ /**
449
+ * Parse a filter graph into a segment.
450
+ *
451
+ * Parses a textual filter description and returns a segment object.
452
+ * The segment separates parsing from initialization, allowing filter
453
+ * contexts to be configured before initialization.
454
+ *
455
+ * Direct mapping to avfilter_graph_segment_parse().
456
+ *
457
+ * @param filters - Filter graph description string
458
+ *
459
+ * @param flags - Parsing flags (default: 0)
460
+ *
461
+ * @returns FilterGraphSegment instance or null on error
462
+ *
463
+ * @example
464
+ * ```typescript
465
+ * import { FFmpegError } from 'node-av';
466
+ *
467
+ * const segment = graph.segmentParse('scale=640:480');
468
+ * if (!segment) {
469
+ * throw new Error('Failed to parse filter');
470
+ * }
471
+ *
472
+ * // Create and configure filters
473
+ * FFmpegError.throwIfError(segment.createFilters(), 'createFilters');
474
+ * FFmpegError.throwIfError(segment.applyOpts(), 'applyOpts');
475
+ * FFmpegError.throwIfError(segment.apply(inputs, outputs), 'apply');
476
+ *
477
+ * segment.free();
478
+ * ```
479
+ *
480
+ * @see {@link FilterGraphSegment} For segment operations
481
+ * @see {@link parse} For standard parsing
482
+ */
483
+ segmentParse(filters, flags = 0) {
484
+ const native = this.native.segmentParse(filters, flags);
485
+ return native ? new FilterGraphSegment(native) : null;
486
+ }
487
+ /**
488
+ * Validate the filter graph configuration.
489
+ *
490
+ * Checks if the graph is valid and properly configured.
491
+ * Does not finalize the graph like config() does.
492
+ *
493
+ * @returns 0 on success, negative AVERROR on error:
494
+ * - AVERROR_EINVAL: Invalid configuration
495
+ *
496
+ * @example
497
+ * ```typescript
498
+ * import { FFmpegError } from 'node-av';
499
+ *
500
+ * const ret = graph.validate();
501
+ * FFmpegError.throwIfError(ret, 'validate');
502
+ * ```
503
+ *
504
+ * @see {@link config} To configure and finalize
505
+ */
506
+ validate() {
507
+ return this.native.validate();
508
+ }
509
+ /**
510
+ * Request a frame from the oldest sink.
511
+ *
512
+ * Requests that a frame be output from the oldest sink in the graph.
513
+ * Used to drive the filter graph processing.
514
+ *
515
+ * Direct mapping to avfilter_graph_request_oldest().
516
+ *
517
+ * @returns 0 on success, negative AVERROR on error:
518
+ * - AVERROR_EOF: End of stream reached
519
+ * - AVERROR_EAGAIN: Need more input
520
+ *
521
+ * @example
522
+ * ```typescript
523
+ * import { FFmpegError } from 'node-av';
524
+ * import { AVERROR_EOF, AVERROR_EAGAIN } from 'node-av/constants';
525
+ *
526
+ * const ret = await graph.requestOldest();
527
+ * if (ret === AVERROR_EOF) {
528
+ * // No more frames
529
+ * } else if (ret === AVERROR_EAGAIN) {
530
+ * // Need to provide more input
531
+ * } else {
532
+ * FFmpegError.throwIfError(ret, 'requestOldest');
533
+ * }
534
+ * ```
535
+ */
536
+ async requestOldest() {
537
+ return await this.native.requestOldest();
538
+ }
539
+ /**
540
+ * Request the oldest queued frame from filters synchronously.
541
+ * Synchronous version of requestOldest.
542
+ *
543
+ * Requests a frame from the oldest sink in the graph.
544
+ * Used for pulling frames through the filter pipeline.
545
+ *
546
+ * Direct mapping to avfilter_graph_request_oldest().
547
+ *
548
+ * @returns 0 on success, negative AVERROR on error:
549
+ * - AVERROR_EOF: No more frames
550
+ * - AVERROR_EAGAIN: Need more input
551
+ *
552
+ * @example
553
+ * ```typescript
554
+ * import { FFmpegError } from 'node-av';
555
+ * import { AVERROR_EOF, AVERROR_EAGAIN } from 'node-av/constants';
556
+ *
557
+ * // Pull frames through the graph
558
+ * const ret = graph.requestOldestSync();
559
+ * if (ret === AVERROR_EOF) {
560
+ * // All frames processed
561
+ * } else if (ret === AVERROR_EAGAIN) {
562
+ * // Need more input frames
563
+ * } else {
564
+ * FFmpegError.throwIfError(ret, 'requestOldestSync');
565
+ * }
566
+ * ```
567
+ *
568
+ * @see {@link requestOldest} For async version
569
+ */
570
+ requestOldestSync() {
571
+ return this.native.requestOldestSync();
572
+ }
573
+ /**
574
+ * Dump the filter graph to a string.
575
+ *
576
+ * Returns a textual representation of the graph structure.
577
+ * Useful for debugging and visualization.
578
+ *
579
+ * Direct mapping to avfilter_graph_dump().
580
+ *
581
+ * @returns Graph description string, or null on failure
582
+ *
583
+ * @example
584
+ * ```typescript
585
+ * const graphStr = graph.dump();
586
+ * if (graphStr) {
587
+ * console.log('Graph structure:');
588
+ * console.log(graphStr);
589
+ * }
590
+ * ```
591
+ */
592
+ dump() {
593
+ return this.native.dump();
594
+ }
595
+ /**
596
+ * Send a command to filters in the graph.
597
+ *
598
+ * Sends a command to one or more filters for immediate execution.
599
+ * Target can be a specific filter name or "all" for all filters.
600
+ *
601
+ * Direct mapping to avfilter_graph_send_command().
602
+ *
603
+ * @param target - Filter name or "all"
604
+ *
605
+ * @param cmd - Command to send
606
+ *
607
+ * @param arg - Command argument
608
+ *
609
+ * @param flags - Command flags
610
+ *
611
+ * @returns Error code or response object
612
+ *
613
+ * @example
614
+ * ```typescript
615
+ * // Send command to specific filter
616
+ * const result = graph.sendCommand(
617
+ * 'volume',
618
+ * 'volume',
619
+ * '0.5'
620
+ * );
621
+ *
622
+ * // Send to all filters
623
+ * const result2 = graph.sendCommand(
624
+ * 'all',
625
+ * 'enable',
626
+ * 'timeline'
627
+ * );
628
+ * ```
629
+ *
630
+ * @see {@link queueCommand} For delayed execution
631
+ */
632
+ sendCommand(target, cmd, arg, flags) {
633
+ return this.native.sendCommand(target, cmd, arg, flags);
634
+ }
635
+ /**
636
+ * Queue a command for delayed execution.
637
+ *
638
+ * Schedules a command to be executed at a specific timestamp.
639
+ * The command is executed when the filter processes a frame with that timestamp.
640
+ *
641
+ * Direct mapping to avfilter_graph_queue_command().
642
+ *
643
+ * @param target - Filter name or "all"
644
+ *
645
+ * @param cmd - Command to queue
646
+ *
647
+ * @param arg - Command argument
648
+ *
649
+ * @param ts - Timestamp for execution
650
+ *
651
+ * @param flags - Command flags
652
+ *
653
+ * @returns 0 on success, negative AVERROR on error
654
+ *
655
+ * @example
656
+ * ```typescript
657
+ * import { FFmpegError } from 'node-av';
658
+ *
659
+ * // Queue volume change at 5 seconds
660
+ * const ret = graph.queueCommand(
661
+ * 'volume',
662
+ * 'volume',
663
+ * '0.2',
664
+ * 5000000, // microseconds
665
+ * 0
666
+ * );
667
+ * FFmpegError.throwIfError(ret, 'queueCommand');
668
+ * ```
669
+ *
670
+ * @see {@link sendCommand} For immediate execution
671
+ */
672
+ queueCommand(target, cmd, arg, ts, flags) {
673
+ return this.native.queueCommand(target, cmd, arg, ts, flags);
674
+ }
675
+ /**
676
+ * Get the underlying native FilterGraph object.
677
+ *
678
+ * @returns The native FilterGraph binding object
679
+ *
680
+ * @internal
681
+ */
682
+ getNative() {
683
+ return this.native;
684
+ }
685
+ /**
686
+ * Dispose of the filter graph.
687
+ *
688
+ * Implements the Disposable interface for automatic cleanup.
689
+ * Equivalent to calling free().
690
+ *
691
+ * @example
692
+ * ```typescript
693
+ * {
694
+ * using graph = new FilterGraph();
695
+ * graph.alloc();
696
+ * // Build and use graph...
697
+ * } // Automatically freed when leaving scope
698
+ * ```
699
+ */
700
+ [Symbol.dispose]() {
701
+ this.native[Symbol.dispose]();
702
+ }
703
+ }
704
+ //# sourceMappingURL=filter-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-graph.js","sourceRoot":"","sources":["../../src/lib/filter-graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,OAAO,WAAY,SAAQ,YAA+B;IAC9D;QACE,KAAK,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,IAAI,OAAO;QACT,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACpC,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,IAAI,UAAU,CAAC,KAAwB;QACrC,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,S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