bare-ffmpeg 1.0.0-2 → 1.0.0-21

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 (47) hide show
  1. package/CMakeLists.txt +10 -3
  2. package/README.md +1097 -0
  3. package/binding.cc +3330 -0
  4. package/cmake/ports/ffmpeg/port.cmake +513 -0
  5. package/cmake/ports/opus/patches/01-windows-clang.patch +52 -0
  6. package/cmake/ports/opus/port.cmake +42 -0
  7. package/cmake/ports/svt-av1/port.cmake +42 -0
  8. package/cmake/ports/x264/patches/01-windows-clang.patch +33 -0
  9. package/cmake/ports/x264/port.cmake +157 -0
  10. package/index.js +14 -4
  11. package/lib/audio-fifo.js +47 -0
  12. package/lib/channel-layout.js +35 -0
  13. package/lib/codec-context.js +92 -15
  14. package/lib/codec-parameters.js +230 -8
  15. package/lib/codec.js +19 -0
  16. package/lib/constants.js +163 -8
  17. package/lib/dictionary.js +18 -15
  18. package/lib/errors.js +38 -0
  19. package/lib/format-context.js +62 -31
  20. package/lib/frame.js +87 -16
  21. package/lib/image.js +22 -0
  22. package/lib/input-format.js +8 -3
  23. package/lib/io-context.js +29 -6
  24. package/lib/log.js +16 -0
  25. package/lib/output-format.js +4 -0
  26. package/lib/packet.js +88 -13
  27. package/lib/rational.js +35 -1
  28. package/lib/resampler.js +63 -0
  29. package/lib/samples.js +49 -0
  30. package/lib/scaler.js +8 -7
  31. package/lib/stream.js +37 -12
  32. package/package.json +7 -4
  33. package/prebuilds/android-arm/bare-ffmpeg.bare +0 -0
  34. package/prebuilds/android-arm64/bare-ffmpeg.bare +0 -0
  35. package/prebuilds/android-ia32/bare-ffmpeg.bare +0 -0
  36. package/prebuilds/android-x64/bare-ffmpeg.bare +0 -0
  37. package/prebuilds/darwin-arm64/bare-ffmpeg.bare +0 -0
  38. package/prebuilds/darwin-x64/bare-ffmpeg.bare +0 -0
  39. package/prebuilds/ios-arm64/bare-ffmpeg.bare +0 -0
  40. package/prebuilds/ios-arm64-simulator/bare-ffmpeg.bare +0 -0
  41. package/prebuilds/ios-x64-simulator/bare-ffmpeg.bare +0 -0
  42. package/prebuilds/linux-arm64/bare-ffmpeg.bare +0 -0
  43. package/prebuilds/linux-x64/bare-ffmpeg.bare +0 -0
  44. package/prebuilds/win32-arm64/bare-ffmpeg.bare +0 -0
  45. package/prebuilds/win32-x64/bare-ffmpeg.bare +0 -0
  46. package/binding.c +0 -2128
  47. package/lib/reference-counted.js +0 -39
@@ -1,39 +0,0 @@
1
- module.exports = class FFmpegReferenceCounted {
2
- constructor() {
3
- this._refs = 0
4
- this._destroyed = false
5
- }
6
-
7
- _ref() {
8
- if (this._destroyed === false) this._refs++
9
- return this
10
- }
11
-
12
- _unref() {
13
- if (this._refs === 0) {
14
- throw new Error('Cannot unreference object with no active references')
15
- }
16
-
17
- if (--this._refs === 0 && this._destroyed === true) this._destroy()
18
- return this
19
- }
20
-
21
- _destroy() {}
22
-
23
- destroy() {
24
- if (this._refs !== 0) {
25
- throw new Error('Cannot destroy object with active references')
26
- }
27
-
28
- if (this._destroyed === true) {
29
- throw new Error('Object has already been destroyed')
30
- }
31
-
32
- this._destroyed = true
33
- this._destroy()
34
- }
35
-
36
- [Symbol.dispose]() {
37
- this.destroy()
38
- }
39
- }