node-av 1.0.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -41
- package/dist/api/bitstream-filter.d.ts +180 -123
- package/dist/api/bitstream-filter.js +182 -126
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/decoder.d.ts +286 -130
- package/dist/api/decoder.js +321 -159
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/encoder.d.ts +254 -158
- package/dist/api/encoder.js +326 -298
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +912 -0
- package/dist/api/filter-presets.js +1407 -0
- package/dist/api/filter-presets.js.map +1 -0
- package/dist/api/filter.d.ts +280 -284
- package/dist/api/filter.js +435 -509
- package/dist/api/filter.js.map +1 -1
- package/dist/api/hardware.d.ts +226 -159
- package/dist/api/hardware.js +405 -287
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +3 -2
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +65 -61
- package/dist/api/io-stream.js +45 -47
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/media-input.d.ts +244 -141
- package/dist/api/media-input.js +207 -104
- package/dist/api/media-input.js.map +1 -1
- package/dist/api/media-output.d.ts +206 -128
- package/dist/api/media-output.js +212 -129
- package/dist/api/media-output.js.map +1 -1
- package/dist/api/pipeline.d.ts +168 -38
- package/dist/api/pipeline.js +238 -14
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/types.d.ts +22 -182
- package/dist/api/utilities/audio-sample.d.ts +1 -1
- package/dist/api/utilities/image.d.ts +1 -1
- package/dist/api/utilities/media-type.d.ts +1 -1
- package/dist/api/utilities/pixel-format.d.ts +1 -1
- package/dist/api/utilities/sample-format.d.ts +1 -1
- package/dist/api/utilities/timestamp.d.ts +1 -1
- package/dist/api/utils.d.ts +1 -2
- package/dist/api/utils.js +9 -0
- package/dist/api/utils.js.map +1 -1
- package/dist/{lib → constants}/channel-layouts.d.ts +1 -1
- package/dist/constants/channel-layouts.js.map +1 -0
- package/dist/{lib → constants}/constants.d.ts +19 -4
- package/dist/{lib → constants}/constants.js +15 -1
- package/dist/constants/constants.js.map +1 -0
- package/dist/constants/decoders.d.ts +609 -0
- package/dist/constants/decoders.js +617 -0
- package/dist/constants/decoders.js.map +1 -0
- package/dist/constants/encoders.d.ts +285 -0
- package/dist/constants/encoders.js +298 -0
- package/dist/constants/encoders.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +5 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/audio-fifo.d.ts +128 -171
- package/dist/lib/audio-fifo.js +130 -173
- package/dist/lib/audio-fifo.js.map +1 -1
- package/dist/lib/binding.d.ts +7 -5
- package/dist/lib/binding.js +5 -0
- package/dist/lib/binding.js.map +1 -1
- package/dist/lib/bitstream-filter-context.d.ts +139 -184
- package/dist/lib/bitstream-filter-context.js +139 -188
- package/dist/lib/bitstream-filter-context.js.map +1 -1
- package/dist/lib/bitstream-filter.d.ts +69 -55
- package/dist/lib/bitstream-filter.js +68 -54
- package/dist/lib/bitstream-filter.js.map +1 -1
- package/dist/lib/codec-context.d.ts +317 -381
- package/dist/lib/codec-context.js +316 -381
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +161 -171
- package/dist/lib/codec-parameters.js +162 -172
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +92 -105
- package/dist/lib/codec-parser.js +92 -103
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +328 -217
- package/dist/lib/codec.js +392 -218
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.d.ts +150 -204
- package/dist/lib/dictionary.js +159 -213
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.d.ts +97 -131
- package/dist/lib/error.js +98 -128
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/filter-context.d.ts +317 -194
- package/dist/lib/filter-context.js +335 -200
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +252 -293
- package/dist/lib/filter-graph.js +253 -294
- package/dist/lib/filter-graph.js.map +1 -1
- package/dist/lib/filter-inout.d.ts +87 -95
- package/dist/lib/filter-inout.js +87 -95
- package/dist/lib/filter-inout.js.map +1 -1
- package/dist/lib/filter.d.ts +93 -111
- package/dist/lib/filter.js +94 -112
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +321 -429
- package/dist/lib/format-context.js +314 -386
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +263 -406
- package/dist/lib/frame.js +263 -408
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +150 -204
- package/dist/lib/hardware-device-context.js +149 -203
- package/dist/lib/hardware-device-context.js.map +1 -1
- package/dist/lib/hardware-frames-context.d.ts +171 -181
- package/dist/lib/hardware-frames-context.js +171 -181
- package/dist/lib/hardware-frames-context.js.map +1 -1
- package/dist/lib/index.d.ts +2 -3
- package/dist/lib/index.js +2 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/input-format.d.ts +90 -118
- package/dist/lib/input-format.js +89 -117
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/io-context.d.ts +210 -242
- package/dist/lib/io-context.js +221 -253
- package/dist/lib/io-context.js.map +1 -1
- package/dist/lib/log.d.ts +86 -120
- package/dist/lib/log.js +85 -122
- package/dist/lib/log.js.map +1 -1
- package/dist/lib/native-types.d.ts +127 -112
- package/dist/lib/native-types.js +9 -0
- package/dist/lib/native-types.js.map +1 -1
- package/dist/lib/option.d.ts +285 -242
- package/dist/lib/option.js +310 -250
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +78 -102
- package/dist/lib/output-format.js +77 -101
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +173 -241
- package/dist/lib/packet.js +172 -241
- package/dist/lib/packet.js.map +1 -1
- package/dist/lib/rational.d.ts +0 -2
- package/dist/lib/rational.js +0 -2
- package/dist/lib/rational.js.map +1 -1
- package/dist/lib/software-resample-context.d.ts +242 -326
- package/dist/lib/software-resample-context.js +242 -326
- package/dist/lib/software-resample-context.js.map +1 -1
- package/dist/lib/software-scale-context.d.ts +130 -174
- package/dist/lib/software-scale-context.js +132 -176
- package/dist/lib/software-scale-context.js.map +1 -1
- package/dist/lib/stream.d.ts +88 -198
- package/dist/lib/stream.js +87 -197
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/utilities.d.ts +372 -181
- package/dist/lib/utilities.js +373 -182
- package/dist/lib/utilities.js.map +1 -1
- package/install/check.js +0 -1
- package/package.json +32 -24
- package/release_notes.md +43 -13
- package/CHANGELOG.md +0 -8
- package/dist/lib/channel-layouts.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- /package/dist/{lib → constants}/channel-layouts.js +0 -0
package/dist/lib/stream.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { CodecParameters } from './codec-parameters.js';
|
|
2
2
|
import { Dictionary } from './dictionary.js';
|
|
3
3
|
import { Rational } from './rational.js';
|
|
4
|
-
import type { AVDiscard, AVDisposition, AVStreamEventFlag } from '
|
|
4
|
+
import type { AVDiscard, AVDisposition, AVStreamEventFlag } from '../constants/constants.js';
|
|
5
5
|
import type { NativeStream, NativeWrapper } from './native-types.js';
|
|
6
6
|
import type { Packet } from './packet.js';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Media stream within a format context.
|
|
9
9
|
*
|
|
10
|
-
* Represents a single stream (video, audio, subtitle, etc.) within a media
|
|
11
|
-
*
|
|
12
|
-
* and
|
|
13
|
-
*
|
|
10
|
+
* Represents a single stream (video, audio, subtitle, etc.) within a media container.
|
|
11
|
+
* Contains stream-specific information including codec parameters, timing information,
|
|
12
|
+
* metadata, and disposition flags. Each stream in a file has a unique index and may
|
|
13
|
+
* contain packets of compressed data.
|
|
14
14
|
*
|
|
15
15
|
* Direct mapping to FFmpeg's AVStream.
|
|
16
16
|
*
|
|
@@ -19,304 +19,194 @@ import type { Packet } from './packet.js';
|
|
|
19
19
|
* import { FormatContext, FFmpegError } from 'node-av';
|
|
20
20
|
* import { AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO } from 'node-av/constants';
|
|
21
21
|
*
|
|
22
|
-
* //
|
|
22
|
+
* // Access streams from format context
|
|
23
23
|
* const formatContext = new FormatContext();
|
|
24
|
-
*
|
|
25
|
-
* FFmpegError.throwIfError(ret, 'openInput');
|
|
24
|
+
* await formatContext.openInput('video.mp4');
|
|
26
25
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* // Access streams
|
|
31
|
-
* const streams = formatContext.streams;
|
|
32
|
-
* for (const stream of streams) {
|
|
33
|
-
* console.log(`Stream ${stream.index}: ${stream.codecpar.codecType}`);
|
|
34
|
-
* console.log(`Time base: ${stream.timeBase.num}/${stream.timeBase.den}`);
|
|
35
|
-
*
|
|
36
|
-
* // Direct access to codec parameters
|
|
26
|
+
* // Iterate through streams
|
|
27
|
+
* for (let i = 0; i < formatContext.nbStreams; i++) {
|
|
28
|
+
* const stream = formatContext.streams[i];
|
|
37
29
|
* const codecpar = stream.codecpar;
|
|
30
|
+
*
|
|
38
31
|
* if (codecpar.codecType === AVMEDIA_TYPE_VIDEO) {
|
|
39
|
-
* console.log(`Video
|
|
32
|
+
* console.log(`Video stream ${stream.index}:`);
|
|
33
|
+
* console.log(` Codec: ${codecpar.codecId}`);
|
|
34
|
+
* console.log(` Resolution: ${codecpar.width}x${codecpar.height}`);
|
|
35
|
+
* console.log(` Frame rate: ${stream.avgFrameRate.num}/${stream.avgFrameRate.den}`);
|
|
40
36
|
* } else if (codecpar.codecType === AVMEDIA_TYPE_AUDIO) {
|
|
41
|
-
* console.log(`Audio
|
|
37
|
+
* console.log(`Audio stream ${stream.index}:`);
|
|
38
|
+
* console.log(` Sample rate: ${codecpar.sampleRate} Hz`);
|
|
39
|
+
* console.log(` Channels: ${codecpar.channels}`);
|
|
42
40
|
* }
|
|
43
41
|
* }
|
|
44
42
|
* ```
|
|
45
43
|
*
|
|
46
|
-
* @see
|
|
47
|
-
* @see {@link
|
|
44
|
+
* @see [AVStream](https://ffmpeg.org/doxygen/trunk/structAVStream.html) - FFmpeg Doxygen
|
|
45
|
+
* @see {@link FormatContext} For container operations
|
|
46
|
+
* @see {@link CodecParameters} For codec configuration
|
|
48
47
|
*/
|
|
49
48
|
export declare class Stream implements NativeWrapper<NativeStream> {
|
|
50
49
|
private native;
|
|
51
50
|
private _codecpar?;
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Streams are created and managed by FormatContext.
|
|
56
|
-
* For demuxing, streams are created automatically when opening input.
|
|
57
|
-
* For muxing, use formatContext.newStream() to create streams.
|
|
58
|
-
*
|
|
52
|
+
* @param native - The native stream instance
|
|
59
53
|
* @internal
|
|
60
|
-
*
|
|
61
|
-
* @param native - Native AVStream to wrap
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* // Don't create streams directly
|
|
66
|
-
* // const stream = new Stream(); // Wrong
|
|
67
|
-
*
|
|
68
|
-
* // For demuxing: streams are created automatically
|
|
69
|
-
* const streams = formatContext.streams; // Correct
|
|
70
|
-
*
|
|
71
|
-
* // For muxing: use newStream
|
|
72
|
-
* const stream = formatContext.newStream(null); // Correct
|
|
73
|
-
* ```
|
|
74
54
|
*/
|
|
75
55
|
constructor(native: NativeStream);
|
|
76
56
|
/**
|
|
77
|
-
* Stream index
|
|
78
|
-
*
|
|
79
|
-
* Zero-based index of this stream in the format context's stream array.
|
|
80
|
-
* This is the index used to identify the stream in packets.
|
|
81
|
-
*
|
|
82
|
-
* Direct mapping to AVStream->index
|
|
83
|
-
*
|
|
84
|
-
* @readonly
|
|
57
|
+
* Stream index.
|
|
85
58
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* // Find video stream index
|
|
89
|
-
* const videoStreamIndex = streams.findIndex(
|
|
90
|
-
* s => s.codecpar.codecType === AVMEDIA_TYPE_VIDEO
|
|
91
|
-
* );
|
|
59
|
+
* Zero-based index of this stream in the format context.
|
|
60
|
+
* Used to identify packets belonging to this stream.
|
|
92
61
|
*
|
|
93
|
-
*
|
|
94
|
-
* if (packet.streamIndex === videoStreamIndex) {
|
|
95
|
-
* // This packet belongs to the video stream
|
|
96
|
-
* }
|
|
97
|
-
* ```
|
|
62
|
+
* Direct mapping to AVStream->index.
|
|
98
63
|
*/
|
|
99
64
|
get index(): number;
|
|
100
65
|
/**
|
|
101
|
-
*
|
|
66
|
+
* Stream ID.
|
|
102
67
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
68
|
+
* Format-specific stream identifier.
|
|
69
|
+
* May be used by some formats for internal stream identification.
|
|
105
70
|
*
|
|
106
|
-
* Direct mapping to AVStream->id
|
|
107
|
-
*
|
|
108
|
-
* - decoding: Set by libavformat
|
|
109
|
-
* - encoding: Set by the user, replaced by libavformat if left unset
|
|
71
|
+
* Direct mapping to AVStream->id.
|
|
110
72
|
*/
|
|
111
73
|
get id(): number;
|
|
112
74
|
set id(value: number);
|
|
113
75
|
/**
|
|
114
|
-
* Codec parameters
|
|
115
|
-
*
|
|
116
|
-
* Contains all the parameters needed to set up a codec for this stream,
|
|
117
|
-
* including codec ID, dimensions for video, sample rate for audio, etc.
|
|
118
|
-
*
|
|
119
|
-
* Direct mapping to AVStream->codecpar
|
|
76
|
+
* Codec parameters.
|
|
120
77
|
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
78
|
+
* Contains essential codec configuration for this stream.
|
|
79
|
+
* Used to initialize decoders and describe stream properties.
|
|
123
80
|
*
|
|
124
|
-
*
|
|
125
|
-
* ```typescript
|
|
126
|
-
* // For video stream
|
|
127
|
-
* stream.codecpar.codecType = AVMEDIA_TYPE_VIDEO;
|
|
128
|
-
* stream.codecpar.codecId = AV_CODEC_ID_H264;
|
|
129
|
-
* stream.codecpar.width = 1920;
|
|
130
|
-
* stream.codecpar.height = 1080;
|
|
131
|
-
*
|
|
132
|
-
* // For audio stream
|
|
133
|
-
* stream.codecpar.codecType = AVMEDIA_TYPE_AUDIO;
|
|
134
|
-
* stream.codecpar.codecId = AV_CODEC_ID_AAC;
|
|
135
|
-
* stream.codecpar.sampleRate = 48000;
|
|
136
|
-
* stream.codecpar.channels = 2;
|
|
137
|
-
* ```
|
|
138
|
-
*
|
|
139
|
-
* @see {@link CodecParameters} For detailed parameter documentation
|
|
81
|
+
* Direct mapping to AVStream->codecpar.
|
|
140
82
|
*/
|
|
141
83
|
get codecpar(): CodecParameters;
|
|
142
84
|
set codecpar(value: CodecParameters);
|
|
143
85
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* The fundamental unit of time (in seconds) in terms of which frame
|
|
147
|
-
* timestamps are represented. For example, a time base of 1/25 means
|
|
148
|
-
* each time unit is 1/25 of a second (40ms).
|
|
149
|
-
*
|
|
150
|
-
* Direct mapping to AVStream->time_base
|
|
151
|
-
*
|
|
152
|
-
* - decoding: Set by libavformat
|
|
153
|
-
* - encoding: May be set before writeHeader() as a hint to the muxer.
|
|
154
|
-
* The muxer will overwrite with the actual timebase used.
|
|
155
|
-
*
|
|
156
|
-
* @example
|
|
157
|
-
* ```typescript
|
|
158
|
-
* import { Rational } from 'node-av';
|
|
159
|
-
*
|
|
160
|
-
* // Common time bases
|
|
161
|
-
* stream.timeBase = new Rational(1, 90000); // 90kHz (MPEG-TS)
|
|
162
|
-
* stream.timeBase = new Rational(1, 1000); // milliseconds
|
|
163
|
-
* stream.timeBase = new Rational(1, 25); // 25 fps video
|
|
86
|
+
* Stream time base.
|
|
164
87
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* const seconds = Number(pts) * stream.timeBase.toDouble();
|
|
168
|
-
* ```
|
|
88
|
+
* Unit of time for timestamps in this stream.
|
|
89
|
+
* All timestamps (PTS/DTS) are in units of this time base.
|
|
169
90
|
*
|
|
170
|
-
*
|
|
91
|
+
* Direct mapping to AVStream->time_base.
|
|
171
92
|
*/
|
|
172
93
|
get timeBase(): Rational;
|
|
173
94
|
set timeBase(value: Rational);
|
|
174
95
|
/**
|
|
175
|
-
*
|
|
96
|
+
* Start time.
|
|
176
97
|
*
|
|
177
|
-
*
|
|
98
|
+
* First timestamp of the stream in stream time base units.
|
|
99
|
+
* AV_NOPTS_VALUE if unknown.
|
|
178
100
|
*
|
|
179
|
-
*
|
|
180
|
-
* it to really is the pts of the first frame.
|
|
181
|
-
* This may be undefined (AV_NOPTS_VALUE).
|
|
182
|
-
*
|
|
183
|
-
* @note The ASF header does NOT contain a correct start_time the ASF
|
|
184
|
-
* demuxer must NOT set this.
|
|
101
|
+
* Direct mapping to AVStream->start_time.
|
|
185
102
|
*/
|
|
186
103
|
get startTime(): bigint;
|
|
187
104
|
set startTime(value: bigint);
|
|
188
105
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* Direct mapping to AVStream->duration
|
|
106
|
+
* Stream duration.
|
|
192
107
|
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
108
|
+
* Total duration in stream time base units.
|
|
109
|
+
* AV_NOPTS_VALUE if unknown.
|
|
195
110
|
*
|
|
196
|
-
*
|
|
197
|
-
* provide a hint to the muxer about the estimated duration.
|
|
111
|
+
* Direct mapping to AVStream->duration.
|
|
198
112
|
*/
|
|
199
113
|
get duration(): bigint;
|
|
200
114
|
set duration(value: bigint);
|
|
201
115
|
/**
|
|
202
|
-
* Number of frames
|
|
116
|
+
* Number of frames.
|
|
203
117
|
*
|
|
204
|
-
*
|
|
118
|
+
* Total number of frames in this stream.
|
|
119
|
+
* 0 if unknown.
|
|
120
|
+
*
|
|
121
|
+
* Direct mapping to AVStream->nb_frames.
|
|
205
122
|
*/
|
|
206
123
|
get nbFrames(): bigint;
|
|
207
124
|
set nbFrames(value: bigint);
|
|
208
125
|
/**
|
|
209
|
-
* Stream disposition
|
|
210
|
-
*
|
|
211
|
-
* Direct mapping to AVStream->disposition
|
|
126
|
+
* Stream disposition flags.
|
|
212
127
|
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* - muxing: may be set by the caller before avformat_write_header().
|
|
128
|
+
* Combination of AV_DISPOSITION_* flags indicating stream properties
|
|
129
|
+
* (e.g., default, forced subtitles, visual impaired, etc.).
|
|
216
130
|
*
|
|
217
|
-
*
|
|
218
|
-
* - AV_DISPOSITION_DEFAULT: default track
|
|
219
|
-
* - AV_DISPOSITION_ATTACHED_PIC: stream is an attached picture (album art)
|
|
220
|
-
* - AV_DISPOSITION_CAPTIONS: stream contains captions
|
|
221
|
-
* - AV_DISPOSITION_DESCRIPTIONS: stream contains descriptions
|
|
222
|
-
* - AV_DISPOSITION_METADATA: stream contains metadata
|
|
131
|
+
* Direct mapping to AVStream->disposition.
|
|
223
132
|
*/
|
|
224
133
|
get disposition(): AVDisposition;
|
|
225
134
|
set disposition(value: AVDisposition);
|
|
226
135
|
/**
|
|
227
|
-
*
|
|
136
|
+
* Discard setting.
|
|
228
137
|
*
|
|
229
|
-
*
|
|
138
|
+
* Indicates which packets can be discarded during demuxing.
|
|
139
|
+
* Used to skip non-essential packets for performance.
|
|
230
140
|
*
|
|
231
|
-
*
|
|
232
|
-
* - AVDISCARD_DEFAULT: discard useless packets like 0 size packets in avi
|
|
233
|
-
* - AVDISCARD_NONREF: discard all non reference
|
|
234
|
-
* - AVDISCARD_BIDIR: discard all bidirectional frames
|
|
235
|
-
* - AVDISCARD_NONINTRA: discard all non intra frames
|
|
236
|
-
* - AVDISCARD_NONKEY: discard all frames except keyframes
|
|
237
|
-
* - AVDISCARD_ALL: discard all
|
|
141
|
+
* Direct mapping to AVStream->discard.
|
|
238
142
|
*/
|
|
239
143
|
get discard(): AVDiscard;
|
|
240
144
|
set discard(value: AVDiscard);
|
|
241
145
|
/**
|
|
242
|
-
* Sample aspect ratio
|
|
146
|
+
* Sample aspect ratio.
|
|
243
147
|
*
|
|
244
|
-
*
|
|
148
|
+
* Pixel aspect ratio for video streams.
|
|
149
|
+
* 0/1 if unknown or not applicable.
|
|
245
150
|
*
|
|
246
|
-
*
|
|
247
|
-
* - encoding: Set by user.
|
|
248
|
-
* - decoding: Set by libavformat.
|
|
151
|
+
* Direct mapping to AVStream->sample_aspect_ratio.
|
|
249
152
|
*/
|
|
250
153
|
get sampleAspectRatio(): Rational;
|
|
251
154
|
set sampleAspectRatio(value: Rational);
|
|
252
155
|
/**
|
|
253
|
-
* Average
|
|
156
|
+
* Average frame rate.
|
|
254
157
|
*
|
|
255
|
-
*
|
|
158
|
+
* Average framerate of the stream.
|
|
159
|
+
* 0/1 if unknown or variable frame rate.
|
|
256
160
|
*
|
|
257
|
-
*
|
|
258
|
-
* avformat_find_stream_info().
|
|
259
|
-
* - muxing: May be set by the caller before avformat_write_header().
|
|
161
|
+
* Direct mapping to AVStream->avg_frame_rate.
|
|
260
162
|
*/
|
|
261
163
|
get avgFrameRate(): Rational;
|
|
262
164
|
set avgFrameRate(value: Rational);
|
|
263
165
|
/**
|
|
264
|
-
* Real
|
|
166
|
+
* Real frame rate.
|
|
265
167
|
*
|
|
266
|
-
*
|
|
168
|
+
* Real base frame rate of the stream.
|
|
169
|
+
* This is the lowest common multiple of all frame rates in the stream.
|
|
267
170
|
*
|
|
268
|
-
*
|
|
269
|
-
* represented accurately (it is the least common multiple of all
|
|
270
|
-
* framerates in the stream). Note, this value is just a guess!
|
|
271
|
-
* For example, if the time base is 1/90000 and all frames have either
|
|
272
|
-
* approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
|
|
171
|
+
* Direct mapping to AVStream->r_frame_rate.
|
|
273
172
|
*/
|
|
274
173
|
get rFrameRate(): Rational;
|
|
275
174
|
set rFrameRate(value: Rational);
|
|
276
175
|
/**
|
|
277
|
-
*
|
|
176
|
+
* Stream metadata.
|
|
278
177
|
*
|
|
279
|
-
*
|
|
178
|
+
* Dictionary containing stream-specific metadata
|
|
179
|
+
* (e.g., language, title, encoder settings).
|
|
280
180
|
*
|
|
281
|
-
*
|
|
181
|
+
* Direct mapping to AVStream->metadata.
|
|
282
182
|
*/
|
|
283
183
|
get metadata(): Dictionary | null;
|
|
284
184
|
set metadata(value: Dictionary | null);
|
|
285
185
|
/**
|
|
286
|
-
*
|
|
287
|
-
* will contain the attached picture (e.g., album art).
|
|
186
|
+
* Attached picture.
|
|
288
187
|
*
|
|
289
|
-
*
|
|
188
|
+
* For streams with AV_DISPOSITION_ATTACHED_PIC set,
|
|
189
|
+
* contains the attached picture (e.g., album art).
|
|
290
190
|
*
|
|
291
|
-
*
|
|
292
|
-
* - encoding: unused
|
|
293
|
-
* @readonly
|
|
191
|
+
* Direct mapping to AVStream->attached_pic.
|
|
294
192
|
*/
|
|
295
193
|
get attachedPic(): Packet | null;
|
|
296
194
|
/**
|
|
297
|
-
*
|
|
298
|
-
* AVSTREAM_EVENT_FLAG_*.
|
|
195
|
+
* Event flags.
|
|
299
196
|
*
|
|
300
|
-
*
|
|
197
|
+
* Flags indicating events that happened to the stream.
|
|
198
|
+
* Used for signaling format changes.
|
|
301
199
|
*
|
|
302
|
-
*
|
|
303
|
-
* avformat_find_stream_info() and av_read_frame(). Flags must be cleared
|
|
304
|
-
* by the user once the event has been handled.
|
|
305
|
-
* - muxing: may be set by the user after avformat_write_header() to
|
|
306
|
-
* indicate a user-triggered event. The muxer will clear the flags for
|
|
307
|
-
* events it has handled in av_[interleaved]_write_frame().
|
|
308
|
-
*
|
|
309
|
-
* Flags:
|
|
310
|
-
* - AVSTREAM_EVENT_FLAG_METADATA_UPDATED: metadata was updated
|
|
311
|
-
* - AVSTREAM_EVENT_FLAG_NEW_PACKETS: new packets were read for this stream
|
|
200
|
+
* Direct mapping to AVStream->event_flags.
|
|
312
201
|
*/
|
|
313
202
|
get eventFlags(): AVStreamEventFlag;
|
|
314
203
|
set eventFlags(value: AVStreamEventFlag);
|
|
315
204
|
/**
|
|
316
|
-
* Get the native
|
|
205
|
+
* Get the underlying native Stream object.
|
|
206
|
+
*
|
|
207
|
+
* @returns The native Stream binding object
|
|
317
208
|
*
|
|
318
|
-
* @internal
|
|
319
|
-
* @returns The underlying native stream object
|
|
209
|
+
* @internal
|
|
320
210
|
*/
|
|
321
211
|
getNative(): NativeStream;
|
|
322
212
|
}
|