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/io-context.js
CHANGED
|
@@ -78,6 +78,7 @@ export class IOContext extends OptionMember {
|
|
|
78
78
|
* Used internally for wrapping native I/O contexts.
|
|
79
79
|
*
|
|
80
80
|
* @param native - Native IOContext binding object
|
|
81
|
+
*
|
|
81
82
|
* @returns Wrapped IOContext instance
|
|
82
83
|
*
|
|
83
84
|
* @internal
|
|
@@ -184,6 +185,7 @@ export class IOContext extends OptionMember {
|
|
|
184
185
|
* Direct mapping to avio_alloc_context() without callbacks.
|
|
185
186
|
*
|
|
186
187
|
* @param bufferSize - Size of internal buffer
|
|
188
|
+
*
|
|
187
189
|
* @param writeFlag - 1 for write, 0 for read
|
|
188
190
|
*
|
|
189
191
|
* @example
|
|
@@ -206,9 +208,13 @@ export class IOContext extends OptionMember {
|
|
|
206
208
|
* Direct mapping to avio_alloc_context() with callbacks.
|
|
207
209
|
*
|
|
208
210
|
* @param bufferSize - Size of internal buffer
|
|
211
|
+
*
|
|
209
212
|
* @param writeFlag - 1 for write mode, 0 for read mode
|
|
213
|
+
*
|
|
210
214
|
* @param readCallback - Function to read data (null for write-only)
|
|
215
|
+
*
|
|
211
216
|
* @param writeCallback - Function to write data (null for read-only)
|
|
217
|
+
*
|
|
212
218
|
* @param seekCallback - Function to seek in stream (optional)
|
|
213
219
|
*
|
|
214
220
|
* @example
|
|
@@ -271,7 +277,9 @@ export class IOContext extends OptionMember {
|
|
|
271
277
|
* Direct mapping to avio_open2().
|
|
272
278
|
*
|
|
273
279
|
* @param url - URL or file path to open
|
|
280
|
+
*
|
|
274
281
|
* @param flags - Open flags (AVIO_FLAG_READ, AVIO_FLAG_WRITE, etc.)
|
|
282
|
+
*
|
|
275
283
|
* @returns 0 on success, negative AVERROR on error:
|
|
276
284
|
* - AVERROR_ENOENT: File not found
|
|
277
285
|
* - AVERROR_EACCES: Permission denied
|
|
@@ -296,6 +304,43 @@ export class IOContext extends OptionMember {
|
|
|
296
304
|
async open2(url, flags = AVIO_FLAG_READ) {
|
|
297
305
|
return await this.native.open2(url, flags);
|
|
298
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Open resource for I/O synchronously.
|
|
309
|
+
* Synchronous version of open2.
|
|
310
|
+
*
|
|
311
|
+
* Opens a URL or file for reading or writing.
|
|
312
|
+
* Automatically selects the appropriate protocol handler.
|
|
313
|
+
*
|
|
314
|
+
* Direct mapping to avio_open2().
|
|
315
|
+
*
|
|
316
|
+
* @param url - URL or file path to open
|
|
317
|
+
*
|
|
318
|
+
* @param flags - Open flags (AVIO_FLAG_READ, AVIO_FLAG_WRITE, etc.)
|
|
319
|
+
*
|
|
320
|
+
* @returns 0 on success, negative AVERROR on error:
|
|
321
|
+
* - AVERROR_ENOENT: File not found
|
|
322
|
+
* - AVERROR_EACCES: Permission denied
|
|
323
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```typescript
|
|
327
|
+
* import { FFmpegError } from 'node-av';
|
|
328
|
+
* import { AVIO_FLAG_READ, AVIO_FLAG_WRITE } from 'node-av/constants';
|
|
329
|
+
*
|
|
330
|
+
* // Open for reading
|
|
331
|
+
* const ret = io.open2Sync('input.mp4', AVIO_FLAG_READ);
|
|
332
|
+
* FFmpegError.throwIfError(ret, 'open2');
|
|
333
|
+
*
|
|
334
|
+
* // Open for writing
|
|
335
|
+
* const ret2 = io.open2Sync('output.mp4', AVIO_FLAG_WRITE);
|
|
336
|
+
* FFmpegError.throwIfError(ret2, 'open2');
|
|
337
|
+
* ```
|
|
338
|
+
*
|
|
339
|
+
* @see {@link open2} For async version
|
|
340
|
+
*/
|
|
341
|
+
open2Sync(url, flags = AVIO_FLAG_READ) {
|
|
342
|
+
return this.native.open2Sync(url, flags);
|
|
343
|
+
}
|
|
299
344
|
/**
|
|
300
345
|
* Close I/O context.
|
|
301
346
|
*
|
|
@@ -319,6 +364,30 @@ export class IOContext extends OptionMember {
|
|
|
319
364
|
async closep() {
|
|
320
365
|
return await this.native.closep();
|
|
321
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Close I/O context synchronously.
|
|
369
|
+
* Synchronous version of closep.
|
|
370
|
+
*
|
|
371
|
+
* Closes the I/O context and frees resources.
|
|
372
|
+
* Sets internal pointer to NULL.
|
|
373
|
+
*
|
|
374
|
+
* Direct mapping to avio_closep().
|
|
375
|
+
*
|
|
376
|
+
* @returns 0 on success, negative AVERROR on error
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```typescript
|
|
380
|
+
* const ret = io.closepSync();
|
|
381
|
+
* if (ret < 0) {
|
|
382
|
+
* console.error(`Failed to close: ${ret}`);
|
|
383
|
+
* }
|
|
384
|
+
* ```
|
|
385
|
+
*
|
|
386
|
+
* @see {@link closep} For async version
|
|
387
|
+
*/
|
|
388
|
+
closepSync() {
|
|
389
|
+
return this.native.closepSync();
|
|
390
|
+
}
|
|
322
391
|
/**
|
|
323
392
|
* Read data from I/O context.
|
|
324
393
|
*
|
|
@@ -327,6 +396,7 @@ export class IOContext extends OptionMember {
|
|
|
327
396
|
* Direct mapping to avio_read().
|
|
328
397
|
*
|
|
329
398
|
* @param size - Maximum number of bytes to read
|
|
399
|
+
*
|
|
330
400
|
* @returns Buffer with data, or error code if negative:
|
|
331
401
|
* - AVERROR_EOF: End of file reached
|
|
332
402
|
* - AVERROR_EIO: I/O error
|
|
@@ -346,6 +416,33 @@ export class IOContext extends OptionMember {
|
|
|
346
416
|
async read(size) {
|
|
347
417
|
return await this.native.read(size);
|
|
348
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Read data from I/O context synchronously.
|
|
421
|
+
* Synchronous version of read.
|
|
422
|
+
*
|
|
423
|
+
* Reads up to the specified number of bytes from the stream.
|
|
424
|
+
*
|
|
425
|
+
* Direct mapping to avio_read().
|
|
426
|
+
*
|
|
427
|
+
* @param size - Number of bytes to read
|
|
428
|
+
*
|
|
429
|
+
* @returns Buffer with data, or negative AVERROR on error
|
|
430
|
+
*
|
|
431
|
+
* @example
|
|
432
|
+
* ```typescript
|
|
433
|
+
* const result = io.readSync(4096);
|
|
434
|
+
* if (Buffer.isBuffer(result)) {
|
|
435
|
+
* console.log(`Read ${result.length} bytes`);
|
|
436
|
+
* } else {
|
|
437
|
+
* console.log(`Read error: ${result}`);
|
|
438
|
+
* }
|
|
439
|
+
* ```
|
|
440
|
+
*
|
|
441
|
+
* @see {@link read} For async version
|
|
442
|
+
*/
|
|
443
|
+
readSync(size) {
|
|
444
|
+
return this.native.readSync(size);
|
|
445
|
+
}
|
|
349
446
|
/**
|
|
350
447
|
* Write data to I/O context.
|
|
351
448
|
*
|
|
@@ -367,6 +464,27 @@ export class IOContext extends OptionMember {
|
|
|
367
464
|
async write(buffer) {
|
|
368
465
|
await this.native.write(buffer);
|
|
369
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Write data to I/O context synchronously.
|
|
469
|
+
* Synchronous version of write.
|
|
470
|
+
*
|
|
471
|
+
* Writes buffer data to the stream.
|
|
472
|
+
*
|
|
473
|
+
* Direct mapping to avio_write().
|
|
474
|
+
*
|
|
475
|
+
* @param buffer - Data to write
|
|
476
|
+
*
|
|
477
|
+
* @example
|
|
478
|
+
* ```typescript
|
|
479
|
+
* const data = Buffer.from('Hello, World!');
|
|
480
|
+
* io.writeSync(data);
|
|
481
|
+
* ```
|
|
482
|
+
*
|
|
483
|
+
* @see {@link write} For async version
|
|
484
|
+
*/
|
|
485
|
+
writeSync(buffer) {
|
|
486
|
+
this.native.writeSync(buffer);
|
|
487
|
+
}
|
|
370
488
|
/**
|
|
371
489
|
* Seek to position in stream.
|
|
372
490
|
*
|
|
@@ -376,7 +494,9 @@ export class IOContext extends OptionMember {
|
|
|
376
494
|
* Direct mapping to avio_seek().
|
|
377
495
|
*
|
|
378
496
|
* @param offset - Byte offset to seek to
|
|
497
|
+
*
|
|
379
498
|
* @param whence - Seek origin (AVSEEK_SET, AVSEEK_CUR, AVSEEK_END)
|
|
499
|
+
*
|
|
380
500
|
* @returns New position, or negative AVERROR on error:
|
|
381
501
|
* - AVERROR_EINVAL: Invalid arguments
|
|
382
502
|
* - AVERROR_ENOSYS: Seeking not supported
|
|
@@ -401,6 +521,42 @@ export class IOContext extends OptionMember {
|
|
|
401
521
|
async seek(offset, whence) {
|
|
402
522
|
return await this.native.seek(offset, whence);
|
|
403
523
|
}
|
|
524
|
+
/**
|
|
525
|
+
* Seek to position in stream synchronously.
|
|
526
|
+
* Synchronous version of seek.
|
|
527
|
+
*
|
|
528
|
+
* Changes the current position in the stream.
|
|
529
|
+
* Not all streams support seeking.
|
|
530
|
+
*
|
|
531
|
+
* Direct mapping to avio_seek().
|
|
532
|
+
*
|
|
533
|
+
* @param offset - Byte offset to seek to
|
|
534
|
+
*
|
|
535
|
+
* @param whence - Seek origin (AVSEEK_SET, AVSEEK_CUR, AVSEEK_END)
|
|
536
|
+
*
|
|
537
|
+
* @returns New position, or negative AVERROR on error:
|
|
538
|
+
* - AVERROR_EINVAL: Invalid arguments
|
|
539
|
+
* - AVERROR_ENOSYS: Seeking not supported
|
|
540
|
+
*
|
|
541
|
+
* @example
|
|
542
|
+
* ```typescript
|
|
543
|
+
* import { AVSEEK_SET, AVSEEK_CUR, AVSEEK_END } from 'node-av/constants';
|
|
544
|
+
*
|
|
545
|
+
* // Seek to absolute position
|
|
546
|
+
* const pos1 = io.seekSync(1024n, AVSEEK_SET);
|
|
547
|
+
*
|
|
548
|
+
* // Seek relative to current position
|
|
549
|
+
* const pos2 = io.seekSync(512n, AVSEEK_CUR);
|
|
550
|
+
*
|
|
551
|
+
* // Seek relative to end
|
|
552
|
+
* const pos3 = io.seekSync(-1024n, AVSEEK_END);
|
|
553
|
+
* ```
|
|
554
|
+
*
|
|
555
|
+
* @see {@link seek} For async version
|
|
556
|
+
*/
|
|
557
|
+
seekSync(offset, whence) {
|
|
558
|
+
return this.native.seekSync(offset, whence);
|
|
559
|
+
}
|
|
404
560
|
/**
|
|
405
561
|
* Get stream size.
|
|
406
562
|
*
|
|
@@ -425,6 +581,33 @@ export class IOContext extends OptionMember {
|
|
|
425
581
|
async size() {
|
|
426
582
|
return await this.native.size();
|
|
427
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Get stream size synchronously.
|
|
586
|
+
* Synchronous version of size.
|
|
587
|
+
*
|
|
588
|
+
* Returns the total size of the stream in bytes.
|
|
589
|
+
* Not all streams have a known size.
|
|
590
|
+
*
|
|
591
|
+
* Direct mapping to avio_size().
|
|
592
|
+
*
|
|
593
|
+
* @returns Size in bytes, or negative AVERROR if unknown:
|
|
594
|
+
* - AVERROR_ENOSYS: Size not available
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
* ```typescript
|
|
598
|
+
* const size = io.sizeSync();
|
|
599
|
+
* if (size >= 0n) {
|
|
600
|
+
* console.log(`Stream size: ${size} bytes`);
|
|
601
|
+
* } else {
|
|
602
|
+
* console.log('Stream size unknown');
|
|
603
|
+
* }
|
|
604
|
+
* ```
|
|
605
|
+
*
|
|
606
|
+
* @see {@link size} For async version
|
|
607
|
+
*/
|
|
608
|
+
sizeSync() {
|
|
609
|
+
return this.native.sizeSync();
|
|
610
|
+
}
|
|
428
611
|
/**
|
|
429
612
|
* Flush buffered data.
|
|
430
613
|
*
|
|
@@ -443,6 +626,25 @@ export class IOContext extends OptionMember {
|
|
|
443
626
|
async flush() {
|
|
444
627
|
await this.native.flush();
|
|
445
628
|
}
|
|
629
|
+
/**
|
|
630
|
+
* Flush buffered data synchronously.
|
|
631
|
+
* Synchronous version of flush.
|
|
632
|
+
*
|
|
633
|
+
* Forces any buffered data to be written to the underlying resource.
|
|
634
|
+
*
|
|
635
|
+
* Direct mapping to avio_flush().
|
|
636
|
+
*
|
|
637
|
+
* @example
|
|
638
|
+
* ```typescript
|
|
639
|
+
* io.writeSync(data);
|
|
640
|
+
* io.flushSync(); // Ensure data is written
|
|
641
|
+
* ```
|
|
642
|
+
*
|
|
643
|
+
* @see {@link flush} For async version
|
|
644
|
+
*/
|
|
645
|
+
flushSync() {
|
|
646
|
+
this.native.flushSync();
|
|
647
|
+
}
|
|
446
648
|
/**
|
|
447
649
|
* Skip bytes in stream.
|
|
448
650
|
*
|
|
@@ -452,6 +654,7 @@ export class IOContext extends OptionMember {
|
|
|
452
654
|
* Direct mapping to avio_skip().
|
|
453
655
|
*
|
|
454
656
|
* @param offset - Number of bytes to skip
|
|
657
|
+
*
|
|
455
658
|
* @returns New position after skipping
|
|
456
659
|
*
|
|
457
660
|
* @example
|
|
@@ -466,6 +669,31 @@ export class IOContext extends OptionMember {
|
|
|
466
669
|
async skip(offset) {
|
|
467
670
|
return await this.native.skip(offset);
|
|
468
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
* Skip bytes in stream synchronously.
|
|
674
|
+
* Synchronous version of skip.
|
|
675
|
+
*
|
|
676
|
+
* Advances the position by the specified offset.
|
|
677
|
+
* More efficient than reading and discarding data.
|
|
678
|
+
*
|
|
679
|
+
* Direct mapping to avio_skip().
|
|
680
|
+
*
|
|
681
|
+
* @param offset - Number of bytes to skip
|
|
682
|
+
*
|
|
683
|
+
* @returns New position after skipping
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* ```typescript
|
|
687
|
+
* // Skip 1024 bytes forward
|
|
688
|
+
* const newPos = io.skipSync(1024n);
|
|
689
|
+
* console.log(`New position: ${newPos}`);
|
|
690
|
+
* ```
|
|
691
|
+
*
|
|
692
|
+
* @see {@link skip} For async version
|
|
693
|
+
*/
|
|
694
|
+
skipSync(offset) {
|
|
695
|
+
return this.native.skipSync(offset);
|
|
696
|
+
}
|
|
469
697
|
/**
|
|
470
698
|
* Get current position.
|
|
471
699
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io-context.js","sourceRoot":"","sources":["../../src/lib/io-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,OAAO,SAAU,SAAQ,YAA6B;IAC1D;QACE,KAAK,CAAC,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IAClC,CAAC;IAED
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
|
*
|
|
97
97
|
* @param level - Log level for this message
|
|
98
|
+
*
|
|
98
99
|
* @param message - Message to log
|
|
99
100
|
*
|
|
100
101
|
* @example
|
|
@@ -116,6 +117,7 @@ export declare class Log {
|
|
|
116
117
|
* Direct mapping to av_log_set_callback().
|
|
117
118
|
*
|
|
118
119
|
* @param callback - Function to handle log messages, or null to remove
|
|
120
|
+
*
|
|
119
121
|
* @param options - Additional logging options
|
|
120
122
|
*
|
|
121
123
|
* @example
|
package/dist/lib/log.js
CHANGED
|
@@ -98,6 +98,7 @@ export class Log {
|
|
|
98
98
|
* Direct mapping to av_log().
|
|
99
99
|
*
|
|
100
100
|
* @param level - Log level for this message
|
|
101
|
+
*
|
|
101
102
|
* @param message - Message to log
|
|
102
103
|
*
|
|
103
104
|
* @example
|
|
@@ -121,6 +122,7 @@ export class Log {
|
|
|
121
122
|
* Direct mapping to av_log_set_callback().
|
|
122
123
|
*
|
|
123
124
|
* @param callback - Function to handle log messages, or null to remove
|
|
125
|
+
*
|
|
124
126
|
* @param options - Additional logging options
|
|
125
127
|
*
|
|
126
128
|
* @example
|
package/dist/lib/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/lib/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,OAAO,GAAG;IACd;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAiB;QAC/B,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,QAAQ;QACb,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/lib/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,OAAO,GAAG;IACd;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAiB;QAC/B,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,QAAQ;QACb,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,GAAG,CAAC,KAAiB,EAAE,OAAe;QAC3C,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,MAAM,CAAC,WAAW,CAAC,QAA+D,EAAE,OAAoB;QACtG,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,aAAa;QAClB,QAAQ,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -89,6 +89,7 @@ export interface NativeFrame extends Disposable {
|
|
|
89
89
|
copy(src: NativeFrame): number;
|
|
90
90
|
fromBuffer(buffer: Buffer): number;
|
|
91
91
|
hwframeTransferData(dst: NativeFrame, flags?: number): Promise<number>;
|
|
92
|
+
hwframeTransferDataSync(dst: NativeFrame, flags?: number): number;
|
|
92
93
|
isHwFrame(): boolean;
|
|
93
94
|
isSwFrame(): boolean;
|
|
94
95
|
getSideData(type: AVFrameSideDataType): Buffer | null;
|
|
@@ -187,9 +188,13 @@ export interface NativeCodecContext extends Disposable {
|
|
|
187
188
|
parametersFromContext(params: NativeCodecParameters): number;
|
|
188
189
|
flushBuffers(): void;
|
|
189
190
|
sendPacket(packet: NativePacket | null): Promise<number>;
|
|
191
|
+
sendPacketSync(packet: NativePacket | null): number;
|
|
190
192
|
receiveFrame(frame: NativeFrame): Promise<number>;
|
|
193
|
+
receiveFrameSync(frame: NativeFrame): number;
|
|
191
194
|
sendFrame(frame: NativeFrame | null): Promise<number>;
|
|
195
|
+
sendFrameSync(frame: NativeFrame | null): number;
|
|
192
196
|
receivePacket(packet: NativePacket): Promise<number>;
|
|
197
|
+
receivePacketSync(packet: NativePacket): number;
|
|
193
198
|
setHardwarePixelFormat(hwFormat: AVPixelFormat, swFormat?: AVPixelFormat): void;
|
|
194
199
|
[Symbol.dispose](): void;
|
|
195
200
|
}
|
|
@@ -282,13 +287,21 @@ export interface NativeIOContext extends AsyncDisposable {
|
|
|
282
287
|
allocContextWithCallbacks(bufferSize: number, writeFlag: 0 | 1, readCallback?: (size: number) => Buffer | null | number, writeCallback?: (buffer: Buffer) => number | void, seekCallback?: (offset: bigint, whence: AVSeekWhence) => bigint | number): void;
|
|
283
288
|
freeContext(): void;
|
|
284
289
|
open2(url: string, flags: AVIOFlag): Promise<number>;
|
|
290
|
+
open2Sync(url: string, flags: AVIOFlag): number;
|
|
285
291
|
closep(): Promise<number>;
|
|
292
|
+
closepSync(): number;
|
|
286
293
|
read(size: number): Promise<Buffer | number>;
|
|
294
|
+
readSync(size: number): Buffer | number;
|
|
287
295
|
write(buffer: Buffer): Promise<void>;
|
|
296
|
+
writeSync(buffer: Buffer): void;
|
|
288
297
|
seek(offset: bigint, whence: AVSeekWhence): Promise<bigint>;
|
|
298
|
+
seekSync(offset: bigint, whence: AVSeekWhence): bigint;
|
|
289
299
|
size(): Promise<bigint>;
|
|
300
|
+
sizeSync(): bigint;
|
|
290
301
|
flush(): Promise<void>;
|
|
302
|
+
flushSync(): void;
|
|
291
303
|
skip(offset: bigint): Promise<bigint>;
|
|
304
|
+
skipSync(offset: bigint): bigint;
|
|
292
305
|
tell(): bigint;
|
|
293
306
|
readonly eof: boolean;
|
|
294
307
|
readonly error: number;
|
|
@@ -394,18 +407,30 @@ export interface NativeFormatContext extends AsyncDisposable {
|
|
|
394
407
|
allocOutputContext2(oformat: NativeOutputFormat | null, formatName: string | null, filename: string | null): number;
|
|
395
408
|
freeContext(): void;
|
|
396
409
|
openInput(url: string, fmt: NativeInputFormat | null, options: NativeDictionary | null): Promise<number>;
|
|
410
|
+
openInputSync(url: string, fmt: NativeInputFormat | null, options: NativeDictionary | null): number;
|
|
397
411
|
closeInput(): Promise<void>;
|
|
412
|
+
closeInputSync(): void;
|
|
398
413
|
findStreamInfo(options: NativeDictionary[] | null): Promise<number>;
|
|
414
|
+
findStreamInfoSync(options: NativeDictionary | null): number;
|
|
399
415
|
readFrame(pkt: NativePacket): Promise<number>;
|
|
416
|
+
readFrameSync(pkt: NativePacket): number;
|
|
400
417
|
seekFrame(streamIndex: number, timestamp: bigint, flags: AVSeekFlag): Promise<number>;
|
|
418
|
+
seekFrameSync(streamIndex: number, timestamp: bigint, flags: AVSeekFlag): number;
|
|
401
419
|
seekFile(streamIndex: number, minTs: bigint, ts: bigint, maxTs: bigint, flags: AVSeekFlag): Promise<number>;
|
|
402
420
|
openOutput(): Promise<number>;
|
|
421
|
+
openOutputSync(): number;
|
|
403
422
|
closeOutput(): Promise<void>;
|
|
423
|
+
closeOutputSync(): void;
|
|
404
424
|
writeHeader(options: NativeDictionary | null): Promise<number>;
|
|
425
|
+
writeHeaderSync(options: NativeDictionary | null): number;
|
|
405
426
|
writeFrame(pkt: NativePacket | null): Promise<number>;
|
|
427
|
+
writeFrameSync(pkt: NativePacket | null): number;
|
|
406
428
|
interleavedWriteFrame(pkt: NativePacket | null): Promise<number>;
|
|
429
|
+
interleavedWriteFrameSync(pkt: NativePacket | null): number;
|
|
407
430
|
writeTrailer(): Promise<number>;
|
|
408
|
-
|
|
431
|
+
writeTrailerSync(): number;
|
|
432
|
+
flush(): Promise<void>;
|
|
433
|
+
flushSync(): void;
|
|
409
434
|
newStream(c: NativeCodec | null): NativeStream;
|
|
410
435
|
dumpFormat(index: number, url: string, isOutput: boolean): void;
|
|
411
436
|
findBestStream(type: AVMediaType, wantedStreamNb: number, relatedStream: number, wantDecoder: boolean, flags: number): number | {
|
|
@@ -442,8 +467,11 @@ export interface NativeAudioFifo extends Disposable {
|
|
|
442
467
|
alloc(sampleFmt: AVSampleFormat, channels: number, nbSamples: number): void;
|
|
443
468
|
free(): void;
|
|
444
469
|
write(data: Buffer | Buffer[], nbSamples: number): Promise<number>;
|
|
470
|
+
writeSync(data: Buffer | Buffer[], nbSamples: number): number;
|
|
445
471
|
read(data: Buffer | Buffer[], nbSamples: number): Promise<number>;
|
|
472
|
+
readSync(data: Buffer | Buffer[], nbSamples: number): number;
|
|
446
473
|
peek(data: Buffer | Buffer[], nbSamples: number): Promise<number>;
|
|
474
|
+
peekSync(data: Buffer | Buffer[], nbSamples: number): number;
|
|
447
475
|
drain(nbSamples: number): void;
|
|
448
476
|
reset(): void;
|
|
449
477
|
realloc(nbSamples: number): number;
|
|
@@ -463,7 +491,9 @@ export interface NativeSoftwareScaleContext extends Disposable {
|
|
|
463
491
|
initContext(): number;
|
|
464
492
|
freeContext(): void;
|
|
465
493
|
scale(srcSlice: Buffer[], srcStride: number[], srcSliceY: number, srcSliceH: number, dst: Buffer[], dstStride: number[]): Promise<number>;
|
|
494
|
+
scaleSync(srcSlice: Buffer[], srcStride: number[], srcSliceY: number, srcSliceH: number, dst: Buffer[], dstStride: number[]): number;
|
|
466
495
|
scaleFrame(dst: NativeFrame, src: NativeFrame): Promise<number>;
|
|
496
|
+
scaleFrameSync(dst: NativeFrame, src: NativeFrame): number;
|
|
467
497
|
[Symbol.dispose](): void;
|
|
468
498
|
}
|
|
469
499
|
/**
|
|
@@ -482,6 +512,7 @@ export interface NativeSoftwareResampleContext extends Disposable {
|
|
|
482
512
|
free(): void;
|
|
483
513
|
close(): void;
|
|
484
514
|
convert(outBuffer: Buffer[] | null, outCount: number, inBuffer: Buffer[] | null, inCount: number): Promise<number>;
|
|
515
|
+
convertSync(outBuffer: Buffer[] | null, outCount: number, inBuffer: Buffer[] | null, inCount: number): number;
|
|
485
516
|
convertFrame(outFrame: NativeFrame | null, inFrame: NativeFrame | null): number;
|
|
486
517
|
configFrame(outFrame: NativeFrame | null, inFrame: NativeFrame | null): number;
|
|
487
518
|
isInitialized(): boolean;
|
|
@@ -533,6 +564,7 @@ export interface NativeFilterContext extends Disposable {
|
|
|
533
564
|
link(srcPad: number, dst: NativeFilterContext, dstPad: number): number;
|
|
534
565
|
unlink(pad: number): void;
|
|
535
566
|
buffersrcAddFrame(frame: NativeFrame | null): Promise<number>;
|
|
567
|
+
buffersrcAddFrameSync(frame: NativeFrame | null): number;
|
|
536
568
|
buffersrcParametersSet(params: {
|
|
537
569
|
width?: number;
|
|
538
570
|
height?: number;
|
|
@@ -545,6 +577,7 @@ export interface NativeFilterContext extends Disposable {
|
|
|
545
577
|
channelLayout?: bigint;
|
|
546
578
|
}): number;
|
|
547
579
|
buffersinkGetFrame(frame: NativeFrame): Promise<number>;
|
|
580
|
+
buffersinkGetFrameSync(frame: NativeFrame): number;
|
|
548
581
|
buffersinkGetWidth(): number;
|
|
549
582
|
buffersinkGetHeight(): number;
|
|
550
583
|
buffersinkGetFormat(): AVPixelFormat | AVSampleFormat;
|
|
@@ -577,11 +610,13 @@ export interface NativeFilterGraph extends Disposable {
|
|
|
577
610
|
allocFilter(filter: NativeFilter, name: string): NativeFilterContext | null;
|
|
578
611
|
getFilter(name: string): NativeFilterContext | null;
|
|
579
612
|
config(): Promise<number>;
|
|
613
|
+
configSync(): number;
|
|
580
614
|
parse(filters: string, inputs: NativeFilterInOut | null, outputs: NativeFilterInOut | null): number;
|
|
581
615
|
parse2(filters: string): number;
|
|
582
616
|
parsePtr(filters: string, inputs?: NativeFilterInOut | null, outputs?: NativeFilterInOut | null): number;
|
|
583
617
|
validate(): number;
|
|
584
618
|
requestOldest(): Promise<number>;
|
|
619
|
+
requestOldestSync(): number;
|
|
585
620
|
dump(): string | null;
|
|
586
621
|
sendCommand(target: string, cmd: string, arg: string, flags?: AVFilterCmdFlag): number | {
|
|
587
622
|
response: string | null;
|
|
@@ -655,6 +690,7 @@ export interface NativeHardwareFramesContext extends Disposable {
|
|
|
655
690
|
init(): number;
|
|
656
691
|
getBuffer(frame: NativeFrame, flags?: number): number;
|
|
657
692
|
transferData(dst: NativeFrame, src: NativeFrame, flags?: number): Promise<number>;
|
|
693
|
+
transferDataSync(dst: NativeFrame, src: NativeFrame, flags?: number): number;
|
|
658
694
|
transferGetFormats(direction: AVHWFrameTransferDirection): AVPixelFormat[] | number;
|
|
659
695
|
map(dst: NativeFrame, src: NativeFrame, flags?: number): number;
|
|
660
696
|
createDerived(format: AVPixelFormat, derivedDevice: NativeHardwareDeviceContext, source: NativeHardwareFramesContext, flags?: number): number;
|
|
@@ -696,7 +732,9 @@ export interface NativeBitStreamFilterContext extends Disposable {
|
|
|
696
732
|
free(): void;
|
|
697
733
|
flush(): void;
|
|
698
734
|
sendPacket(packet: NativePacket | null): Promise<number>;
|
|
735
|
+
sendPacketSync(packet: NativePacket | null): number;
|
|
699
736
|
receivePacket(packet: NativePacket): Promise<number>;
|
|
737
|
+
receivePacketSync(packet: NativePacket): number;
|
|
700
738
|
isInitialized(): boolean;
|
|
701
739
|
[Symbol.dispose](): void;
|
|
702
740
|
}
|