node-av 1.0.3 → 1.2.0
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/README.md +56 -41
- package/dist/api/bitstream-filter.d.ts +180 -123
- package/dist/api/bitstream-filter.js +182 -126
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/decoder.d.ts +286 -130
- package/dist/api/decoder.js +321 -159
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/encoder.d.ts +254 -158
- package/dist/api/encoder.js +326 -298
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +912 -0
- package/dist/api/filter-presets.js +1407 -0
- package/dist/api/filter-presets.js.map +1 -0
- package/dist/api/filter.d.ts +280 -284
- package/dist/api/filter.js +435 -509
- package/dist/api/filter.js.map +1 -1
- package/dist/api/hardware.d.ts +226 -159
- package/dist/api/hardware.js +405 -287
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +3 -2
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +65 -61
- package/dist/api/io-stream.js +45 -47
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/media-input.d.ts +244 -141
- package/dist/api/media-input.js +207 -104
- package/dist/api/media-input.js.map +1 -1
- package/dist/api/media-output.d.ts +206 -128
- package/dist/api/media-output.js +212 -129
- package/dist/api/media-output.js.map +1 -1
- package/dist/api/pipeline.d.ts +168 -38
- package/dist/api/pipeline.js +238 -14
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/types.d.ts +22 -182
- package/dist/api/utilities/audio-sample.d.ts +1 -1
- package/dist/api/utilities/image.d.ts +1 -1
- package/dist/api/utilities/media-type.d.ts +1 -1
- package/dist/api/utilities/pixel-format.d.ts +1 -1
- package/dist/api/utilities/sample-format.d.ts +1 -1
- package/dist/api/utilities/timestamp.d.ts +1 -1
- package/dist/api/utils.d.ts +1 -2
- package/dist/api/utils.js +9 -0
- package/dist/api/utils.js.map +1 -1
- package/dist/{lib → constants}/channel-layouts.d.ts +1 -1
- package/dist/constants/channel-layouts.js.map +1 -0
- package/dist/{lib → constants}/constants.d.ts +19 -4
- package/dist/{lib → constants}/constants.js +15 -1
- package/dist/constants/constants.js.map +1 -0
- package/dist/constants/decoders.d.ts +609 -0
- package/dist/constants/decoders.js +617 -0
- package/dist/constants/decoders.js.map +1 -0
- package/dist/constants/encoders.d.ts +285 -0
- package/dist/constants/encoders.js +298 -0
- package/dist/constants/encoders.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +5 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/audio-fifo.d.ts +128 -171
- package/dist/lib/audio-fifo.js +130 -173
- package/dist/lib/audio-fifo.js.map +1 -1
- package/dist/lib/binding.d.ts +7 -5
- package/dist/lib/binding.js +5 -0
- package/dist/lib/binding.js.map +1 -1
- package/dist/lib/bitstream-filter-context.d.ts +139 -184
- package/dist/lib/bitstream-filter-context.js +139 -188
- package/dist/lib/bitstream-filter-context.js.map +1 -1
- package/dist/lib/bitstream-filter.d.ts +69 -55
- package/dist/lib/bitstream-filter.js +68 -54
- package/dist/lib/bitstream-filter.js.map +1 -1
- package/dist/lib/codec-context.d.ts +317 -381
- package/dist/lib/codec-context.js +316 -381
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +161 -171
- package/dist/lib/codec-parameters.js +162 -172
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +92 -105
- package/dist/lib/codec-parser.js +92 -103
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +328 -217
- package/dist/lib/codec.js +392 -218
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.d.ts +150 -204
- package/dist/lib/dictionary.js +159 -213
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.d.ts +97 -131
- package/dist/lib/error.js +98 -128
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/filter-context.d.ts +317 -194
- package/dist/lib/filter-context.js +335 -200
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +252 -293
- package/dist/lib/filter-graph.js +253 -294
- package/dist/lib/filter-graph.js.map +1 -1
- package/dist/lib/filter-inout.d.ts +87 -95
- package/dist/lib/filter-inout.js +87 -95
- package/dist/lib/filter-inout.js.map +1 -1
- package/dist/lib/filter.d.ts +93 -111
- package/dist/lib/filter.js +94 -112
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +321 -429
- package/dist/lib/format-context.js +314 -386
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +263 -406
- package/dist/lib/frame.js +263 -408
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +150 -204
- package/dist/lib/hardware-device-context.js +149 -203
- package/dist/lib/hardware-device-context.js.map +1 -1
- package/dist/lib/hardware-frames-context.d.ts +171 -181
- package/dist/lib/hardware-frames-context.js +171 -181
- package/dist/lib/hardware-frames-context.js.map +1 -1
- package/dist/lib/index.d.ts +2 -3
- package/dist/lib/index.js +2 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/input-format.d.ts +90 -118
- package/dist/lib/input-format.js +89 -117
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/io-context.d.ts +210 -242
- package/dist/lib/io-context.js +221 -253
- package/dist/lib/io-context.js.map +1 -1
- package/dist/lib/log.d.ts +86 -120
- package/dist/lib/log.js +85 -122
- package/dist/lib/log.js.map +1 -1
- package/dist/lib/native-types.d.ts +127 -112
- package/dist/lib/native-types.js +9 -0
- package/dist/lib/native-types.js.map +1 -1
- package/dist/lib/option.d.ts +285 -242
- package/dist/lib/option.js +310 -250
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +78 -102
- package/dist/lib/output-format.js +77 -101
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +173 -241
- package/dist/lib/packet.js +172 -241
- package/dist/lib/packet.js.map +1 -1
- package/dist/lib/rational.d.ts +0 -2
- package/dist/lib/rational.js +0 -2
- package/dist/lib/rational.js.map +1 -1
- package/dist/lib/software-resample-context.d.ts +242 -326
- package/dist/lib/software-resample-context.js +242 -326
- package/dist/lib/software-resample-context.js.map +1 -1
- package/dist/lib/software-scale-context.d.ts +130 -174
- package/dist/lib/software-scale-context.js +132 -176
- package/dist/lib/software-scale-context.js.map +1 -1
- package/dist/lib/stream.d.ts +88 -198
- package/dist/lib/stream.js +87 -197
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/utilities.d.ts +372 -181
- package/dist/lib/utilities.js +373 -182
- package/dist/lib/utilities.js.map +1 -1
- package/install/check.js +0 -1
- package/package.json +32 -24
- package/release_notes.md +43 -13
- package/CHANGELOG.md +0 -8
- package/dist/lib/channel-layouts.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- /package/dist/{lib → constants}/channel-layouts.js +0 -0
package/dist/lib/filter.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_VIDEO } from '../constants/constants.js';
|
|
1
2
|
import { bindings } from './binding.js';
|
|
2
|
-
import { AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_VIDEO } from './constants.js';
|
|
3
3
|
/**
|
|
4
|
-
* Filter
|
|
4
|
+
* Filter descriptor for video/audio processing.
|
|
5
5
|
*
|
|
6
|
-
* Represents a
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Represents a filter that can be used in filter graphs for processing
|
|
7
|
+
* audio and video frames. Filters can be sources (no inputs), sinks (no outputs),
|
|
8
|
+
* or processors (with both inputs and outputs). Each filter has specific
|
|
9
|
+
* capabilities and pad configurations.
|
|
9
10
|
*
|
|
10
11
|
* Direct mapping to FFmpeg's AVFilter.
|
|
11
12
|
*
|
|
@@ -13,79 +14,58 @@ import { AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_VIDEO } from './constants.js';
|
|
|
13
14
|
* ```typescript
|
|
14
15
|
* import { Filter } from 'node-av';
|
|
15
16
|
*
|
|
16
|
-
* //
|
|
17
|
+
* // Get a specific filter
|
|
17
18
|
* const scaleFilter = Filter.getByName('scale');
|
|
18
|
-
* if (
|
|
19
|
+
* if (scaleFilter) {
|
|
20
|
+
* console.log(`Filter: ${scaleFilter.name}`);
|
|
21
|
+
* console.log(`Description: ${scaleFilter.description}`);
|
|
22
|
+
* console.log(`Inputs: ${scaleFilter.inputs.length}`);
|
|
23
|
+
* console.log(`Outputs: ${scaleFilter.outputs.length}`);
|
|
24
|
+
* }
|
|
19
25
|
*
|
|
20
|
-
* //
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* console.log(`Inputs: ${scaleFilter.inputs.length}`);
|
|
24
|
-
* console.log(`Outputs: ${scaleFilter.outputs.length}`);
|
|
25
|
-
*
|
|
26
|
-
* // Get all video filters
|
|
27
|
-
* const allFilters = Filter.getList();
|
|
28
|
-
* const videoFilters = allFilters.filter(f => f.isVideo());
|
|
26
|
+
* // List all video filters
|
|
27
|
+
* const filters = Filter.getList();
|
|
28
|
+
* const videoFilters = filters.filter(f => f.isVideo());
|
|
29
29
|
* console.log(`Found ${videoFilters.length} video filters`);
|
|
30
30
|
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see [AVFilter](https://ffmpeg.org/doxygen/trunk/structAVFilter.html) - FFmpeg Doxygen
|
|
33
|
+
* @see {@link FilterContext} For using filters in graphs
|
|
34
|
+
* @see {@link FilterGraph} For building filter pipelines
|
|
31
35
|
*/
|
|
32
36
|
export class Filter {
|
|
33
37
|
native;
|
|
34
38
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Filters are global immutable objects managed by FFmpeg.
|
|
38
|
-
* Use the static factory methods to obtain filter instances.
|
|
39
|
-
*
|
|
39
|
+
* @param native - The native filter instance
|
|
40
40
|
* @internal
|
|
41
|
-
*
|
|
42
|
-
* @param native - Native AVFilter to wrap
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
* import { Filter } from 'node-av';
|
|
47
|
-
*
|
|
48
|
-
* // Don't use constructor directly
|
|
49
|
-
* // const filter = new Filter(); // Wrong
|
|
50
|
-
*
|
|
51
|
-
* // Use static factory methods instead
|
|
52
|
-
* const filter = Filter.getByName('scale'); // Correct
|
|
53
|
-
* const filters = Filter.getList(); // Correct
|
|
54
|
-
* ```
|
|
55
41
|
*/
|
|
56
42
|
constructor(native) {
|
|
57
43
|
this.native = native;
|
|
58
44
|
}
|
|
59
45
|
/**
|
|
60
|
-
*
|
|
46
|
+
* Get a filter by name.
|
|
61
47
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
48
|
+
* Retrieves a specific filter descriptor by its name.
|
|
49
|
+
* Common filter names include 'scale', 'crop', 'overlay', 'aformat', etc.
|
|
64
50
|
*
|
|
65
|
-
* Direct mapping to avfilter_get_by_name()
|
|
51
|
+
* Direct mapping to avfilter_get_by_name().
|
|
66
52
|
*
|
|
67
|
-
* @param name -
|
|
68
|
-
*
|
|
69
|
-
* @returns The filter if found, null otherwise
|
|
53
|
+
* @param name - Name of the filter
|
|
54
|
+
* @returns Filter instance if found, null otherwise
|
|
70
55
|
*
|
|
71
56
|
* @example
|
|
72
57
|
* ```typescript
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* const scaleFilter = Filter.getByName('scale');
|
|
77
|
-
* if (!scaleFilter) {
|
|
58
|
+
* // Get video scaling filter
|
|
59
|
+
* const scale = Filter.getByName('scale');
|
|
60
|
+
* if (!scale) {
|
|
78
61
|
* throw new Error('Scale filter not available');
|
|
79
62
|
* }
|
|
80
63
|
*
|
|
81
|
-
* //
|
|
82
|
-
* const
|
|
83
|
-
* if (!volumeFilter) {
|
|
84
|
-
* throw new Error('Volume filter not available');
|
|
85
|
-
* }
|
|
64
|
+
* // Get audio format filter
|
|
65
|
+
* const aformat = Filter.getByName('aformat');
|
|
86
66
|
* ```
|
|
87
67
|
*
|
|
88
|
-
* @see {@link getList} To
|
|
68
|
+
* @see {@link getList} To list all available filters
|
|
89
69
|
*/
|
|
90
70
|
static getByName(name) {
|
|
91
71
|
const native = bindings.Filter.getByName(name);
|
|
@@ -94,30 +74,27 @@ export class Filter {
|
|
|
94
74
|
/**
|
|
95
75
|
* Get list of all available filters.
|
|
96
76
|
*
|
|
97
|
-
* Returns all registered filters in
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* Direct mapping to avfilter_iterate()
|
|
77
|
+
* Returns an array of all registered filters in FFmpeg.
|
|
78
|
+
* Useful for discovering available filters or building filter lists.
|
|
101
79
|
*
|
|
102
|
-
* @returns Array of all
|
|
80
|
+
* @returns Array of all available filters
|
|
103
81
|
*
|
|
104
82
|
* @example
|
|
105
83
|
* ```typescript
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* });
|
|
84
|
+
* // List all filters
|
|
85
|
+
* const filters = Filter.getList();
|
|
86
|
+
* console.log(`Total filters: ${filters.length}`);
|
|
87
|
+
*
|
|
88
|
+
* // Find all source filters (generators)
|
|
89
|
+
* const sources = filters.filter(f => f.isSource());
|
|
90
|
+
* console.log(`Source filters: ${sources.length}`);
|
|
91
|
+
*
|
|
92
|
+
* // Find all sink filters (outputs)
|
|
93
|
+
* const sinks = filters.filter(f => f.isSink());
|
|
94
|
+
* console.log(`Sink filters: ${sinks.length}`);
|
|
118
95
|
* ```
|
|
119
96
|
*
|
|
120
|
-
* @see {@link getByName} To
|
|
97
|
+
* @see {@link getByName} To get a specific filter
|
|
121
98
|
*/
|
|
122
99
|
static getList() {
|
|
123
100
|
const natives = bindings.Filter.getList();
|
|
@@ -126,9 +103,9 @@ export class Filter {
|
|
|
126
103
|
/**
|
|
127
104
|
* Filter name.
|
|
128
105
|
*
|
|
129
|
-
*
|
|
106
|
+
* Unique identifier for the filter (e.g., 'scale', 'overlay').
|
|
130
107
|
*
|
|
131
|
-
*
|
|
108
|
+
* Direct mapping to AVFilter->name.
|
|
132
109
|
*/
|
|
133
110
|
get name() {
|
|
134
111
|
return this.native.name;
|
|
@@ -136,9 +113,9 @@ export class Filter {
|
|
|
136
113
|
/**
|
|
137
114
|
* Filter description.
|
|
138
115
|
*
|
|
139
|
-
* Direct mapping to AVFilter->description
|
|
140
|
-
*
|
|
141
116
|
* Human-readable description of what the filter does.
|
|
117
|
+
*
|
|
118
|
+
* Direct mapping to AVFilter->description.
|
|
142
119
|
*/
|
|
143
120
|
get description() {
|
|
144
121
|
return this.native.description;
|
|
@@ -146,10 +123,10 @@ export class Filter {
|
|
|
146
123
|
/**
|
|
147
124
|
* Input pads.
|
|
148
125
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* Array of input connection points for the filter.
|
|
126
|
+
* Array of input pad descriptors.
|
|
152
127
|
* Empty array for source filters.
|
|
128
|
+
*
|
|
129
|
+
* Direct mapping to AVFilter->inputs.
|
|
153
130
|
*/
|
|
154
131
|
get inputs() {
|
|
155
132
|
return this.native.inputs;
|
|
@@ -157,10 +134,10 @@ export class Filter {
|
|
|
157
134
|
/**
|
|
158
135
|
* Output pads.
|
|
159
136
|
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* Array of output connection points for the filter.
|
|
137
|
+
* Array of output pad descriptors.
|
|
163
138
|
* Empty array for sink filters.
|
|
139
|
+
*
|
|
140
|
+
* Direct mapping to AVFilter->outputs.
|
|
164
141
|
*/
|
|
165
142
|
get outputs() {
|
|
166
143
|
return this.native.outputs;
|
|
@@ -168,90 +145,95 @@ export class Filter {
|
|
|
168
145
|
/**
|
|
169
146
|
* Filter flags.
|
|
170
147
|
*
|
|
171
|
-
*
|
|
148
|
+
* Combination of AVFILTER_FLAG_* values indicating filter capabilities.
|
|
172
149
|
*
|
|
173
|
-
*
|
|
150
|
+
* Direct mapping to AVFilter->flags.
|
|
174
151
|
*/
|
|
175
152
|
get flags() {
|
|
176
153
|
return this.native.flags;
|
|
177
154
|
}
|
|
178
155
|
/**
|
|
179
|
-
* Check if
|
|
156
|
+
* Check if filter is a source.
|
|
180
157
|
*
|
|
181
|
-
* Source filters
|
|
158
|
+
* Source filters generate frames without input
|
|
159
|
+
* (e.g., 'testsrc', 'color', 'anullsrc').
|
|
182
160
|
*
|
|
183
|
-
* @returns
|
|
161
|
+
* @returns True if filter has no inputs
|
|
184
162
|
*
|
|
185
163
|
* @example
|
|
186
164
|
* ```typescript
|
|
187
|
-
* const filter = Filter.getByName('
|
|
188
|
-
* if (filter
|
|
165
|
+
* const filter = Filter.getByName('testsrc');
|
|
166
|
+
* if (filter?.isSource()) {
|
|
189
167
|
* console.log('This is a source filter');
|
|
190
168
|
* }
|
|
191
169
|
* ```
|
|
170
|
+
*
|
|
171
|
+
* @see {@link isSink} To check for sink filters
|
|
192
172
|
*/
|
|
193
173
|
isSource() {
|
|
194
174
|
return this.inputs.length === 0;
|
|
195
175
|
}
|
|
196
176
|
/**
|
|
197
|
-
* Check if
|
|
177
|
+
* Check if filter is a sink.
|
|
198
178
|
*
|
|
199
|
-
* Sink filters
|
|
179
|
+
* Sink filters consume frames without output
|
|
180
|
+
* (e.g., 'nullsink', 'buffersink').
|
|
200
181
|
*
|
|
201
|
-
* @returns
|
|
182
|
+
* @returns True if filter has no outputs
|
|
202
183
|
*
|
|
203
184
|
* @example
|
|
204
185
|
* ```typescript
|
|
205
|
-
* const filter = Filter.getByName('
|
|
206
|
-
* if (filter
|
|
186
|
+
* const filter = Filter.getByName('nullsink');
|
|
187
|
+
* if (filter?.isSink()) {
|
|
207
188
|
* console.log('This is a sink filter');
|
|
208
189
|
* }
|
|
209
190
|
* ```
|
|
191
|
+
*
|
|
192
|
+
* @see {@link isSource} To check for source filters
|
|
210
193
|
*/
|
|
211
194
|
isSink() {
|
|
212
195
|
return this.outputs.length === 0;
|
|
213
196
|
}
|
|
214
197
|
/**
|
|
215
|
-
* Check if
|
|
198
|
+
* Check if filter processes video.
|
|
216
199
|
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* @returns true if the filter processes video data, false otherwise
|
|
200
|
+
* @returns True if filter has video inputs or outputs
|
|
220
201
|
*
|
|
221
202
|
* @example
|
|
222
203
|
* ```typescript
|
|
223
|
-
* const
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* }
|
|
204
|
+
* const filters = Filter.getList();
|
|
205
|
+
* const videoFilters = filters.filter(f => f.isVideo());
|
|
206
|
+
* console.log(`Video filters: ${videoFilters.length}`);
|
|
227
207
|
* ```
|
|
208
|
+
*
|
|
209
|
+
* @see {@link isAudio} To check for audio filters
|
|
228
210
|
*/
|
|
229
211
|
isVideo() {
|
|
230
212
|
return this.inputs.some((i) => i.type === AVMEDIA_TYPE_VIDEO) || this.outputs.some((o) => o.type === AVMEDIA_TYPE_VIDEO);
|
|
231
213
|
}
|
|
232
214
|
/**
|
|
233
|
-
* Check if
|
|
234
|
-
*
|
|
235
|
-
* Checks if any input or output pad handles audio data.
|
|
215
|
+
* Check if filter processes audio.
|
|
236
216
|
*
|
|
237
|
-
* @returns
|
|
217
|
+
* @returns True if filter has audio inputs or outputs
|
|
238
218
|
*
|
|
239
219
|
* @example
|
|
240
220
|
* ```typescript
|
|
241
|
-
* const
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* }
|
|
221
|
+
* const filters = Filter.getList();
|
|
222
|
+
* const audioFilters = filters.filter(f => f.isAudio());
|
|
223
|
+
* console.log(`Audio filters: ${audioFilters.length}`);
|
|
245
224
|
* ```
|
|
225
|
+
*
|
|
226
|
+
* @see {@link isVideo} To check for video filters
|
|
246
227
|
*/
|
|
247
228
|
isAudio() {
|
|
248
229
|
return this.inputs.some((i) => i.type === AVMEDIA_TYPE_AUDIO) || this.outputs.some((o) => o.type === AVMEDIA_TYPE_AUDIO);
|
|
249
230
|
}
|
|
250
231
|
/**
|
|
251
|
-
* Get the native
|
|
232
|
+
* Get the underlying native Filter object.
|
|
252
233
|
*
|
|
253
|
-
* @
|
|
254
|
-
*
|
|
234
|
+
* @returns The native Filter binding object
|
|
235
|
+
*
|
|
236
|
+
* @internal
|
|
255
237
|
*/
|
|
256
238
|
getNative() {
|
|
257
239
|
return this.native;
|
package/dist/lib/filter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/lib/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/lib/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,MAAM;IACT,MAAM,CAAe;IAE7B;;;OAGG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,SAAS,CAAC,IAAY;QAC3B,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,OAAO;QACZ,MAAM,OA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