@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,526 @@
|
|
|
1
|
+
import { CodecParameters } from './codec-parameters.js';
|
|
2
|
+
import { CodecParser } from './codec-parser.js';
|
|
3
|
+
import { Dictionary } from './dictionary.js';
|
|
4
|
+
import { Rational } from './rational.js';
|
|
5
|
+
/**
|
|
6
|
+
* Media stream within a format context.
|
|
7
|
+
*
|
|
8
|
+
* Represents a single stream (video, audio, subtitle, etc.) within a media container.
|
|
9
|
+
* Contains stream-specific information including codec parameters, timing information,
|
|
10
|
+
* metadata, and disposition flags. Each stream in a file has a unique index and may
|
|
11
|
+
* contain packets of compressed data.
|
|
12
|
+
*
|
|
13
|
+
* Direct mapping to FFmpeg's AVStream.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { FormatContext, FFmpegError } from 'node-av';
|
|
18
|
+
* import { AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO } from 'node-av/constants';
|
|
19
|
+
*
|
|
20
|
+
* // Access streams from format context
|
|
21
|
+
* const formatContext = new FormatContext();
|
|
22
|
+
* await formatContext.openInput('video.mp4');
|
|
23
|
+
*
|
|
24
|
+
* // Iterate through streams
|
|
25
|
+
* for (let i = 0; i < formatContext.nbStreams; i++) {
|
|
26
|
+
* const stream = formatContext.streams[i];
|
|
27
|
+
* const codecpar = stream.codecpar;
|
|
28
|
+
*
|
|
29
|
+
* if (codecpar.codecType === AVMEDIA_TYPE_VIDEO) {
|
|
30
|
+
* console.log(`Video stream ${stream.index}:`);
|
|
31
|
+
* console.log(` Codec: ${codecpar.codecId}`);
|
|
32
|
+
* console.log(` Resolution: ${codecpar.width}x${codecpar.height}`);
|
|
33
|
+
* console.log(` Frame rate: ${stream.avgFrameRate.num}/${stream.avgFrameRate.den}`);
|
|
34
|
+
* } else if (codecpar.codecType === AVMEDIA_TYPE_AUDIO) {
|
|
35
|
+
* console.log(`Audio stream ${stream.index}:`);
|
|
36
|
+
* console.log(` Sample rate: ${codecpar.sampleRate} Hz`);
|
|
37
|
+
* console.log(` Channels: ${codecpar.channels}`);
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see [AVStream](https://ffmpeg.org/doxygen/trunk/structAVStream.html) - FFmpeg Doxygen
|
|
43
|
+
* @see {@link FormatContext} For container operations
|
|
44
|
+
* @see {@link CodecParameters} For codec configuration
|
|
45
|
+
*/
|
|
46
|
+
export class Stream {
|
|
47
|
+
native;
|
|
48
|
+
_metadata; // Cache for metadata wrapper
|
|
49
|
+
_codecpar; // Cache the wrapped codecpar
|
|
50
|
+
_parser; // Cache the wrapped parser
|
|
51
|
+
/**
|
|
52
|
+
* @param native - The native stream instance
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
constructor(native) {
|
|
57
|
+
this.native = native;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Stream index.
|
|
61
|
+
*
|
|
62
|
+
* Zero-based index of this stream in the format context.
|
|
63
|
+
* Used to identify packets belonging to this stream.
|
|
64
|
+
*
|
|
65
|
+
* Direct mapping to AVStream->index.
|
|
66
|
+
*/
|
|
67
|
+
get index() {
|
|
68
|
+
return this.native.index;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Stream ID.
|
|
72
|
+
*
|
|
73
|
+
* Format-specific stream identifier.
|
|
74
|
+
* May be used by some formats for internal stream identification.
|
|
75
|
+
*
|
|
76
|
+
* Direct mapping to AVStream->id.
|
|
77
|
+
*/
|
|
78
|
+
get id() {
|
|
79
|
+
return this.native.id;
|
|
80
|
+
}
|
|
81
|
+
set id(value) {
|
|
82
|
+
this.native.id = value;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Codec parameters.
|
|
86
|
+
*
|
|
87
|
+
* Contains essential codec configuration for this stream.
|
|
88
|
+
* Used to initialize decoders and describe stream properties.
|
|
89
|
+
*
|
|
90
|
+
* Direct mapping to AVStream->codecpar.
|
|
91
|
+
*/
|
|
92
|
+
get codecpar() {
|
|
93
|
+
// Return cached wrapper if we already have one
|
|
94
|
+
if (this._codecpar) {
|
|
95
|
+
return this._codecpar;
|
|
96
|
+
}
|
|
97
|
+
// Create and cache the wrapper
|
|
98
|
+
const params = Object.create(CodecParameters.prototype);
|
|
99
|
+
params.native = this.native.codecpar;
|
|
100
|
+
this._codecpar = params;
|
|
101
|
+
return params;
|
|
102
|
+
}
|
|
103
|
+
set codecpar(value) {
|
|
104
|
+
// Copy codec parameters to the stream
|
|
105
|
+
// The native binding handles the copying
|
|
106
|
+
this.native.codecpar = value.getNative();
|
|
107
|
+
// Clear the cache as the underlying parameters have changed
|
|
108
|
+
this._codecpar = undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Stream time base.
|
|
112
|
+
*
|
|
113
|
+
* Unit of time for timestamps in this stream.
|
|
114
|
+
* All timestamps (PTS/DTS) are in units of this time base.
|
|
115
|
+
*
|
|
116
|
+
* Direct mapping to AVStream->time_base.
|
|
117
|
+
*/
|
|
118
|
+
get timeBase() {
|
|
119
|
+
const tb = this.native.timeBase;
|
|
120
|
+
return new Rational(tb.num, tb.den);
|
|
121
|
+
}
|
|
122
|
+
set timeBase(value) {
|
|
123
|
+
this.native.timeBase = { num: value.num, den: value.den };
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Start time.
|
|
127
|
+
*
|
|
128
|
+
* First timestamp of the stream in stream time base units.
|
|
129
|
+
* AV_NOPTS_VALUE if unknown.
|
|
130
|
+
*
|
|
131
|
+
* Direct mapping to AVStream->start_time.
|
|
132
|
+
*/
|
|
133
|
+
get startTime() {
|
|
134
|
+
return this.native.startTime;
|
|
135
|
+
}
|
|
136
|
+
set startTime(value) {
|
|
137
|
+
this.native.startTime = value;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Stream duration.
|
|
141
|
+
*
|
|
142
|
+
* Total duration in stream time base units.
|
|
143
|
+
* AV_NOPTS_VALUE if unknown.
|
|
144
|
+
*
|
|
145
|
+
* Direct mapping to AVStream->duration.
|
|
146
|
+
*/
|
|
147
|
+
get duration() {
|
|
148
|
+
return this.native.duration;
|
|
149
|
+
}
|
|
150
|
+
set duration(value) {
|
|
151
|
+
this.native.duration = value;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Number of frames.
|
|
155
|
+
*
|
|
156
|
+
* Total number of frames in this stream.
|
|
157
|
+
* 0 if unknown.
|
|
158
|
+
*
|
|
159
|
+
* Direct mapping to AVStream->nb_frames.
|
|
160
|
+
*/
|
|
161
|
+
get nbFrames() {
|
|
162
|
+
return this.native.nbFrames;
|
|
163
|
+
}
|
|
164
|
+
set nbFrames(value) {
|
|
165
|
+
this.native.nbFrames = value;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Stream disposition flags.
|
|
169
|
+
*
|
|
170
|
+
* Combination of AV_DISPOSITION_* flags indicating stream properties
|
|
171
|
+
* (e.g., default, forced subtitles, visual impaired, etc.).
|
|
172
|
+
*
|
|
173
|
+
* Direct mapping to AVStream->disposition.
|
|
174
|
+
*/
|
|
175
|
+
get disposition() {
|
|
176
|
+
return this.native.disposition;
|
|
177
|
+
}
|
|
178
|
+
set disposition(value) {
|
|
179
|
+
this.native.disposition = value;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Discard setting.
|
|
183
|
+
*
|
|
184
|
+
* Indicates which packets can be discarded during demuxing.
|
|
185
|
+
* Used to skip non-essential packets for performance.
|
|
186
|
+
*
|
|
187
|
+
* Direct mapping to AVStream->discard.
|
|
188
|
+
*/
|
|
189
|
+
get discard() {
|
|
190
|
+
return this.native.discard;
|
|
191
|
+
}
|
|
192
|
+
set discard(value) {
|
|
193
|
+
this.native.discard = value;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Sample aspect ratio.
|
|
197
|
+
*
|
|
198
|
+
* Pixel aspect ratio for video streams.
|
|
199
|
+
* 0/1 if unknown or not applicable.
|
|
200
|
+
*
|
|
201
|
+
* Direct mapping to AVStream->sample_aspect_ratio.
|
|
202
|
+
*/
|
|
203
|
+
get sampleAspectRatio() {
|
|
204
|
+
const sar = this.native.sampleAspectRatio;
|
|
205
|
+
return new Rational(sar.num || 0, sar.den || 1);
|
|
206
|
+
}
|
|
207
|
+
set sampleAspectRatio(value) {
|
|
208
|
+
this.native.sampleAspectRatio = { num: value.num, den: value.den };
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Average frame rate.
|
|
212
|
+
*
|
|
213
|
+
* Average framerate of the stream.
|
|
214
|
+
* 0/1 if unknown or variable frame rate.
|
|
215
|
+
*
|
|
216
|
+
* Direct mapping to AVStream->avg_frame_rate.
|
|
217
|
+
*/
|
|
218
|
+
get avgFrameRate() {
|
|
219
|
+
const fr = this.native.avgFrameRate;
|
|
220
|
+
// Handle 0/0 case (unknown frame rate in FFmpeg)
|
|
221
|
+
if (fr.den === 0) {
|
|
222
|
+
return new Rational(0, 1);
|
|
223
|
+
}
|
|
224
|
+
return new Rational(fr.num, fr.den);
|
|
225
|
+
}
|
|
226
|
+
set avgFrameRate(value) {
|
|
227
|
+
this.native.avgFrameRate = { num: value.num, den: value.den };
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Real frame rate.
|
|
231
|
+
*
|
|
232
|
+
* Real base frame rate of the stream.
|
|
233
|
+
* This is the lowest common multiple of all frame rates in the stream.
|
|
234
|
+
*
|
|
235
|
+
* Direct mapping to AVStream->r_frame_rate.
|
|
236
|
+
*/
|
|
237
|
+
get rFrameRate() {
|
|
238
|
+
const fr = this.native.rFrameRate;
|
|
239
|
+
// Handle 0/0 case (unknown frame rate in FFmpeg)
|
|
240
|
+
if (fr.den === 0) {
|
|
241
|
+
return new Rational(0, 1);
|
|
242
|
+
}
|
|
243
|
+
return new Rational(fr.num, fr.den);
|
|
244
|
+
}
|
|
245
|
+
set rFrameRate(value) {
|
|
246
|
+
this.native.rFrameRate = { num: value.num, den: value.den };
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Number of bits for PTS wrap-around detection.
|
|
250
|
+
*
|
|
251
|
+
* Used for timestamp wrap-around correction in formats with limited timestamp bits.
|
|
252
|
+
* Common values: 33 (MPEG-TS), 31 (DVB), 64 (no wrapping).
|
|
253
|
+
*
|
|
254
|
+
* Direct mapping to AVStream->pts_wrap_bits.
|
|
255
|
+
*/
|
|
256
|
+
get ptsWrapBits() {
|
|
257
|
+
return this.native.ptsWrapBits;
|
|
258
|
+
}
|
|
259
|
+
set ptsWrapBits(value) {
|
|
260
|
+
this.native.ptsWrapBits = value;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Stream metadata.
|
|
264
|
+
*
|
|
265
|
+
* Dictionary containing stream-specific metadata
|
|
266
|
+
* (e.g., language, title, encoder settings).
|
|
267
|
+
*
|
|
268
|
+
* Direct mapping to AVStream->metadata.
|
|
269
|
+
*/
|
|
270
|
+
get metadata() {
|
|
271
|
+
const native = this.native.metadata;
|
|
272
|
+
if (!native) {
|
|
273
|
+
// Clear cache if native is null
|
|
274
|
+
this._metadata = undefined;
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
// Return cached wrapper if available and still valid
|
|
278
|
+
if (this._metadata && this._metadata.native === native) {
|
|
279
|
+
return this._metadata;
|
|
280
|
+
}
|
|
281
|
+
// Create and cache new wrapper
|
|
282
|
+
const device = Object.create(Dictionary.prototype);
|
|
283
|
+
device.native = native;
|
|
284
|
+
this._metadata = device;
|
|
285
|
+
return device;
|
|
286
|
+
}
|
|
287
|
+
set metadata(value) {
|
|
288
|
+
this.native.metadata = value?.getNative() ?? null;
|
|
289
|
+
this._metadata = undefined;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Attached picture.
|
|
293
|
+
*
|
|
294
|
+
* For streams with AV_DISPOSITION_ATTACHED_PIC set,
|
|
295
|
+
* contains the attached picture (e.g., album art).
|
|
296
|
+
*
|
|
297
|
+
* Direct mapping to AVStream->attached_pic.
|
|
298
|
+
*/
|
|
299
|
+
get attachedPic() {
|
|
300
|
+
return this.native.attachedPic;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Event flags.
|
|
304
|
+
*
|
|
305
|
+
* Flags indicating events that happened to the stream.
|
|
306
|
+
* Used for signaling format changes.
|
|
307
|
+
*
|
|
308
|
+
* Direct mapping to AVStream->event_flags.
|
|
309
|
+
*/
|
|
310
|
+
get eventFlags() {
|
|
311
|
+
return this.native.eventFlags;
|
|
312
|
+
}
|
|
313
|
+
set eventFlags(value) {
|
|
314
|
+
this.native.eventFlags = value;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Get the codec parser attached to this stream.
|
|
318
|
+
*
|
|
319
|
+
* Returns the parser context if the stream has an active parser, null otherwise.
|
|
320
|
+
* Parsers are automatically created by FFmpeg for certain formats and codecs.
|
|
321
|
+
* Useful for accessing parser state like repeat_pict for interlaced video.
|
|
322
|
+
*
|
|
323
|
+
* Direct mapping to av_stream_get_parser().
|
|
324
|
+
*
|
|
325
|
+
* @returns Parser context or null if no parser attached
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* const parser = stream.parser;
|
|
330
|
+
* if (parser) {
|
|
331
|
+
* const fields = 1 + parser.repeatPict;
|
|
332
|
+
* console.log(`Frame uses ${fields} fields`);
|
|
333
|
+
* }
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* @see {@link CodecParser} For parser details
|
|
337
|
+
*/
|
|
338
|
+
get parser() {
|
|
339
|
+
const native = this.native.parser;
|
|
340
|
+
if (!native) {
|
|
341
|
+
// Clear cache if native is null
|
|
342
|
+
this._parser = undefined;
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
// Return cached wrapper if available and still valid
|
|
346
|
+
if (this._parser && this._parser.native === native) {
|
|
347
|
+
return this._parser;
|
|
348
|
+
}
|
|
349
|
+
// Create and cache new wrapper
|
|
350
|
+
const parser = Object.create(CodecParser.prototype);
|
|
351
|
+
parser.native = native;
|
|
352
|
+
this._parser = parser;
|
|
353
|
+
return parser;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Set stream event flags.
|
|
357
|
+
*
|
|
358
|
+
* Sets one or more event flags using bitwise OR. Allows setting multiple flags
|
|
359
|
+
* without manually performing bitwise operations.
|
|
360
|
+
*
|
|
361
|
+
* @param flags - One or more event flag values to set
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED, AVSTREAM_EVENT_FLAG_NEW_PACKETS } from 'node-av/constants';
|
|
366
|
+
*
|
|
367
|
+
* // Set multiple event flags at once
|
|
368
|
+
* stream.setEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED, AVSTREAM_EVENT_FLAG_NEW_PACKETS);
|
|
369
|
+
* ```
|
|
370
|
+
*
|
|
371
|
+
* @see {@link clearEventFlags} To unset event flags
|
|
372
|
+
* @see {@link hasEventFlags} To check event flags
|
|
373
|
+
* @see {@link eventFlags} For direct event flag access
|
|
374
|
+
*/
|
|
375
|
+
setEventFlags(...flags) {
|
|
376
|
+
for (const flag of flags) {
|
|
377
|
+
this.native.eventFlags = (this.native.eventFlags | flag);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Clear stream event flags.
|
|
382
|
+
*
|
|
383
|
+
* Clears one or more event flags using bitwise AND NOT. Allows clearing multiple
|
|
384
|
+
* flags without manually performing bitwise operations.
|
|
385
|
+
*
|
|
386
|
+
* @param flags - One or more event flag values to clear
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* ```typescript
|
|
390
|
+
* import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED } from 'node-av/constants';
|
|
391
|
+
*
|
|
392
|
+
* // Clear specific event flag
|
|
393
|
+
* stream.clearEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED);
|
|
394
|
+
* ```
|
|
395
|
+
*
|
|
396
|
+
* @see {@link setEventFlags} To set event flags
|
|
397
|
+
* @see {@link hasEventFlags} To check event flags
|
|
398
|
+
* @see {@link eventFlags} For direct event flag access
|
|
399
|
+
*/
|
|
400
|
+
clearEventFlags(...flags) {
|
|
401
|
+
for (const flag of flags) {
|
|
402
|
+
this.native.eventFlags = (this.native.eventFlags & ~flag);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Check if stream has specific event flags.
|
|
407
|
+
*
|
|
408
|
+
* Tests whether all specified event flags are set using bitwise AND.
|
|
409
|
+
*
|
|
410
|
+
* @param flags - One or more event flag values to check
|
|
411
|
+
*
|
|
412
|
+
* @returns true if all specified event flags are set, false otherwise
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* ```typescript
|
|
416
|
+
* import { AVSTREAM_EVENT_FLAG_METADATA_UPDATED } from 'node-av/constants';
|
|
417
|
+
*
|
|
418
|
+
* if (stream.hasEventFlags(AVSTREAM_EVENT_FLAG_METADATA_UPDATED)) {
|
|
419
|
+
* console.log('Stream metadata was updated');
|
|
420
|
+
* }
|
|
421
|
+
* ```
|
|
422
|
+
*
|
|
423
|
+
* @see {@link setEventFlags} To set event flags
|
|
424
|
+
* @see {@link clearEventFlags} To unset event flags
|
|
425
|
+
* @see {@link eventFlags} For direct event flag access
|
|
426
|
+
*/
|
|
427
|
+
hasEventFlags(...flags) {
|
|
428
|
+
for (const flag of flags) {
|
|
429
|
+
if ((this.native.eventFlags & flag) !== flag) {
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Set stream disposition flags.
|
|
437
|
+
*
|
|
438
|
+
* Sets one or more disposition flags using bitwise OR. Allows setting multiple flags
|
|
439
|
+
* without manually performing bitwise operations.
|
|
440
|
+
*
|
|
441
|
+
* @param flags - One or more disposition flag values to set
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```typescript
|
|
445
|
+
* import { AV_DISPOSITION_DEFAULT, AV_DISPOSITION_FORCED } from 'node-av/constants';
|
|
446
|
+
*
|
|
447
|
+
* // Set multiple disposition flags at once
|
|
448
|
+
* stream.setDisposition(AV_DISPOSITION_DEFAULT, AV_DISPOSITION_FORCED);
|
|
449
|
+
* ```
|
|
450
|
+
*
|
|
451
|
+
* @see {@link clearDisposition} To unset disposition flags
|
|
452
|
+
* @see {@link hasDisposition} To check disposition flags
|
|
453
|
+
* @see {@link disposition} For direct disposition flag access
|
|
454
|
+
*/
|
|
455
|
+
setDisposition(...flags) {
|
|
456
|
+
for (const flag of flags) {
|
|
457
|
+
this.native.disposition = (this.native.disposition | flag);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Clear stream disposition flags.
|
|
462
|
+
*
|
|
463
|
+
* Clears one or more disposition flags using bitwise AND NOT. Allows clearing multiple
|
|
464
|
+
* flags without manually performing bitwise operations.
|
|
465
|
+
*
|
|
466
|
+
* @param flags - One or more disposition flag values to clear
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```typescript
|
|
470
|
+
* import { AV_DISPOSITION_FORCED } from 'node-av/constants';
|
|
471
|
+
*
|
|
472
|
+
* // Clear specific disposition flag
|
|
473
|
+
* stream.clearDisposition(AV_DISPOSITION_FORCED);
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* @see {@link setDisposition} To set disposition flags
|
|
477
|
+
* @see {@link hasDisposition} To check disposition flags
|
|
478
|
+
* @see {@link disposition} For direct disposition flag access
|
|
479
|
+
*/
|
|
480
|
+
clearDisposition(...flags) {
|
|
481
|
+
for (const flag of flags) {
|
|
482
|
+
this.native.disposition = (this.native.disposition & ~flag);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Check if stream has specific disposition flags.
|
|
487
|
+
*
|
|
488
|
+
* Tests whether all specified disposition flags are set using bitwise AND.
|
|
489
|
+
*
|
|
490
|
+
* @param flags - One or more disposition flag values to check
|
|
491
|
+
*
|
|
492
|
+
* @returns true if all specified disposition flags are set, false otherwise
|
|
493
|
+
*
|
|
494
|
+
* @example
|
|
495
|
+
* ```typescript
|
|
496
|
+
* import { AV_DISPOSITION_DEFAULT } from 'node-av/constants';
|
|
497
|
+
*
|
|
498
|
+
* if (stream.hasDisposition(AV_DISPOSITION_DEFAULT)) {
|
|
499
|
+
* console.log('Stream is marked as default');
|
|
500
|
+
* }
|
|
501
|
+
* ```
|
|
502
|
+
*
|
|
503
|
+
* @see {@link setDisposition} To set disposition flags
|
|
504
|
+
* @see {@link clearDisposition} To unset disposition flags
|
|
505
|
+
* @see {@link disposition} For direct disposition flag access
|
|
506
|
+
*/
|
|
507
|
+
hasDisposition(...flags) {
|
|
508
|
+
for (const flag of flags) {
|
|
509
|
+
if ((this.native.disposition & flag) !== flag) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Get the underlying native Stream object.
|
|
517
|
+
*
|
|
518
|
+
* @returns The native Stream binding object
|
|
519
|
+
*
|
|
520
|
+
* @internal
|
|
521
|
+
*/
|
|
522
|
+
getNative() {
|
|
523
|
+
return this.native;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/lib/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,MAAM;IACT,MAAM,CAAe;IACrB,SAAS,CAAc,CAAC,6BAA6B;IACrD,SAAS,CAAmB,CAAC,6BAA6B;IAC1D,OAAO,CAAe,CAAC,2BAA2B;IAE1D;;;;OAIG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CA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