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.
- package/CMakeLists.txt +10 -3
- package/README.md +1097 -0
- package/binding.cc +3330 -0
- package/cmake/ports/ffmpeg/port.cmake +513 -0
- package/cmake/ports/opus/patches/01-windows-clang.patch +52 -0
- package/cmake/ports/opus/port.cmake +42 -0
- package/cmake/ports/svt-av1/port.cmake +42 -0
- package/cmake/ports/x264/patches/01-windows-clang.patch +33 -0
- package/cmake/ports/x264/port.cmake +157 -0
- package/index.js +14 -4
- package/lib/audio-fifo.js +47 -0
- package/lib/channel-layout.js +35 -0
- package/lib/codec-context.js +92 -15
- package/lib/codec-parameters.js +230 -8
- package/lib/codec.js +19 -0
- package/lib/constants.js +163 -8
- package/lib/dictionary.js +18 -15
- package/lib/errors.js +38 -0
- package/lib/format-context.js +62 -31
- package/lib/frame.js +87 -16
- package/lib/image.js +22 -0
- package/lib/input-format.js +8 -3
- package/lib/io-context.js +29 -6
- package/lib/log.js +16 -0
- package/lib/output-format.js +4 -0
- package/lib/packet.js +88 -13
- package/lib/rational.js +35 -1
- package/lib/resampler.js +63 -0
- package/lib/samples.js +49 -0
- package/lib/scaler.js +8 -7
- package/lib/stream.js +37 -12
- package/package.json +7 -4
- package/prebuilds/android-arm/bare-ffmpeg.bare +0 -0
- package/prebuilds/android-arm64/bare-ffmpeg.bare +0 -0
- package/prebuilds/android-ia32/bare-ffmpeg.bare +0 -0
- package/prebuilds/android-x64/bare-ffmpeg.bare +0 -0
- package/prebuilds/darwin-arm64/bare-ffmpeg.bare +0 -0
- package/prebuilds/darwin-x64/bare-ffmpeg.bare +0 -0
- package/prebuilds/ios-arm64/bare-ffmpeg.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-ffmpeg.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-ffmpeg.bare +0 -0
- package/prebuilds/linux-arm64/bare-ffmpeg.bare +0 -0
- package/prebuilds/linux-x64/bare-ffmpeg.bare +0 -0
- package/prebuilds/win32-arm64/bare-ffmpeg.bare +0 -0
- package/prebuilds/win32-x64/bare-ffmpeg.bare +0 -0
- package/binding.c +0 -2128
- package/lib/reference-counted.js +0 -39
package/lib/reference-counted.js
DELETED
|
@@ -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
|
-
}
|