node-av-light 0.0.0 → 7.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +711 -0
  3. package/dist/api/audio-frame-buffer.d.ts +636 -0
  4. package/dist/api/audio-frame-buffer.js +1027 -0
  5. package/dist/api/audio-frame-buffer.js.map +1 -0
  6. package/dist/api/bitstream-filter.d.ts +938 -0
  7. package/dist/api/bitstream-filter.js +1427 -0
  8. package/dist/api/bitstream-filter.js.map +1 -0
  9. package/dist/api/constants.d.ts +44 -0
  10. package/dist/api/constants.js +45 -0
  11. package/dist/api/constants.js.map +1 -0
  12. package/dist/api/data/test_av1.ivf +0 -0
  13. package/dist/api/data/test_h264.h264 +0 -0
  14. package/dist/api/data/test_hevc.h265 +0 -0
  15. package/dist/api/data/test_mjpeg.mjpeg +0 -0
  16. package/dist/api/data/test_vp8.ivf +0 -0
  17. package/dist/api/data/test_vp9.ivf +0 -0
  18. package/dist/api/decoder.d.ts +1413 -0
  19. package/dist/api/decoder.js +2367 -0
  20. package/dist/api/decoder.js.map +1 -0
  21. package/dist/api/demuxer.d.ts +1295 -0
  22. package/dist/api/demuxer.js +2344 -0
  23. package/dist/api/demuxer.js.map +1 -0
  24. package/dist/api/device.d.ts +589 -0
  25. package/dist/api/device.js +964 -0
  26. package/dist/api/device.js.map +1 -0
  27. package/dist/api/encoder-pool.d.ts +262 -0
  28. package/dist/api/encoder-pool.js +397 -0
  29. package/dist/api/encoder-pool.js.map +1 -0
  30. package/dist/api/encoder.d.ts +1509 -0
  31. package/dist/api/encoder.js +2619 -0
  32. package/dist/api/encoder.js.map +1 -0
  33. package/dist/api/filter-complex.d.ts +828 -0
  34. package/dist/api/filter-complex.js +1661 -0
  35. package/dist/api/filter-complex.js.map +1 -0
  36. package/dist/api/filter-presets.d.ts +800 -0
  37. package/dist/api/filter-presets.js +1554 -0
  38. package/dist/api/filter-presets.js.map +1 -0
  39. package/dist/api/filter.d.ts +1339 -0
  40. package/dist/api/filter.js +2075 -0
  41. package/dist/api/filter.js.map +1 -0
  42. package/dist/api/fmp4-stream.d.ts +797 -0
  43. package/dist/api/fmp4-stream.js +1428 -0
  44. package/dist/api/fmp4-stream.js.map +1 -0
  45. package/dist/api/hardware.d.ts +677 -0
  46. package/dist/api/hardware.js +1300 -0
  47. package/dist/api/hardware.js.map +1 -0
  48. package/dist/api/index.d.ts +21 -0
  49. package/dist/api/index.js +38 -0
  50. package/dist/api/index.js.map +1 -0
  51. package/dist/api/io-stream.d.ts +308 -0
  52. package/dist/api/io-stream.js +358 -0
  53. package/dist/api/io-stream.js.map +1 -0
  54. package/dist/api/muxer.d.ts +1311 -0
  55. package/dist/api/muxer.js +2672 -0
  56. package/dist/api/muxer.js.map +1 -0
  57. package/dist/api/pipeline.d.ts +801 -0
  58. package/dist/api/pipeline.js +1344 -0
  59. package/dist/api/pipeline.js.map +1 -0
  60. package/dist/api/probe.d.ts +128 -0
  61. package/dist/api/probe.js +227 -0
  62. package/dist/api/probe.js.map +1 -0
  63. package/dist/api/rtp-stream.d.ts +497 -0
  64. package/dist/api/rtp-stream.js +1131 -0
  65. package/dist/api/rtp-stream.js.map +1 -0
  66. package/dist/api/scaler.d.ts +561 -0
  67. package/dist/api/scaler.js +918 -0
  68. package/dist/api/scaler.js.map +1 -0
  69. package/dist/api/types.d.ts +17 -0
  70. package/dist/api/types.js +2 -0
  71. package/dist/api/types.js.map +1 -0
  72. package/dist/api/utilities/async-queue.d.ts +149 -0
  73. package/dist/api/utilities/async-queue.js +254 -0
  74. package/dist/api/utilities/async-queue.js.map +1 -0
  75. package/dist/api/utilities/audio-sample.d.ts +117 -0
  76. package/dist/api/utilities/audio-sample.js +112 -0
  77. package/dist/api/utilities/audio-sample.js.map +1 -0
  78. package/dist/api/utilities/audio-transcode.d.ts +20 -0
  79. package/dist/api/utilities/audio-transcode.js +27 -0
  80. package/dist/api/utilities/audio-transcode.js.map +1 -0
  81. package/dist/api/utilities/channel-layout.d.ts +76 -0
  82. package/dist/api/utilities/channel-layout.js +80 -0
  83. package/dist/api/utilities/channel-layout.js.map +1 -0
  84. package/dist/api/utilities/codec-format.d.ts +87 -0
  85. package/dist/api/utilities/codec-format.js +117 -0
  86. package/dist/api/utilities/codec-format.js.map +1 -0
  87. package/dist/api/utilities/context-options.d.ts +25 -0
  88. package/dist/api/utilities/context-options.js +23 -0
  89. package/dist/api/utilities/context-options.js.map +1 -0
  90. package/dist/api/utilities/electron-shared-texture.d.ts +368 -0
  91. package/dist/api/utilities/electron-shared-texture.js +540 -0
  92. package/dist/api/utilities/electron-shared-texture.js.map +1 -0
  93. package/dist/api/utilities/image.d.ts +207 -0
  94. package/dist/api/utilities/image.js +213 -0
  95. package/dist/api/utilities/image.js.map +1 -0
  96. package/dist/api/utilities/index.d.ts +14 -0
  97. package/dist/api/utilities/index.js +27 -0
  98. package/dist/api/utilities/index.js.map +1 -0
  99. package/dist/api/utilities/live-decoding.d.ts +15 -0
  100. package/dist/api/utilities/live-decoding.js +32 -0
  101. package/dist/api/utilities/live-decoding.js.map +1 -0
  102. package/dist/api/utilities/media-type.d.ts +49 -0
  103. package/dist/api/utilities/media-type.js +53 -0
  104. package/dist/api/utilities/media-type.js.map +1 -0
  105. package/dist/api/utilities/packet-age-watchdog.d.ts +198 -0
  106. package/dist/api/utilities/packet-age-watchdog.js +594 -0
  107. package/dist/api/utilities/packet-age-watchdog.js.map +1 -0
  108. package/dist/api/utilities/pixel-format.d.ts +89 -0
  109. package/dist/api/utilities/pixel-format.js +97 -0
  110. package/dist/api/utilities/pixel-format.js.map +1 -0
  111. package/dist/api/utilities/sample-format.d.ts +129 -0
  112. package/dist/api/utilities/sample-format.js +141 -0
  113. package/dist/api/utilities/sample-format.js.map +1 -0
  114. package/dist/api/utilities/scale-size.d.ts +51 -0
  115. package/dist/api/utilities/scale-size.js +55 -0
  116. package/dist/api/utilities/scale-size.js.map +1 -0
  117. package/dist/api/utilities/scheduler.d.ts +138 -0
  118. package/dist/api/utilities/scheduler.js +98 -0
  119. package/dist/api/utilities/scheduler.js.map +1 -0
  120. package/dist/api/utilities/streaming.d.ts +186 -0
  121. package/dist/api/utilities/streaming.js +309 -0
  122. package/dist/api/utilities/streaming.js.map +1 -0
  123. package/dist/api/utilities/timestamp.d.ts +193 -0
  124. package/dist/api/utilities/timestamp.js +206 -0
  125. package/dist/api/utilities/timestamp.js.map +1 -0
  126. package/dist/api/utilities/video-transcode.d.ts +218 -0
  127. package/dist/api/utilities/video-transcode.js +624 -0
  128. package/dist/api/utilities/video-transcode.js.map +1 -0
  129. package/dist/api/utilities/whisper-model.d.ts +330 -0
  130. package/dist/api/utilities/whisper-model.js +587 -0
  131. package/dist/api/utilities/whisper-model.js.map +1 -0
  132. package/dist/api/utils.d.ts +19 -0
  133. package/dist/api/utils.js +39 -0
  134. package/dist/api/utils.js.map +1 -0
  135. package/dist/api/webrtc-stream.d.ts +294 -0
  136. package/dist/api/webrtc-stream.js +546 -0
  137. package/dist/api/webrtc-stream.js.map +1 -0
  138. package/dist/api/whisper.d.ts +326 -0
  139. package/dist/api/whisper.js +402 -0
  140. package/dist/api/whisper.js.map +1 -0
  141. package/dist/constants/bsf-options.d.ts +364 -0
  142. package/dist/constants/bsf-options.js +7 -0
  143. package/dist/constants/bsf-options.js.map +1 -0
  144. package/dist/constants/channel-layouts.d.ts +53 -0
  145. package/dist/constants/channel-layouts.js +57 -0
  146. package/dist/constants/channel-layouts.js.map +1 -0
  147. package/dist/constants/constants.d.ts +2435 -0
  148. package/dist/constants/constants.js +1989 -0
  149. package/dist/constants/constants.js.map +1 -0
  150. package/dist/constants/decoders.d.ts +651 -0
  151. package/dist/constants/decoders.js +641 -0
  152. package/dist/constants/decoders.js.map +1 -0
  153. package/dist/constants/encoders.d.ts +314 -0
  154. package/dist/constants/encoders.js +309 -0
  155. package/dist/constants/encoders.js.map +1 -0
  156. package/dist/constants/filter-options.d.ts +12099 -0
  157. package/dist/constants/filter-options.js +7 -0
  158. package/dist/constants/filter-options.js.map +1 -0
  159. package/dist/constants/format-options.d.ts +4319 -0
  160. package/dist/constants/format-options.js +7 -0
  161. package/dist/constants/format-options.js.map +1 -0
  162. package/dist/constants/formats.d.ts +18 -0
  163. package/dist/constants/formats.js +7 -0
  164. package/dist/constants/formats.js.map +1 -0
  165. package/dist/constants/hardware.d.ts +26 -0
  166. package/dist/constants/hardware.js +27 -0
  167. package/dist/constants/hardware.js.map +1 -0
  168. package/dist/constants/index.d.ts +10 -0
  169. package/dist/constants/index.js +6 -0
  170. package/dist/constants/index.js.map +1 -0
  171. package/dist/constants/options.d.ts +6217 -0
  172. package/dist/constants/options.js +7 -0
  173. package/dist/constants/options.js.map +1 -0
  174. package/dist/ffmpeg/index.d.ts +101 -0
  175. package/dist/ffmpeg/index.js +161 -0
  176. package/dist/ffmpeg/index.js.map +1 -0
  177. package/dist/ffmpeg/version.d.ts +6 -0
  178. package/dist/ffmpeg/version.js +7 -0
  179. package/dist/ffmpeg/version.js.map +1 -0
  180. package/dist/index.d.ts +4 -0
  181. package/dist/index.js +9 -0
  182. package/dist/index.js.map +1 -0
  183. package/dist/lib/audio-fifo.d.ts +399 -0
  184. package/dist/lib/audio-fifo.js +431 -0
  185. package/dist/lib/audio-fifo.js.map +1 -0
  186. package/dist/lib/binding.d.ts +242 -0
  187. package/dist/lib/binding.js +102 -0
  188. package/dist/lib/binding.js.map +1 -0
  189. package/dist/lib/bitstream-filter-context.d.ts +381 -0
  190. package/dist/lib/bitstream-filter-context.js +443 -0
  191. package/dist/lib/bitstream-filter-context.js.map +1 -0
  192. package/dist/lib/bitstream-filter.d.ts +140 -0
  193. package/dist/lib/bitstream-filter.js +154 -0
  194. package/dist/lib/bitstream-filter.js.map +1 -0
  195. package/dist/lib/codec-context.d.ts +1069 -0
  196. package/dist/lib/codec-context.js +1336 -0
  197. package/dist/lib/codec-context.js.map +1 -0
  198. package/dist/lib/codec-parameters.d.ts +664 -0
  199. package/dist/lib/codec-parameters.js +813 -0
  200. package/dist/lib/codec-parameters.js.map +1 -0
  201. package/dist/lib/codec-parser.d.ts +201 -0
  202. package/dist/lib/codec-parser.js +213 -0
  203. package/dist/lib/codec-parser.js.map +1 -0
  204. package/dist/lib/codec.d.ts +617 -0
  205. package/dist/lib/codec.js +746 -0
  206. package/dist/lib/codec.js.map +1 -0
  207. package/dist/lib/device.d.ts +294 -0
  208. package/dist/lib/device.js +326 -0
  209. package/dist/lib/device.js.map +1 -0
  210. package/dist/lib/dictionary.d.ts +333 -0
  211. package/dist/lib/dictionary.js +372 -0
  212. package/dist/lib/dictionary.js.map +1 -0
  213. package/dist/lib/error.d.ts +311 -0
  214. package/dist/lib/error.js +395 -0
  215. package/dist/lib/error.js.map +1 -0
  216. package/dist/lib/fifo.d.ts +416 -0
  217. package/dist/lib/fifo.js +453 -0
  218. package/dist/lib/fifo.js.map +1 -0
  219. package/dist/lib/filter-context.d.ts +714 -0
  220. package/dist/lib/filter-context.js +783 -0
  221. package/dist/lib/filter-context.js.map +1 -0
  222. package/dist/lib/filter-graph-segment.d.ts +161 -0
  223. package/dist/lib/filter-graph-segment.js +172 -0
  224. package/dist/lib/filter-graph-segment.js.map +1 -0
  225. package/dist/lib/filter-graph.d.ts +641 -0
  226. package/dist/lib/filter-graph.js +704 -0
  227. package/dist/lib/filter-graph.js.map +1 -0
  228. package/dist/lib/filter-inout.d.ts +202 -0
  229. package/dist/lib/filter-inout.js +261 -0
  230. package/dist/lib/filter-inout.js.map +1 -0
  231. package/dist/lib/filter.d.ts +243 -0
  232. package/dist/lib/filter.js +272 -0
  233. package/dist/lib/filter.js.map +1 -0
  234. package/dist/lib/format-context.d.ts +1335 -0
  235. package/dist/lib/format-context.js +1455 -0
  236. package/dist/lib/format-context.js.map +1 -0
  237. package/dist/lib/frame-utils.d.ts +116 -0
  238. package/dist/lib/frame-utils.js +98 -0
  239. package/dist/lib/frame-utils.js.map +1 -0
  240. package/dist/lib/frame.d.ts +1315 -0
  241. package/dist/lib/frame.js +1535 -0
  242. package/dist/lib/frame.js.map +1 -0
  243. package/dist/lib/hardware-device-context.d.ts +362 -0
  244. package/dist/lib/hardware-device-context.js +383 -0
  245. package/dist/lib/hardware-device-context.js.map +1 -0
  246. package/dist/lib/hardware-frames-context.d.ts +418 -0
  247. package/dist/lib/hardware-frames-context.js +471 -0
  248. package/dist/lib/hardware-frames-context.js.map +1 -0
  249. package/dist/lib/index.d.ts +35 -0
  250. package/dist/lib/index.js +60 -0
  251. package/dist/lib/index.js.map +1 -0
  252. package/dist/lib/input-format.d.ts +249 -0
  253. package/dist/lib/input-format.js +306 -0
  254. package/dist/lib/input-format.js.map +1 -0
  255. package/dist/lib/io-context.d.ts +698 -0
  256. package/dist/lib/io-context.js +771 -0
  257. package/dist/lib/io-context.js.map +1 -0
  258. package/dist/lib/log.d.ts +174 -0
  259. package/dist/lib/log.js +184 -0
  260. package/dist/lib/log.js.map +1 -0
  261. package/dist/lib/native-types.d.ts +1024 -0
  262. package/dist/lib/native-types.js +2 -0
  263. package/dist/lib/native-types.js.map +1 -0
  264. package/dist/lib/option.d.ts +953 -0
  265. package/dist/lib/option.js +1607 -0
  266. package/dist/lib/option.js.map +1 -0
  267. package/dist/lib/output-format.d.ts +222 -0
  268. package/dist/lib/output-format.js +259 -0
  269. package/dist/lib/output-format.js.map +1 -0
  270. package/dist/lib/packet.d.ts +521 -0
  271. package/dist/lib/packet.js +613 -0
  272. package/dist/lib/packet.js.map +1 -0
  273. package/dist/lib/rational.d.ts +251 -0
  274. package/dist/lib/rational.js +278 -0
  275. package/dist/lib/rational.js.map +1 -0
  276. package/dist/lib/software-resample-context.d.ts +552 -0
  277. package/dist/lib/software-resample-context.js +592 -0
  278. package/dist/lib/software-resample-context.js.map +1 -0
  279. package/dist/lib/software-scale-context.d.ts +344 -0
  280. package/dist/lib/software-scale-context.js +366 -0
  281. package/dist/lib/software-scale-context.js.map +1 -0
  282. package/dist/lib/stream.d.ts +383 -0
  283. package/dist/lib/stream.js +524 -0
  284. package/dist/lib/stream.js.map +1 -0
  285. package/dist/lib/sync-queue.d.ts +179 -0
  286. package/dist/lib/sync-queue.js +197 -0
  287. package/dist/lib/sync-queue.js.map +1 -0
  288. package/dist/lib/types.d.ts +34 -0
  289. package/dist/lib/types.js +2 -0
  290. package/dist/lib/types.js.map +1 -0
  291. package/dist/lib/utilities.d.ts +1198 -0
  292. package/dist/lib/utilities.js +1302 -0
  293. package/dist/lib/utilities.js.map +1 -0
  294. package/dist/utils/electron.d.ts +49 -0
  295. package/dist/utils/electron.js +63 -0
  296. package/dist/utils/electron.js.map +1 -0
  297. package/dist/utils/index.d.ts +6 -0
  298. package/dist/utils/index.js +7 -0
  299. package/dist/utils/index.js.map +1 -0
  300. package/dist/utils/libc.d.ts +11 -0
  301. package/dist/utils/libc.js +35 -0
  302. package/dist/utils/libc.js.map +1 -0
  303. package/dist/utils/variant.d.ts +26 -0
  304. package/dist/utils/variant.js +31 -0
  305. package/dist/utils/variant.js.map +1 -0
  306. package/dist/webrtc/index.d.ts +4 -0
  307. package/dist/webrtc/index.js +7 -0
  308. package/dist/webrtc/index.js.map +1 -0
  309. package/install/check.js +124 -0
  310. package/install/ffmpeg.js +66 -0
  311. package/package.json +165 -3
@@ -0,0 +1,471 @@
1
+ import { bindings } from './binding.js';
2
+ import { HardwareDeviceContext } from './hardware-device-context.js';
3
+ /**
4
+ * Hardware frames context for GPU memory management.
5
+ *
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.
10
+ *
11
+ * Direct mapping to FFmpeg's AVHWFramesContext.
12
+ *
13
+ * @example
14
+ * ```typescript
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';
17
+ *
18
+ * // Create hardware frames context
19
+ * const device = new HardwareDeviceContext();
20
+ * device.create(AV_HWDEVICE_TYPE_CUDA);
21
+ *
22
+ * const frames = new HardwareFramesContext();
23
+ * frames.format = AV_PIX_FMT_CUDA; // Hardware format
24
+ * frames.swFormat = AV_PIX_FMT_NV12; // Software format
25
+ * frames.width = 1920;
26
+ * frames.height = 1080;
27
+ * frames.initialPoolSize = 20; // Pre-allocate 20 frames
28
+ *
29
+ * frames.alloc(device);
30
+ * const ret = frames.init();
31
+ * FFmpegError.throwIfError(ret, 'init');
32
+ *
33
+ * // Allocate hardware frame
34
+ * const hwFrame = new Frame();
35
+ * const ret2 = frames.getBuffer(hwFrame, 0);
36
+ * FFmpegError.throwIfError(ret2, 'getBuffer');
37
+ *
38
+ * // Transfer from CPU to GPU
39
+ * const cpuFrame = new Frame();
40
+ * // ... fill cpuFrame with data ...
41
+ * await frames.transferData(hwFrame, cpuFrame);
42
+ *
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');
47
+ * ```
48
+ *
49
+ * @see [AVHWFramesContext](https://ffmpeg.org/doxygen/trunk/structAVHWFramesContext.html) - FFmpeg Doxygen
50
+ * @see {@link HardwareDeviceContext} For device management
51
+ * @see {@link Frame} For frame operations
52
+ */
53
+ export class HardwareFramesContext {
54
+ native;
55
+ constructor() {
56
+ this.native = new bindings.HardwareFramesContext();
57
+ }
58
+ /**
59
+ * Hardware pixel format.
60
+ *
61
+ * The pixel format used for frames in GPU memory.
62
+ * Hardware-specific format like AV_PIX_FMT_CUDA or AV_PIX_FMT_VAAPI.
63
+ *
64
+ * Direct mapping to AVHWFramesContext->format.
65
+ */
66
+ get format() {
67
+ return this.native.format;
68
+ }
69
+ set format(value) {
70
+ this.native.format = value;
71
+ }
72
+ /**
73
+ * Software pixel format.
74
+ *
75
+ * The pixel format frames are converted to when transferred
76
+ * to system memory. Standard format like AV_PIX_FMT_YUV420P.
77
+ *
78
+ * Direct mapping to AVHWFramesContext->sw_format.
79
+ */
80
+ get swFormat() {
81
+ return this.native.swFormat;
82
+ }
83
+ set swFormat(value) {
84
+ this.native.swFormat = value;
85
+ }
86
+ /**
87
+ * Frame width.
88
+ *
89
+ * Width of frames in pixels.
90
+ *
91
+ * Direct mapping to AVHWFramesContext->width.
92
+ */
93
+ get width() {
94
+ return this.native.width;
95
+ }
96
+ set width(value) {
97
+ this.native.width = value;
98
+ }
99
+ /**
100
+ * Frame height.
101
+ *
102
+ * Height of frames in pixels.
103
+ *
104
+ * Direct mapping to AVHWFramesContext->height.
105
+ */
106
+ get height() {
107
+ return this.native.height;
108
+ }
109
+ set height(value) {
110
+ this.native.height = value;
111
+ }
112
+ /**
113
+ * Initial pool size.
114
+ *
115
+ * Number of frames to pre-allocate in the pool.
116
+ * Set before calling init() for optimal performance.
117
+ *
118
+ * Direct mapping to AVHWFramesContext->initial_pool_size.
119
+ */
120
+ get initialPoolSize() {
121
+ return this.native.initialPoolSize;
122
+ }
123
+ set initialPoolSize(value) {
124
+ this.native.initialPoolSize = value;
125
+ }
126
+ /**
127
+ * Associated hardware device.
128
+ *
129
+ * Reference to the device context this frames context belongs to.
130
+ * Automatically set when calling alloc().
131
+ *
132
+ * Direct mapping to AVHWFramesContext->device_ref.
133
+ */
134
+ get deviceRef() {
135
+ // Not cached: device_ref is unset before alloc(), and the native wrapper holds
136
+ // its own AVBufferRef, so a fresh wrapper per access is safe
137
+ const native = this.native.deviceRef;
138
+ if (!native) {
139
+ return null;
140
+ }
141
+ const device = Object.create(HardwareDeviceContext.prototype);
142
+ device.native = native;
143
+ return device;
144
+ }
145
+ /**
146
+ * Allocate hardware frames context.
147
+ *
148
+ * Allocates the frames context and associates it with a device.
149
+ * Must be called before init().
150
+ *
151
+ * Direct mapping to av_hwframe_ctx_alloc().
152
+ *
153
+ * @param device - Hardware device context to use
154
+ *
155
+ * @throws {Error} If allocation fails (ENOMEM)
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * import { AV_PIX_FMT_CUDA, AV_PIX_FMT_NV12 } from 'node-av/constants';
160
+ *
161
+ * const frames = new HardwareFramesContext();
162
+ * frames.format = AV_PIX_FMT_CUDA;
163
+ * frames.swFormat = AV_PIX_FMT_NV12;
164
+ * frames.width = 1920;
165
+ * frames.height = 1080;
166
+ * frames.alloc(device);
167
+ * ```
168
+ *
169
+ * @see {@link init} To initialize after allocation
170
+ */
171
+ alloc(device) {
172
+ this.native.alloc(device.getNative());
173
+ }
174
+ /**
175
+ * Initialize hardware frames context.
176
+ *
177
+ * Initializes the frame pool after configuration.
178
+ * Must be called after alloc() and property setup.
179
+ *
180
+ * Direct mapping to av_hwframe_ctx_init().
181
+ *
182
+ * @returns 0 on success, negative AVERROR on error:
183
+ * - AVERROR_EINVAL: Invalid parameters
184
+ * - AVERROR_ENOMEM: Memory allocation failure
185
+ * - AVERROR_ENOSYS: Operation not supported
186
+ * - Hardware-specific errors
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * import { FFmpegError } from 'node-av';
191
+ *
192
+ * frames.alloc(device);
193
+ * const ret = frames.init();
194
+ * FFmpegError.throwIfError(ret, 'init');
195
+ * ```
196
+ *
197
+ * @see {@link alloc} Must be called first
198
+ */
199
+ init() {
200
+ return this.native.init();
201
+ }
202
+ /**
203
+ * Free hardware frames context.
204
+ *
205
+ * Releases all frames and resources associated with the context.
206
+ * The context becomes invalid after calling this.
207
+ *
208
+ * Direct mapping to av_buffer_unref() on frames context.
209
+ *
210
+ * @example
211
+ * ```typescript
212
+ * frames.free();
213
+ * // Frames context is now invalid
214
+ * ```
215
+ *
216
+ * @see {@link Symbol.dispose} For automatic cleanup
217
+ */
218
+ free() {
219
+ this.native.free();
220
+ }
221
+ /**
222
+ * Allocate hardware frame from pool.
223
+ *
224
+ * Gets a frame from the hardware frame pool.
225
+ * The frame will have hardware-backed storage.
226
+ *
227
+ * Direct mapping to av_hwframe_get_buffer().
228
+ *
229
+ * @param frame - Frame to allocate buffer for
230
+ *
231
+ * @param flags - Allocation flags (usually 0)
232
+ *
233
+ * @returns 0 on success, negative AVERROR on error:
234
+ * - AVERROR_ENOMEM: No frames available in pool
235
+ * - AVERROR_EINVAL: Invalid parameters
236
+ *
237
+ * @example
238
+ * ```typescript
239
+ * import { Frame, FFmpegError } from 'node-av';
240
+ *
241
+ * const hwFrame = new Frame();
242
+ * const ret = frames.getBuffer(hwFrame, 0);
243
+ * FFmpegError.throwIfError(ret, 'getBuffer');
244
+ * // hwFrame now has GPU memory allocated
245
+ * ```
246
+ *
247
+ * @see {@link transferData} To upload data to hardware frame
248
+ */
249
+ getBuffer(frame, flags) {
250
+ return this.native.getBuffer(frame.getNative(), flags ?? 0);
251
+ }
252
+ /**
253
+ * Transfer data between hardware and system memory.
254
+ *
255
+ * Copies frame data between GPU and CPU memory.
256
+ * Direction is determined by frame types.
257
+ *
258
+ * Direct mapping to av_hwframe_transfer_data().
259
+ *
260
+ * @param dst - Destination frame
261
+ *
262
+ * @param src - Source frame
263
+ *
264
+ * @param flags - Transfer flags (usually 0)
265
+ *
266
+ * @returns 0 on success, negative AVERROR on error:
267
+ * - AVERROR_EINVAL: Invalid parameters
268
+ * - AVERROR_ENOSYS: Transfer not supported
269
+ * - AVERROR_ENOMEM: Memory allocation failure
270
+ *
271
+ * @example
272
+ * ```typescript
273
+ * import { FFmpegError } from 'node-av';
274
+ *
275
+ * // Upload: CPU -> GPU
276
+ * const cpuFrame = new Frame();
277
+ * // ... fill cpuFrame with data ...
278
+ * const hwFrame = new Frame();
279
+ * frames.getBuffer(hwFrame, 0);
280
+ * const ret = await frames.transferData(hwFrame, cpuFrame);
281
+ * FFmpegError.throwIfError(ret, 'transferData');
282
+ *
283
+ * // Download: GPU -> CPU
284
+ * const downloadFrame = new Frame();
285
+ * const ret2 = await frames.transferData(downloadFrame, hwFrame);
286
+ * FFmpegError.throwIfError(ret2, 'transferData');
287
+ * ```
288
+ *
289
+ * @see {@link getBuffer} To allocate hardware frame
290
+ * @see {@link map} For zero-copy access
291
+ */
292
+ async transferData(dst, src, flags) {
293
+ return await this.native.transferData(dst.getNative(), src.getNative(), flags ?? 0);
294
+ }
295
+ /**
296
+ * Transfer frame between hardware and system memory synchronously.
297
+ * Synchronous version of transferData.
298
+ *
299
+ * Copies frame data between GPU and CPU memory.
300
+ * Direction depends on frame types (hardware vs software).
301
+ *
302
+ * Direct mapping to av_hwframe_transfer_data().
303
+ *
304
+ * @param dst - Destination frame
305
+ *
306
+ * @param src - Source frame
307
+ *
308
+ * @param flags - Transfer flags (currently unused, pass 0)
309
+ *
310
+ * @returns 0 on success, negative AVERROR on error:
311
+ * - AVERROR_EINVAL: Invalid frames
312
+ * - AVERROR_ENOSYS: Operation not supported
313
+ * - AVERROR_ENOMEM: Memory allocation failure
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * import { Frame, FFmpegError } from 'node-av';
318
+ *
319
+ * // Download from GPU to CPU
320
+ * const cpuFrame = new Frame();
321
+ * cpuFrame.format = frames.swFormat;
322
+ * cpuFrame.width = frames.width;
323
+ * cpuFrame.height = frames.height;
324
+ * cpuFrame.allocBuffer();
325
+ *
326
+ * const ret = frames.transferDataSync(cpuFrame, hwFrame);
327
+ * FFmpegError.throwIfError(ret, 'transferDataSync');
328
+ *
329
+ * // Upload from CPU to GPU
330
+ * const ret2 = frames.transferDataSync(hwFrame, cpuFrame);
331
+ * FFmpegError.throwIfError(ret2, 'transferDataSync');
332
+ * ```
333
+ *
334
+ * @see {@link transferData} For async version
335
+ */
336
+ transferDataSync(dst, src, flags) {
337
+ return this.native.transferDataSync(dst.getNative(), src.getNative(), flags ?? 0);
338
+ }
339
+ /**
340
+ * Get supported transfer formats.
341
+ *
342
+ * Returns pixel formats supported for frame transfer
343
+ * in the specified direction.
344
+ *
345
+ * Direct mapping to av_hwframe_transfer_get_formats().
346
+ *
347
+ * @param direction - Transfer direction (FROM/TO hardware)
348
+ *
349
+ * @returns Array of supported formats, or error code:
350
+ * - AVERROR_ENOSYS: Query not supported
351
+ * - AVERROR_ENOMEM: Memory allocation failure
352
+ *
353
+ * @example
354
+ * ```typescript
355
+ * import { AV_HWFRAME_TRANSFER_DIRECTION_FROM } from 'node-av/constants';
356
+ *
357
+ * const formats = frames.transferGetFormats(AV_HWFRAME_TRANSFER_DIRECTION_FROM);
358
+ * if (Array.isArray(formats)) {
359
+ * console.log('Supported download formats:', formats);
360
+ * } else {
361
+ * console.error('Error querying formats:', formats);
362
+ * }
363
+ * ```
364
+ */
365
+ transferGetFormats(direction) {
366
+ return this.native.transferGetFormats(direction);
367
+ }
368
+ /**
369
+ * Map hardware frame to system memory.
370
+ *
371
+ * Creates a mapping of hardware frame data accessible from CPU.
372
+ * More efficient than transferData() for read-only access.
373
+ *
374
+ * Direct mapping to av_hwframe_map().
375
+ *
376
+ * @param dst - Destination frame for mapped data
377
+ *
378
+ * @param src - Hardware frame to map
379
+ *
380
+ * @param flags - Mapping flags (AV_HWFRAME_MAP_*)
381
+ *
382
+ * @returns 0 on success, negative AVERROR on error:
383
+ * - AVERROR_EINVAL: Invalid parameters
384
+ * - AVERROR_ENOSYS: Mapping not supported
385
+ *
386
+ * @example
387
+ * ```typescript
388
+ * import { FFmpegError } from 'node-av';
389
+ * import { AV_HWFRAME_MAP_READ } from 'node-av/constants';
390
+ *
391
+ * const mappedFrame = new Frame();
392
+ * const ret = frames.map(mappedFrame, hwFrame, AV_HWFRAME_MAP_READ);
393
+ * FFmpegError.throwIfError(ret, 'map');
394
+ * // Can now read hwFrame data through mappedFrame
395
+ * ```
396
+ *
397
+ * @see {@link transferData} For full data copy
398
+ */
399
+ map(dst, src, flags) {
400
+ return this.native.map(dst.getNative(), src.getNative(), flags ?? 0);
401
+ }
402
+ /**
403
+ * Create derived frames context.
404
+ *
405
+ * Creates a new frames context derived from another,
406
+ * potentially on a different device.
407
+ *
408
+ * Direct mapping to av_hwframe_ctx_create_derived().
409
+ *
410
+ * @param format - Pixel format for derived frames
411
+ *
412
+ * @param derivedDevice - Target device context
413
+ *
414
+ * @param source - Source frames context
415
+ *
416
+ * @param flags - Creation flags
417
+ *
418
+ * @returns 0 on success, negative AVERROR on error:
419
+ * - AVERROR_EINVAL: Invalid parameters
420
+ * - AVERROR_ENOSYS: Derivation not supported
421
+ * - AVERROR_ENOMEM: Memory allocation failure
422
+ *
423
+ * @example
424
+ * ```typescript
425
+ * import { FFmpegError } from 'node-av';
426
+ * import { AV_PIX_FMT_VULKAN } from 'node-av/constants';
427
+ *
428
+ * const derivedFrames = new HardwareFramesContext();
429
+ * const ret = derivedFrames.createDerived(
430
+ * AV_PIX_FMT_VULKAN,
431
+ * vulkanDevice,
432
+ * cudaFrames,
433
+ * 0
434
+ * );
435
+ * FFmpegError.throwIfError(ret, 'createDerived');
436
+ * ```
437
+ */
438
+ createDerived(format, derivedDevice, source, flags) {
439
+ return this.native.createDerived(format, derivedDevice.getNative(), source.native, flags ?? 0);
440
+ }
441
+ /**
442
+ * Get the underlying native HardwareFramesContext object.
443
+ *
444
+ * @returns The native HardwareFramesContext binding object
445
+ *
446
+ * @internal
447
+ */
448
+ getNative() {
449
+ return this.native;
450
+ }
451
+ /**
452
+ * Dispose of the hardware frames context.
453
+ *
454
+ * Implements the Disposable interface for automatic cleanup.
455
+ * Equivalent to calling free().
456
+ *
457
+ * @example
458
+ * ```typescript
459
+ * {
460
+ * using frames = new HardwareFramesContext();
461
+ * frames.alloc(device);
462
+ * frames.init();
463
+ * // Use frames...
464
+ * } // Automatically freed when leaving scope
465
+ * ```
466
+ */
467
+ [Symbol.dispose]() {
468
+ this.native[Symbol.dispose]();
469
+ }
470
+ }
471
+ //# sourceMappingURL=hardware-frames-context.js.map
@@ -0,0 +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,c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;;;;;;;;;;;;;;OAwCG;IACH,gBAAgB,CAAC,GAAU,EAAE,GAAU,EAAE,KAAc;QACrD,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kBAAkB,CAAC,SAAqC;QACtD,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;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"}
@@ -0,0 +1,35 @@
1
+ export type * from './types.js';
2
+ export { FormatContext, type RTSPStreamInfo } from './format-context.js';
3
+ export { CodecContext } from './codec-context.js';
4
+ export { CodecParameters } from './codec-parameters.js';
5
+ export { Codec, type CodecProfile } from './codec.js';
6
+ export { CodecParser } from './codec-parser.js';
7
+ export { Packet } from './packet.js';
8
+ export { Frame, type AudioFrame, type D3D11TextureFrame, type DmaBufFrame, type DmaBufPlanes, type IOSurfaceFrame, type NSImageFrame, type VideoFrame } from './frame.js';
9
+ export { Stream } from './stream.js';
10
+ export { InputFormat } from './input-format.js';
11
+ export { OutputFormat } from './output-format.js';
12
+ export { HardwareDeviceContext } from './hardware-device-context.js';
13
+ export { HardwareFramesContext } from './hardware-frames-context.js';
14
+ export { SoftwareScaleContext } from './software-scale-context.js';
15
+ export { SoftwareResampleContext } from './software-resample-context.js';
16
+ export { AudioFifo } from './audio-fifo.js';
17
+ export { Fifo } from './fifo.js';
18
+ export { FrameUtils, type ImageCrop, type ImageFormat, type ImageOptions, type ImageOutputFormat, type ImageResize } from './frame-utils.js';
19
+ export { IOContext } from './io-context.js';
20
+ export { Dictionary } from './dictionary.js';
21
+ export { Option, OptionInfo, type OptionMember } from './option.js';
22
+ export { SyncQueue, SyncQueueType } from './sync-queue.js';
23
+ export { FilterContext } from './filter-context.js';
24
+ export { FilterGraphSegment } from './filter-graph-segment.js';
25
+ export { FilterGraph } from './filter-graph.js';
26
+ export { FilterInOut } from './filter-inout.js';
27
+ export { Filter, type FilterPad } from './filter.js';
28
+ export { BitStreamFilterContext } from './bitstream-filter-context.js';
29
+ export { BitStreamFilter } from './bitstream-filter.js';
30
+ export { Rational } from './rational.js';
31
+ export { Log, type LogOptions } from './log.js';
32
+ export { Device, type AudioDeviceInfo, type AudioDeviceMode, type BaseDeviceInfo, type DeviceInfo, type DeviceMode, type ScreenBounds, type ScreenDeviceInfo, type VideoDeviceInfo, } from './device.js';
33
+ export { FFmpegError, PosixError } from './error.js';
34
+ export * from './utilities.js';
35
+ export type { OptionCapableObject } from './binding.js';
@@ -0,0 +1,60 @@
1
+ // Format Context
2
+ export { FormatContext } from './format-context.js';
3
+ // Codec Context
4
+ export { CodecContext } from './codec-context.js';
5
+ // Codec Parameters
6
+ export { CodecParameters } from './codec-parameters.js';
7
+ // Codec
8
+ export { Codec } from './codec.js';
9
+ // Codec Parser
10
+ export { CodecParser } from './codec-parser.js';
11
+ // Packet
12
+ export { Packet } from './packet.js';
13
+ // Frame
14
+ export { Frame } from './frame.js';
15
+ // Stream
16
+ export { Stream } from './stream.js';
17
+ // Input/Output Format
18
+ export { InputFormat } from './input-format.js';
19
+ export { OutputFormat } from './output-format.js';
20
+ // Hardware related classes
21
+ export { HardwareDeviceContext } from './hardware-device-context.js';
22
+ export { HardwareFramesContext } from './hardware-frames-context.js';
23
+ // Software Scale
24
+ export { SoftwareScaleContext } from './software-scale-context.js';
25
+ // Software Resample
26
+ export { SoftwareResampleContext } from './software-resample-context.js';
27
+ // Audio FIFO
28
+ export { AudioFifo } from './audio-fifo.js';
29
+ // Generic FIFO
30
+ export { Fifo } from './fifo.js';
31
+ // Frame Utils
32
+ export { FrameUtils } from './frame-utils.js';
33
+ // I/O Context
34
+ export { IOContext } from './io-context.js';
35
+ // Dictionary
36
+ export { Dictionary } from './dictionary.js';
37
+ // Option
38
+ export { Option, OptionInfo } from './option.js';
39
+ // Sync Queue
40
+ export { SyncQueue, SyncQueueType } from './sync-queue.js';
41
+ // Filter related classes
42
+ export { FilterContext } from './filter-context.js';
43
+ export { FilterGraphSegment } from './filter-graph-segment.js';
44
+ export { FilterGraph } from './filter-graph.js';
45
+ export { FilterInOut } from './filter-inout.js';
46
+ export { Filter } from './filter.js';
47
+ // Bitstream Filter related classes
48
+ export { BitStreamFilterContext } from './bitstream-filter-context.js';
49
+ export { BitStreamFilter } from './bitstream-filter.js';
50
+ // Utils
51
+ export { Rational } from './rational.js';
52
+ // Logging
53
+ export { Log } from './log.js';
54
+ // Device
55
+ export { Device, } from './device.js';
56
+ // Error handling
57
+ export { FFmpegError, PosixError } from './error.js';
58
+ // Utilities
59
+ export * from './utilities.js';
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1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