node-av 1.1.0 → 1.3.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 +51 -59
- package/dist/api/bitstream-filter.d.ts +183 -123
- package/dist/api/bitstream-filter.js +185 -127
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/decoder.d.ts +282 -130
- package/dist/api/decoder.js +290 -142
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/encoder.d.ts +249 -160
- package/dist/api/encoder.js +276 -207
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +1944 -96
- package/dist/api/filter-presets.js +2059 -105
- package/dist/api/filter-presets.js.map +1 -1
- package/dist/api/filter.d.ts +264 -200
- package/dist/api/filter.js +269 -231
- package/dist/api/filter.js.map +1 -1
- package/dist/api/hardware.d.ts +246 -117
- package/dist/api/hardware.js +440 -217
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +65 -55
- package/dist/api/io-stream.js +43 -40
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/media-input.d.ts +242 -139
- package/dist/api/media-input.js +205 -103
- package/dist/api/media-input.js.map +1 -1
- package/dist/api/media-output.d.ts +208 -126
- package/dist/api/media-output.js +212 -126
- package/dist/api/media-output.js.map +1 -1
- package/dist/api/pipeline.d.ts +361 -38
- package/dist/api/pipeline.js +255 -14
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/types.d.ts +26 -187
- package/dist/api/utilities/audio-sample.d.ts +0 -8
- package/dist/api/utilities/audio-sample.js +0 -8
- package/dist/api/utilities/audio-sample.js.map +1 -1
- package/dist/api/utilities/channel-layout.d.ts +0 -8
- package/dist/api/utilities/channel-layout.js +0 -8
- package/dist/api/utilities/channel-layout.js.map +1 -1
- package/dist/api/utilities/image.d.ts +0 -8
- package/dist/api/utilities/image.js +0 -8
- package/dist/api/utilities/image.js.map +1 -1
- package/dist/api/utilities/index.d.ts +3 -3
- package/dist/api/utilities/index.js +3 -3
- package/dist/api/utilities/index.js.map +1 -1
- package/dist/api/utilities/media-type.d.ts +1 -9
- package/dist/api/utilities/media-type.js +1 -9
- package/dist/api/utilities/media-type.js.map +1 -1
- package/dist/api/utilities/pixel-format.d.ts +1 -9
- package/dist/api/utilities/pixel-format.js +1 -9
- package/dist/api/utilities/pixel-format.js.map +1 -1
- package/dist/api/utilities/sample-format.d.ts +1 -9
- package/dist/api/utilities/sample-format.js +1 -9
- package/dist/api/utilities/sample-format.js.map +1 -1
- package/dist/api/utilities/streaming.d.ts +0 -8
- package/dist/api/utilities/streaming.js +0 -8
- package/dist/api/utilities/streaming.js.map +1 -1
- package/dist/api/utilities/timestamp.d.ts +0 -8
- package/dist/api/utilities/timestamp.js +0 -8
- package/dist/api/utilities/timestamp.js.map +1 -1
- package/dist/api/utils.d.ts +1 -2
- package/dist/api/utils.js +11 -0
- package/dist/api/utils.js.map +1 -1
- package/dist/constants/constants.d.ts +1 -1
- package/dist/constants/constants.js +2 -0
- package/dist/constants/constants.js.map +1 -1
- package/dist/lib/audio-fifo.d.ts +127 -170
- package/dist/lib/audio-fifo.js +130 -173
- package/dist/lib/audio-fifo.js.map +1 -1
- package/dist/lib/binding.d.ts +1 -0
- package/dist/lib/binding.js +7 -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 +68 -54
- package/dist/lib/bitstream-filter.js +68 -54
- package/dist/lib/bitstream-filter.js.map +1 -1
- package/dist/lib/codec-context.d.ts +316 -380
- package/dist/lib/codec-context.js +316 -381
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +160 -170
- package/dist/lib/codec-parameters.js +162 -172
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +91 -104
- package/dist/lib/codec-parser.js +92 -103
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +266 -283
- package/dist/lib/codec.js +270 -287
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.d.ts +149 -203
- package/dist/lib/dictionary.js +158 -212
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.d.ts +96 -130
- package/dist/lib/error.js +98 -128
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/filter-context.d.ts +284 -218
- package/dist/lib/filter-context.js +290 -227
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +251 -292
- 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 +93 -111
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +320 -428
- package/dist/lib/format-context.js +313 -385
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +262 -405
- package/dist/lib/frame.js +263 -408
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +149 -203
- 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 +170 -180
- 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 +3 -2
- package/dist/lib/index.js +3 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/input-format.d.ts +89 -117
- package/dist/lib/input-format.js +89 -117
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/io-context.d.ts +209 -241
- package/dist/lib/io-context.js +220 -252
- package/dist/lib/io-context.js.map +1 -1
- package/dist/lib/log.d.ts +85 -119
- package/dist/lib/log.js +85 -122
- package/dist/lib/log.js.map +1 -1
- package/dist/lib/native-types.d.ts +118 -106
- package/dist/lib/native-types.js +0 -7
- package/dist/lib/native-types.js.map +1 -1
- package/dist/lib/option.d.ts +437 -218
- package/dist/lib/option.js +462 -226
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +77 -101
- package/dist/lib/output-format.js +77 -101
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +172 -240
- 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 +241 -325
- 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 +129 -173
- package/dist/lib/software-scale-context.js +131 -175
- package/dist/lib/software-scale-context.js.map +1 -1
- package/dist/lib/stream.d.ts +87 -197
- package/dist/lib/stream.js +87 -197
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/utilities.d.ts +435 -181
- package/dist/lib/utilities.js +438 -182
- package/dist/lib/utilities.js.map +1 -1
- package/install/check.js +0 -1
- package/install/ffmpeg.js +0 -11
- package/package.json +25 -18
- package/release_notes.md +24 -59
- package/CHANGELOG.md +0 -8
package/dist/api/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AVPixelFormat, AVSampleFormat
|
|
1
|
+
import type { AVPixelFormat, AVSampleFormat } from '../constants/constants.js';
|
|
2
2
|
import type { ChannelLayout, IRational } from '../lib/index.js';
|
|
3
3
|
import type { HardwareContext } from './hardware.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,6 @@ import type { HardwareContext } from './hardware.js';
|
|
|
7
7
|
* Contains all necessary parameters to describe a video stream.
|
|
8
8
|
* Used for encoder and filter initialization.
|
|
9
9
|
*
|
|
10
|
-
* @interface VideoInfo
|
|
11
10
|
*/
|
|
12
11
|
export interface VideoInfo {
|
|
13
12
|
/** Discriminator for TypeScript type narrowing */
|
|
@@ -31,7 +30,6 @@ export interface VideoInfo {
|
|
|
31
30
|
* Contains all necessary parameters to describe an audio stream.
|
|
32
31
|
* Used for encoder and filter initialization.
|
|
33
32
|
*
|
|
34
|
-
* @interface AudioInfo
|
|
35
33
|
*/
|
|
36
34
|
export interface AudioInfo {
|
|
37
35
|
/** Discriminator for TypeScript type narrowing */
|
|
@@ -44,76 +42,28 @@ export interface AudioInfo {
|
|
|
44
42
|
channelLayout: ChannelLayout;
|
|
45
43
|
/** Time base (required for timing) */
|
|
46
44
|
timeBase: IRational;
|
|
47
|
-
/**
|
|
48
|
-
* Number of samples per frame.
|
|
49
|
-
*
|
|
50
|
-
* Some encoders require specific frame sizes:
|
|
51
|
-
* - AAC: typically 1024 samples
|
|
52
|
-
* - MP3: typically 1152 samples
|
|
53
|
-
* - Opus: flexible, but often 960 or 2880
|
|
54
|
-
*
|
|
55
|
-
* If not specified, the encoder's default will be used.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```typescript
|
|
59
|
-
* const encoder = await Encoder.create('aac', {
|
|
60
|
-
* type: 'audio',
|
|
61
|
-
* sampleRate: 48000,
|
|
62
|
-
* sampleFormat: AV_SAMPLE_FMT_FLTP,
|
|
63
|
-
* channelLayout: AV_CHANNEL_LAYOUT_STEREO,
|
|
64
|
-
* timeBase: { num: 1, den: 48000 },
|
|
65
|
-
* frameSize: 1024
|
|
66
|
-
* });
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
45
|
+
/** Number of samples per frame */
|
|
69
46
|
frameSize?: number;
|
|
70
47
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Union type for stream information.
|
|
73
|
-
* Can be either video or audio stream info.
|
|
74
|
-
*/
|
|
75
48
|
export type StreamInfo = VideoInfo | AudioInfo;
|
|
76
49
|
/**
|
|
77
50
|
* Raw video data configuration.
|
|
78
51
|
*
|
|
79
52
|
* Specifies parameters for opening raw video files like YUV.
|
|
80
53
|
*
|
|
81
|
-
* @interface VideoRawData
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* const rawVideo: VideoRawData = {
|
|
86
|
-
* type: 'video',
|
|
87
|
-
* data: 'testdata/input.yuv',
|
|
88
|
-
* width: 1280,
|
|
89
|
-
* height: 720,
|
|
90
|
-
* pixelFormat: 'yuv420p',
|
|
91
|
-
* frameRate: 30
|
|
92
|
-
* };
|
|
93
|
-
* const input = await MediaInput.open(rawVideo);
|
|
94
|
-
* ```
|
|
95
54
|
*/
|
|
96
55
|
export interface VideoRawData {
|
|
97
|
-
/**
|
|
98
|
-
* Type discriminator for TypeScript.
|
|
99
|
-
*/
|
|
56
|
+
/** Type discriminator for TypeScript */
|
|
100
57
|
type: 'video';
|
|
101
|
-
/**
|
|
102
|
-
* Raw audio input source (file path, Buffer, or stream).
|
|
103
|
-
*/
|
|
58
|
+
/** Raw audio input source (file path, Buffer, or stream) */
|
|
104
59
|
input: string | Buffer;
|
|
105
|
-
/**
|
|
106
|
-
* Video dimensions.
|
|
107
|
-
*/
|
|
60
|
+
/** Video width */
|
|
108
61
|
width: number;
|
|
62
|
+
/** Video height */
|
|
109
63
|
height: number;
|
|
110
|
-
/**
|
|
111
|
-
* Pixel format (e.g., AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12, AV_PIX_FMT_RGB24).
|
|
112
|
-
*/
|
|
64
|
+
/** Pixel format (e.g., AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12, AV_PIX_FMT_RGB24) */
|
|
113
65
|
pixelFormat: AVPixelFormat;
|
|
114
|
-
/**
|
|
115
|
-
* Frame rate as a rational
|
|
116
|
-
*/
|
|
66
|
+
/** Frame rate as a rational */
|
|
117
67
|
frameRate: IRational;
|
|
118
68
|
}
|
|
119
69
|
/**
|
|
@@ -121,54 +71,25 @@ export interface VideoRawData {
|
|
|
121
71
|
*
|
|
122
72
|
* Specifies parameters for opening raw audio files like PCM.
|
|
123
73
|
*
|
|
124
|
-
* @interface AudioRawData
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* ```typescript
|
|
128
|
-
* const rawAudio: AudioRawData = {
|
|
129
|
-
* type: 'audio',
|
|
130
|
-
* data: 'testdata/audio.pcm',
|
|
131
|
-
* sampleRate: 48000,
|
|
132
|
-
* channels: 2,
|
|
133
|
-
* sampleFormat: 's16le'
|
|
134
|
-
* };
|
|
135
|
-
* const input = await MediaInput.open(rawAudio);
|
|
136
|
-
* ```
|
|
137
74
|
*/
|
|
138
75
|
export interface AudioRawData {
|
|
139
|
-
/**
|
|
140
|
-
* Type discriminator for TypeScript.
|
|
141
|
-
*/
|
|
76
|
+
/** Type discriminator for TypeScript */
|
|
142
77
|
type: 'audio';
|
|
143
|
-
/**
|
|
144
|
-
* Raw audio input source (file path, Buffer, or stream).
|
|
145
|
-
*/
|
|
78
|
+
/** Raw audio input source (file path, Buffer, or stream) */
|
|
146
79
|
input: string | Buffer;
|
|
147
|
-
/**
|
|
148
|
-
* Sample rate in Hz (e.g., 44100, 48000).
|
|
149
|
-
*/
|
|
80
|
+
/** Sample rate in Hz (e.g., 44100, 48000) */
|
|
150
81
|
sampleRate: number;
|
|
151
|
-
/**
|
|
152
|
-
* Number of audio channels.
|
|
153
|
-
*/
|
|
82
|
+
/** Number of audio channels */
|
|
154
83
|
channels: number;
|
|
155
|
-
/**
|
|
156
|
-
* Sample format (e.g., AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32).
|
|
157
|
-
*/
|
|
84
|
+
/** Sample format (e.g., AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32) */
|
|
158
85
|
sampleFormat: AVSampleFormat;
|
|
159
86
|
}
|
|
160
|
-
/**
|
|
161
|
-
* Raw data configuration for MediaInput.
|
|
162
|
-
*
|
|
163
|
-
* @type RawData
|
|
164
|
-
*/
|
|
165
87
|
export type RawData = VideoRawData | AudioRawData;
|
|
166
88
|
/**
|
|
167
89
|
* Options for MediaInput opening.
|
|
168
90
|
*
|
|
169
91
|
* Configures how media files are opened and packets are read.
|
|
170
|
-
*
|
|
171
|
-
* @interface MediaInputOptions
|
|
92
|
+
* Supports format detection, buffering, and FFmpeg options.
|
|
172
93
|
*/
|
|
173
94
|
export interface MediaInputOptions {
|
|
174
95
|
/**
|
|
@@ -180,12 +101,6 @@ export interface MediaInputOptions {
|
|
|
180
101
|
*
|
|
181
102
|
* @default 8192
|
|
182
103
|
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* const input = await MediaInput.open('video.m1v', {
|
|
186
|
-
* bufferSize: 4096 // Use a smaller buffer size
|
|
187
|
-
* });
|
|
188
|
-
* ```
|
|
189
104
|
*/
|
|
190
105
|
bufferSize?: number;
|
|
191
106
|
/**
|
|
@@ -194,44 +109,12 @@ export interface MediaInputOptions {
|
|
|
194
109
|
* Use this to specify the input format explicitly instead of auto-detection.
|
|
195
110
|
* Useful for raw formats like 'rawvideo', 'rawaudio', etc.
|
|
196
111
|
*
|
|
197
|
-
* @example
|
|
198
|
-
* ```typescript
|
|
199
|
-
* // Open raw YUV video
|
|
200
|
-
* const input = await MediaInput.open('input.yuv', {
|
|
201
|
-
* format: 'rawvideo',
|
|
202
|
-
* options: {
|
|
203
|
-
* video_size: '1920x1080',
|
|
204
|
-
* pixel_format: 'yuv420p',
|
|
205
|
-
* framerate: '30'
|
|
206
|
-
* }
|
|
207
|
-
* });
|
|
208
|
-
* ```
|
|
209
112
|
*/
|
|
210
113
|
format?: string;
|
|
211
114
|
/**
|
|
212
115
|
* FFmpeg format options passed directly to the input.
|
|
213
116
|
* These are equivalent to options specified before -i in ffmpeg CLI.
|
|
214
117
|
*
|
|
215
|
-
* @example
|
|
216
|
-
* ```typescript
|
|
217
|
-
* // For RTSP with low latency:
|
|
218
|
-
* const input = await MediaInput.open('rtsp://...', {
|
|
219
|
-
* options: {
|
|
220
|
-
* 'rtsp_transport': 'tcp',
|
|
221
|
-
* 'fflags': '+discardcorrupt+nobuffer',
|
|
222
|
-
* 'flags': 'low_delay',
|
|
223
|
-
* 'analyzeduration': '0',
|
|
224
|
-
* 'probesize': '500000'
|
|
225
|
-
* }
|
|
226
|
-
* });
|
|
227
|
-
*
|
|
228
|
-
* // For seeking in MP4:
|
|
229
|
-
* const input = await MediaInput.open('video.mp4', {
|
|
230
|
-
* options: {
|
|
231
|
-
* 'ss': '10', // Start at 10 seconds
|
|
232
|
-
* }
|
|
233
|
-
* });
|
|
234
|
-
* ```
|
|
235
118
|
*/
|
|
236
119
|
options?: Record<string, string | number>;
|
|
237
120
|
}
|
|
@@ -241,7 +124,6 @@ export interface MediaInputOptions {
|
|
|
241
124
|
* Configuration parameters for initializing a media decoder.
|
|
242
125
|
* Supports hardware acceleration and threading configuration.
|
|
243
126
|
*
|
|
244
|
-
* @interface DecoderOptions
|
|
245
127
|
*/
|
|
246
128
|
export interface DecoderOptions {
|
|
247
129
|
/** Number of threads to use (0 for auto) */
|
|
@@ -257,7 +139,6 @@ export interface DecoderOptions {
|
|
|
257
139
|
* Encoder-specific configuration options.
|
|
258
140
|
* Stream parameters (width, height, format, etc.) are taken from the provided stream.
|
|
259
141
|
*
|
|
260
|
-
* @interface EncoderOptions
|
|
261
142
|
*/
|
|
262
143
|
export interface EncoderOptions {
|
|
263
144
|
/** Target bitrate (number, bigint, or string like '5M') */
|
|
@@ -281,9 +162,7 @@ export interface EncoderOptions {
|
|
|
281
162
|
/**
|
|
282
163
|
* Options for MediaOutput creation.
|
|
283
164
|
*
|
|
284
|
-
* Configures output container format.
|
|
285
|
-
*
|
|
286
|
-
* @interface MediaOutputOptions
|
|
165
|
+
* Configures output container format and buffering.
|
|
287
166
|
*/
|
|
288
167
|
export interface MediaOutputOptions {
|
|
289
168
|
/**
|
|
@@ -292,12 +171,6 @@ export interface MediaOutputOptions {
|
|
|
292
171
|
* If not specified, format is guessed from file extension.
|
|
293
172
|
* Use this to override automatic format detection.
|
|
294
173
|
*
|
|
295
|
-
* @example
|
|
296
|
-
* ```typescript
|
|
297
|
-
* const output = await MediaOutput.open('output.bin', {
|
|
298
|
-
* format: 'mp4' // Force MP4 format despite .bin extension
|
|
299
|
-
* });
|
|
300
|
-
* ```
|
|
301
174
|
*/
|
|
302
175
|
format?: string;
|
|
303
176
|
/**
|
|
@@ -310,17 +183,15 @@ export interface MediaOutputOptions {
|
|
|
310
183
|
*
|
|
311
184
|
* @default 4096
|
|
312
185
|
*
|
|
313
|
-
* @example
|
|
314
|
-
* ```typescript
|
|
315
|
-
* const output = await MediaOutput.open('output.mp4', {
|
|
316
|
-
* bufferSize: 8192 // Use an 8KB buffer
|
|
317
|
-
* });
|
|
318
186
|
* ```
|
|
319
187
|
*/
|
|
320
188
|
bufferSize?: number;
|
|
321
189
|
}
|
|
322
190
|
/**
|
|
323
191
|
* Options for creating a filter instance.
|
|
192
|
+
*
|
|
193
|
+
* Configuration for filter graph initialization and hardware acceleration.
|
|
194
|
+
*
|
|
324
195
|
*/
|
|
325
196
|
export interface FilterOptions {
|
|
326
197
|
/**
|
|
@@ -342,18 +213,12 @@ export interface FilterOptions {
|
|
|
342
213
|
* Parameters for configuring hardware-accelerated encoding/decoding.
|
|
343
214
|
* Supports device selection and initialization options.
|
|
344
215
|
*
|
|
345
|
-
* @interface HardwareOptions
|
|
346
216
|
*/
|
|
347
217
|
export interface HardwareOptions {
|
|
348
218
|
/**
|
|
349
|
-
*
|
|
350
|
-
* If not specified, auto-detection will be used.
|
|
219
|
+
* Device path or index (e.g., '0' for first GPU).
|
|
351
220
|
*/
|
|
352
221
|
device?: string;
|
|
353
|
-
/**
|
|
354
|
-
* Device name or index (e.g., '0' for first GPU).
|
|
355
|
-
*/
|
|
356
|
-
deviceName?: string;
|
|
357
222
|
/**
|
|
358
223
|
* Device initialization options.
|
|
359
224
|
*/
|
|
@@ -365,17 +230,18 @@ export interface HardwareOptions {
|
|
|
365
230
|
* Defines callback functions for custom read operations with FFmpeg.
|
|
366
231
|
* Used by IOStream.create() for custom input protocols.
|
|
367
232
|
*
|
|
368
|
-
* @interface IOInputCallbacks
|
|
369
233
|
*/
|
|
370
234
|
export interface IOInputCallbacks {
|
|
371
235
|
/**
|
|
372
236
|
* Read callback - called when FFmpeg needs to read data.
|
|
237
|
+
*
|
|
373
238
|
* @param size - Number of bytes to read
|
|
374
239
|
* @returns Buffer with data, null for EOF, or negative error code
|
|
375
240
|
*/
|
|
376
241
|
read: (size: number) => Buffer | null | number;
|
|
377
242
|
/**
|
|
378
243
|
* Seek callback - called when FFmpeg needs to seek in the stream.
|
|
244
|
+
*
|
|
379
245
|
* @param offset - Offset to seek to
|
|
380
246
|
* @param whence - Seek origin (AVSEEK_SET, AVSEEK_CUR, AVSEEK_END, or AVSEEK_SIZE)
|
|
381
247
|
* @returns New position or negative error code
|
|
@@ -388,18 +254,18 @@ export interface IOInputCallbacks {
|
|
|
388
254
|
* Defines callback functions for custom write operations with FFmpeg.
|
|
389
255
|
* Used internally by MediaOutput for custom output protocols.
|
|
390
256
|
*
|
|
391
|
-
* @interface IOOutputCallbacks
|
|
392
|
-
* @internal
|
|
393
257
|
*/
|
|
394
258
|
export interface IOOutputCallbacks {
|
|
395
259
|
/**
|
|
396
260
|
* Write callback - called when FFmpeg needs to write data.
|
|
261
|
+
*
|
|
397
262
|
* @param buffer - Buffer containing data to write
|
|
398
263
|
* @returns Number of bytes written or void
|
|
399
264
|
*/
|
|
400
265
|
write: (buffer: Buffer) => number | void;
|
|
401
266
|
/**
|
|
402
267
|
* Seek callback - called when FFmpeg needs to seek in the output.
|
|
268
|
+
*
|
|
403
269
|
* @param offset - Offset to seek to
|
|
404
270
|
* @param whence - Seek origin (AVSEEK_SET, AVSEEK_CUR, AVSEEK_END)
|
|
405
271
|
* @returns New position or negative error code
|
|
@@ -407,40 +273,13 @@ export interface IOOutputCallbacks {
|
|
|
407
273
|
seek?: (offset: bigint, whence: number) => bigint | number;
|
|
408
274
|
/**
|
|
409
275
|
* Read callback - some formats may need to read back data.
|
|
276
|
+
*
|
|
410
277
|
* @param size - Number of bytes to read
|
|
411
278
|
* @returns Buffer with data, null for EOF, or negative error code
|
|
412
279
|
*/
|
|
413
280
|
read?: (size: number) => Buffer | null | number;
|
|
414
281
|
}
|
|
415
282
|
/**
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
* Configuration for frame transformation operations.
|
|
419
|
-
* Supports cropping, resizing, and format conversion.
|
|
420
|
-
*
|
|
421
|
-
* @interface ImageOptions
|
|
422
|
-
*/
|
|
423
|
-
export interface ImageOptions {
|
|
424
|
-
/** Crop the image */
|
|
425
|
-
crop?: {
|
|
426
|
-
top: number;
|
|
427
|
-
left: number;
|
|
428
|
-
width: number;
|
|
429
|
-
height: number;
|
|
430
|
-
};
|
|
431
|
-
/** Resize the image */
|
|
432
|
-
resize?: {
|
|
433
|
-
width: number;
|
|
434
|
-
height: number;
|
|
435
|
-
algorithm?: SWSFlag;
|
|
436
|
-
};
|
|
437
|
-
/** Convert pixel format */
|
|
438
|
-
format?: {
|
|
439
|
-
to: AVPixelFormat;
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Hardware accelerated codec names supported across different hardware types.
|
|
444
|
-
* These are generic codec names that map to specific hardware encoder implementations.
|
|
283
|
+
* Base codec names supported across different hardware types.
|
|
445
284
|
*/
|
|
446
|
-
export type
|
|
285
|
+
export type BaseCodecName = 'av1' | 'h264' | 'hevc' | 'h263' | 'mpeg2' | 'mpeg4' | 'vp8' | 'vp9' | 'mjpeg' | 'prores';
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Audio Sample Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio sample buffers in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/audio-sample-utils
|
|
8
|
-
*/
|
|
9
1
|
import type { AVSampleFormat } from '../../constants/constants.js';
|
|
10
2
|
/**
|
|
11
3
|
* Audio sample allocation result.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Audio Sample Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio sample buffers in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/audio-sample-utils
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
import { FFmpegError } from '../../lib/error.js';
|
|
11
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-sample.js","sourceRoot":"","sources":["../../../src/api/utilities/audio-sample.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"audio-sample.js","sourceRoot":"","sources":["../../../src/api/utilities/audio-sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA0BjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,gBAAgB;IAC3B,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,KAAK,CAAC,UAAkB,EAAE,SAAiB,EAAE,SAAyB,EAAE,KAAa;QAC1F,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QAChF,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,MAA+B,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,MAAM,CAAC,aAAa,CAAC,UAAkB,EAAE,SAAiB,EAAE,SAAyB,EAAE,KAAa;QAClG,MAAM,MAAM,GAAG,QAAQ,CAAC,sBAAsB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACxF,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,iCAAiC,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,MAA+B,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Channel Layout Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio channel layouts in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/channel-layout-utils
|
|
8
|
-
*/
|
|
9
1
|
import type { ChannelLayout } from '../../lib/types.js';
|
|
10
2
|
/**
|
|
11
3
|
* Audio channel layout utilities.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Channel Layout Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio channel layouts in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/channel-layout-utils
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
/**
|
|
11
3
|
* Audio channel layout utilities.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-layout.js","sourceRoot":"","sources":["../../../src/api/utilities/channel-layout.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"channel-layout.js","sourceRoot":"","sources":["../../../src/api/utilities/channel-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,OAAO,kBAAkB;IAC7B,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CAAC,QAAQ,CAAC,aAAqC;QACnD,OAAO,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with image buffers in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/image-utils
|
|
8
|
-
*/
|
|
9
1
|
import type { AVPixelFormat } from '../../constants/constants.js';
|
|
10
2
|
/**
|
|
11
3
|
* Image buffer allocation result.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with image buffers in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/image-utils
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
import { FFmpegError } from '../../lib/error.js';
|
|
11
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/api/utilities/image.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/api/utilities/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAgBjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,UAAU;IACrB,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,KAAK,CAAC,KAAa,EAAE,MAAc,EAAE,MAAqB,EAAE,KAAa;QAC9E,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QACnE,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,MAAyB,CAAC;IACnC,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,WAAW,CAAC,KAAa,EAAE,MAAc,EAAE,MAAqB,EAAE,KAAa;QACpF,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAAI,CAAC,OAAiB,EAAE,YAAsB,EAAE,OAAiB,EAAE,YAAsB,EAAE,MAAqB,EAAE,KAAa,EAAE,MAAc;QACpJ,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,aAAa,CAAC,MAAqB,EAAE,KAAa,EAAE,MAAc,EAAE,KAAa;QACtF,OAAO,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,MAAM,CAAC,YAAY,CACjB,GAAW,EACX,OAAe,EACf,OAAwB,EACxB,WAA4B,EAC5B,MAAqB,EACrB,KAAa,EACb,MAAc,EACd,KAAa;QAEb,OAAO,QAAQ,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACxG,CAAC;CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { AudioSampleUtils, type AudioSampleAllocation, type AudioSampleBufferSize } from './audio-sample.js';
|
|
2
2
|
export { ChannelLayoutUtils } from './channel-layout.js';
|
|
3
3
|
export { ImageUtils, type ImageAllocation } from './image.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
4
|
+
export { MediaTypeUtils } from './media-type.js';
|
|
5
|
+
export { PixelFormatUtils } from './pixel-format.js';
|
|
6
|
+
export { SampleFormatUtils } from './sample-format.js';
|
|
7
7
|
export { TimestampUtils } from './timestamp.js';
|
|
8
8
|
export { StreamingUtils } from './streaming.js';
|
|
@@ -5,11 +5,11 @@ export { ChannelLayoutUtils } from './channel-layout.js';
|
|
|
5
5
|
// Image
|
|
6
6
|
export { ImageUtils } from './image.js';
|
|
7
7
|
// Media
|
|
8
|
-
export {
|
|
8
|
+
export { MediaTypeUtils } from './media-type.js';
|
|
9
9
|
// Pixel Format
|
|
10
|
-
export {
|
|
10
|
+
export { PixelFormatUtils } from './pixel-format.js';
|
|
11
11
|
// Sample Format
|
|
12
|
-
export {
|
|
12
|
+
export { SampleFormatUtils } from './sample-format.js';
|
|
13
13
|
// Timestamp
|
|
14
14
|
export { TimestampUtils } from './timestamp.js';
|
|
15
15
|
// Streaming
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/utilities/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EAAE,gBAAgB,EAA0D,MAAM,mBAAmB,CAAC;AAE7G,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,QAAQ;AACR,OAAO,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AAE9D,QAAQ;AACR,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/utilities/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EAAE,gBAAgB,EAA0D,MAAM,mBAAmB,CAAC;AAE7G,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,QAAQ;AACR,OAAO,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AAE9D,QAAQ;AACR,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,eAAe;AACf,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY;AACZ,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,YAAY;AACZ,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Media Type Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with media types in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/media-type
|
|
8
|
-
*/
|
|
9
1
|
import type { AVMediaType } from '../../constants/constants.js';
|
|
10
2
|
/**
|
|
11
3
|
* Media type utilities.
|
|
@@ -23,7 +15,7 @@ import type { AVMediaType } from '../../constants/constants.js';
|
|
|
23
15
|
* console.log(MediaType.getString(AVMEDIA_TYPE_SUBTITLE)); // "subtitle"
|
|
24
16
|
* ```
|
|
25
17
|
*/
|
|
26
|
-
export declare class
|
|
18
|
+
export declare class MediaTypeUtils {
|
|
27
19
|
private constructor();
|
|
28
20
|
/**
|
|
29
21
|
* Get string representation of media type.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Media Type Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with media types in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/media-type
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
/**
|
|
11
3
|
* Media type utilities.
|
|
@@ -23,7 +15,7 @@ import { bindings } from '../../lib/binding.js';
|
|
|
23
15
|
* console.log(MediaType.getString(AVMEDIA_TYPE_SUBTITLE)); // "subtitle"
|
|
24
16
|
* ```
|
|
25
17
|
*/
|
|
26
|
-
export class
|
|
18
|
+
export class MediaTypeUtils {
|
|
27
19
|
// Private constructor to prevent instantiation
|
|
28
20
|
constructor() { }
|
|
29
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-type.js","sourceRoot":"","sources":["../../../src/api/utilities/media-type.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"media-type.js","sourceRoot":"","sources":["../../../src/api/utilities/media-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,cAAc;IACzB,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,SAAS,CAAC,IAAiB;QAChC,OAAO,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pixel Format Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with video pixel formats in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/pixel-format
|
|
8
|
-
*/
|
|
9
1
|
import type { AVPixelFormat } from '../../constants/constants.js';
|
|
10
2
|
/**
|
|
11
3
|
* Video pixel format utilities.
|
|
@@ -27,7 +19,7 @@ import type { AVPixelFormat } from '../../constants/constants.js';
|
|
|
27
19
|
* console.log(format === AV_PIX_FMT_YUV420P); // true
|
|
28
20
|
* ```
|
|
29
21
|
*/
|
|
30
|
-
export declare class
|
|
22
|
+
export declare class PixelFormatUtils {
|
|
31
23
|
private constructor();
|
|
32
24
|
/**
|
|
33
25
|
* Get the name of a pixel format.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pixel Format Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with video pixel formats in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/pixel-format
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
/**
|
|
11
3
|
* Video pixel format utilities.
|
|
@@ -27,7 +19,7 @@ import { bindings } from '../../lib/binding.js';
|
|
|
27
19
|
* console.log(format === AV_PIX_FMT_YUV420P); // true
|
|
28
20
|
* ```
|
|
29
21
|
*/
|
|
30
|
-
export class
|
|
22
|
+
export class PixelFormatUtils {
|
|
31
23
|
// Private constructor to prevent instantiation
|
|
32
24
|
constructor() { }
|
|
33
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixel-format.js","sourceRoot":"","sources":["../../../src/api/utilities/pixel-format.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pixel-format.js","sourceRoot":"","sources":["../../../src/api/utilities/pixel-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,gBAAgB;IAC3B,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,OAAO,CAAC,MAAqB;QAClC,OAAO,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAY;QAC1B,OAAO,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,UAAU,CAAC,MAAqB;QACrC,OAAO,QAAQ,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sample Format Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio sample formats in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/sample-format
|
|
8
|
-
*/
|
|
9
1
|
import type { AVSampleFormat } from '../../constants/constants.js';
|
|
10
2
|
/**
|
|
11
3
|
* Audio sample format utilities.
|
|
@@ -29,7 +21,7 @@ import type { AVSampleFormat } from '../../constants/constants.js';
|
|
|
29
21
|
* const planar = SampleFormat.getPlanarFormat(AV_SAMPLE_FMT_FLT);
|
|
30
22
|
* ```
|
|
31
23
|
*/
|
|
32
|
-
export declare class
|
|
24
|
+
export declare class SampleFormatUtils {
|
|
33
25
|
private constructor();
|
|
34
26
|
/**
|
|
35
27
|
* Get bytes per sample for a sample format.
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sample Format Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for working with audio sample formats in FFmpeg.
|
|
5
|
-
* All methods are static and map directly to FFmpeg's libavutil functions.
|
|
6
|
-
*
|
|
7
|
-
* @module lib/sample-format
|
|
8
|
-
*/
|
|
9
1
|
import { bindings } from '../../lib/binding.js';
|
|
10
2
|
/**
|
|
11
3
|
* Audio sample format utilities.
|
|
@@ -29,7 +21,7 @@ import { bindings } from '../../lib/binding.js';
|
|
|
29
21
|
* const planar = SampleFormat.getPlanarFormat(AV_SAMPLE_FMT_FLT);
|
|
30
22
|
* ```
|
|
31
23
|
*/
|
|
32
|
-
export class
|
|
24
|
+
export class SampleFormatUtils {
|
|
33
25
|
// Private constructor to prevent instantiation
|
|
34
26
|
constructor() { }
|
|
35
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-format.js","sourceRoot":"","sources":["../../../src/api/utilities/sample-format.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sample-format.js","sourceRoot":"","sources":["../../../src/api/utilities/sample-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,iBAAiB;IAC5B,+CAA+C;IAC/C,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAsB;QAC7C,OAAO,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,OAAO,CAAC,MAAsB;QACnC,OAAO,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,eAAe,CAAC,MAAsB;QAC3C,OAAO,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,eAAe,CAAC,MAAsB;QAC3C,OAAO,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAsB;QACpC,OAAO,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF"}
|