@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.
- package/BUILD_LINUX.md +61 -0
- package/LICENSE.md +22 -0
- package/README.md +662 -0
- package/build_mac_local.sh +69 -0
- package/dist/api/audio-frame-buffer.d.ts +205 -0
- package/dist/api/audio-frame-buffer.js +287 -0
- package/dist/api/audio-frame-buffer.js.map +1 -0
- package/dist/api/bitstream-filter.d.ts +820 -0
- package/dist/api/bitstream-filter.js +1242 -0
- package/dist/api/bitstream-filter.js.map +1 -0
- package/dist/api/constants.d.ts +44 -0
- package/dist/api/constants.js +45 -0
- package/dist/api/constants.js.map +1 -0
- package/dist/api/data/test_av1.ivf +0 -0
- package/dist/api/data/test_h264.h264 +0 -0
- package/dist/api/data/test_hevc.h265 +0 -0
- package/dist/api/data/test_mjpeg.mjpeg +0 -0
- package/dist/api/data/test_vp8.ivf +0 -0
- package/dist/api/data/test_vp9.ivf +0 -0
- package/dist/api/decoder.d.ts +1088 -0
- package/dist/api/decoder.js +1775 -0
- package/dist/api/decoder.js.map +1 -0
- package/dist/api/demuxer.d.ts +1219 -0
- package/dist/api/demuxer.js +2081 -0
- package/dist/api/demuxer.js.map +1 -0
- package/dist/api/device.d.ts +586 -0
- package/dist/api/device.js +961 -0
- package/dist/api/device.js.map +1 -0
- package/dist/api/encoder.d.ts +1132 -0
- package/dist/api/encoder.js +1988 -0
- package/dist/api/encoder.js.map +1 -0
- package/dist/api/filter-complex.d.ts +821 -0
- package/dist/api/filter-complex.js +1604 -0
- package/dist/api/filter-complex.js.map +1 -0
- package/dist/api/filter-presets.d.ts +1286 -0
- package/dist/api/filter-presets.js +2152 -0
- package/dist/api/filter-presets.js.map +1 -0
- package/dist/api/filter.d.ts +1234 -0
- package/dist/api/filter.js +1976 -0
- package/dist/api/filter.js.map +1 -0
- package/dist/api/fmp4-stream.d.ts +426 -0
- package/dist/api/fmp4-stream.js +739 -0
- package/dist/api/fmp4-stream.js.map +1 -0
- package/dist/api/hardware.d.ts +651 -0
- package/dist/api/hardware.js +1260 -0
- package/dist/api/hardware.js.map +1 -0
- package/dist/api/index.d.ts +17 -0
- package/dist/api/index.js +32 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/io-stream.d.ts +307 -0
- package/dist/api/io-stream.js +282 -0
- package/dist/api/io-stream.js.map +1 -0
- package/dist/api/muxer.d.ts +957 -0
- package/dist/api/muxer.js +2002 -0
- package/dist/api/muxer.js.map +1 -0
- package/dist/api/pipeline.d.ts +607 -0
- package/dist/api/pipeline.js +1145 -0
- package/dist/api/pipeline.js.map +1 -0
- package/dist/api/utilities/async-queue.d.ts +120 -0
- package/dist/api/utilities/async-queue.js +211 -0
- package/dist/api/utilities/async-queue.js.map +1 -0
- package/dist/api/utilities/audio-sample.d.ts +117 -0
- package/dist/api/utilities/audio-sample.js +112 -0
- package/dist/api/utilities/audio-sample.js.map +1 -0
- package/dist/api/utilities/channel-layout.d.ts +76 -0
- package/dist/api/utilities/channel-layout.js +80 -0
- package/dist/api/utilities/channel-layout.js.map +1 -0
- package/dist/api/utilities/electron-shared-texture.d.ts +328 -0
- package/dist/api/utilities/electron-shared-texture.js +503 -0
- package/dist/api/utilities/electron-shared-texture.js.map +1 -0
- package/dist/api/utilities/image.d.ts +207 -0
- package/dist/api/utilities/image.js +213 -0
- package/dist/api/utilities/image.js.map +1 -0
- package/dist/api/utilities/index.d.ts +12 -0
- package/dist/api/utilities/index.js +25 -0
- package/dist/api/utilities/index.js.map +1 -0
- package/dist/api/utilities/media-type.d.ts +49 -0
- package/dist/api/utilities/media-type.js +53 -0
- package/dist/api/utilities/media-type.js.map +1 -0
- package/dist/api/utilities/pixel-format.d.ts +89 -0
- package/dist/api/utilities/pixel-format.js +97 -0
- package/dist/api/utilities/pixel-format.js.map +1 -0
- package/dist/api/utilities/sample-format.d.ts +129 -0
- package/dist/api/utilities/sample-format.js +141 -0
- package/dist/api/utilities/sample-format.js.map +1 -0
- package/dist/api/utilities/scheduler.d.ts +138 -0
- package/dist/api/utilities/scheduler.js +98 -0
- package/dist/api/utilities/scheduler.js.map +1 -0
- package/dist/api/utilities/streaming.d.ts +186 -0
- package/dist/api/utilities/streaming.js +309 -0
- package/dist/api/utilities/streaming.js.map +1 -0
- package/dist/api/utilities/timestamp.d.ts +193 -0
- package/dist/api/utilities/timestamp.js +206 -0
- package/dist/api/utilities/timestamp.js.map +1 -0
- package/dist/api/utilities/whisper-model.d.ts +310 -0
- package/dist/api/utilities/whisper-model.js +528 -0
- package/dist/api/utilities/whisper-model.js.map +1 -0
- package/dist/api/utils.d.ts +19 -0
- package/dist/api/utils.js +39 -0
- package/dist/api/utils.js.map +1 -0
- package/dist/api/whisper.d.ts +324 -0
- package/dist/api/whisper.js +362 -0
- package/dist/api/whisper.js.map +1 -0
- package/dist/constants/channel-layouts.d.ts +53 -0
- package/dist/constants/channel-layouts.js +57 -0
- package/dist/constants/channel-layouts.js.map +1 -0
- package/dist/constants/constants.d.ts +2325 -0
- package/dist/constants/constants.js +1887 -0
- package/dist/constants/constants.js.map +1 -0
- package/dist/constants/decoders.d.ts +633 -0
- package/dist/constants/decoders.js +641 -0
- package/dist/constants/decoders.js.map +1 -0
- package/dist/constants/encoders.d.ts +295 -0
- package/dist/constants/encoders.js +308 -0
- package/dist/constants/encoders.js.map +1 -0
- package/dist/constants/hardware.d.ts +26 -0
- package/dist/constants/hardware.js +27 -0
- package/dist/constants/hardware.js.map +1 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +6 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/ffmpeg/index.d.ts +99 -0
- package/dist/ffmpeg/index.js +115 -0
- package/dist/ffmpeg/index.js.map +1 -0
- package/dist/ffmpeg/utils.d.ts +31 -0
- package/dist/ffmpeg/utils.js +68 -0
- package/dist/ffmpeg/utils.js.map +1 -0
- package/dist/ffmpeg/version.d.ts +6 -0
- package/dist/ffmpeg/version.js +7 -0
- package/dist/ffmpeg/version.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/audio-fifo.d.ts +399 -0
- package/dist/lib/audio-fifo.js +431 -0
- package/dist/lib/audio-fifo.js.map +1 -0
- package/dist/lib/binding.d.ts +228 -0
- package/dist/lib/binding.js +60 -0
- package/dist/lib/binding.js.map +1 -0
- package/dist/lib/bitstream-filter-context.d.ts +379 -0
- package/dist/lib/bitstream-filter-context.js +441 -0
- package/dist/lib/bitstream-filter-context.js.map +1 -0
- package/dist/lib/bitstream-filter.d.ts +140 -0
- package/dist/lib/bitstream-filter.js +154 -0
- package/dist/lib/bitstream-filter.js.map +1 -0
- package/dist/lib/codec-context.d.ts +1071 -0
- package/dist/lib/codec-context.js +1354 -0
- package/dist/lib/codec-context.js.map +1 -0
- package/dist/lib/codec-parameters.d.ts +616 -0
- package/dist/lib/codec-parameters.js +761 -0
- package/dist/lib/codec-parameters.js.map +1 -0
- package/dist/lib/codec-parser.d.ts +201 -0
- package/dist/lib/codec-parser.js +213 -0
- package/dist/lib/codec-parser.js.map +1 -0
- package/dist/lib/codec.d.ts +586 -0
- package/dist/lib/codec.js +713 -0
- package/dist/lib/codec.js.map +1 -0
- package/dist/lib/device.d.ts +291 -0
- package/dist/lib/device.js +324 -0
- package/dist/lib/device.js.map +1 -0
- package/dist/lib/dictionary.d.ts +333 -0
- package/dist/lib/dictionary.js +372 -0
- package/dist/lib/dictionary.js.map +1 -0
- package/dist/lib/error.d.ts +242 -0
- package/dist/lib/error.js +303 -0
- package/dist/lib/error.js.map +1 -0
- package/dist/lib/fifo.d.ts +416 -0
- package/dist/lib/fifo.js +453 -0
- package/dist/lib/fifo.js.map +1 -0
- package/dist/lib/filter-context.d.ts +712 -0
- package/dist/lib/filter-context.js +789 -0
- package/dist/lib/filter-context.js.map +1 -0
- package/dist/lib/filter-graph-segment.d.ts +160 -0
- package/dist/lib/filter-graph-segment.js +171 -0
- package/dist/lib/filter-graph-segment.js.map +1 -0
- package/dist/lib/filter-graph.d.ts +641 -0
- package/dist/lib/filter-graph.js +704 -0
- package/dist/lib/filter-graph.js.map +1 -0
- package/dist/lib/filter-inout.d.ts +198 -0
- package/dist/lib/filter-inout.js +257 -0
- package/dist/lib/filter-inout.js.map +1 -0
- package/dist/lib/filter.d.ts +243 -0
- package/dist/lib/filter.js +272 -0
- package/dist/lib/filter.js.map +1 -0
- package/dist/lib/format-context.d.ts +1254 -0
- package/dist/lib/format-context.js +1379 -0
- package/dist/lib/format-context.js.map +1 -0
- package/dist/lib/frame-utils.d.ts +116 -0
- package/dist/lib/frame-utils.js +98 -0
- package/dist/lib/frame-utils.js.map +1 -0
- package/dist/lib/frame.d.ts +1222 -0
- package/dist/lib/frame.js +1435 -0
- package/dist/lib/frame.js.map +1 -0
- package/dist/lib/hardware-device-context.d.ts +362 -0
- package/dist/lib/hardware-device-context.js +383 -0
- package/dist/lib/hardware-device-context.js.map +1 -0
- package/dist/lib/hardware-frames-context.d.ts +419 -0
- package/dist/lib/hardware-frames-context.js +477 -0
- package/dist/lib/hardware-frames-context.js.map +1 -0
- package/dist/lib/index.d.ts +35 -0
- package/dist/lib/index.js +60 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/input-format.d.ts +249 -0
- package/dist/lib/input-format.js +306 -0
- package/dist/lib/input-format.js.map +1 -0
- package/dist/lib/io-context.d.ts +696 -0
- package/dist/lib/io-context.js +769 -0
- package/dist/lib/io-context.js.map +1 -0
- package/dist/lib/log.d.ts +174 -0
- package/dist/lib/log.js +184 -0
- package/dist/lib/log.js.map +1 -0
- package/dist/lib/native-types.d.ts +946 -0
- package/dist/lib/native-types.js +2 -0
- package/dist/lib/native-types.js.map +1 -0
- package/dist/lib/option.d.ts +927 -0
- package/dist/lib/option.js +1583 -0
- package/dist/lib/option.js.map +1 -0
- package/dist/lib/output-format.d.ts +180 -0
- package/dist/lib/output-format.js +213 -0
- package/dist/lib/output-format.js.map +1 -0
- package/dist/lib/packet.d.ts +501 -0
- package/dist/lib/packet.js +590 -0
- package/dist/lib/packet.js.map +1 -0
- package/dist/lib/rational.d.ts +251 -0
- package/dist/lib/rational.js +278 -0
- package/dist/lib/rational.js.map +1 -0
- package/dist/lib/software-resample-context.d.ts +552 -0
- package/dist/lib/software-resample-context.js +592 -0
- package/dist/lib/software-resample-context.js.map +1 -0
- package/dist/lib/software-scale-context.d.ts +344 -0
- package/dist/lib/software-scale-context.js +366 -0
- package/dist/lib/software-scale-context.js.map +1 -0
- package/dist/lib/stream.d.ts +379 -0
- package/dist/lib/stream.js +526 -0
- package/dist/lib/stream.js.map +1 -0
- package/dist/lib/sync-queue.d.ts +179 -0
- package/dist/lib/sync-queue.js +197 -0
- package/dist/lib/sync-queue.js.map +1 -0
- package/dist/lib/types.d.ts +34 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utilities.d.ts +1127 -0
- package/dist/lib/utilities.js +1225 -0
- package/dist/lib/utilities.js.map +1 -0
- package/dist/utils/electron.d.ts +49 -0
- package/dist/utils/electron.js +63 -0
- package/dist/utils/electron.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/install/check.js +121 -0
- package/install/ffmpeg.js +66 -0
- package/jellyfin-ffmpeg.patch +181 -0
- package/package.json +129 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-context.js","sourceRoot":"","sources":["../../src/lib/filter-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,OAAO,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;;;;;;;;;OAeG;IACH,uBAAuB;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,uBAAuB;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { FilterInOut } from './filter-inout.js';
|
|
2
|
+
import type { NativeFilterGraphSegment } from './native-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parsed filter graph segment.
|
|
5
|
+
*
|
|
6
|
+
* Represents a parsed filtergraph segment that separates parsing from initialization.
|
|
7
|
+
* This allows filter contexts to be configured after creation but before initialization.
|
|
8
|
+
* The workflow involves parsing the filter description, creating filter instances,
|
|
9
|
+
* applying options, and finally initializing and linking the filters.
|
|
10
|
+
*
|
|
11
|
+
* Direct mapping to FFmpeg's AVFilterGraphSegment.
|
|
12
|
+
*
|
|
13
|
+
* @see [AVFilterGraphSegment](https://ffmpeg.org/doxygen/trunk/structAVFilterGraphSegment.html) - FFmpeg Doxygen
|
|
14
|
+
*/
|
|
15
|
+
export declare class FilterGraphSegment implements Disposable {
|
|
16
|
+
private native;
|
|
17
|
+
/**
|
|
18
|
+
* @param native - The native filter graph segment instance
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
constructor(native: NativeFilterGraphSegment);
|
|
23
|
+
/**
|
|
24
|
+
* Create filter instances in the segment.
|
|
25
|
+
*
|
|
26
|
+
* Allocates all filter contexts defined in the segment but does not initialize them.
|
|
27
|
+
* This separation allows configuration of filter properties before the filters are initialized.
|
|
28
|
+
*
|
|
29
|
+
* Direct mapping to avfilter_graph_segment_create_filters().
|
|
30
|
+
*
|
|
31
|
+
* @param flags - Creation flags (default: 0)
|
|
32
|
+
*
|
|
33
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
34
|
+
* - AVERROR_EINVAL: Invalid segment
|
|
35
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import { FFmpegError } from 'node-av';
|
|
40
|
+
*
|
|
41
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
42
|
+
* if (segment) {
|
|
43
|
+
* const ret = segment.createFilters();
|
|
44
|
+
* FFmpegError.throwIfError(ret, 'createFilters');
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see {@link applyOpts} To apply options after creation
|
|
49
|
+
* @see {@link apply} To initialize and link filters
|
|
50
|
+
*/
|
|
51
|
+
createFilters(flags?: number): number;
|
|
52
|
+
/**
|
|
53
|
+
* Apply options to filter instances.
|
|
54
|
+
*
|
|
55
|
+
* Applies the parsed filter options to their respective filter contexts.
|
|
56
|
+
* This method should be called after creating filters and before initializing them.
|
|
57
|
+
*
|
|
58
|
+
* Direct mapping to avfilter_graph_segment_apply_opts().
|
|
59
|
+
*
|
|
60
|
+
* @param flags - Option flags (default: 0)
|
|
61
|
+
*
|
|
62
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
63
|
+
* - AVERROR_EINVAL: Invalid options
|
|
64
|
+
* - AVERROR_OPTION_NOT_FOUND: Unknown option
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* import { FFmpegError } from 'node-av';
|
|
69
|
+
*
|
|
70
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
71
|
+
* if (segment) {
|
|
72
|
+
* FFmpegError.throwIfError(segment.createFilters(), 'createFilters');
|
|
73
|
+
* FFmpegError.throwIfError(segment.applyOpts(), 'applyOpts');
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @see {@link createFilters} To create filter instances first
|
|
78
|
+
* @see {@link apply} To initialize and link after applying options
|
|
79
|
+
*/
|
|
80
|
+
applyOpts(flags?: number): number;
|
|
81
|
+
/**
|
|
82
|
+
* Initialize and link all filters in the segment.
|
|
83
|
+
*
|
|
84
|
+
* Initializes all filter contexts in the segment and creates links between them
|
|
85
|
+
* according to the parsed filter graph description. This is the final step that
|
|
86
|
+
* completes the filter setup. All necessary filter configuration should be done
|
|
87
|
+
* before calling this method.
|
|
88
|
+
*
|
|
89
|
+
* Direct mapping to avfilter_graph_segment_apply().
|
|
90
|
+
*
|
|
91
|
+
* @param inputs - Input filter pads
|
|
92
|
+
*
|
|
93
|
+
* @param outputs - Output filter pads
|
|
94
|
+
*
|
|
95
|
+
* @param flags - Apply flags (default: 0)
|
|
96
|
+
*
|
|
97
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
98
|
+
* - AVERROR_EINVAL: Invalid segment or pads
|
|
99
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* import { FFmpegError, FilterInOut } from 'node-av';
|
|
104
|
+
*
|
|
105
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
106
|
+
* if (segment) {
|
|
107
|
+
* FFmpegError.throwIfError(segment.createFilters(), 'createFilters');
|
|
108
|
+
* FFmpegError.throwIfError(segment.applyOpts(), 'applyOpts');
|
|
109
|
+
*
|
|
110
|
+
* const inputs = new FilterInOut();
|
|
111
|
+
* const outputs = new FilterInOut();
|
|
112
|
+
* FFmpegError.throwIfError(segment.apply(inputs, outputs), 'apply');
|
|
113
|
+
*
|
|
114
|
+
* inputs.free();
|
|
115
|
+
* outputs.free();
|
|
116
|
+
* segment.free();
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @see {@link createFilters} To create filter instances
|
|
121
|
+
* @see {@link applyOpts} To apply options before initialization
|
|
122
|
+
*/
|
|
123
|
+
apply(inputs: FilterInOut, outputs: FilterInOut, flags?: number): number;
|
|
124
|
+
/**
|
|
125
|
+
* Free the segment and all associated resources.
|
|
126
|
+
*
|
|
127
|
+
* Releases all memory and resources allocated for this filter graph segment.
|
|
128
|
+
* After calling this method, the segment cannot be used anymore.
|
|
129
|
+
*
|
|
130
|
+
* Direct mapping to avfilter_graph_segment_free().
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
135
|
+
* if (segment) {
|
|
136
|
+
* // Use segment...
|
|
137
|
+
* segment.free();
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see {@link Symbol.dispose} For automatic cleanup with using statement
|
|
142
|
+
*/
|
|
143
|
+
free(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Dispose of the segment.
|
|
146
|
+
*
|
|
147
|
+
* Automatically frees the segment when using the `using` statement.
|
|
148
|
+
* This implements the Disposable interface for automatic resource cleanup.
|
|
149
|
+
* Equivalent to calling free().
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* {
|
|
154
|
+
* using segment = graph.segmentParse('scale=640:480');
|
|
155
|
+
* // Use segment...
|
|
156
|
+
* } // Automatically freed
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
[Symbol.dispose](): void;
|
|
160
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed filter graph segment.
|
|
3
|
+
*
|
|
4
|
+
* Represents a parsed filtergraph segment that separates parsing from initialization.
|
|
5
|
+
* This allows filter contexts to be configured after creation but before initialization.
|
|
6
|
+
* The workflow involves parsing the filter description, creating filter instances,
|
|
7
|
+
* applying options, and finally initializing and linking the filters.
|
|
8
|
+
*
|
|
9
|
+
* Direct mapping to FFmpeg's AVFilterGraphSegment.
|
|
10
|
+
*
|
|
11
|
+
* @see [AVFilterGraphSegment](https://ffmpeg.org/doxygen/trunk/structAVFilterGraphSegment.html) - FFmpeg Doxygen
|
|
12
|
+
*/
|
|
13
|
+
export class FilterGraphSegment {
|
|
14
|
+
native;
|
|
15
|
+
/**
|
|
16
|
+
* @param native - The native filter graph segment instance
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
constructor(native) {
|
|
21
|
+
this.native = native;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create filter instances in the segment.
|
|
25
|
+
*
|
|
26
|
+
* Allocates all filter contexts defined in the segment but does not initialize them.
|
|
27
|
+
* This separation allows configuration of filter properties before the filters are initialized.
|
|
28
|
+
*
|
|
29
|
+
* Direct mapping to avfilter_graph_segment_create_filters().
|
|
30
|
+
*
|
|
31
|
+
* @param flags - Creation flags (default: 0)
|
|
32
|
+
*
|
|
33
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
34
|
+
* - AVERROR_EINVAL: Invalid segment
|
|
35
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import { FFmpegError } from 'node-av';
|
|
40
|
+
*
|
|
41
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
42
|
+
* if (segment) {
|
|
43
|
+
* const ret = segment.createFilters();
|
|
44
|
+
* FFmpegError.throwIfError(ret, 'createFilters');
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see {@link applyOpts} To apply options after creation
|
|
49
|
+
* @see {@link apply} To initialize and link filters
|
|
50
|
+
*/
|
|
51
|
+
createFilters(flags = 0) {
|
|
52
|
+
return this.native.createFilters(flags);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Apply options to filter instances.
|
|
56
|
+
*
|
|
57
|
+
* Applies the parsed filter options to their respective filter contexts.
|
|
58
|
+
* This method should be called after creating filters and before initializing them.
|
|
59
|
+
*
|
|
60
|
+
* Direct mapping to avfilter_graph_segment_apply_opts().
|
|
61
|
+
*
|
|
62
|
+
* @param flags - Option flags (default: 0)
|
|
63
|
+
*
|
|
64
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
65
|
+
* - AVERROR_EINVAL: Invalid options
|
|
66
|
+
* - AVERROR_OPTION_NOT_FOUND: Unknown option
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* import { FFmpegError } from 'node-av';
|
|
71
|
+
*
|
|
72
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
73
|
+
* if (segment) {
|
|
74
|
+
* FFmpegError.throwIfError(segment.createFilters(), 'createFilters');
|
|
75
|
+
* FFmpegError.throwIfError(segment.applyOpts(), 'applyOpts');
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @see {@link createFilters} To create filter instances first
|
|
80
|
+
* @see {@link apply} To initialize and link after applying options
|
|
81
|
+
*/
|
|
82
|
+
applyOpts(flags = 0) {
|
|
83
|
+
return this.native.applyOpts(flags);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Initialize and link all filters in the segment.
|
|
87
|
+
*
|
|
88
|
+
* Initializes all filter contexts in the segment and creates links between them
|
|
89
|
+
* according to the parsed filter graph description. This is the final step that
|
|
90
|
+
* completes the filter setup. All necessary filter configuration should be done
|
|
91
|
+
* before calling this method.
|
|
92
|
+
*
|
|
93
|
+
* Direct mapping to avfilter_graph_segment_apply().
|
|
94
|
+
*
|
|
95
|
+
* @param inputs - Input filter pads
|
|
96
|
+
*
|
|
97
|
+
* @param outputs - Output filter pads
|
|
98
|
+
*
|
|
99
|
+
* @param flags - Apply flags (default: 0)
|
|
100
|
+
*
|
|
101
|
+
* @returns 0 on success, negative AVERROR on failure:
|
|
102
|
+
* - AVERROR_EINVAL: Invalid segment or pads
|
|
103
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* import { FFmpegError, FilterInOut } from 'node-av';
|
|
108
|
+
*
|
|
109
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
110
|
+
* if (segment) {
|
|
111
|
+
* FFmpegError.throwIfError(segment.createFilters(), 'createFilters');
|
|
112
|
+
* FFmpegError.throwIfError(segment.applyOpts(), 'applyOpts');
|
|
113
|
+
*
|
|
114
|
+
* const inputs = new FilterInOut();
|
|
115
|
+
* const outputs = new FilterInOut();
|
|
116
|
+
* FFmpegError.throwIfError(segment.apply(inputs, outputs), 'apply');
|
|
117
|
+
*
|
|
118
|
+
* inputs.free();
|
|
119
|
+
* outputs.free();
|
|
120
|
+
* segment.free();
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @see {@link createFilters} To create filter instances
|
|
125
|
+
* @see {@link applyOpts} To apply options before initialization
|
|
126
|
+
*/
|
|
127
|
+
apply(inputs, outputs, flags = 0) {
|
|
128
|
+
return this.native.apply(inputs.getNative(), outputs.getNative(), flags);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Free the segment and all associated resources.
|
|
132
|
+
*
|
|
133
|
+
* Releases all memory and resources allocated for this filter graph segment.
|
|
134
|
+
* After calling this method, the segment cannot be used anymore.
|
|
135
|
+
*
|
|
136
|
+
* Direct mapping to avfilter_graph_segment_free().
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const segment = graph.segmentParse('scale=640:480');
|
|
141
|
+
* if (segment) {
|
|
142
|
+
* // Use segment...
|
|
143
|
+
* segment.free();
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @see {@link Symbol.dispose} For automatic cleanup with using statement
|
|
148
|
+
*/
|
|
149
|
+
free() {
|
|
150
|
+
this.native.free();
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Dispose of the segment.
|
|
154
|
+
*
|
|
155
|
+
* Automatically frees the segment when using the `using` statement.
|
|
156
|
+
* This implements the Disposable interface for automatic resource cleanup.
|
|
157
|
+
* Equivalent to calling free().
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* {
|
|
162
|
+
* using segment = graph.segmentParse('scale=640:480');
|
|
163
|
+
* // Use segment...
|
|
164
|
+
* } // Automatically freed
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
[Symbol.dispose]() {
|
|
168
|
+
this.native[Symbol.dispose]();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=filter-graph-segment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-graph-segment.js","sourceRoot":"","sources":["../../src/lib/filter-graph-segment.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,kBAAkB;IACrB,MAAM,CAA2B;IAEzC;;;;OAIG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,aAAa,CAAC,KAAK,GAAG,CAAC;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,SAAS,CAAC,KAAK,GAAG,CAAC;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,KAAK,CAAC,MAAmB,EAAE,OAAoB,EAAE,KAAK,GAAG,CAAC;QACxD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,CAAC;CACF"}
|