node-av 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/fmp4-stream.d.ts +77 -0
- package/dist/api/fmp4-stream.js +159 -12
- package/dist/api/fmp4-stream.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/rtp-stream.d.ts +8 -0
- package/dist/api/rtp-stream.js +8 -3
- package/dist/api/rtp-stream.js.map +1 -1
- package/dist/api/utilities/electron-shared-texture.d.ts +316 -0
- package/dist/api/utilities/electron-shared-texture.js +420 -0
- package/dist/api/utilities/electron-shared-texture.js.map +1 -0
- package/dist/api/utilities/index.d.ts +2 -1
- package/dist/api/utilities/index.js +3 -1
- package/dist/api/utilities/index.js.map +1 -1
- package/dist/constants/constants.d.ts +33 -4
- package/dist/constants/constants.js +15 -7
- package/dist/constants/constants.js.map +1 -1
- package/dist/lib/frame.d.ts +126 -0
- package/dist/lib/frame.js +111 -1
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/native-types.d.ts +8 -0
- package/package.json +13 -13
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { AV_HWFRAME_MAP_READ, AV_HWFRAME_MAP_WRITE, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE } from '../../constants/constants.js';
|
|
2
|
+
import { FFmpegError } from '../../lib/error.js';
|
|
3
|
+
import { Frame } from '../../lib/frame.js';
|
|
4
|
+
import { HardwareFramesContext } from '../../lib/hardware-frames-context.js';
|
|
5
|
+
import { PixelFormatUtils } from './pixel-format.js';
|
|
6
|
+
/**
|
|
7
|
+
* High-level GPU texture import for Electron shared textures.
|
|
8
|
+
*
|
|
9
|
+
* Handles platform detection (macOS IOSurface, Windows D3D11,
|
|
10
|
+
* Linux DMA-BUF), HardwareFramesContext lifecycle, and format mapping automatically.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { HardwareContext, SharedTexture } from 'node-av/api';
|
|
15
|
+
*
|
|
16
|
+
* const hw = HardwareContext.auto();
|
|
17
|
+
* using sharedTexture = SharedTexture.create(hw);
|
|
18
|
+
*
|
|
19
|
+
* // In Electron paint event:
|
|
20
|
+
* offscreen.webContents.on('paint', (event) => {
|
|
21
|
+
* const texture = event.texture;
|
|
22
|
+
* if (!texture?.textureInfo) return;
|
|
23
|
+
*
|
|
24
|
+
* using frame = sharedTexture.importTexture(texture.textureInfo, { pts: 0n });
|
|
25
|
+
* // frame is a hardware Frame ready for encoding/filtering
|
|
26
|
+
*
|
|
27
|
+
* texture.release();
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @see {@link HardwareContext} For hardware acceleration setup
|
|
32
|
+
* @see {@link Frame} For frame operations
|
|
33
|
+
*/
|
|
34
|
+
export class SharedTexture {
|
|
35
|
+
_hardware;
|
|
36
|
+
_framesCtx = null;
|
|
37
|
+
_currentWidth = 0;
|
|
38
|
+
_currentHeight = 0;
|
|
39
|
+
_swFormat;
|
|
40
|
+
_isDisposed = false;
|
|
41
|
+
// Mapping context cache for mapTo() helper
|
|
42
|
+
_mappingCtx = null;
|
|
43
|
+
_mappingHw = null;
|
|
44
|
+
constructor(hardware, options) {
|
|
45
|
+
this._hardware = hardware;
|
|
46
|
+
this._swFormat = options.swFormat ?? AV_PIX_FMT_BGRA;
|
|
47
|
+
if (options.width)
|
|
48
|
+
this._currentWidth = options.width;
|
|
49
|
+
if (options.height)
|
|
50
|
+
this._currentHeight = options.height;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a SharedTexture.
|
|
54
|
+
*
|
|
55
|
+
* @param hardware - Initialized hardware context (from HardwareContext.auto() or HardwareContext.create())
|
|
56
|
+
*
|
|
57
|
+
* @param options - Optional configuration overrides
|
|
58
|
+
*
|
|
59
|
+
* @returns SharedTexture instance
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const hw = HardwareContext.auto();
|
|
64
|
+
* using sharedTexture = SharedTexture.create(hw);
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* // With explicit software format
|
|
70
|
+
* import { AV_PIX_FMT_NV12 } from 'node-av/constants';
|
|
71
|
+
*
|
|
72
|
+
* using sharedTexture = SharedTexture.create(hw, { swFormat: AV_PIX_FMT_NV12 });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
static create(hardware, options = {}) {
|
|
76
|
+
if (!hardware || hardware.isDisposed) {
|
|
77
|
+
throw new Error('SharedTexture requires a valid, non-disposed HardwareContext');
|
|
78
|
+
}
|
|
79
|
+
return new SharedTexture(hardware, options);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The hardware context used by this sharedTexture.
|
|
83
|
+
*/
|
|
84
|
+
get hardware() {
|
|
85
|
+
return this._hardware;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Current width of the cached HardwareFramesContext.
|
|
89
|
+
*/
|
|
90
|
+
get width() {
|
|
91
|
+
return this._currentWidth;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Current height of the cached HardwareFramesContext.
|
|
95
|
+
*/
|
|
96
|
+
get height() {
|
|
97
|
+
return this._currentHeight;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Whether this sharedTexture has been disposed.
|
|
101
|
+
*/
|
|
102
|
+
get isDisposed() {
|
|
103
|
+
return this._isDisposed;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Import an Electron textureInfo as a hardware Frame.
|
|
107
|
+
*
|
|
108
|
+
* Automatically detects the platform from the handle contents,
|
|
109
|
+
* manages the HardwareFramesContext, and creates a zero-copy hardware frame.
|
|
110
|
+
*
|
|
111
|
+
* @param textureInfo - Electron's textureInfo object from paint event
|
|
112
|
+
*
|
|
113
|
+
* @param options - Per-frame options (pts, timeBase)
|
|
114
|
+
*
|
|
115
|
+
* @returns Hardware Frame referencing the GPU texture
|
|
116
|
+
*
|
|
117
|
+
* @throws {Error} If disposed, no valid handle found, or import fails
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* offscreen.webContents.on('paint', (event) => {
|
|
122
|
+
* const texture = event.texture;
|
|
123
|
+
* if (!texture?.textureInfo) return;
|
|
124
|
+
*
|
|
125
|
+
* using frame = sharedTexture.importTexture(texture.textureInfo, {
|
|
126
|
+
* pts: BigInt(Date.now()) * 1000n,
|
|
127
|
+
* timeBase: { num: 1, den: 1000000 },
|
|
128
|
+
* });
|
|
129
|
+
*
|
|
130
|
+
* texture.release();
|
|
131
|
+
* });
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
importTexture(textureInfo, options = {}) {
|
|
135
|
+
if (this._isDisposed) {
|
|
136
|
+
throw new Error('SharedTexture has been disposed');
|
|
137
|
+
}
|
|
138
|
+
const { width, height } = textureInfo.codedSize;
|
|
139
|
+
const swFormat = this.resolvePixelFormat(textureInfo.pixelFormat);
|
|
140
|
+
const handle = textureInfo.handle;
|
|
141
|
+
return this.importFromHandle(handle, width, height, swFormat, options);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Import a raw SharedTextureHandle as a hardware Frame.
|
|
145
|
+
*
|
|
146
|
+
* Use this when you have the handle directly without the full textureInfo wrapper.
|
|
147
|
+
*
|
|
148
|
+
* @param handle - Platform-specific GPU texture handle
|
|
149
|
+
*
|
|
150
|
+
* @param props - Dimensions, format, and timing options
|
|
151
|
+
*
|
|
152
|
+
* @returns Hardware Frame referencing the GPU texture
|
|
153
|
+
*
|
|
154
|
+
* @throws {Error} If disposed, no valid handle found, or import fails
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const frame = sharedTexture.importHandle(handle, {
|
|
159
|
+
* width: 1920,
|
|
160
|
+
* height: 1080,
|
|
161
|
+
* pixelFormat: 'BGRA',
|
|
162
|
+
* pts: 0n,
|
|
163
|
+
* });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
importHandle(handle, props) {
|
|
167
|
+
if (this._isDisposed) {
|
|
168
|
+
throw new Error('SharedTexture has been disposed');
|
|
169
|
+
}
|
|
170
|
+
let swFormat = this._swFormat;
|
|
171
|
+
if (props.pixelFormat !== undefined) {
|
|
172
|
+
swFormat = typeof props.pixelFormat === 'string' ? this.resolvePixelFormat(props.pixelFormat) : props.pixelFormat;
|
|
173
|
+
}
|
|
174
|
+
return this.importFromHandle(handle, props.width, props.height, swFormat, {
|
|
175
|
+
pts: props.pts,
|
|
176
|
+
timeBase: props.timeBase,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Map a frame to a different hardware format.
|
|
181
|
+
*
|
|
182
|
+
* Handles HardwareFramesContext creation and caching automatically.
|
|
183
|
+
* The mapping context is cached and reused for subsequent calls with the
|
|
184
|
+
* same target hardware and frame dimensions.
|
|
185
|
+
*
|
|
186
|
+
* @param srcFrame - Source frame (e.g., DRM PRIME from importTexture on Linux)
|
|
187
|
+
*
|
|
188
|
+
* @param targetHw - Target hardware context (e.g., VAAPI, Vulkan)
|
|
189
|
+
*
|
|
190
|
+
* @param flags - Mapping flags
|
|
191
|
+
*
|
|
192
|
+
* @returns Mapped frame in target hardware format
|
|
193
|
+
*
|
|
194
|
+
* @throws {FFmpegError} If mapping fails (e.g., unsupported mapping, invalid frames)
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```typescript
|
|
198
|
+
* import { HardwareContext, SharedTexture } from 'node-av/api';
|
|
199
|
+
* import { AV_HWDEVICE_TYPE_VAAPI } from 'node-av/constants';
|
|
200
|
+
*
|
|
201
|
+
* // Import DRM PRIME frame from Electron shared texture
|
|
202
|
+
* const drmFrame = sharedTexture.importTexture(textureInfo, { pts: 0n });
|
|
203
|
+
*
|
|
204
|
+
* // Map to VAAPI for encoding
|
|
205
|
+
* const vaapiHw = await HardwareContext.create(AV_HWDEVICE_TYPE_VAAPI);
|
|
206
|
+
* const vaapiFrame = sharedTexture.mapTo(drmFrame, vaapiHw);
|
|
207
|
+
*
|
|
208
|
+
* // Encode with VAAPI encoder
|
|
209
|
+
* encoder.encode(vaapiFrame);
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
mapTo(srcFrame, targetHw, flags) {
|
|
213
|
+
if (this._isDisposed) {
|
|
214
|
+
throw new Error('SharedTexture has been disposed');
|
|
215
|
+
}
|
|
216
|
+
// Ensure mapping context exists and matches target hardware + dimensions
|
|
217
|
+
this.ensureMappingContext(srcFrame, targetHw);
|
|
218
|
+
// Create destination frame
|
|
219
|
+
const dstFrame = new Frame();
|
|
220
|
+
dstFrame.alloc();
|
|
221
|
+
// Allocate buffer from target hardware frames context
|
|
222
|
+
const allocRet = this._mappingCtx.getBuffer(dstFrame);
|
|
223
|
+
FFmpegError.throwIfError(allocRet, 'Failed to allocate target hardware frame');
|
|
224
|
+
// Copy timing properties
|
|
225
|
+
dstFrame.pts = srcFrame.pts;
|
|
226
|
+
dstFrame.timeBase = srcFrame.timeBase;
|
|
227
|
+
// Perform mapping
|
|
228
|
+
const mapFlags = flags ?? AV_HWFRAME_MAP_READ | AV_HWFRAME_MAP_WRITE;
|
|
229
|
+
const ret = this._mappingCtx.map(dstFrame, srcFrame, mapFlags);
|
|
230
|
+
FFmpegError.throwIfError(ret, 'Failed to map frame to target hardware format');
|
|
231
|
+
return dstFrame;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Ensure mapping context exists and matches the target hardware and frame dimensions.
|
|
235
|
+
*
|
|
236
|
+
* Re-creates the context if target hardware changes or dimensions change.
|
|
237
|
+
*
|
|
238
|
+
* @param srcFrame - Source frame to get dimensions from
|
|
239
|
+
*
|
|
240
|
+
* @param targetHw - Target hardware context
|
|
241
|
+
*
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
244
|
+
ensureMappingContext(srcFrame, targetHw) {
|
|
245
|
+
// Re-create if target hardware changed or dimensions changed
|
|
246
|
+
if (this._mappingHw !== targetHw || this._mappingCtx?.width !== srcFrame.width || this._mappingCtx?.height !== srcFrame.height) {
|
|
247
|
+
// Free previous context
|
|
248
|
+
if (this._mappingCtx) {
|
|
249
|
+
this._mappingCtx.free();
|
|
250
|
+
this._mappingCtx = null;
|
|
251
|
+
}
|
|
252
|
+
// Create new mapping context for target hardware
|
|
253
|
+
const ctx = new HardwareFramesContext();
|
|
254
|
+
ctx.alloc(targetHw.deviceContext);
|
|
255
|
+
ctx.format = targetHw.devicePixelFormat;
|
|
256
|
+
ctx.swFormat = srcFrame.format; // Use source format
|
|
257
|
+
ctx.width = srcFrame.width;
|
|
258
|
+
ctx.height = srcFrame.height;
|
|
259
|
+
const ret = ctx.init();
|
|
260
|
+
FFmpegError.throwIfError(ret, 'Failed to initialize mapping HardwareFramesContext');
|
|
261
|
+
this._mappingCtx = ctx;
|
|
262
|
+
this._mappingHw = targetHw;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Release the cached HardwareFramesContext and mapping context.
|
|
267
|
+
*
|
|
268
|
+
* The HardwareContext is NOT disposed — it belongs to the caller.
|
|
269
|
+
* Safe to call multiple times.
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```typescript
|
|
273
|
+
* sharedTexture.dispose();
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
dispose() {
|
|
277
|
+
if (this._isDisposed) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
this._isDisposed = true;
|
|
281
|
+
if (this._framesCtx) {
|
|
282
|
+
this._framesCtx.free();
|
|
283
|
+
this._framesCtx = null;
|
|
284
|
+
}
|
|
285
|
+
if (this._mappingCtx) {
|
|
286
|
+
this._mappingCtx.free();
|
|
287
|
+
this._mappingCtx = null;
|
|
288
|
+
}
|
|
289
|
+
this._mappingHw = null;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Core import logic — dispatches to the correct Frame factory based on handle type.
|
|
293
|
+
*
|
|
294
|
+
* @param handle - Platform-specific GPU texture handle
|
|
295
|
+
*
|
|
296
|
+
* @param width - Texture width in pixels
|
|
297
|
+
*
|
|
298
|
+
* @param height - Texture height in pixels
|
|
299
|
+
*
|
|
300
|
+
* @param swFormat - Software pixel format for HardwareFramesContext
|
|
301
|
+
*
|
|
302
|
+
* @param options - Per-frame timing options
|
|
303
|
+
*
|
|
304
|
+
* @returns Hardware Frame referencing the GPU texture
|
|
305
|
+
*
|
|
306
|
+
* @internal
|
|
307
|
+
*/
|
|
308
|
+
importFromHandle(handle, width, height, swFormat, options) {
|
|
309
|
+
// macOS — IOSurface
|
|
310
|
+
if (handle.ioSurface && handle.ioSurface.length > 0) {
|
|
311
|
+
const framesCtx = this.ensureFramesContext(width, height, swFormat);
|
|
312
|
+
return Frame.fromIOSurface(handle.ioSurface, {
|
|
313
|
+
hwFramesCtx: framesCtx,
|
|
314
|
+
pts: options.pts,
|
|
315
|
+
timeBase: options.timeBase,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
// Windows — D3D11 shared texture
|
|
319
|
+
if (handle.ntHandle && handle.ntHandle.length > 0) {
|
|
320
|
+
return Frame.fromD3D11Texture(handle.ntHandle, {
|
|
321
|
+
hwDeviceCtx: this._hardware.deviceContext,
|
|
322
|
+
pts: options.pts,
|
|
323
|
+
timeBase: options.timeBase,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
// Linux — DMA-BUF
|
|
327
|
+
if (handle.nativePixmap) {
|
|
328
|
+
const dmaBuf = {
|
|
329
|
+
planes: handle.nativePixmap.planes,
|
|
330
|
+
modifier: handle.nativePixmap.modifier,
|
|
331
|
+
};
|
|
332
|
+
return Frame.fromDmaBuf(dmaBuf, {
|
|
333
|
+
width,
|
|
334
|
+
height,
|
|
335
|
+
swFormat,
|
|
336
|
+
pts: options.pts,
|
|
337
|
+
timeBase: options.timeBase,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
throw new Error('SharedTexture: no valid handle found (expected ioSurface, ntHandle, or nativePixmap)');
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Ensure HardwareFramesContext is created and matches the requested dimensions/format.
|
|
344
|
+
*
|
|
345
|
+
* Re-creates the context only when dimensions or format change.
|
|
346
|
+
* Windows D3D11 does not use this — it passes HardwareDeviceContext directly.
|
|
347
|
+
*
|
|
348
|
+
* @param width - Frame width in pixels
|
|
349
|
+
*
|
|
350
|
+
* @param height - Frame height in pixels
|
|
351
|
+
*
|
|
352
|
+
* @param swFormat - Software pixel format
|
|
353
|
+
*
|
|
354
|
+
* @returns Initialized HardwareFramesContext matching the requested parameters
|
|
355
|
+
*
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
ensureFramesContext(width, height, swFormat) {
|
|
359
|
+
if (this._framesCtx && this._currentWidth === width && this._currentHeight === height && this._swFormat === swFormat) {
|
|
360
|
+
return this._framesCtx;
|
|
361
|
+
}
|
|
362
|
+
// Free previous context if dimensions/format changed
|
|
363
|
+
if (this._framesCtx) {
|
|
364
|
+
this._framesCtx.free();
|
|
365
|
+
this._framesCtx = null;
|
|
366
|
+
}
|
|
367
|
+
const framesCtx = new HardwareFramesContext();
|
|
368
|
+
framesCtx.alloc(this._hardware.deviceContext);
|
|
369
|
+
framesCtx.format = this._hardware.devicePixelFormat;
|
|
370
|
+
framesCtx.swFormat = swFormat;
|
|
371
|
+
framesCtx.width = width;
|
|
372
|
+
framesCtx.height = height;
|
|
373
|
+
const ret = framesCtx.init();
|
|
374
|
+
FFmpegError.throwIfError(ret, 'Failed to initialize HardwareFramesContext');
|
|
375
|
+
this._framesCtx = framesCtx;
|
|
376
|
+
this._currentWidth = width;
|
|
377
|
+
this._currentHeight = height;
|
|
378
|
+
this._swFormat = swFormat;
|
|
379
|
+
return framesCtx;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Resolve a pixel format string (e.g., 'BGRA') to an AVPixelFormat enum value.
|
|
383
|
+
*
|
|
384
|
+
* Falls back to the configured swFormat if the name is not recognized.
|
|
385
|
+
*
|
|
386
|
+
* @param name - Pixel format name string from Electron
|
|
387
|
+
*
|
|
388
|
+
* @returns Resolved AVPixelFormat enum value
|
|
389
|
+
*
|
|
390
|
+
* @internal
|
|
391
|
+
*/
|
|
392
|
+
resolvePixelFormat(name) {
|
|
393
|
+
// Electron reports formats in uppercase (e.g., 'BGRA'), FFmpeg uses lowercase
|
|
394
|
+
const fmt = PixelFormatUtils.fromName(name.toLowerCase());
|
|
395
|
+
if (fmt === AV_PIX_FMT_NONE) {
|
|
396
|
+
return this._swFormat;
|
|
397
|
+
}
|
|
398
|
+
return fmt;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Dispose of the SharedTexture.
|
|
402
|
+
*
|
|
403
|
+
* Implements the Disposable interface for automatic cleanup.
|
|
404
|
+
* Equivalent to calling dispose().
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* ```typescript
|
|
408
|
+
* {
|
|
409
|
+
* using sharedTexture = SharedTexture.create(hw);
|
|
410
|
+
* // Use sharedTexture...
|
|
411
|
+
* } // Automatically disposed
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* @see {@link dispose} For manual cleanup
|
|
415
|
+
*/
|
|
416
|
+
[Symbol.dispose]() {
|
|
417
|
+
this.dispose();
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=electron-shared-texture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electron-shared-texture.js","sourceRoot":"","sources":["../../../src/api/utilities/electron-shared-texture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAo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B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAE1B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;;;;OAUG;IACK,kBAAkB,CAAC,IAAY;QACrC,8EAA8E;QAC9E,MAAM,GAAG,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAC1D,IAAI,GAAG,KAAK,eAAe,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -6,6 +6,7 @@ export { PixelFormatUtils } from './pixel-format.js';
|
|
|
6
6
|
export { SampleFormatUtils } from './sample-format.js';
|
|
7
7
|
export { TimestampUtils } from './timestamp.js';
|
|
8
8
|
export { StreamingUtils } from './streaming.js';
|
|
9
|
-
export {
|
|
9
|
+
export { WHISPER_MODELS, WHISPER_VAD_MODELS, WhisperDownloader, type DownloadOptions, type WhisperModelName, type WhisperModelType, type WhisperVADModelName, } from './whisper-model.js';
|
|
10
10
|
export { AsyncQueue } from './async-queue.js';
|
|
11
11
|
export { Scheduler, SchedulerControl, type SchedulableComponent } from './scheduler.js';
|
|
12
|
+
export { SharedTexture, type ImportHandleProps, type SharedTextureHandle, type SharedTextureOptions, type TextureFrameOptions, type TextureInfo, } from './electron-shared-texture.js';
|
|
@@ -15,9 +15,11 @@ export { TimestampUtils } from './timestamp.js';
|
|
|
15
15
|
// Streaming
|
|
16
16
|
export { StreamingUtils } from './streaming.js';
|
|
17
17
|
// Whisper Model Downloader
|
|
18
|
-
export {
|
|
18
|
+
export { WHISPER_MODELS, WHISPER_VAD_MODELS, WhisperDownloader, } from './whisper-model.js';
|
|
19
19
|
// AsyncQueue
|
|
20
20
|
export { AsyncQueue } from './async-queue.js';
|
|
21
21
|
// Scheduler
|
|
22
22
|
export { Scheduler, SchedulerControl } from './scheduler.js';
|
|
23
|
+
// SharedTexture
|
|
24
|
+
export { SharedTexture, } from './electron-shared-texture.js';
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,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;AAEhD,2BAA2B;AAC3B,OAAO,EACL,
|
|
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;AAEhD,2BAA2B;AAC3B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAKlB,MAAM,oBAAoB,CAAC;AAE5B,aAAa;AACb,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAA6B,MAAM,gBAAgB,CAAC;AAExF,gBAAgB;AAChB,OAAO,EACL,aAAa,GAMd,MAAM,8BAA8B,CAAC"}
|
|
@@ -43,6 +43,13 @@ export declare const AV_PICTURE_STRUCTURE_UNKNOWN: AVPictureStructure;
|
|
|
43
43
|
export declare const AV_PICTURE_STRUCTURE_TOP_FIELD: AVPictureStructure;
|
|
44
44
|
export declare const AV_PICTURE_STRUCTURE_BOTTOM_FIELD: AVPictureStructure;
|
|
45
45
|
export declare const AV_PICTURE_STRUCTURE_FRAME: AVPictureStructure;
|
|
46
|
+
export type AVCodecHWConfigMethod = number & {
|
|
47
|
+
readonly [__ffmpeg_brand]: 'AVCodecHWConfigMethod';
|
|
48
|
+
};
|
|
49
|
+
export declare const AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX: AVCodecHWConfigMethod;
|
|
50
|
+
export declare const AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX: AVCodecHWConfigMethod;
|
|
51
|
+
export declare const AV_CODEC_HW_CONFIG_METHOD_INTERNAL: AVCodecHWConfigMethod;
|
|
52
|
+
export declare const AV_CODEC_HW_CONFIG_METHOD_AD_HOC: AVCodecHWConfigMethod;
|
|
46
53
|
export type AVCodecID = number & {
|
|
47
54
|
readonly [__ffmpeg_brand]: 'AVCodecID';
|
|
48
55
|
};
|
|
@@ -902,6 +909,10 @@ export declare const AV_AFD_14_9: AVActiveFormatDescription;
|
|
|
902
909
|
export declare const AV_AFD_4_3_SP_14_9: AVActiveFormatDescription;
|
|
903
910
|
export declare const AV_AFD_16_9_SP_14_9: AVActiveFormatDescription;
|
|
904
911
|
export declare const AV_AFD_SP_4_3: AVActiveFormatDescription;
|
|
912
|
+
export type AVFrameCropFlag = number & {
|
|
913
|
+
readonly [__ffmpeg_brand]: 'AVFrameCropFlag';
|
|
914
|
+
};
|
|
915
|
+
export declare const AV_FRAME_CROP_UNALIGNED: AVFrameCropFlag;
|
|
905
916
|
export type AVHDRPlusOverlapProcessOption = number & {
|
|
906
917
|
readonly [__ffmpeg_brand]: 'AVHDRPlusOverlapProcessOption';
|
|
907
918
|
};
|
|
@@ -940,10 +951,28 @@ export type AVHWFrameTransferDirection = number & {
|
|
|
940
951
|
};
|
|
941
952
|
export declare const AV_HWFRAME_TRANSFER_DIRECTION_FROM: AVHWFrameTransferDirection;
|
|
942
953
|
export declare const AV_HWFRAME_TRANSFER_DIRECTION_TO: AVHWFrameTransferDirection;
|
|
954
|
+
export type AVHWFrameMapFlag = number & {
|
|
955
|
+
readonly [__ffmpeg_brand]: 'AVHWFrameMapFlag';
|
|
956
|
+
};
|
|
957
|
+
export declare const AV_HWFRAME_MAP_READ: AVHWFrameMapFlag;
|
|
958
|
+
export declare const AV_HWFRAME_MAP_WRITE: AVHWFrameMapFlag;
|
|
959
|
+
export declare const AV_HWFRAME_MAP_OVERWRITE: AVHWFrameMapFlag;
|
|
960
|
+
export declare const AV_HWFRAME_MAP_DIRECT: AVHWFrameMapFlag;
|
|
943
961
|
export type AVD3D12VAFrameFlags = number & {
|
|
944
962
|
readonly [__ffmpeg_brand]: 'AVD3D12VAFrameFlags';
|
|
945
963
|
};
|
|
946
964
|
export declare const AV_D3D12VA_FRAME_FLAG_NONE: AVD3D12VAFrameFlags;
|
|
965
|
+
export type AVDRMMax = number & {
|
|
966
|
+
readonly [__ffmpeg_brand]: 'AVDRMMax';
|
|
967
|
+
};
|
|
968
|
+
export declare const AV_DRM_MAX_PLANES: AVDRMMax;
|
|
969
|
+
export type AVVaapiDriverQuirk = number & {
|
|
970
|
+
readonly [__ffmpeg_brand]: 'AVVaapiDriverQuirk';
|
|
971
|
+
};
|
|
972
|
+
export declare const AV_VAAPI_DRIVER_QUIRK_USER_SET: AVVaapiDriverQuirk;
|
|
973
|
+
export declare const AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS: AVVaapiDriverQuirk;
|
|
974
|
+
export declare const AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE: AVVaapiDriverQuirk;
|
|
975
|
+
export declare const AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES: AVVaapiDriverQuirk;
|
|
947
976
|
export type AVIAMFAnimationType = number & {
|
|
948
977
|
readonly [__ffmpeg_brand]: 'AVIAMFAnimationType';
|
|
949
978
|
};
|
|
@@ -1072,6 +1101,10 @@ export declare const AV_OPT_TYPE_BOOL: AVOptionTypeBool;
|
|
|
1072
1101
|
export declare const AV_OPT_TYPE_CHLAYOUT: AVOptionTypeChLayout;
|
|
1073
1102
|
export declare const AV_OPT_TYPE_UINT: AVOptionTypeUint;
|
|
1074
1103
|
export declare const AV_OPT_TYPE_BINARY_INT_ARRAY: AVOptionTypeBinaryIntArray;
|
|
1104
|
+
export type AVOptFlagImplicit = number & {
|
|
1105
|
+
readonly [__ffmpeg_brand]: 'AVOptFlagImplicit';
|
|
1106
|
+
};
|
|
1107
|
+
export declare const AV_OPT_FLAG_IMPLICIT_KEY: AVOptFlagImplicit;
|
|
1075
1108
|
export type AVPixelFormat = number & {
|
|
1076
1109
|
readonly [__ffmpeg_brand]: 'AVPixelFormat';
|
|
1077
1110
|
};
|
|
@@ -2241,10 +2274,6 @@ export type AVThreadType = number & {
|
|
|
2241
2274
|
};
|
|
2242
2275
|
export declare const FF_THREAD_FRAME: AVThreadType;
|
|
2243
2276
|
export declare const FF_THREAD_SLICE: AVThreadType;
|
|
2244
|
-
export declare const AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 1;
|
|
2245
|
-
export declare const AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = 2;
|
|
2246
|
-
export declare const AV_CODEC_HW_CONFIG_METHOD_INTERNAL = 4;
|
|
2247
|
-
export declare const AV_CODEC_HW_CONFIG_METHOD_AD_HOC = 8;
|
|
2248
2277
|
export type AVError = number & {
|
|
2249
2278
|
readonly [__ffmpeg_brand]: 'AVError';
|
|
2250
2279
|
};
|
|
@@ -31,6 +31,10 @@ export const AV_PICTURE_STRUCTURE_UNKNOWN = 0;
|
|
|
31
31
|
export const AV_PICTURE_STRUCTURE_TOP_FIELD = 1;
|
|
32
32
|
export const AV_PICTURE_STRUCTURE_BOTTOM_FIELD = 2;
|
|
33
33
|
export const AV_PICTURE_STRUCTURE_FRAME = 3;
|
|
34
|
+
export const AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 1;
|
|
35
|
+
export const AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = 2;
|
|
36
|
+
export const AV_CODEC_HW_CONFIG_METHOD_INTERNAL = 4;
|
|
37
|
+
export const AV_CODEC_HW_CONFIG_METHOD_AD_HOC = 8;
|
|
34
38
|
export const AV_CODEC_ID_NONE = 0;
|
|
35
39
|
export const AV_CODEC_ID_MPEG1VIDEO = 1;
|
|
36
40
|
export const AV_CODEC_ID_MPEG2VIDEO = 2;
|
|
@@ -815,6 +819,7 @@ export const AV_AFD_14_9 = 11;
|
|
|
815
819
|
export const AV_AFD_4_3_SP_14_9 = 13;
|
|
816
820
|
export const AV_AFD_16_9_SP_14_9 = 14;
|
|
817
821
|
export const AV_AFD_SP_4_3 = 15;
|
|
822
|
+
export const AV_FRAME_CROP_UNALIGNED = 1;
|
|
818
823
|
export const AV_HDR_PLUS_OVERLAP_PROCESS_WEIGHTED_AVERAGING = 0;
|
|
819
824
|
export const AV_HDR_PLUS_OVERLAP_PROCESS_LAYERING = 1;
|
|
820
825
|
export const AV_HMAC_MD5 = 0;
|
|
@@ -841,7 +846,16 @@ export const AV_HWDEVICE_TYPE_AMF = 14;
|
|
|
841
846
|
export const AV_HWDEVICE_TYPE_OHCODEC = 15;
|
|
842
847
|
export const AV_HWFRAME_TRANSFER_DIRECTION_FROM = 0;
|
|
843
848
|
export const AV_HWFRAME_TRANSFER_DIRECTION_TO = 1;
|
|
849
|
+
export const AV_HWFRAME_MAP_READ = 1;
|
|
850
|
+
export const AV_HWFRAME_MAP_WRITE = 2;
|
|
851
|
+
export const AV_HWFRAME_MAP_OVERWRITE = 4;
|
|
852
|
+
export const AV_HWFRAME_MAP_DIRECT = 8;
|
|
844
853
|
export const AV_D3D12VA_FRAME_FLAG_NONE = 0;
|
|
854
|
+
export const AV_DRM_MAX_PLANES = 4;
|
|
855
|
+
export const AV_VAAPI_DRIVER_QUIRK_USER_SET = 1;
|
|
856
|
+
export const AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = 2;
|
|
857
|
+
export const AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = 4;
|
|
858
|
+
export const AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES = 8;
|
|
845
859
|
export const AV_IAMF_ANIMATION_TYPE_STEP = 0;
|
|
846
860
|
export const AV_IAMF_ANIMATION_TYPE_LINEAR = 1;
|
|
847
861
|
export const AV_IAMF_ANIMATION_TYPE_BEZIER = 2;
|
|
@@ -883,6 +897,7 @@ export const AV_OPT_TYPE_BOOL = 18;
|
|
|
883
897
|
export const AV_OPT_TYPE_CHLAYOUT = 19;
|
|
884
898
|
export const AV_OPT_TYPE_UINT = 20;
|
|
885
899
|
export const AV_OPT_TYPE_BINARY_INT_ARRAY = 25; // For int arrays like pix_fmts
|
|
900
|
+
export const AV_OPT_FLAG_IMPLICIT_KEY = 1;
|
|
886
901
|
export const AV_PIX_FMT_NONE = -1;
|
|
887
902
|
export const AV_PIX_FMT_YUV420P = 0;
|
|
888
903
|
export const AV_PIX_FMT_YUYV422 = 1;
|
|
@@ -1812,13 +1827,6 @@ export const SWR_FLAG_RESAMPLE = 1;
|
|
|
1812
1827
|
export const SWR_CH_MAX = 64;
|
|
1813
1828
|
export const FF_THREAD_FRAME = 1;
|
|
1814
1829
|
export const FF_THREAD_SLICE = 2;
|
|
1815
|
-
// ============================================================================
|
|
1816
|
-
// AV_CODEC_HW_CONFIG_METHOD - Hardware configuration methods
|
|
1817
|
-
// ============================================================================
|
|
1818
|
-
export const AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 0x01;
|
|
1819
|
-
export const AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = 0x02;
|
|
1820
|
-
export const AV_CODEC_HW_CONFIG_METHOD_INTERNAL = 0x04;
|
|
1821
|
-
export const AV_CODEC_HW_CONFIG_METHOD_AD_HOC = 0x08;
|
|
1822
1830
|
export const AVERROR_BSF_NOT_FOUND = -1179861752;
|
|
1823
1831
|
export const AVERROR_BUG = -558323010;
|
|
1824
1832
|
export const AVERROR_BUFFER_TOO_SMALL = -1397118274;
|