node-av 1.1.0 → 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 +51 -38
- package/dist/api/bitstream-filter.d.ts +180 -123
- package/dist/api/bitstream-filter.js +180 -125
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/decoder.d.ts +279 -132
- package/dist/api/decoder.js +285 -142
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/encoder.d.ts +246 -162
- package/dist/api/encoder.js +272 -208
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +690 -94
- package/dist/api/filter-presets.js +686 -102
- package/dist/api/filter-presets.js.map +1 -1
- package/dist/api/filter.d.ts +249 -213
- package/dist/api/filter.js +252 -242
- package/dist/api/filter.js.map +1 -1
- package/dist/api/hardware.d.ts +224 -117
- package/dist/api/hardware.js +380 -214
- 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 -61
- package/dist/api/io-stream.js +43 -46
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/media-input.d.ts +242 -140
- package/dist/api/media-input.js +205 -103
- package/dist/api/media-input.js.map +1 -1
- package/dist/api/media-output.d.ts +206 -128
- package/dist/api/media-output.js +210 -128
- 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 +21 -187
- 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/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.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 +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 +264 -281
- package/dist/lib/codec.js +268 -285
- 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 +2 -1
- package/dist/lib/index.js +2 -2
- 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 +117 -106
- package/dist/lib/native-types.js +0 -7
- package/dist/lib/native-types.js.map +1 -1
- package/dist/lib/option.d.ts +284 -241
- package/dist/lib/option.js +309 -249
- 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 +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 +21 -12
- package/release_notes.md +43 -59
- package/CHANGELOG.md +0 -8
|
@@ -3,100 +3,66 @@ import { HardwareDeviceContext } from './hardware-device-context.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Hardware frames context for GPU memory management.
|
|
5
5
|
*
|
|
6
|
-
* Manages pools of hardware frames
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Manages pools of hardware frames (textures/surfaces) on the GPU.
|
|
7
|
+
* Essential for zero-copy hardware acceleration, allowing frames to stay
|
|
8
|
+
* in GPU memory throughout the processing pipeline. Provides frame allocation,
|
|
9
|
+
* format conversion, and data transfer between hardware and system memory.
|
|
9
10
|
*
|
|
10
11
|
* Direct mapping to FFmpeg's AVHWFramesContext.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```typescript
|
|
14
|
-
* import {
|
|
15
|
-
* import {
|
|
15
|
+
* import { HardwareFramesContext, HardwareDeviceContext, Frame, FFmpegError } from 'node-av';
|
|
16
|
+
* import { AV_PIX_FMT_NV12, AV_PIX_FMT_CUDA, AV_HWDEVICE_TYPE_CUDA } from 'node-av/constants';
|
|
16
17
|
*
|
|
17
18
|
* // Create hardware frames context
|
|
18
19
|
* const device = new HardwareDeviceContext();
|
|
19
|
-
*
|
|
20
|
-
* FFmpegError.throwIfError(deviceRet, 'create device');
|
|
20
|
+
* device.create(AV_HWDEVICE_TYPE_CUDA);
|
|
21
21
|
*
|
|
22
22
|
* const frames = new HardwareFramesContext();
|
|
23
|
-
* frames.alloc(device);
|
|
24
|
-
*
|
|
25
|
-
* // Configure frame parameters
|
|
26
23
|
* frames.format = AV_PIX_FMT_CUDA; // Hardware format
|
|
27
24
|
* frames.swFormat = AV_PIX_FMT_NV12; // Software format
|
|
28
25
|
* frames.width = 1920;
|
|
29
26
|
* frames.height = 1080;
|
|
30
|
-
* frames.initialPoolSize =
|
|
27
|
+
* frames.initialPoolSize = 20; // Pre-allocate 20 frames
|
|
31
28
|
*
|
|
32
|
-
*
|
|
29
|
+
* frames.alloc(device);
|
|
33
30
|
* const ret = frames.init();
|
|
34
|
-
* FFmpegError.throwIfError(ret, 'init
|
|
31
|
+
* FFmpegError.throwIfError(ret, 'init');
|
|
35
32
|
*
|
|
36
33
|
* // Allocate hardware frame
|
|
37
34
|
* const hwFrame = new Frame();
|
|
38
|
-
* hwFrame.alloc();
|
|
39
35
|
* const ret2 = frames.getBuffer(hwFrame, 0);
|
|
40
36
|
* FFmpegError.throwIfError(ret2, 'getBuffer');
|
|
41
37
|
*
|
|
42
|
-
* // Transfer
|
|
43
|
-
* const
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* swFrame.height = 1080;
|
|
47
|
-
* swFrame.format = AV_PIX_FMT_NV12;
|
|
48
|
-
* const swRet = swFrame.getBuffer();
|
|
49
|
-
* FFmpegError.throwIfError(swRet, 'getBuffer sw');
|
|
50
|
-
*
|
|
51
|
-
* // Download from hardware
|
|
52
|
-
* const dlRet = await frames.transferData(swFrame, hwFrame, 0);
|
|
53
|
-
* FFmpegError.throwIfError(dlRet, 'download');
|
|
38
|
+
* // Transfer from CPU to GPU
|
|
39
|
+
* const cpuFrame = new Frame();
|
|
40
|
+
* // ... fill cpuFrame with data ...
|
|
41
|
+
* await frames.transferData(hwFrame, cpuFrame);
|
|
54
42
|
*
|
|
55
|
-
* //
|
|
56
|
-
* const
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* // Cleanup
|
|
60
|
-
* hwFrame.free();
|
|
61
|
-
* swFrame.free();
|
|
62
|
-
* frames.free();
|
|
63
|
-
* device.free();
|
|
43
|
+
* // Map hardware frame to CPU for access
|
|
44
|
+
* const mappedFrame = new Frame();
|
|
45
|
+
* const ret3 = frames.map(mappedFrame, hwFrame, AV_HWFRAME_MAP_READ);
|
|
46
|
+
* FFmpegError.throwIfError(ret3, 'map');
|
|
64
47
|
* ```
|
|
65
48
|
*
|
|
49
|
+
* @see [AVHWFramesContext](https://ffmpeg.org/doxygen/trunk/structAVHWFramesContext.html) - FFmpeg Doxygen
|
|
66
50
|
* @see {@link HardwareDeviceContext} For device management
|
|
67
|
-
* @see {@link Frame} For frame
|
|
51
|
+
* @see {@link Frame} For frame operations
|
|
68
52
|
*/
|
|
69
53
|
export class HardwareFramesContext {
|
|
70
54
|
native;
|
|
71
55
|
_deviceRef; // Cache for device context wrapper
|
|
72
|
-
/**
|
|
73
|
-
* Create a new hardware frames context.
|
|
74
|
-
*
|
|
75
|
-
* The context is uninitialized - you must call alloc() before use.
|
|
76
|
-
* No FFmpeg resources are allocated until initialization.
|
|
77
|
-
*
|
|
78
|
-
* Direct wrapper around AVHWFramesContext.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```typescript
|
|
82
|
-
* import { HardwareFramesContext, FFmpegError } from 'node-av';
|
|
83
|
-
*
|
|
84
|
-
* const frames = new HardwareFramesContext();
|
|
85
|
-
* frames.alloc(device);
|
|
86
|
-
* // Configure parameters
|
|
87
|
-
* const ret = frames.init();
|
|
88
|
-
* FFmpegError.throwIfError(ret, 'init');
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
56
|
constructor() {
|
|
92
57
|
this.native = new bindings.HardwareFramesContext();
|
|
93
58
|
}
|
|
94
59
|
/**
|
|
95
60
|
* Hardware pixel format.
|
|
96
61
|
*
|
|
97
|
-
* The pixel format
|
|
62
|
+
* The pixel format used for frames in GPU memory.
|
|
63
|
+
* Hardware-specific format like AV_PIX_FMT_CUDA or AV_PIX_FMT_VAAPI.
|
|
98
64
|
*
|
|
99
|
-
* Direct mapping to AVHWFramesContext->format
|
|
65
|
+
* Direct mapping to AVHWFramesContext->format.
|
|
100
66
|
*/
|
|
101
67
|
get format() {
|
|
102
68
|
return this.native.format;
|
|
@@ -107,9 +73,10 @@ export class HardwareFramesContext {
|
|
|
107
73
|
/**
|
|
108
74
|
* Software pixel format.
|
|
109
75
|
*
|
|
110
|
-
* The pixel format
|
|
76
|
+
* The pixel format frames are converted to when transferred
|
|
77
|
+
* to system memory. Standard format like AV_PIX_FMT_YUV420P.
|
|
111
78
|
*
|
|
112
|
-
* Direct mapping to AVHWFramesContext->sw_format
|
|
79
|
+
* Direct mapping to AVHWFramesContext->sw_format.
|
|
113
80
|
*/
|
|
114
81
|
get swFormat() {
|
|
115
82
|
return this.native.swFormat;
|
|
@@ -120,9 +87,9 @@ export class HardwareFramesContext {
|
|
|
120
87
|
/**
|
|
121
88
|
* Frame width.
|
|
122
89
|
*
|
|
123
|
-
*
|
|
90
|
+
* Width of frames in pixels.
|
|
124
91
|
*
|
|
125
|
-
* Direct mapping to AVHWFramesContext->width
|
|
92
|
+
* Direct mapping to AVHWFramesContext->width.
|
|
126
93
|
*/
|
|
127
94
|
get width() {
|
|
128
95
|
return this.native.width;
|
|
@@ -133,9 +100,9 @@ export class HardwareFramesContext {
|
|
|
133
100
|
/**
|
|
134
101
|
* Frame height.
|
|
135
102
|
*
|
|
136
|
-
*
|
|
103
|
+
* Height of frames in pixels.
|
|
137
104
|
*
|
|
138
|
-
* Direct mapping to AVHWFramesContext->height
|
|
105
|
+
* Direct mapping to AVHWFramesContext->height.
|
|
139
106
|
*/
|
|
140
107
|
get height() {
|
|
141
108
|
return this.native.height;
|
|
@@ -146,8 +113,10 @@ export class HardwareFramesContext {
|
|
|
146
113
|
/**
|
|
147
114
|
* Initial pool size.
|
|
148
115
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
116
|
+
* Number of frames to pre-allocate in the pool.
|
|
117
|
+
* Set before calling init() for optimal performance.
|
|
118
|
+
*
|
|
119
|
+
* Direct mapping to AVHWFramesContext->initial_pool_size.
|
|
151
120
|
*/
|
|
152
121
|
get initialPoolSize() {
|
|
153
122
|
return this.native.initialPoolSize;
|
|
@@ -156,11 +125,12 @@ export class HardwareFramesContext {
|
|
|
156
125
|
this.native.initialPoolSize = value;
|
|
157
126
|
}
|
|
158
127
|
/**
|
|
159
|
-
* Associated device
|
|
128
|
+
* Associated hardware device.
|
|
160
129
|
*
|
|
161
|
-
*
|
|
130
|
+
* Reference to the device context this frames context belongs to.
|
|
131
|
+
* Automatically set when calling alloc().
|
|
162
132
|
*
|
|
163
|
-
*
|
|
133
|
+
* Direct mapping to AVHWFramesContext->device_ref.
|
|
164
134
|
*/
|
|
165
135
|
get deviceRef() {
|
|
166
136
|
// Return cached wrapper if we already have one
|
|
@@ -179,148 +149,172 @@ export class HardwareFramesContext {
|
|
|
179
149
|
return device;
|
|
180
150
|
}
|
|
181
151
|
/**
|
|
182
|
-
* Allocate
|
|
152
|
+
* Allocate hardware frames context.
|
|
153
|
+
*
|
|
154
|
+
* Allocates the frames context and associates it with a device.
|
|
155
|
+
* Must be called before init().
|
|
156
|
+
*
|
|
157
|
+
* Direct mapping to av_hwframe_ctx_alloc().
|
|
183
158
|
*
|
|
184
|
-
*
|
|
159
|
+
* @param device - Hardware device context to use
|
|
185
160
|
*
|
|
186
|
-
* @
|
|
161
|
+
* @throws {Error} If allocation fails (ENOMEM)
|
|
187
162
|
*
|
|
188
163
|
* @example
|
|
189
164
|
* ```typescript
|
|
165
|
+
* import { AV_PIX_FMT_CUDA, AV_PIX_FMT_NV12 } from 'node-av/constants';
|
|
166
|
+
*
|
|
190
167
|
* const frames = new HardwareFramesContext();
|
|
191
|
-
* frames.alloc(device);
|
|
192
|
-
* // Set parameters before init()
|
|
193
168
|
* frames.format = AV_PIX_FMT_CUDA;
|
|
194
169
|
* frames.swFormat = AV_PIX_FMT_NV12;
|
|
195
170
|
* frames.width = 1920;
|
|
196
171
|
* frames.height = 1080;
|
|
172
|
+
* frames.alloc(device);
|
|
197
173
|
* ```
|
|
198
174
|
*
|
|
199
|
-
* @
|
|
175
|
+
* @see {@link init} To initialize after allocation
|
|
200
176
|
*/
|
|
201
177
|
alloc(device) {
|
|
202
178
|
this.native.alloc(device.getNative());
|
|
203
179
|
}
|
|
204
180
|
/**
|
|
205
|
-
*
|
|
181
|
+
* Initialize hardware frames context.
|
|
182
|
+
*
|
|
183
|
+
* Initializes the frame pool after configuration.
|
|
184
|
+
* Must be called after alloc() and property setup.
|
|
206
185
|
*
|
|
207
|
-
* Direct mapping to av_hwframe_ctx_init()
|
|
186
|
+
* Direct mapping to av_hwframe_ctx_init().
|
|
208
187
|
*
|
|
209
188
|
* @returns 0 on success, negative AVERROR on error:
|
|
210
|
-
* -
|
|
211
|
-
* -
|
|
212
|
-
* -
|
|
213
|
-
* -
|
|
189
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
190
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
191
|
+
* - AVERROR_ENOSYS: Operation not supported
|
|
192
|
+
* - Hardware-specific errors
|
|
214
193
|
*
|
|
215
194
|
* @example
|
|
216
195
|
* ```typescript
|
|
196
|
+
* import { FFmpegError } from 'node-av';
|
|
197
|
+
*
|
|
198
|
+
* frames.alloc(device);
|
|
217
199
|
* const ret = frames.init();
|
|
218
|
-
*
|
|
219
|
-
* throw new FFmpegError(ret);
|
|
220
|
-
* }
|
|
200
|
+
* FFmpegError.throwIfError(ret, 'init');
|
|
221
201
|
* ```
|
|
202
|
+
*
|
|
203
|
+
* @see {@link alloc} Must be called first
|
|
222
204
|
*/
|
|
223
205
|
init() {
|
|
224
206
|
return this.native.init();
|
|
225
207
|
}
|
|
226
208
|
/**
|
|
227
|
-
* Free
|
|
209
|
+
* Free hardware frames context.
|
|
228
210
|
*
|
|
229
|
-
*
|
|
211
|
+
* Releases all frames and resources associated with the context.
|
|
212
|
+
* The context becomes invalid after calling this.
|
|
213
|
+
*
|
|
214
|
+
* Direct mapping to av_buffer_unref() on frames context.
|
|
230
215
|
*
|
|
231
216
|
* @example
|
|
232
217
|
* ```typescript
|
|
233
218
|
* frames.free();
|
|
234
|
-
* //
|
|
219
|
+
* // Frames context is now invalid
|
|
235
220
|
* ```
|
|
221
|
+
*
|
|
222
|
+
* @see {@link Symbol.dispose} For automatic cleanup
|
|
236
223
|
*/
|
|
237
224
|
free() {
|
|
238
225
|
this.native.free();
|
|
239
226
|
}
|
|
240
227
|
/**
|
|
241
|
-
* Allocate
|
|
228
|
+
* Allocate hardware frame from pool.
|
|
242
229
|
*
|
|
243
|
-
*
|
|
230
|
+
* Gets a frame from the hardware frame pool.
|
|
231
|
+
* The frame will have hardware-backed storage.
|
|
244
232
|
*
|
|
245
|
-
*
|
|
246
|
-
* @param flags - Currently unused, should be set to 0
|
|
233
|
+
* Direct mapping to av_hwframe_get_buffer().
|
|
247
234
|
*
|
|
235
|
+
* @param frame - Frame to allocate buffer for
|
|
236
|
+
* @param flags - Allocation flags (usually 0)
|
|
248
237
|
* @returns 0 on success, negative AVERROR on error:
|
|
249
|
-
* -
|
|
250
|
-
* -
|
|
251
|
-
* - AVERROR(ENOMEM): Memory allocation failure
|
|
252
|
-
* - <0: Device-specific errors
|
|
238
|
+
* - AVERROR_ENOMEM: No frames available in pool
|
|
239
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
253
240
|
*
|
|
254
241
|
* @example
|
|
255
242
|
* ```typescript
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* const
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* // frame now contains a hardware frame
|
|
243
|
+
* import { Frame, FFmpegError } from 'node-av';
|
|
244
|
+
*
|
|
245
|
+
* const hwFrame = new Frame();
|
|
246
|
+
* const ret = frames.getBuffer(hwFrame, 0);
|
|
247
|
+
* FFmpegError.throwIfError(ret, 'getBuffer');
|
|
248
|
+
* // hwFrame now has GPU memory allocated
|
|
263
249
|
* ```
|
|
250
|
+
*
|
|
251
|
+
* @see {@link transferData} To upload data to hardware frame
|
|
264
252
|
*/
|
|
265
253
|
getBuffer(frame, flags) {
|
|
266
254
|
return this.native.getBuffer(frame.getNative(), flags ?? 0);
|
|
267
255
|
}
|
|
268
256
|
/**
|
|
269
|
-
*
|
|
257
|
+
* Transfer data between hardware and system memory.
|
|
270
258
|
*
|
|
271
|
-
*
|
|
259
|
+
* Copies frame data between GPU and CPU memory.
|
|
260
|
+
* Direction is determined by frame types.
|
|
261
|
+
*
|
|
262
|
+
* Direct mapping to av_hwframe_transfer_data().
|
|
272
263
|
*
|
|
273
264
|
* @param dst - Destination frame
|
|
274
265
|
* @param src - Source frame
|
|
275
|
-
* @param flags -
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
* -
|
|
279
|
-
* -
|
|
280
|
-
* - AVERROR(EINVAL): Invalid parameters
|
|
281
|
-
* - <0: Other errors
|
|
266
|
+
* @param flags - Transfer flags (usually 0)
|
|
267
|
+
* @returns 0 on success, negative AVERROR on error:
|
|
268
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
269
|
+
* - AVERROR_ENOSYS: Transfer not supported
|
|
270
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
282
271
|
*
|
|
283
272
|
* @example
|
|
284
273
|
* ```typescript
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* const
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
274
|
+
* import { FFmpegError } from 'node-av';
|
|
275
|
+
*
|
|
276
|
+
* // Upload: CPU -> GPU
|
|
277
|
+
* const cpuFrame = new Frame();
|
|
278
|
+
* // ... fill cpuFrame with data ...
|
|
279
|
+
* const hwFrame = new Frame();
|
|
280
|
+
* frames.getBuffer(hwFrame, 0);
|
|
281
|
+
* const ret = await frames.transferData(hwFrame, cpuFrame);
|
|
282
|
+
* FFmpegError.throwIfError(ret, 'transferData');
|
|
283
|
+
*
|
|
284
|
+
* // Download: GPU -> CPU
|
|
285
|
+
* const downloadFrame = new Frame();
|
|
286
|
+
* const ret2 = await frames.transferData(downloadFrame, hwFrame);
|
|
287
|
+
* FFmpegError.throwIfError(ret2, 'transferData');
|
|
296
288
|
* ```
|
|
289
|
+
*
|
|
290
|
+
* @see {@link getBuffer} To allocate hardware frame
|
|
291
|
+
* @see {@link map} For zero-copy access
|
|
297
292
|
*/
|
|
298
293
|
async transferData(dst, src, flags) {
|
|
299
|
-
return this.native.transferData(dst.getNative(), src.getNative(), flags ?? 0);
|
|
294
|
+
return await this.native.transferData(dst.getNative(), src.getNative(), flags ?? 0);
|
|
300
295
|
}
|
|
301
296
|
/**
|
|
302
|
-
* Get
|
|
297
|
+
* Get supported transfer formats.
|
|
303
298
|
*
|
|
304
|
-
*
|
|
299
|
+
* Returns pixel formats supported for frame transfer
|
|
300
|
+
* in the specified direction.
|
|
305
301
|
*
|
|
306
|
-
*
|
|
302
|
+
* Direct mapping to av_hwframe_transfer_get_formats().
|
|
307
303
|
*
|
|
308
|
-
* @
|
|
309
|
-
*
|
|
310
|
-
* -
|
|
304
|
+
* @param direction - Transfer direction (FROM/TO hardware)
|
|
305
|
+
* @returns Array of supported formats, or error code:
|
|
306
|
+
* - AVERROR_ENOSYS: Query not supported
|
|
307
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
311
308
|
*
|
|
312
309
|
* @example
|
|
313
310
|
* ```typescript
|
|
314
|
-
*
|
|
311
|
+
* import { AV_HWFRAME_TRANSFER_DIRECTION_FROM } from 'node-av/constants';
|
|
312
|
+
*
|
|
315
313
|
* const formats = frames.transferGetFormats(AV_HWFRAME_TRANSFER_DIRECTION_FROM);
|
|
316
314
|
* if (Array.isArray(formats)) {
|
|
317
315
|
* console.log('Supported download formats:', formats);
|
|
318
|
-
* }
|
|
319
|
-
*
|
|
320
|
-
* // Get formats for uploading to hardware
|
|
321
|
-
* const formats2 = frames.transferGetFormats(AV_HWFRAME_TRANSFER_DIRECTION_TO);
|
|
322
|
-
* if (Array.isArray(formats2)) {
|
|
323
|
-
* console.log('Supported upload formats:', formats2);
|
|
316
|
+
* } else {
|
|
317
|
+
* console.error('Error querying formats:', formats);
|
|
324
318
|
* }
|
|
325
319
|
* ```
|
|
326
320
|
*/
|
|
@@ -328,76 +322,77 @@ export class HardwareFramesContext {
|
|
|
328
322
|
return this.native.transferGetFormats(direction);
|
|
329
323
|
}
|
|
330
324
|
/**
|
|
331
|
-
* Map
|
|
325
|
+
* Map hardware frame to system memory.
|
|
332
326
|
*
|
|
333
|
-
*
|
|
327
|
+
* Creates a mapping of hardware frame data accessible from CPU.
|
|
328
|
+
* More efficient than transferData() for read-only access.
|
|
334
329
|
*
|
|
335
|
-
*
|
|
336
|
-
* and origin of the src and dst frames. On input, src should be a usable
|
|
337
|
-
* frame with valid hardware/software format and allocated data.
|
|
338
|
-
*
|
|
339
|
-
* @param dst - Destination frame
|
|
340
|
-
* @param src - Source frame to map
|
|
341
|
-
* @param flags - Combination of AV_HWFRAME_MAP_* flags
|
|
330
|
+
* Direct mapping to av_hwframe_map().
|
|
342
331
|
*
|
|
332
|
+
* @param dst - Destination frame for mapped data
|
|
333
|
+
* @param src - Hardware frame to map
|
|
334
|
+
* @param flags - Mapping flags (AV_HWFRAME_MAP_*)
|
|
343
335
|
* @returns 0 on success, negative AVERROR on error:
|
|
344
|
-
* -
|
|
345
|
-
* -
|
|
346
|
-
* - AVERROR(EINVAL): Invalid parameters
|
|
347
|
-
* - <0: Other errors
|
|
336
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
337
|
+
* - AVERROR_ENOSYS: Mapping not supported
|
|
348
338
|
*
|
|
349
339
|
* @example
|
|
350
340
|
* ```typescript
|
|
341
|
+
* import { FFmpegError } from 'node-av';
|
|
342
|
+
* import { AV_HWFRAME_MAP_READ } from 'node-av/constants';
|
|
343
|
+
*
|
|
351
344
|
* const mappedFrame = new Frame();
|
|
352
|
-
* mappedFrame.alloc();
|
|
353
345
|
* const ret = frames.map(mappedFrame, hwFrame, AV_HWFRAME_MAP_READ);
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* }
|
|
357
|
-
* // mappedFrame now provides CPU access to hwFrame
|
|
346
|
+
* FFmpegError.throwIfError(ret, 'map');
|
|
347
|
+
* // Can now read hwFrame data through mappedFrame
|
|
358
348
|
* ```
|
|
349
|
+
*
|
|
350
|
+
* @see {@link transferData} For full data copy
|
|
359
351
|
*/
|
|
360
352
|
map(dst, src, flags) {
|
|
361
353
|
return this.native.map(dst.getNative(), src.getNative(), flags ?? 0);
|
|
362
354
|
}
|
|
363
355
|
/**
|
|
364
|
-
* Create
|
|
356
|
+
* Create derived frames context.
|
|
365
357
|
*
|
|
366
|
-
*
|
|
358
|
+
* Creates a new frames context derived from another,
|
|
359
|
+
* potentially on a different device.
|
|
367
360
|
*
|
|
368
|
-
*
|
|
369
|
-
* @param derivedDevice - Device context for the derived frames
|
|
370
|
-
* @param source - Source frames context
|
|
371
|
-
* @param flags - Currently unused, should be 0
|
|
361
|
+
* Direct mapping to av_hwframe_ctx_create_derived().
|
|
372
362
|
*
|
|
363
|
+
* @param format - Pixel format for derived frames
|
|
364
|
+
* @param derivedDevice - Target device context
|
|
365
|
+
* @param source - Source frames context
|
|
366
|
+
* @param flags - Creation flags
|
|
373
367
|
* @returns 0 on success, negative AVERROR on error:
|
|
374
|
-
* -
|
|
375
|
-
* -
|
|
376
|
-
* -
|
|
377
|
-
* - <0: Other errors
|
|
368
|
+
* - AVERROR_EINVAL: Invalid parameters
|
|
369
|
+
* - AVERROR_ENOSYS: Derivation not supported
|
|
370
|
+
* - AVERROR_ENOMEM: Memory allocation failure
|
|
378
371
|
*
|
|
379
372
|
* @example
|
|
380
373
|
* ```typescript
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
374
|
+
* import { FFmpegError } from 'node-av';
|
|
375
|
+
* import { AV_PIX_FMT_VULKAN } from 'node-av/constants';
|
|
376
|
+
*
|
|
377
|
+
* const derivedFrames = new HardwareFramesContext();
|
|
378
|
+
* const ret = derivedFrames.createDerived(
|
|
379
|
+
* AV_PIX_FMT_VULKAN,
|
|
380
|
+
* vulkanDevice,
|
|
381
|
+
* cudaFrames,
|
|
386
382
|
* 0
|
|
387
383
|
* );
|
|
388
|
-
*
|
|
389
|
-
* throw new FFmpegError(ret);
|
|
390
|
-
* }
|
|
384
|
+
* FFmpegError.throwIfError(ret, 'createDerived');
|
|
391
385
|
* ```
|
|
392
386
|
*/
|
|
393
387
|
createDerived(format, derivedDevice, source, flags) {
|
|
394
388
|
return this.native.createDerived(format, derivedDevice.getNative(), source.native, flags ?? 0);
|
|
395
389
|
}
|
|
396
390
|
/**
|
|
397
|
-
* Get the native
|
|
391
|
+
* Get the underlying native HardwareFramesContext object.
|
|
398
392
|
*
|
|
399
|
-
* @
|
|
400
|
-
*
|
|
393
|
+
* @returns The native HardwareFramesContext binding object
|
|
394
|
+
*
|
|
395
|
+
* @internal
|
|
401
396
|
*/
|
|
402
397
|
getNative() {
|
|
403
398
|
return this.native;
|
|
@@ -410,18 +405,13 @@ export class HardwareFramesContext {
|
|
|
410
405
|
*
|
|
411
406
|
* @example
|
|
412
407
|
* ```typescript
|
|
413
|
-
* import { HardwareFramesContext, FFmpegError } from 'node-av';
|
|
414
|
-
*
|
|
415
408
|
* {
|
|
416
409
|
* using frames = new HardwareFramesContext();
|
|
417
410
|
* frames.alloc(device);
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
* // ... use frames
|
|
411
|
+
* frames.init();
|
|
412
|
+
* // Use frames...
|
|
421
413
|
* } // Automatically freed when leaving scope
|
|
422
414
|
* ```
|
|
423
|
-
*
|
|
424
|
-
* @see {@link free} For manual cleanup
|
|
425
415
|
*/
|
|
426
416
|
[Symbol.dispose]() {
|
|
427
417
|
this.native[Symbol.dispose]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware-frames-context.js","sourceRoot":"","sources":["../../src/lib/hardware-frames-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAMrE
|
|
1
|
+
{"version":3,"file":"hardware-frames-context.js","sourceRoot":"","sources":["../../src/lib/hardware-frames-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAMrE;;;;;;;;;;;;;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C,SAAS,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,kBAAkB,CAAC,SAAqC;QACtD,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,GAAG,CAAC,GAAU,EAAE,GAAU,EAAE,KAAc;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,CAAC,MAAqB,EAAE,aAAoC,EAAE,MAA6B,EAAE,KAAc;QACtH,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,CAAC;CACF"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { SoftwareResampleContext } from './software-resample-context.js';
|
|
|
16
16
|
export { AudioFifo } from './audio-fifo.js';
|
|
17
17
|
export { IOContext } from './io-context.js';
|
|
18
18
|
export { Dictionary } from './dictionary.js';
|
|
19
|
+
export { Option, OptionInfo, type OptionMember } from './option.js';
|
|
19
20
|
export { FilterContext } from './filter-context.js';
|
|
20
21
|
export { FilterGraph } from './filter-graph.js';
|
|
21
22
|
export { FilterInOut } from './filter-inout.js';
|
|
@@ -26,4 +27,4 @@ export { Rational } from './rational.js';
|
|
|
26
27
|
export { Log } from './log.js';
|
|
27
28
|
export * from './error.js';
|
|
28
29
|
export * from './utilities.js';
|
|
29
|
-
export {
|
|
30
|
+
export type { OptionCapableObject } from './binding.js';
|
package/dist/lib/index.js
CHANGED
|
@@ -30,6 +30,8 @@ export { AudioFifo } from './audio-fifo.js';
|
|
|
30
30
|
export { IOContext } from './io-context.js';
|
|
31
31
|
// Dictionary
|
|
32
32
|
export { Dictionary } from './dictionary.js';
|
|
33
|
+
// Option
|
|
34
|
+
export { Option, OptionInfo } from './option.js';
|
|
33
35
|
// Filter related classes
|
|
34
36
|
export { FilterContext } from './filter-context.js';
|
|
35
37
|
export { FilterGraph } from './filter-graph.js';
|
|
@@ -46,6 +48,4 @@ export { Log } from './log.js';
|
|
|
46
48
|
export * from './error.js';
|
|
47
49
|
// Utilities
|
|
48
50
|
export * from './utilities.js';
|
|
49
|
-
// Option
|
|
50
|
-
export { Option, OptionInfo } from './option.js';
|
|
51
51
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAEA,iBAAiB;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAQ;AACR,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;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