@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":"codec-parameters.js","sourceRoot":"","sources":["../../src/lib/codec-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAoBhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,OAAO,eAAe;IAClB,MAAM,CAAwB;IAEtC;QACE,IAAI,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AAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { AVCodecID } from '../constants/constants.js';
|
|
2
|
+
import type { CodecContext } from './codec-context.js';
|
|
3
|
+
import type { NativeCodecParser, NativeWrapper } from './native-types.js';
|
|
4
|
+
import type { Packet } from './packet.js';
|
|
5
|
+
/**
|
|
6
|
+
* Parser for extracting codec frames from raw bitstream data.
|
|
7
|
+
*
|
|
8
|
+
* Analyzes and splits raw bitstream data into individual codec frames.
|
|
9
|
+
* Essential for processing elementary streams, extracting NAL units,
|
|
10
|
+
* and handling frame boundaries in raw codec data. Commonly used for
|
|
11
|
+
* parsing H.264/H.265 streams, AAC ADTS streams, and other raw formats.
|
|
12
|
+
*
|
|
13
|
+
* Direct mapping to FFmpeg's AVCodecParserContext.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { CodecParser, CodecContext, Packet, FFmpegError } from 'node-av';
|
|
18
|
+
* import { AV_CODEC_ID_H264 } from 'node-av/constants';
|
|
19
|
+
*
|
|
20
|
+
* // Create and initialize parser
|
|
21
|
+
* const parser = new CodecParser();
|
|
22
|
+
* parser.init(AV_CODEC_ID_H264);
|
|
23
|
+
*
|
|
24
|
+
* // Parse raw data into packets
|
|
25
|
+
* const packet = new Packet();
|
|
26
|
+
* packet.alloc();
|
|
27
|
+
*
|
|
28
|
+
* const rawData = Buffer.from([...]); // Raw H.264 stream
|
|
29
|
+
* const ret = parser.parse2(
|
|
30
|
+
* codecContext,
|
|
31
|
+
* packet,
|
|
32
|
+
* rawData,
|
|
33
|
+
* 0n, // pts
|
|
34
|
+
* 0n, // dts
|
|
35
|
+
* 0 // position
|
|
36
|
+
* );
|
|
37
|
+
*
|
|
38
|
+
* if (ret > 0) {
|
|
39
|
+
* // Got complete packet, ret is consumed bytes
|
|
40
|
+
* console.log(`Parsed ${ret} bytes into packet`);
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* // Cleanup
|
|
44
|
+
* parser.close();
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @see [AVCodecParserContext](https://ffmpeg.org/doxygen/trunk/structAVCodecParserContext.html) - FFmpeg Doxygen
|
|
48
|
+
* @see {@link CodecContext} For decoding parsed packets
|
|
49
|
+
*/
|
|
50
|
+
export declare class CodecParser implements Disposable, NativeWrapper<NativeCodecParser> {
|
|
51
|
+
private native;
|
|
52
|
+
constructor();
|
|
53
|
+
/**
|
|
54
|
+
* Initialize parser for specific codec.
|
|
55
|
+
*
|
|
56
|
+
* Sets up the parser to handle a specific codec format.
|
|
57
|
+
* Must be called before parsing data.
|
|
58
|
+
*
|
|
59
|
+
* Direct mapping to av_parser_init().
|
|
60
|
+
*
|
|
61
|
+
* @param codecId - Codec ID to parse
|
|
62
|
+
*
|
|
63
|
+
* @throws {Error} If codec parser not available
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* import { AV_CODEC_ID_AAC } from 'node-av/constants';
|
|
68
|
+
*
|
|
69
|
+
* const parser = new CodecParser();
|
|
70
|
+
* parser.init(AV_CODEC_ID_AAC);
|
|
71
|
+
* // Parser ready for AAC ADTS streams
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @see {@link parse2} To parse data
|
|
75
|
+
* @see {@link close} To cleanup
|
|
76
|
+
*/
|
|
77
|
+
init(codecId: AVCodecID): void;
|
|
78
|
+
/**
|
|
79
|
+
* Parse bitstream data into packets.
|
|
80
|
+
*
|
|
81
|
+
* Analyzes raw bitstream data and extracts complete codec frames.
|
|
82
|
+
* May require multiple calls to accumulate enough data for a complete frame.
|
|
83
|
+
* Returns the number of bytes consumed from the input buffer.
|
|
84
|
+
*
|
|
85
|
+
* Direct mapping to av_parser_parse2().
|
|
86
|
+
*
|
|
87
|
+
* @param codecContext - Codec context for parser state
|
|
88
|
+
*
|
|
89
|
+
* @param packet - Packet to receive parsed frame
|
|
90
|
+
*
|
|
91
|
+
* @param data - Raw bitstream data to parse
|
|
92
|
+
*
|
|
93
|
+
* @param pts - Presentation timestamp for data
|
|
94
|
+
*
|
|
95
|
+
* @param dts - Decoding timestamp for data
|
|
96
|
+
*
|
|
97
|
+
* @param pos - Byte position in stream
|
|
98
|
+
*
|
|
99
|
+
* @returns Number of bytes consumed from data, negative on error:
|
|
100
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
101
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import { FFmpegError } from 'node-av';
|
|
106
|
+
*
|
|
107
|
+
* let offset = 0;
|
|
108
|
+
* while (offset < rawData.length) {
|
|
109
|
+
* const remaining = rawData.subarray(offset);
|
|
110
|
+
* const ret = parser.parse2(
|
|
111
|
+
* codecContext,
|
|
112
|
+
* packet,
|
|
113
|
+
* remaining,
|
|
114
|
+
* pts,
|
|
115
|
+
* dts,
|
|
116
|
+
* offset
|
|
117
|
+
* );
|
|
118
|
+
*
|
|
119
|
+
* if (ret < 0) {
|
|
120
|
+
* FFmpegError.throwIfError(ret, 'parse2');
|
|
121
|
+
* }
|
|
122
|
+
*
|
|
123
|
+
* offset += ret;
|
|
124
|
+
*
|
|
125
|
+
* if (packet.size > 0) {
|
|
126
|
+
* // Got complete packet
|
|
127
|
+
* await processPacket(packet);
|
|
128
|
+
* packet.unref();
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @see {@link init} To initialize parser
|
|
134
|
+
*/
|
|
135
|
+
parse2(codecContext: CodecContext, packet: Packet, data: Buffer, pts: bigint, dts: bigint, pos: number): number;
|
|
136
|
+
/**
|
|
137
|
+
* Number of pictures to repeat for field-based interlaced content.
|
|
138
|
+
*
|
|
139
|
+
* Used to calculate frame duration for interlaced video:
|
|
140
|
+
* `frame_duration = (1 + repeat_pict) * time_base`
|
|
141
|
+
*
|
|
142
|
+
* Commonly used in H.264 to display telecined material.
|
|
143
|
+
* Value comes from the codec parser after parsing a frame.
|
|
144
|
+
*
|
|
145
|
+
* Direct mapping to AVCodecParserContext.repeat_pict.
|
|
146
|
+
*
|
|
147
|
+
* @returns Repeat picture count (0 for progressive, >0 for interlaced)
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* const parser = stream.parser;
|
|
152
|
+
* if (parser) {
|
|
153
|
+
* const fields = 1 + parser.repeatPict;
|
|
154
|
+
* console.log(`Frame uses ${fields} fields`);
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
get repeatPict(): number;
|
|
159
|
+
/**
|
|
160
|
+
* Close the codec parser.
|
|
161
|
+
*
|
|
162
|
+
* Releases all resources associated with the parser.
|
|
163
|
+
* The parser becomes invalid after calling this.
|
|
164
|
+
*
|
|
165
|
+
* Direct mapping to av_parser_close().
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```typescript
|
|
169
|
+
* parser.close();
|
|
170
|
+
* // Parser is now invalid
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* @see {@link init} To initialize
|
|
174
|
+
* @see {@link Symbol.dispose} For automatic cleanup
|
|
175
|
+
*/
|
|
176
|
+
close(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Get the underlying native CodecParser object.
|
|
179
|
+
*
|
|
180
|
+
* @returns The native CodecParser binding object
|
|
181
|
+
*
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
getNative(): NativeCodecParser;
|
|
185
|
+
/**
|
|
186
|
+
* Dispose of the codec parser.
|
|
187
|
+
*
|
|
188
|
+
* Implements the Disposable interface for automatic cleanup.
|
|
189
|
+
* Equivalent to calling close().
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* {
|
|
194
|
+
* using parser = new CodecParser();
|
|
195
|
+
* parser.init(AV_CODEC_ID_H264);
|
|
196
|
+
* // Use parser...
|
|
197
|
+
* } // Automatically closed when leaving scope
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
[Symbol.dispose](): void;
|
|
201
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { bindings } from './binding.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parser for extracting codec frames from raw bitstream data.
|
|
4
|
+
*
|
|
5
|
+
* Analyzes and splits raw bitstream data into individual codec frames.
|
|
6
|
+
* Essential for processing elementary streams, extracting NAL units,
|
|
7
|
+
* and handling frame boundaries in raw codec data. Commonly used for
|
|
8
|
+
* parsing H.264/H.265 streams, AAC ADTS streams, and other raw formats.
|
|
9
|
+
*
|
|
10
|
+
* Direct mapping to FFmpeg's AVCodecParserContext.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { CodecParser, CodecContext, Packet, FFmpegError } from 'node-av';
|
|
15
|
+
* import { AV_CODEC_ID_H264 } from 'node-av/constants';
|
|
16
|
+
*
|
|
17
|
+
* // Create and initialize parser
|
|
18
|
+
* const parser = new CodecParser();
|
|
19
|
+
* parser.init(AV_CODEC_ID_H264);
|
|
20
|
+
*
|
|
21
|
+
* // Parse raw data into packets
|
|
22
|
+
* const packet = new Packet();
|
|
23
|
+
* packet.alloc();
|
|
24
|
+
*
|
|
25
|
+
* const rawData = Buffer.from([...]); // Raw H.264 stream
|
|
26
|
+
* const ret = parser.parse2(
|
|
27
|
+
* codecContext,
|
|
28
|
+
* packet,
|
|
29
|
+
* rawData,
|
|
30
|
+
* 0n, // pts
|
|
31
|
+
* 0n, // dts
|
|
32
|
+
* 0 // position
|
|
33
|
+
* );
|
|
34
|
+
*
|
|
35
|
+
* if (ret > 0) {
|
|
36
|
+
* // Got complete packet, ret is consumed bytes
|
|
37
|
+
* console.log(`Parsed ${ret} bytes into packet`);
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* // Cleanup
|
|
41
|
+
* parser.close();
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see [AVCodecParserContext](https://ffmpeg.org/doxygen/trunk/structAVCodecParserContext.html) - FFmpeg Doxygen
|
|
45
|
+
* @see {@link CodecContext} For decoding parsed packets
|
|
46
|
+
*/
|
|
47
|
+
export class CodecParser {
|
|
48
|
+
native;
|
|
49
|
+
constructor() {
|
|
50
|
+
this.native = new bindings.CodecParser();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Initialize parser for specific codec.
|
|
54
|
+
*
|
|
55
|
+
* Sets up the parser to handle a specific codec format.
|
|
56
|
+
* Must be called before parsing data.
|
|
57
|
+
*
|
|
58
|
+
* Direct mapping to av_parser_init().
|
|
59
|
+
*
|
|
60
|
+
* @param codecId - Codec ID to parse
|
|
61
|
+
*
|
|
62
|
+
* @throws {Error} If codec parser not available
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* import { AV_CODEC_ID_AAC } from 'node-av/constants';
|
|
67
|
+
*
|
|
68
|
+
* const parser = new CodecParser();
|
|
69
|
+
* parser.init(AV_CODEC_ID_AAC);
|
|
70
|
+
* // Parser ready for AAC ADTS streams
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @see {@link parse2} To parse data
|
|
74
|
+
* @see {@link close} To cleanup
|
|
75
|
+
*/
|
|
76
|
+
init(codecId) {
|
|
77
|
+
this.native.init(codecId);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parse bitstream data into packets.
|
|
81
|
+
*
|
|
82
|
+
* Analyzes raw bitstream data and extracts complete codec frames.
|
|
83
|
+
* May require multiple calls to accumulate enough data for a complete frame.
|
|
84
|
+
* Returns the number of bytes consumed from the input buffer.
|
|
85
|
+
*
|
|
86
|
+
* Direct mapping to av_parser_parse2().
|
|
87
|
+
*
|
|
88
|
+
* @param codecContext - Codec context for parser state
|
|
89
|
+
*
|
|
90
|
+
* @param packet - Packet to receive parsed frame
|
|
91
|
+
*
|
|
92
|
+
* @param data - Raw bitstream data to parse
|
|
93
|
+
*
|
|
94
|
+
* @param pts - Presentation timestamp for data
|
|
95
|
+
*
|
|
96
|
+
* @param dts - Decoding timestamp for data
|
|
97
|
+
*
|
|
98
|
+
* @param pos - Byte position in stream
|
|
99
|
+
*
|
|
100
|
+
* @returns Number of bytes consumed from data, negative on error:
|
|
101
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
102
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import { FFmpegError } from 'node-av';
|
|
107
|
+
*
|
|
108
|
+
* let offset = 0;
|
|
109
|
+
* while (offset < rawData.length) {
|
|
110
|
+
* const remaining = rawData.subarray(offset);
|
|
111
|
+
* const ret = parser.parse2(
|
|
112
|
+
* codecContext,
|
|
113
|
+
* packet,
|
|
114
|
+
* remaining,
|
|
115
|
+
* pts,
|
|
116
|
+
* dts,
|
|
117
|
+
* offset
|
|
118
|
+
* );
|
|
119
|
+
*
|
|
120
|
+
* if (ret < 0) {
|
|
121
|
+
* FFmpegError.throwIfError(ret, 'parse2');
|
|
122
|
+
* }
|
|
123
|
+
*
|
|
124
|
+
* offset += ret;
|
|
125
|
+
*
|
|
126
|
+
* if (packet.size > 0) {
|
|
127
|
+
* // Got complete packet
|
|
128
|
+
* await processPacket(packet);
|
|
129
|
+
* packet.unref();
|
|
130
|
+
* }
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @see {@link init} To initialize parser
|
|
135
|
+
*/
|
|
136
|
+
parse2(codecContext, packet, data, pts, dts, pos) {
|
|
137
|
+
return this.native.parse2(codecContext.getNative(), packet.getNative(), data, pts, dts, pos);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Number of pictures to repeat for field-based interlaced content.
|
|
141
|
+
*
|
|
142
|
+
* Used to calculate frame duration for interlaced video:
|
|
143
|
+
* `frame_duration = (1 + repeat_pict) * time_base`
|
|
144
|
+
*
|
|
145
|
+
* Commonly used in H.264 to display telecined material.
|
|
146
|
+
* Value comes from the codec parser after parsing a frame.
|
|
147
|
+
*
|
|
148
|
+
* Direct mapping to AVCodecParserContext.repeat_pict.
|
|
149
|
+
*
|
|
150
|
+
* @returns Repeat picture count (0 for progressive, >0 for interlaced)
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* const parser = stream.parser;
|
|
155
|
+
* if (parser) {
|
|
156
|
+
* const fields = 1 + parser.repeatPict;
|
|
157
|
+
* console.log(`Frame uses ${fields} fields`);
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
get repeatPict() {
|
|
162
|
+
return this.native.repeatPict;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Close the codec parser.
|
|
166
|
+
*
|
|
167
|
+
* Releases all resources associated with the parser.
|
|
168
|
+
* The parser becomes invalid after calling this.
|
|
169
|
+
*
|
|
170
|
+
* Direct mapping to av_parser_close().
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* parser.close();
|
|
175
|
+
* // Parser is now invalid
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @see {@link init} To initialize
|
|
179
|
+
* @see {@link Symbol.dispose} For automatic cleanup
|
|
180
|
+
*/
|
|
181
|
+
close() {
|
|
182
|
+
this.native.close();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Get the underlying native CodecParser object.
|
|
186
|
+
*
|
|
187
|
+
* @returns The native CodecParser binding object
|
|
188
|
+
*
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
getNative() {
|
|
192
|
+
return this.native;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Dispose of the codec parser.
|
|
196
|
+
*
|
|
197
|
+
* Implements the Disposable interface for automatic cleanup.
|
|
198
|
+
* Equivalent to calling close().
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* {
|
|
203
|
+
* using parser = new CodecParser();
|
|
204
|
+
* parser.init(AV_CODEC_ID_H264);
|
|
205
|
+
* // Use parser...
|
|
206
|
+
* } // Automatically closed when leaving scope
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
[Symbol.dispose]() {
|
|
210
|
+
this.close();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=codec-parser.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG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