node-av 1.3.0 → 2.1.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 +47 -40
- package/binding.gyp +12 -0
- package/dist/api/bitstream-filter.d.ts +134 -2
- package/dist/api/bitstream-filter.js +200 -2
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/decoder.d.ts +261 -105
- package/dist/api/decoder.js +384 -171
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/encoder.d.ts +338 -74
- package/dist/api/encoder.js +546 -188
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +479 -1513
- package/dist/api/filter-presets.js +1044 -2005
- package/dist/api/filter-presets.js.map +1 -1
- package/dist/api/filter.d.ts +370 -150
- package/dist/api/filter.js +647 -364
- package/dist/api/filter.js.map +1 -1
- package/dist/api/hardware.d.ts +25 -31
- package/dist/api/hardware.js +36 -70
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +6 -0
- package/dist/api/io-stream.js +2 -0
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/media-input.d.ts +208 -2
- package/dist/api/media-input.js +356 -8
- package/dist/api/media-input.js.map +1 -1
- package/dist/api/media-output.d.ts +142 -104
- package/dist/api/media-output.js +446 -179
- package/dist/api/media-output.js.map +1 -1
- package/dist/api/pipeline.d.ts +82 -17
- package/dist/api/pipeline.js +80 -42
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/types.d.ts +24 -57
- package/dist/api/utils.js +2 -0
- package/dist/api/utils.js.map +1 -1
- package/dist/lib/audio-fifo.d.ts +103 -0
- package/dist/lib/audio-fifo.js +109 -0
- package/dist/lib/audio-fifo.js.map +1 -1
- package/dist/lib/binding.d.ts +1 -0
- package/dist/lib/binding.js.map +1 -1
- package/dist/lib/bitstream-filter-context.d.ts +79 -0
- package/dist/lib/bitstream-filter-context.js +83 -0
- package/dist/lib/bitstream-filter-context.js.map +1 -1
- package/dist/lib/bitstream-filter.d.ts +2 -0
- package/dist/lib/bitstream-filter.js +2 -0
- package/dist/lib/bitstream-filter.js.map +1 -1
- package/dist/lib/codec-context.d.ts +168 -0
- package/dist/lib/codec-context.js +178 -0
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +3 -0
- package/dist/lib/codec-parameters.js +3 -0
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +6 -0
- package/dist/lib/codec-parser.js +6 -0
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +12 -0
- package/dist/lib/codec.js +12 -0
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.d.ts +18 -2
- package/dist/lib/dictionary.js +18 -2
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.d.ts +8 -0
- package/dist/lib/error.js +9 -0
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/filter-context.d.ts +119 -2
- package/dist/lib/filter-context.js +119 -0
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +80 -0
- package/dist/lib/filter-graph.js +84 -0
- package/dist/lib/filter-graph.js.map +1 -1
- package/dist/lib/filter-inout.d.ts +1 -0
- package/dist/lib/filter-inout.js +1 -0
- package/dist/lib/filter-inout.js.map +1 -1
- package/dist/lib/filter.d.ts +2 -0
- package/dist/lib/filter.js +2 -0
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +356 -20
- package/dist/lib/format-context.js +375 -23
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +84 -1
- package/dist/lib/frame.js +96 -0
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +8 -0
- package/dist/lib/hardware-device-context.js +8 -0
- package/dist/lib/hardware-device-context.js.map +1 -1
- package/dist/lib/hardware-frames-context.d.ts +55 -0
- package/dist/lib/hardware-frames-context.js +57 -0
- package/dist/lib/hardware-frames-context.js.map +1 -1
- package/dist/lib/input-format.d.ts +43 -3
- package/dist/lib/input-format.js +48 -0
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/io-context.d.ts +212 -0
- package/dist/lib/io-context.js +228 -0
- package/dist/lib/io-context.js.map +1 -1
- package/dist/lib/log.d.ts +2 -0
- package/dist/lib/log.js +2 -0
- package/dist/lib/log.js.map +1 -1
- package/dist/lib/native-types.d.ts +39 -1
- package/dist/lib/option.d.ts +90 -0
- package/dist/lib/option.js +97 -0
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +4 -0
- package/dist/lib/output-format.js +4 -0
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +7 -0
- package/dist/lib/packet.js +7 -0
- package/dist/lib/packet.js.map +1 -1
- package/dist/lib/rational.d.ts +1 -0
- package/dist/lib/rational.js +1 -0
- package/dist/lib/rational.js.map +1 -1
- package/dist/lib/software-resample-context.d.ts +64 -0
- package/dist/lib/software-resample-context.js +66 -0
- package/dist/lib/software-resample-context.js.map +1 -1
- package/dist/lib/software-scale-context.d.ts +98 -0
- package/dist/lib/software-scale-context.js +102 -0
- package/dist/lib/software-scale-context.js.map +1 -1
- package/dist/lib/stream.d.ts +1 -0
- package/dist/lib/stream.js +1 -0
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/utilities.d.ts +60 -0
- package/dist/lib/utilities.js +60 -0
- package/dist/lib/utilities.js.map +1 -1
- package/package.json +18 -18
- package/release_notes.md +0 -29
package/dist/lib/codec-parser.js
CHANGED
|
@@ -86,11 +86,17 @@ export class CodecParser {
|
|
|
86
86
|
* Direct mapping to av_parser_parse2().
|
|
87
87
|
*
|
|
88
88
|
* @param codecContext - Codec context for parser state
|
|
89
|
+
*
|
|
89
90
|
* @param packet - Packet to receive parsed frame
|
|
91
|
+
*
|
|
90
92
|
* @param data - Raw bitstream data to parse
|
|
93
|
+
*
|
|
91
94
|
* @param pts - Presentation timestamp for data
|
|
95
|
+
*
|
|
92
96
|
* @param dts - Decoding timestamp for data
|
|
97
|
+
*
|
|
93
98
|
* @param pos - Byte position in stream
|
|
99
|
+
*
|
|
94
100
|
* @returns Number of bytes consumed from data, negative on error:
|
|
95
101
|
* - AVERROR_EINVAL: Invalid parameters
|
|
96
102
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-parser.js","sourceRoot":"","sources":["../../src/lib/codec-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAOxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,WAAW;IACd,MAAM,CAAoB;IAElC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CAAC,OAAkB;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"codec-parser.js","sourceRoot":"","sources":["../../src/lib/codec-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAOxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,WAAW;IACd,MAAM,CAAoB;IAElC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CAAC,OAAkB;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,MAAM,CAAC,YAA0B,EAAE,MAAc,EAAE,IAAY,EAAE,GAAW,EAAE,GAAW,EAAE,GAAW;QACpG,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;CACF"}
|
package/dist/lib/codec.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
50
50
|
private native;
|
|
51
51
|
/**
|
|
52
52
|
* @param native - The native codec instance
|
|
53
|
+
*
|
|
53
54
|
* @internal
|
|
54
55
|
*/
|
|
55
56
|
constructor(native: NativeCodec);
|
|
@@ -61,6 +62,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
61
62
|
* Direct mapping to avcodec_find_decoder().
|
|
62
63
|
*
|
|
63
64
|
* @param id - Codec ID to search for
|
|
65
|
+
*
|
|
64
66
|
* @returns Decoder if found, null otherwise
|
|
65
67
|
*
|
|
66
68
|
* @example
|
|
@@ -90,6 +92,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
90
92
|
* Direct mapping to avcodec_find_decoder_by_name().
|
|
91
93
|
*
|
|
92
94
|
* @param name - Decoder name
|
|
95
|
+
*
|
|
93
96
|
* @returns Decoder if found, null otherwise
|
|
94
97
|
*
|
|
95
98
|
* @example
|
|
@@ -115,6 +118,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
115
118
|
* Direct mapping to avcodec_find_encoder().
|
|
116
119
|
*
|
|
117
120
|
* @param id - Codec ID to search for
|
|
121
|
+
*
|
|
118
122
|
* @returns Encoder if found, null otherwise
|
|
119
123
|
*
|
|
120
124
|
* @example
|
|
@@ -144,6 +148,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
144
148
|
* Direct mapping to avcodec_find_encoder_by_name().
|
|
145
149
|
*
|
|
146
150
|
* @param name - Encoder name
|
|
151
|
+
*
|
|
147
152
|
* @returns Encoder if found, null otherwise
|
|
148
153
|
*
|
|
149
154
|
* @example
|
|
@@ -195,6 +200,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
195
200
|
* Direct mapping to av_codec_iterate().
|
|
196
201
|
*
|
|
197
202
|
* @param opaque - Iteration state (null to start)
|
|
203
|
+
*
|
|
198
204
|
* @returns Next codec and state, or null when done
|
|
199
205
|
*
|
|
200
206
|
* @example
|
|
@@ -393,6 +399,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
393
399
|
* Check if codec supports specific device type.
|
|
394
400
|
*
|
|
395
401
|
* @param deviceType - Hardware device type to check
|
|
402
|
+
*
|
|
396
403
|
* @returns True if device type is supported
|
|
397
404
|
*
|
|
398
405
|
* @example
|
|
@@ -411,6 +418,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
411
418
|
* Check if decoder supports hardware acceleration.
|
|
412
419
|
*
|
|
413
420
|
* @param deviceType - Optional specific device type
|
|
421
|
+
*
|
|
414
422
|
* @returns True if hardware decoding is supported
|
|
415
423
|
*
|
|
416
424
|
* @example
|
|
@@ -433,6 +441,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
433
441
|
* Check if encoder supports hardware acceleration.
|
|
434
442
|
*
|
|
435
443
|
* @param deviceType - Optional specific device type
|
|
444
|
+
*
|
|
436
445
|
* @returns True if hardware encoding is supported
|
|
437
446
|
*
|
|
438
447
|
* @example
|
|
@@ -479,6 +488,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
479
488
|
* Returns the hardware configuration methods for a specific device.
|
|
480
489
|
*
|
|
481
490
|
* @param deviceType - Device type to query
|
|
491
|
+
*
|
|
482
492
|
* @returns Method flags, or null if not supported
|
|
483
493
|
*
|
|
484
494
|
* @example
|
|
@@ -502,6 +512,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
502
512
|
* Direct mapping to avcodec_get_hw_config().
|
|
503
513
|
*
|
|
504
514
|
* @param index - Configuration index
|
|
515
|
+
*
|
|
505
516
|
* @returns Hardware configuration, or null if index out of range
|
|
506
517
|
*
|
|
507
518
|
* @example
|
|
@@ -535,6 +546,7 @@ export declare class Codec implements NativeWrapper<NativeCodec> {
|
|
|
535
546
|
* Create codec from native instance.
|
|
536
547
|
*
|
|
537
548
|
* @param native - Native codec instance
|
|
549
|
+
*
|
|
538
550
|
* @returns Codec wrapper or null
|
|
539
551
|
*
|
|
540
552
|
* @internal
|
package/dist/lib/codec.js
CHANGED
|
@@ -47,6 +47,7 @@ export class Codec {
|
|
|
47
47
|
native;
|
|
48
48
|
/**
|
|
49
49
|
* @param native - The native codec instance
|
|
50
|
+
*
|
|
50
51
|
* @internal
|
|
51
52
|
*/
|
|
52
53
|
constructor(native) {
|
|
@@ -60,6 +61,7 @@ export class Codec {
|
|
|
60
61
|
* Direct mapping to avcodec_find_decoder().
|
|
61
62
|
*
|
|
62
63
|
* @param id - Codec ID to search for
|
|
64
|
+
*
|
|
63
65
|
* @returns Decoder if found, null otherwise
|
|
64
66
|
*
|
|
65
67
|
* @example
|
|
@@ -92,6 +94,7 @@ export class Codec {
|
|
|
92
94
|
* Direct mapping to avcodec_find_decoder_by_name().
|
|
93
95
|
*
|
|
94
96
|
* @param name - Decoder name
|
|
97
|
+
*
|
|
95
98
|
* @returns Decoder if found, null otherwise
|
|
96
99
|
*
|
|
97
100
|
* @example
|
|
@@ -120,6 +123,7 @@ export class Codec {
|
|
|
120
123
|
* Direct mapping to avcodec_find_encoder().
|
|
121
124
|
*
|
|
122
125
|
* @param id - Codec ID to search for
|
|
126
|
+
*
|
|
123
127
|
* @returns Encoder if found, null otherwise
|
|
124
128
|
*
|
|
125
129
|
* @example
|
|
@@ -152,6 +156,7 @@ export class Codec {
|
|
|
152
156
|
* Direct mapping to avcodec_find_encoder_by_name().
|
|
153
157
|
*
|
|
154
158
|
* @param name - Encoder name
|
|
159
|
+
*
|
|
155
160
|
* @returns Encoder if found, null otherwise
|
|
156
161
|
*
|
|
157
162
|
* @example
|
|
@@ -209,6 +214,7 @@ export class Codec {
|
|
|
209
214
|
* Direct mapping to av_codec_iterate().
|
|
210
215
|
*
|
|
211
216
|
* @param opaque - Iteration state (null to start)
|
|
217
|
+
*
|
|
212
218
|
* @returns Next codec and state, or null when done
|
|
213
219
|
*
|
|
214
220
|
* @example
|
|
@@ -461,6 +467,7 @@ export class Codec {
|
|
|
461
467
|
* Check if codec supports specific device type.
|
|
462
468
|
*
|
|
463
469
|
* @param deviceType - Hardware device type to check
|
|
470
|
+
*
|
|
464
471
|
* @returns True if device type is supported
|
|
465
472
|
*
|
|
466
473
|
* @example
|
|
@@ -493,6 +500,7 @@ export class Codec {
|
|
|
493
500
|
* Check if decoder supports hardware acceleration.
|
|
494
501
|
*
|
|
495
502
|
* @param deviceType - Optional specific device type
|
|
503
|
+
*
|
|
496
504
|
* @returns True if hardware decoding is supported
|
|
497
505
|
*
|
|
498
506
|
* @example
|
|
@@ -522,6 +530,7 @@ export class Codec {
|
|
|
522
530
|
* Check if encoder supports hardware acceleration.
|
|
523
531
|
*
|
|
524
532
|
* @param deviceType - Optional specific device type
|
|
533
|
+
*
|
|
525
534
|
* @returns True if hardware encoding is supported
|
|
526
535
|
*
|
|
527
536
|
* @example
|
|
@@ -587,6 +596,7 @@ export class Codec {
|
|
|
587
596
|
* Returns the hardware configuration methods for a specific device.
|
|
588
597
|
*
|
|
589
598
|
* @param deviceType - Device type to query
|
|
599
|
+
*
|
|
590
600
|
* @returns Method flags, or null if not supported
|
|
591
601
|
*
|
|
592
602
|
* @example
|
|
@@ -620,6 +630,7 @@ export class Codec {
|
|
|
620
630
|
* Direct mapping to avcodec_get_hw_config().
|
|
621
631
|
*
|
|
622
632
|
* @param index - Configuration index
|
|
633
|
+
*
|
|
623
634
|
* @returns Hardware configuration, or null if index out of range
|
|
624
635
|
*
|
|
625
636
|
* @example
|
|
@@ -653,6 +664,7 @@ export class Codec {
|
|
|
653
664
|
* Create codec from native instance.
|
|
654
665
|
*
|
|
655
666
|
* @param native - Native codec instance
|
|
667
|
+
*
|
|
656
668
|
* @returns Codec wrapper or null
|
|
657
669
|
*
|
|
658
670
|
* @internal
|
package/dist/lib/codec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/lib/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,uCAAuC,EAAE,MAAM,2BAA2B,CAAC;AAC7H,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,OAAO,KAAK;IACR,MAAM,CAAc;IAE5B
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/lib/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,uCAAuC,EAAE,MAAM,2BAA2B,CAAC;AAC7H,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,M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;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,KAAa;QAKvB,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,CAAC,MAA0B;QAC1C,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;CACF"}
|
package/dist/lib/dictionary.d.ts
CHANGED
|
@@ -50,7 +50,9 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
50
50
|
* Convenience method to create a dictionary from a plain object.
|
|
51
51
|
*
|
|
52
52
|
* @param obj - Object with string key-value pairs
|
|
53
|
+
*
|
|
53
54
|
* @param flags - Flags for setting entries
|
|
55
|
+
*
|
|
54
56
|
* @returns New dictionary with entries from object
|
|
55
57
|
*
|
|
56
58
|
* @example
|
|
@@ -65,16 +67,17 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
65
67
|
* // Use for codec options
|
|
66
68
|
* const options = Dictionary.fromObject({
|
|
67
69
|
* 'preset': 'medium',
|
|
68
|
-
* 'crf':
|
|
70
|
+
* 'crf': 23,
|
|
69
71
|
* 'profile': 'high'
|
|
70
72
|
* });
|
|
71
73
|
* ```
|
|
72
74
|
*/
|
|
73
|
-
static fromObject(obj: Record<string, string>, flags?: AVDictFlag): Dictionary;
|
|
75
|
+
static fromObject(obj: Record<string, string | number>, flags?: AVDictFlag): Dictionary;
|
|
74
76
|
/**
|
|
75
77
|
* Create dictionary from native instance.
|
|
76
78
|
*
|
|
77
79
|
* @param native - Native dictionary instance
|
|
80
|
+
*
|
|
78
81
|
* @returns Dictionary wrapper
|
|
79
82
|
*
|
|
80
83
|
* @internal
|
|
@@ -126,7 +129,9 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
126
129
|
* Direct mapping to av_dict_copy().
|
|
127
130
|
*
|
|
128
131
|
* @param dst - Destination dictionary
|
|
132
|
+
*
|
|
129
133
|
* @param flags - Copy flags
|
|
134
|
+
*
|
|
130
135
|
* @returns 0 on success, negative AVERROR on error:
|
|
131
136
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
132
137
|
*
|
|
@@ -149,8 +154,11 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
149
154
|
* Direct mapping to av_dict_set().
|
|
150
155
|
*
|
|
151
156
|
* @param key - Entry key
|
|
157
|
+
*
|
|
152
158
|
* @param value - Entry value
|
|
159
|
+
*
|
|
153
160
|
* @param flags - Set flags (e.g., AV_DICT_DONT_OVERWRITE)
|
|
161
|
+
*
|
|
154
162
|
* @returns 0 on success, negative AVERROR on error:
|
|
155
163
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
156
164
|
*
|
|
@@ -179,7 +187,9 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
179
187
|
* Direct mapping to av_dict_get().
|
|
180
188
|
*
|
|
181
189
|
* @param key - Entry key to look up
|
|
190
|
+
*
|
|
182
191
|
* @param flags - Search flags (e.g., AV_DICT_IGNORE_SUFFIX)
|
|
192
|
+
*
|
|
183
193
|
* @returns Entry value, or null if not found
|
|
184
194
|
*
|
|
185
195
|
* @example
|
|
@@ -241,9 +251,13 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
241
251
|
* Direct mapping to av_dict_parse_string().
|
|
242
252
|
*
|
|
243
253
|
* @param str - String to parse
|
|
254
|
+
*
|
|
244
255
|
* @param keyValSep - Separator between key and value
|
|
256
|
+
*
|
|
245
257
|
* @param pairsSep - Separator between pairs
|
|
258
|
+
*
|
|
246
259
|
* @param flags - Parse flags
|
|
260
|
+
*
|
|
247
261
|
* @returns 0 on success, negative AVERROR on error:
|
|
248
262
|
* - AVERROR_EINVAL: Invalid format
|
|
249
263
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
@@ -272,7 +286,9 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
|
|
|
272
286
|
* Direct mapping to av_dict_get_string().
|
|
273
287
|
*
|
|
274
288
|
* @param keyValSep - Separator between key and value
|
|
289
|
+
*
|
|
275
290
|
* @param pairsSep - Separator between pairs
|
|
291
|
+
*
|
|
276
292
|
* @returns Formatted string, or null on error
|
|
277
293
|
*
|
|
278
294
|
* @example
|
package/dist/lib/dictionary.js
CHANGED
|
@@ -52,7 +52,9 @@ export class Dictionary {
|
|
|
52
52
|
* Convenience method to create a dictionary from a plain object.
|
|
53
53
|
*
|
|
54
54
|
* @param obj - Object with string key-value pairs
|
|
55
|
+
*
|
|
55
56
|
* @param flags - Flags for setting entries
|
|
57
|
+
*
|
|
56
58
|
* @returns New dictionary with entries from object
|
|
57
59
|
*
|
|
58
60
|
* @example
|
|
@@ -67,7 +69,7 @@ export class Dictionary {
|
|
|
67
69
|
* // Use for codec options
|
|
68
70
|
* const options = Dictionary.fromObject({
|
|
69
71
|
* 'preset': 'medium',
|
|
70
|
-
* 'crf':
|
|
72
|
+
* 'crf': 23,
|
|
71
73
|
* 'profile': 'high'
|
|
72
74
|
* });
|
|
73
75
|
* ```
|
|
@@ -75,7 +77,7 @@ export class Dictionary {
|
|
|
75
77
|
static fromObject(obj, flags = AVFLAG_NONE) {
|
|
76
78
|
const dict = new Dictionary();
|
|
77
79
|
for (const [key, value] of Object.entries(obj)) {
|
|
78
|
-
dict.set(key, value, flags);
|
|
80
|
+
dict.set(key, value.toString(), flags);
|
|
79
81
|
}
|
|
80
82
|
return dict;
|
|
81
83
|
}
|
|
@@ -83,6 +85,7 @@ export class Dictionary {
|
|
|
83
85
|
* Create dictionary from native instance.
|
|
84
86
|
*
|
|
85
87
|
* @param native - Native dictionary instance
|
|
88
|
+
*
|
|
86
89
|
* @returns Dictionary wrapper
|
|
87
90
|
*
|
|
88
91
|
* @internal
|
|
@@ -142,7 +145,9 @@ export class Dictionary {
|
|
|
142
145
|
* Direct mapping to av_dict_copy().
|
|
143
146
|
*
|
|
144
147
|
* @param dst - Destination dictionary
|
|
148
|
+
*
|
|
145
149
|
* @param flags - Copy flags
|
|
150
|
+
*
|
|
146
151
|
* @returns 0 on success, negative AVERROR on error:
|
|
147
152
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
148
153
|
*
|
|
@@ -167,8 +172,11 @@ export class Dictionary {
|
|
|
167
172
|
* Direct mapping to av_dict_set().
|
|
168
173
|
*
|
|
169
174
|
* @param key - Entry key
|
|
175
|
+
*
|
|
170
176
|
* @param value - Entry value
|
|
177
|
+
*
|
|
171
178
|
* @param flags - Set flags (e.g., AV_DICT_DONT_OVERWRITE)
|
|
179
|
+
*
|
|
172
180
|
* @returns 0 on success, negative AVERROR on error:
|
|
173
181
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
174
182
|
*
|
|
@@ -199,7 +207,9 @@ export class Dictionary {
|
|
|
199
207
|
* Direct mapping to av_dict_get().
|
|
200
208
|
*
|
|
201
209
|
* @param key - Entry key to look up
|
|
210
|
+
*
|
|
202
211
|
* @param flags - Search flags (e.g., AV_DICT_IGNORE_SUFFIX)
|
|
212
|
+
*
|
|
203
213
|
* @returns Entry value, or null if not found
|
|
204
214
|
*
|
|
205
215
|
* @example
|
|
@@ -267,9 +277,13 @@ export class Dictionary {
|
|
|
267
277
|
* Direct mapping to av_dict_parse_string().
|
|
268
278
|
*
|
|
269
279
|
* @param str - String to parse
|
|
280
|
+
*
|
|
270
281
|
* @param keyValSep - Separator between key and value
|
|
282
|
+
*
|
|
271
283
|
* @param pairsSep - Separator between pairs
|
|
284
|
+
*
|
|
272
285
|
* @param flags - Parse flags
|
|
286
|
+
*
|
|
273
287
|
* @returns 0 on success, negative AVERROR on error:
|
|
274
288
|
* - AVERROR_EINVAL: Invalid format
|
|
275
289
|
* - AVERROR_ENOMEM: Memory allocation failure
|
|
@@ -300,7 +314,9 @@ export class Dictionary {
|
|
|
300
314
|
* Direct mapping to av_dict_get_string().
|
|
301
315
|
*
|
|
302
316
|
* @param keyValSep - Separator between key and value
|
|
317
|
+
*
|
|
303
318
|
* @param pairsSep - Separator between pairs
|
|
319
|
+
*
|
|
304
320
|
* @returns Formatted string, or null on error
|
|
305
321
|
*
|
|
306
322
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../src/lib/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAAmB;IAEjC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC1C,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../src/lib/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAAmB;IAEjC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,UAAU,CAAC,GAAoC,EAAE,QAAoB,WAAW;QACrF,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC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AE,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,WAAW,CAAC,GAAW,EAAE,SAAiB,EAAE,QAAgB,EAAE,QAAoB,WAAW;QAC3F,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,SAAS,CAAC,SAAiB,EAAE,QAAgB;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,CAAC;CACF"}
|
package/dist/lib/error.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
105
105
|
* Direct mapping to av_strerror().
|
|
106
106
|
*
|
|
107
107
|
* @param errnum - FFmpeg error code
|
|
108
|
+
*
|
|
108
109
|
* @returns Error description string
|
|
109
110
|
*
|
|
110
111
|
* @example
|
|
@@ -122,6 +123,7 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
122
123
|
* Direct mapping to AVERROR() macro.
|
|
123
124
|
*
|
|
124
125
|
* @param errorName - POSIX error name
|
|
126
|
+
*
|
|
125
127
|
* @returns FFmpeg error code
|
|
126
128
|
*
|
|
127
129
|
* @example
|
|
@@ -141,6 +143,7 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
141
143
|
* FFmpeg errors are negative values.
|
|
142
144
|
*
|
|
143
145
|
* @param code - Return code to check
|
|
146
|
+
*
|
|
144
147
|
* @returns True if code is an error
|
|
145
148
|
*
|
|
146
149
|
* @example
|
|
@@ -158,6 +161,7 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
158
161
|
* Creates an FFmpegError instance if the code is an error.
|
|
159
162
|
*
|
|
160
163
|
* @param code - FFmpeg return code
|
|
164
|
+
*
|
|
161
165
|
* @returns Error instance or null if not an error
|
|
162
166
|
*
|
|
163
167
|
* @example
|
|
@@ -176,7 +180,9 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
176
180
|
* Commonly used pattern for FFmpeg API calls.
|
|
177
181
|
*
|
|
178
182
|
* @param code - FFmpeg return code
|
|
183
|
+
*
|
|
179
184
|
* @param operation - Optional operation name for context
|
|
185
|
+
*
|
|
180
186
|
* @throws {FFmpegError} If code is negative
|
|
181
187
|
*
|
|
182
188
|
* @example
|
|
@@ -198,7 +204,9 @@ export declare class FFmpegError extends Error implements NativeWrapper<NativeFF
|
|
|
198
204
|
* Convenience method to check for specific error codes.
|
|
199
205
|
*
|
|
200
206
|
* @param code - Return code to check
|
|
207
|
+
*
|
|
201
208
|
* @param errorCode - Error code to compare against
|
|
209
|
+
*
|
|
202
210
|
* @returns True if codes match
|
|
203
211
|
*
|
|
204
212
|
* @example
|
package/dist/lib/error.js
CHANGED
|
@@ -37,6 +37,7 @@ const errorCache = {};
|
|
|
37
37
|
* Get a cached FFmpeg error code by name.
|
|
38
38
|
*
|
|
39
39
|
* @param name - POSIX error name
|
|
40
|
+
*
|
|
40
41
|
* @returns FFmpeg error code
|
|
41
42
|
*
|
|
42
43
|
* @internal
|
|
@@ -134,6 +135,7 @@ export class FFmpegError extends Error {
|
|
|
134
135
|
* Direct mapping to av_strerror().
|
|
135
136
|
*
|
|
136
137
|
* @param errnum - FFmpeg error code
|
|
138
|
+
*
|
|
137
139
|
* @returns Error description string
|
|
138
140
|
*
|
|
139
141
|
* @example
|
|
@@ -153,6 +155,7 @@ export class FFmpegError extends Error {
|
|
|
153
155
|
* Direct mapping to AVERROR() macro.
|
|
154
156
|
*
|
|
155
157
|
* @param errorName - POSIX error name
|
|
158
|
+
*
|
|
156
159
|
* @returns FFmpeg error code
|
|
157
160
|
*
|
|
158
161
|
* @example
|
|
@@ -174,6 +177,7 @@ export class FFmpegError extends Error {
|
|
|
174
177
|
* FFmpeg errors are negative values.
|
|
175
178
|
*
|
|
176
179
|
* @param code - Return code to check
|
|
180
|
+
*
|
|
177
181
|
* @returns True if code is an error
|
|
178
182
|
*
|
|
179
183
|
* @example
|
|
@@ -196,6 +200,7 @@ export class FFmpegError extends Error {
|
|
|
196
200
|
* Creates an FFmpegError instance if the code is an error.
|
|
197
201
|
*
|
|
198
202
|
* @param code - FFmpeg return code
|
|
203
|
+
*
|
|
199
204
|
* @returns Error instance or null if not an error
|
|
200
205
|
*
|
|
201
206
|
* @example
|
|
@@ -219,7 +224,9 @@ export class FFmpegError extends Error {
|
|
|
219
224
|
* Commonly used pattern for FFmpeg API calls.
|
|
220
225
|
*
|
|
221
226
|
* @param code - FFmpeg return code
|
|
227
|
+
*
|
|
222
228
|
* @param operation - Optional operation name for context
|
|
229
|
+
*
|
|
223
230
|
* @throws {FFmpegError} If code is negative
|
|
224
231
|
*
|
|
225
232
|
* @example
|
|
@@ -249,7 +256,9 @@ export class FFmpegError extends Error {
|
|
|
249
256
|
* Convenience method to check for specific error codes.
|
|
250
257
|
*
|
|
251
258
|
* @param code - Return code to check
|
|
259
|
+
*
|
|
252
260
|
* @param errorCode - Error code to compare against
|
|
261
|
+
*
|
|
253
262
|
* @returns True if codes match
|
|
254
263
|
*
|
|
255
264
|
* @example
|
package/dist/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/lib/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,UAiBX;AAjBD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAED,uDAAuD;AACvD,MAAM,UAAU,GAA4B,EAAE,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/lib/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,UAiBX;AAjBD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAED,uDAAuD;AACvD,MAAM,UAAU,GAA4B,EAAE,CAAC;AAE/C;;;;;;;;GAQG;AACH,SAAS,cAAc,CAAC,IAAgB;IACt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