From 05dd12fbcd05927c64a92c70b0252819abe75e3f Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 16 Aug 2024 09:48:52 -0400 Subject: [PATCH 01/17] Revert "I give up on libvpx in tests" This reverts commit 3c6dbc6e8a87edeef9a13f481bf64ec40acfcb0e. --- tests/tests/611-transcode-video.js | 11 ++++++++--- tests/tests/650-all-to-all.js | 7 +++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/tests/611-transcode-video.js b/tests/tests/611-transcode-video.js index 2a96c20f..c0384415 100644 --- a/tests/tests/611-transcode-video.js +++ b/tests/tests/611-transcode-video.js @@ -49,17 +49,22 @@ await libav.avformat_close_input_js(fmt_ctx); let codec; [codec, c, frame, pkt] = - await libav.ff_init_encoder("libopenh264", { + await libav.ff_init_encoder("libvpx", { ctx: { bit_rate: 10000000, pix_fmt: frames[0].format, width: frames[0].width, height: frames[0].height + }, + options: { + "quality": "good", + "cpu-used": "0", + "deadline": "0" } }); const [oc, fmt, pb, st] = await libav.ff_init_muxer( - {filename: "tmp.mkv", open: true}, [[c, 1, 1000]]); + {filename: "tmp.webm", open: true}, [[c, 1, 1000]]); await libav.avformat_write_header(oc, 0); @@ -73,4 +78,4 @@ await libav.av_write_trailer(oc); await libav.ff_free_muxer(oc, pb); await libav.ff_free_encoder(c, frame, pkt); -await h.utils.compareVideo("bbb.webm", "tmp.mkv"); +await h.utils.compareVideo("bbb.webm", "tmp.webm"); diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index c5c2de77..6aee8ae6 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -30,7 +30,6 @@ const formatCodecs = { "mpegts": mp4, "rawvideo": ["rawvideo", null, {nocheck: true}], "wav": [null, "pcm_s16le"], - "webm": [null, "libopus"], "wv": [null, "wavpack"] }; @@ -124,8 +123,8 @@ for (const cv of encoders.video) { if (!h.options.includeSlow) break; - // Even in slow-mode, skip VP8, VP9 and AV1, because they're just too slow! - if (cv === "libvpx" || cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") + // Even in slow-mode, skip VP9 and AV1, because they're just too slow! + if (cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") continue; // Transcode this @@ -182,7 +181,7 @@ for (const f of formats) { video = fc[0]; audio = fc[1]; } else { - video = "libopenh264"; + video = "libvpx"; audio = "libopus"; } From 213eb36c0548fd95371279e61d5991470d84070d Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 16 Aug 2024 09:49:02 -0400 Subject: [PATCH 02/17] Revert "Will *this* make libvpx work on github?" This reverts commit f9b4bc5df622b70f38daf08e8ed72fda3ad0d9a1. --- tests/tests/611-transcode-video.js | 5 ----- tests/tests/650-all-to-all.js | 7 ++++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/tests/611-transcode-video.js b/tests/tests/611-transcode-video.js index c0384415..b8546b74 100644 --- a/tests/tests/611-transcode-video.js +++ b/tests/tests/611-transcode-video.js @@ -55,11 +55,6 @@ let codec; pix_fmt: frames[0].format, width: frames[0].width, height: frames[0].height - }, - options: { - "quality": "good", - "cpu-used": "0", - "deadline": "0" } }); diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index 6aee8ae6..aa0fccc2 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -127,6 +127,10 @@ for (const cv of encoders.video) { if (cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") continue; + // We skip libvpx because its default is time-sensitive + if (cv === "libvpx") + continue; + // Transcode this h.printStatus(`-c:v ${cv}`); let format = codecFormats[cv]; @@ -138,9 +142,6 @@ for (const cv of encoders.video) { "-i", "bbb.webm", "-map", "0:v", "-c:v", cv, - "-quality", "good", - "-cpu-used", "0", - "-deadline", "0", "-b:v", "10M", "-y", out); if (ret !== 0) From 2b49c1aa16e92f484d1f4a66429cb2a22008eb14 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 16 Aug 2024 11:51:04 -0400 Subject: [PATCH 03/17] Nixing libvpx properly for github testing --- tests/tests/611-transcode-video.js | 6 +++--- tests/tests/650-all-to-all.js | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/tests/611-transcode-video.js b/tests/tests/611-transcode-video.js index b8546b74..d93c4e2c 100644 --- a/tests/tests/611-transcode-video.js +++ b/tests/tests/611-transcode-video.js @@ -49,7 +49,7 @@ await libav.avformat_close_input_js(fmt_ctx); let codec; [codec, c, frame, pkt] = - await libav.ff_init_encoder("libvpx", { + await libav.ff_init_encoder("libopenh264", { ctx: { bit_rate: 10000000, pix_fmt: frames[0].format, @@ -59,7 +59,7 @@ let codec; }); const [oc, fmt, pb, st] = await libav.ff_init_muxer( - {filename: "tmp.webm", open: true}, [[c, 1, 1000]]); + {filename: "tmp.mp4", open: true}, [[c, 1, 1000]]); await libav.avformat_write_header(oc, 0); @@ -73,4 +73,4 @@ await libav.av_write_trailer(oc); await libav.ff_free_muxer(oc, pb); await libav.ff_free_encoder(c, frame, pkt); -await h.utils.compareVideo("bbb.webm", "tmp.webm"); +await h.utils.compareVideo("bbb.webm", "tmp.mp4"); diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index aa0fccc2..6d9eda55 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -28,8 +28,10 @@ const formatCodecs = { "mp3": [null, "libmp3lame"], "mp4": mp4, "mpegts": mp4, + "ogg": [null, "libopus"], "rawvideo": ["rawvideo", null, {nocheck: true}], "wav": [null, "pcm_s16le"], + "webm": [null, null], "wv": [null, "wavpack"] }; @@ -123,12 +125,8 @@ for (const cv of encoders.video) { if (!h.options.includeSlow) break; - // Even in slow-mode, skip VP9 and AV1, because they're just too slow! - if (cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") - continue; - - // We skip libvpx because its default is time-sensitive - if (cv === "libvpx") + // Even in slow-mode, skip VP8, VP9, and AV1, because they're just too slow! + if (cv === "libvpx" || cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") continue; // Transcode this @@ -182,7 +180,7 @@ for (const f of formats) { video = fc[0]; audio = fc[1]; } else { - video = "libvpx"; + video = "libopenh264"; audio = "libopus"; } From 0bb68b0f26f37ea2c3a8a7fe1965e9735b0ce274 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 16 Aug 2024 21:41:09 -0400 Subject: [PATCH 04/17] Problem with libvpx diagnosed, worked around (sort of) --- .github/workflows/build-and-test.yaml | 3 ++- mk/libvpx.mk | 1 + tests/tests/611-transcode-video.js | 6 +++--- tests/tests/650-all-to-all.js | 8 +++----- tools/libvpx-emcc-version-check.sh | 27 +++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 9 deletions(-) create mode 100755 tools/libvpx-emcc-version-check.sh diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 7e7570ba..eb11b464 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -14,7 +14,8 @@ jobs: - uses: mymindstorm/setup-emsdk@v12 with: - version: 3.1.60 + # Versions beyond 3.1.50 currently build bad libvpx + version: 3.1.50 actions-cache-folder: 'cache-emsdk' - uses: actions/cache@v3 diff --git a/mk/libvpx.mk b/mk/libvpx.mk index 72341e62..63dd4130 100644 --- a/mk/libvpx.mk +++ b/mk/libvpx.mk @@ -12,6 +12,7 @@ build/inst/%/lib/pkgconfig/vpx.pc: build/libvpx-$(LIBVPX_VERSION)/build-%/Makefi $(MAKE) install build/libvpx-$(LIBVPX_VERSION)/build-%/Makefile: build/libvpx-$(LIBVPX_VERSION)/configure | build/inst/%/cflags.txt + tools/libvpx-emcc-version-check.sh mkdir -p build/libvpx-$(LIBVPX_VERSION)/build-$* cd build/libvpx-$(LIBVPX_VERSION)/build-$* && \ emconfigure ../../libvpx-$(LIBVPX_VERSION)/configure \ diff --git a/tests/tests/611-transcode-video.js b/tests/tests/611-transcode-video.js index d93c4e2c..b8546b74 100644 --- a/tests/tests/611-transcode-video.js +++ b/tests/tests/611-transcode-video.js @@ -49,7 +49,7 @@ await libav.avformat_close_input_js(fmt_ctx); let codec; [codec, c, frame, pkt] = - await libav.ff_init_encoder("libopenh264", { + await libav.ff_init_encoder("libvpx", { ctx: { bit_rate: 10000000, pix_fmt: frames[0].format, @@ -59,7 +59,7 @@ let codec; }); const [oc, fmt, pb, st] = await libav.ff_init_muxer( - {filename: "tmp.mp4", open: true}, [[c, 1, 1000]]); + {filename: "tmp.webm", open: true}, [[c, 1, 1000]]); await libav.avformat_write_header(oc, 0); @@ -73,4 +73,4 @@ await libav.av_write_trailer(oc); await libav.ff_free_muxer(oc, pb); await libav.ff_free_encoder(c, frame, pkt); -await h.utils.compareVideo("bbb.webm", "tmp.mp4"); +await h.utils.compareVideo("bbb.webm", "tmp.webm"); diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index 6d9eda55..2fb0f138 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -15,7 +15,7 @@ // Convert between all (viable) formats and test that they all work -const mp4 = ["libopenh264", "aac"]; +const mp4 = ["libvpx", "aac"]; const formatCodecs = { "adts": [null, null], "f32le": [null, "pcm_f32le", {nocheck: true}], @@ -28,10 +28,8 @@ const formatCodecs = { "mp3": [null, "libmp3lame"], "mp4": mp4, "mpegts": mp4, - "ogg": [null, "libopus"], "rawvideo": ["rawvideo", null, {nocheck: true}], "wav": [null, "pcm_s16le"], - "webm": [null, null], "wv": [null, "wavpack"] }; @@ -125,8 +123,8 @@ for (const cv of encoders.video) { if (!h.options.includeSlow) break; - // Even in slow-mode, skip VP8, VP9, and AV1, because they're just too slow! - if (cv === "libvpx" || cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") + // Even in slow-mode, skip VP9, and AV1, because they're just too slow! + if (cv === "libvpx-vp9" || cv === "libaom-av1" || cv === "libsvtav1") continue; // Transcode this diff --git a/tools/libvpx-emcc-version-check.sh b/tools/libvpx-emcc-version-check.sh new file mode 100755 index 00000000..260275b0 --- /dev/null +++ b/tools/libvpx-emcc-version-check.sh @@ -0,0 +1,27 @@ +#!/bin/sh +EMCC_VERSION="$(emcc --version | head -n 1 | sed 's/^emcc ([^)]*) \([0-9\.]*\).*/\1/')" +MAJOR="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/')" +MINOR="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/')" +REV="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/')" + +BAD=no +if [ "$MAJOR" != 3 ] +then + BAD=yes +elif [ "$MINOR" -gt 1 ] +then + BAD=yes +elif [ "$REV" -gt 50 ] +then + BAD=yes +fi + +if [ "$BAD" = "yes" ] +then + # libvpx with > 3.1.50 produces a working build, but nasty, broken output. + # Test 611 shows the issue. + echo 'libvpx is known to compile incorrectly with emcc versions > 3.1.50. Please downgrade.' + exit 1 +fi + +exit 0 From ee8611abe24f37cdd5a111ece5caf541d6914e73 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 16 Aug 2024 22:43:42 -0400 Subject: [PATCH 05/17] Missing mkdir --- Makefile | 1 + Makefile.m4 | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile b/Makefile index cdefdeec..71b09356 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,7 @@ dist/libav-%.dbg.mjs: dist/libav-$(LIBAVJS_VERSION)-%.dbg.mjs dist/libav.types.d.ts: build/libav.types.d.ts + mkdir -p dist cp $< $@ # General build rule for any target diff --git a/Makefile.m4 b/Makefile.m4 index e3421d91..b13abcde 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -83,6 +83,7 @@ febuildrule(.dbg, js, cat) febuildrule(.dbg, mjs, cat) dist/libav.types.d.ts: build/libav.types.d.ts + mkdir -p dist cp $< $@ # General build rule for any target From d0f6d8c5dcdcf0364aae08377e50497d8acc6aff Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Sat, 17 Aug 2024 00:30:16 -0400 Subject: [PATCH 06/17] VP8 is not MP4... --- tests/tests/650-all-to-all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index 2fb0f138..f14873f5 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -15,7 +15,7 @@ // Convert between all (viable) formats and test that they all work -const mp4 = ["libvpx", "aac"]; +const mp4 = ["libopenh264", "aac"]; const formatCodecs = { "adts": [null, null], "f32le": [null, "pcm_f32le", {nocheck: true}], From 7ee9580794cf97a3ff008e4155335884748f230f Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Sat, 17 Aug 2024 00:37:59 -0400 Subject: [PATCH 07/17] libvpx again is the general option --- tests/tests/650-all-to-all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests/650-all-to-all.js b/tests/tests/650-all-to-all.js index f14873f5..d733cb54 100644 --- a/tests/tests/650-all-to-all.js +++ b/tests/tests/650-all-to-all.js @@ -178,7 +178,7 @@ for (const f of formats) { video = fc[0]; audio = fc[1]; } else { - video = "libopenh264"; + video = "libvpx"; audio = "libopus"; } From d33d6b9d89e888578817c4158d09cd0e61232c54 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Sat, 17 Aug 2024 09:27:25 -0400 Subject: [PATCH 08/17] Who wrote this??? --- pre.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre.js b/pre.js index 0aee133c..fe13ed95 100644 --- a/pre.js +++ b/pre.js @@ -17,7 +17,7 @@ if (typeof _scriptName === "undefined") { if (typeof LibAV === "object" && LibAV && LibAV.base) _scriptName = LibAV.base + "/libav-@VER-@VARIANT.@DBG@TARGET.@JS"; - else if (typeof self && self && self.location) + else if (typeof self === "object" && self && self.location) _scriptName = self.location.href; } From dc7a3f5b638b597e6ed31c8c8e91698d06de6b54 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Sun, 18 Aug 2024 14:55:59 -0400 Subject: [PATCH 09/17] Bring back --memory-init-file where needed --- Makefile | 1 + Makefile.m4 | 1 + tools/memory-init-file-emcc.sh | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100755 tools/memory-init-file-emcc.sh diff --git a/Makefile b/Makefile index 71b09356..d57062c6 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ OPTFLAGS=-Oz THRFLAGS=-pthread ES6FLAGS=-sEXPORT_ES6=1 -sUSE_ES6_IMPORT_META=1 EFLAGS=\ + `tools/memory-init-file-emcc.sh` \ --pre-js pre.js \ --post-js build/post.js --extern-post-js extern-post.js \ -s "EXPORT_NAME='LibAVFactory'" \ diff --git a/Makefile.m4 b/Makefile.m4 index b13abcde..a55db54b 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -16,6 +16,7 @@ OPTFLAGS=-Oz THRFLAGS=-pthread ES6FLAGS=-sEXPORT_ES6=1 -sUSE_ES6_IMPORT_META=1 EFLAGS=\ + `tools/memory-init-file-emcc.sh` \ --pre-js pre.js \ --post-js build/post.js --extern-post-js extern-post.js \ -s "EXPORT_NAME='LibAVFactory'" \ diff --git a/tools/memory-init-file-emcc.sh b/tools/memory-init-file-emcc.sh new file mode 100755 index 00000000..bc34d17c --- /dev/null +++ b/tools/memory-init-file-emcc.sh @@ -0,0 +1,22 @@ +#!/bin/sh +EMCC_VERSION="$(emcc --version | head -n 1 | sed 's/^emcc ([^)]*) \([0-9\.]*\).*/\1/')" +MAJOR="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/')" +MINOR="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/')" +REV="$(echo "$EMCC_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/')" + +# 3.1.55 removed --memory-init-file, but on earlier versions, we *must* use +# --memory-init-file 0 + +MIF=" --memory-init-file 0" +if [ "$MAJOR" != 3 ] +then + MIF="" +elif [ "$MINOR" -gt 1 ] +then + MIF="" +elif [ "$REV" -gt 54 ] +then + MIF="" +fi + +printf '%s\n' "$MIF" From 195f7afab4bc42a508a67cfd9d8a40759e0031d7 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Thu, 19 Sep 2024 16:31:49 -0400 Subject: [PATCH 10/17] Copy the extradata *into the codecpar* --- post.in.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post.in.js b/post.in.js index 249e3b7b..ec8c6366 100644 --- a/post.in.js +++ b/post.in.js @@ -2412,8 +2412,8 @@ var ff_copyin_codecpar = Module.ff_copyin_codecpar = function(codecparPtr, codec var ff_copyin_codecpar_extradata = Module.ff_copyin_codecpar_extradata = function(codecparPtr, extradata) { var extradataPtr = malloc(extradata.length); copyin_u8(extradataPtr, extradata); - AVCodecParameters_extradata_s(extradataPtr); - AVCodecParameters_extradata_size_s(extradata.length); + AVCodecParameters_extradata_s(codecparPtr, extradataPtr); + AVCodecParameters_extradata_size_s(codecparPtr, extradata.length); }; /** From 2b9d8cbc6030e16221ce3de9f5ee3557312e249f Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 20 Sep 2024 15:24:46 -0400 Subject: [PATCH 11/17] This wasn't supposed to be here! --- configs/fragments/ennuicastr/ffmpeg-config.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 configs/fragments/ennuicastr/ffmpeg-config.txt diff --git a/configs/fragments/ennuicastr/ffmpeg-config.txt b/configs/fragments/ennuicastr/ffmpeg-config.txt deleted file mode 100644 index 6cf56ea4..00000000 --- a/configs/fragments/ennuicastr/ffmpeg-config.txt +++ /dev/null @@ -1 +0,0 @@ ---enable-filter=anull From 6caf2c209c3ee0a8fc5516aa18574680e17b0ac5 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 20 Sep 2024 15:25:05 -0400 Subject: [PATCH 12/17] LICENSE SWEEP Making sure the licensing text of every component is as correct as I can manage. --- .../fragments/decoder-ilbc/ffmpeg-config.txt | 1 + configs/fragments/decoder-ilbc/license.js | 35 +++++++++++++++++ .../decoder-interplay_acm/ffmpeg-config.txt | 1 + .../decoder-interplay_acm/license.js | 23 +++++++++++ configs/fragments/decoder-mjpeg/FIXME-jrevdct | 1 + .../fragments/decoder-mjpeg/ffmpeg-config.txt | 1 + configs/fragments/decoder-mjpeg/license.js | 38 +++++++++++++++++++ .../decoder-nellymoser/ffmpeg-config.txt | 1 + .../fragments/decoder-nellymoser/license.js | 28 ++++++++++++++ .../fragments/decoder-prores/FIXME-jrevdct | 1 + configs/fragments/decoder-prores/license.js | 38 +++++++++++++++++++ .../decoder-texturedsp/ffmpeg-config.txt | 1 + .../fragments/decoder-texturedsp/license.js | 26 +++++++++++++ .../decoder-zerocodec/ffmpeg-config.txt | 1 + .../fragments/decoder-zerocodec/license.js | 19 ++++++++++ .../encoder-cinepak/ffmpeg-config.txt | 1 + configs/fragments/encoder-cinepak/license.js | 29 ++++++++++++++ .../fragments/encoder-prores/FIXME-jfdctfst | 1 + .../encoder-prores/ffmpeg-config.txt | 1 + configs/fragments/encoder-prores/license.js | 38 +++++++++++++++++++ .../encoder-texturedsp/ffmpeg-config.txt | 1 + .../fragments/encoder-texturedsp/license.js | 27 +++++++++++++ .../fragments/filter-arnndn/ffmpeg-config.txt | 1 + configs/fragments/filter-arnndn/license.js | 36 ++++++++++++++++++ .../filter-avgblur/ffmpeg-config.txt | 1 + configs/fragments/filter-avgblur/license.js | 25 ++++++++++++ .../filter-bilateral/ffmpeg-config.txt | 1 + configs/fragments/filter-bilateral/license.js | 26 +++++++++++++ .../fragments/filter-bm3d/ffmpeg-config.txt | 1 + configs/fragments/filter-bm3d/license.js | 28 ++++++++++++++ .../fragments/filter-deband/ffmpeg-config.txt | 1 + configs/fragments/filter-deband/license.js | 26 +++++++++++++ .../filter-deesser/ffmpeg-config.txt | 1 + configs/fragments/filter-deesser/license.js | 25 ++++++++++++ .../fragments/filter-gblur/ffmpeg-config.txt | 1 + configs/fragments/filter-gblur/license.js | 30 +++++++++++++++ .../fragments/filter-hdcd/ffmpeg-config.txt | 1 + configs/fragments/filter-hdcd/license.js | 34 +++++++++++++++++ .../fragments/filter-hqx/ffmpeg-config.txt | 1 + configs/fragments/filter-hqx/license.js | 21 ++++++++++ .../fragments/filter-morpho/ffmpeg-config.txt | 1 + configs/fragments/filter-morpho/license.js | 28 ++++++++++++++ 42 files changed, 602 insertions(+) create mode 100644 configs/fragments/decoder-ilbc/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-ilbc/license.js create mode 100644 configs/fragments/decoder-interplay_acm/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-interplay_acm/license.js create mode 100644 configs/fragments/decoder-mjpeg/FIXME-jrevdct create mode 100644 configs/fragments/decoder-mjpeg/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-mjpeg/license.js create mode 100644 configs/fragments/decoder-nellymoser/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-nellymoser/license.js create mode 100644 configs/fragments/decoder-prores/FIXME-jrevdct create mode 100644 configs/fragments/decoder-prores/license.js create mode 100644 configs/fragments/decoder-texturedsp/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-texturedsp/license.js create mode 100644 configs/fragments/decoder-zerocodec/ffmpeg-config.txt create mode 100644 configs/fragments/decoder-zerocodec/license.js create mode 100644 configs/fragments/encoder-cinepak/ffmpeg-config.txt create mode 100644 configs/fragments/encoder-cinepak/license.js create mode 100644 configs/fragments/encoder-prores/FIXME-jfdctfst create mode 100644 configs/fragments/encoder-prores/ffmpeg-config.txt create mode 100644 configs/fragments/encoder-prores/license.js create mode 100644 configs/fragments/encoder-texturedsp/ffmpeg-config.txt create mode 100644 configs/fragments/encoder-texturedsp/license.js create mode 100644 configs/fragments/filter-arnndn/ffmpeg-config.txt create mode 100644 configs/fragments/filter-arnndn/license.js create mode 100644 configs/fragments/filter-avgblur/ffmpeg-config.txt create mode 100644 configs/fragments/filter-avgblur/license.js create mode 100644 configs/fragments/filter-bilateral/ffmpeg-config.txt create mode 100644 configs/fragments/filter-bilateral/license.js create mode 100644 configs/fragments/filter-bm3d/ffmpeg-config.txt create mode 100644 configs/fragments/filter-bm3d/license.js create mode 100644 configs/fragments/filter-deband/ffmpeg-config.txt create mode 100644 configs/fragments/filter-deband/license.js create mode 100644 configs/fragments/filter-deesser/ffmpeg-config.txt create mode 100644 configs/fragments/filter-deesser/license.js create mode 100644 configs/fragments/filter-gblur/ffmpeg-config.txt create mode 100644 configs/fragments/filter-gblur/license.js create mode 100644 configs/fragments/filter-hdcd/ffmpeg-config.txt create mode 100644 configs/fragments/filter-hdcd/license.js create mode 100644 configs/fragments/filter-hqx/ffmpeg-config.txt create mode 100644 configs/fragments/filter-hqx/license.js create mode 100644 configs/fragments/filter-morpho/ffmpeg-config.txt create mode 100644 configs/fragments/filter-morpho/license.js diff --git a/configs/fragments/decoder-ilbc/ffmpeg-config.txt b/configs/fragments/decoder-ilbc/ffmpeg-config.txt new file mode 100644 index 00000000..da269eef --- /dev/null +++ b/configs/fragments/decoder-ilbc/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=ilbc diff --git a/configs/fragments/decoder-ilbc/license.js b/configs/fragments/decoder-ilbc/license.js new file mode 100644 index 00000000..883e3abf --- /dev/null +++ b/configs/fragments/decoder-ilbc/license.js @@ -0,0 +1,35 @@ + * + * --- + * + * ilbcdec.c: + * + * Copyright (c) 2013, The WebRTC project authors. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * diff --git a/configs/fragments/decoder-interplay_acm/ffmpeg-config.txt b/configs/fragments/decoder-interplay_acm/ffmpeg-config.txt new file mode 100644 index 00000000..e1896423 --- /dev/null +++ b/configs/fragments/decoder-interplay_acm/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=interplay_acm diff --git a/configs/fragments/decoder-interplay_acm/license.js b/configs/fragments/decoder-interplay_acm/license.js new file mode 100644 index 00000000..b3e65f9c --- /dev/null +++ b/configs/fragments/decoder-interplay_acm/license.js @@ -0,0 +1,23 @@ + * + * --- + * + * interplayacm.c: + * + * Interplay ACM decoder + * + * Copyright (c) 2004-2008 Marko Kreen + * Copyright (c) 2008 Adam Gashlin + * Copyright (c) 2015 Paul B Mahol + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * diff --git a/configs/fragments/decoder-mjpeg/FIXME-jrevdct b/configs/fragments/decoder-mjpeg/FIXME-jrevdct new file mode 100644 index 00000000..f42c2e90 --- /dev/null +++ b/configs/fragments/decoder-mjpeg/FIXME-jrevdct @@ -0,0 +1 @@ +jrevdct is used by various decoders, but mjpeg and prores seem like the only ones anyone is likely to use nowadays, which is why the license text for it lives here. diff --git a/configs/fragments/decoder-mjpeg/ffmpeg-config.txt b/configs/fragments/decoder-mjpeg/ffmpeg-config.txt new file mode 100644 index 00000000..ff07c232 --- /dev/null +++ b/configs/fragments/decoder-mjpeg/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=mjpeg diff --git a/configs/fragments/decoder-mjpeg/license.js b/configs/fragments/decoder-mjpeg/license.js new file mode 100644 index 00000000..cae6ed7b --- /dev/null +++ b/configs/fragments/decoder-mjpeg/license.js @@ -0,0 +1,38 @@ + * + * --- + * + * jrevdct.c: + * + * This file is part of the Independent JPEG Group's software. + * + * The authors make NO WARRANTY or representation, either express or implied, + * with respect to this software, its quality, accuracy, merchantability, or + * fitness for a particular purpose. This software is provided "AS IS", and + * you, its user, assume the entire risk as to its quality and accuracy. + * + * This software is copyright (C) 1991, 1992, Thomas G. Lane. + * All Rights Reserved except as specified below. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * software (or portions thereof) for any purpose, without fee, subject to + * these conditions: + * (1) If any part of the source code for this software is distributed, then + * this README file must be included, with this copyright and no-warranty + * notice unaltered; and any additions, deletions, or changes to the original + * files must be clearly indicated in accompanying documentation. + * (2) If only executable code is distributed, then the accompanying + * documentation must state that "this software is based in part on the work + * of the Independent JPEG Group". + * (3) Permission for use of this software is granted only if the user accepts + * full responsibility for any undesirable consequences; the authors accept + * NO LIABILITY for damages of any kind. + * + * These conditions apply to any software derived from or based on the IJG + * code, not just to the unmodified library. If you use our work, you ought + * to acknowledge us. + * + * Permission is NOT granted for the use of any IJG author's name or company + * name in advertising or publicity relating to this software or products + * derived from it. This software may be referred to only as "the Independent + * JPEG Group's software". + * diff --git a/configs/fragments/decoder-nellymoser/ffmpeg-config.txt b/configs/fragments/decoder-nellymoser/ffmpeg-config.txt new file mode 100644 index 00000000..a0aef64c --- /dev/null +++ b/configs/fragments/decoder-nellymoser/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=nellymoser diff --git a/configs/fragments/decoder-nellymoser/license.js b/configs/fragments/decoder-nellymoser/license.js new file mode 100644 index 00000000..7fc8dfd5 --- /dev/null +++ b/configs/fragments/decoder-nellymoser/license.js @@ -0,0 +1,28 @@ + * --- + * + * nellymoser: + * + * Copyright (c) 2007 a840bda5870ba11f19698ff6eb9581dfb0f95fa5, + * 539459aeb7d425140b62a3ec7dbf6dc8e408a306, and + * 520e17cd55896441042b14df2566a6eb610ed444 + * Copyright (c) 2007 Loic Minier + * Benjamin Larsson + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * diff --git a/configs/fragments/decoder-prores/FIXME-jrevdct b/configs/fragments/decoder-prores/FIXME-jrevdct new file mode 100644 index 00000000..f42c2e90 --- /dev/null +++ b/configs/fragments/decoder-prores/FIXME-jrevdct @@ -0,0 +1 @@ +jrevdct is used by various decoders, but mjpeg and prores seem like the only ones anyone is likely to use nowadays, which is why the license text for it lives here. diff --git a/configs/fragments/decoder-prores/license.js b/configs/fragments/decoder-prores/license.js new file mode 100644 index 00000000..cae6ed7b --- /dev/null +++ b/configs/fragments/decoder-prores/license.js @@ -0,0 +1,38 @@ + * + * --- + * + * jrevdct.c: + * + * This file is part of the Independent JPEG Group's software. + * + * The authors make NO WARRANTY or representation, either express or implied, + * with respect to this software, its quality, accuracy, merchantability, or + * fitness for a particular purpose. This software is provided "AS IS", and + * you, its user, assume the entire risk as to its quality and accuracy. + * + * This software is copyright (C) 1991, 1992, Thomas G. Lane. + * All Rights Reserved except as specified below. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * software (or portions thereof) for any purpose, without fee, subject to + * these conditions: + * (1) If any part of the source code for this software is distributed, then + * this README file must be included, with this copyright and no-warranty + * notice unaltered; and any additions, deletions, or changes to the original + * files must be clearly indicated in accompanying documentation. + * (2) If only executable code is distributed, then the accompanying + * documentation must state that "this software is based in part on the work + * of the Independent JPEG Group". + * (3) Permission for use of this software is granted only if the user accepts + * full responsibility for any undesirable consequences; the authors accept + * NO LIABILITY for damages of any kind. + * + * These conditions apply to any software derived from or based on the IJG + * code, not just to the unmodified library. If you use our work, you ought + * to acknowledge us. + * + * Permission is NOT granted for the use of any IJG author's name or company + * name in advertising or publicity relating to this software or products + * derived from it. This software may be referred to only as "the Independent + * JPEG Group's software". + * diff --git a/configs/fragments/decoder-texturedsp/ffmpeg-config.txt b/configs/fragments/decoder-texturedsp/ffmpeg-config.txt new file mode 100644 index 00000000..f4a3c4d9 --- /dev/null +++ b/configs/fragments/decoder-texturedsp/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=texturedsp diff --git a/configs/fragments/decoder-texturedsp/license.js b/configs/fragments/decoder-texturedsp/license.js new file mode 100644 index 00000000..85311134 --- /dev/null +++ b/configs/fragments/decoder-texturedsp/license.js @@ -0,0 +1,26 @@ + * + * --- + * + * texturedsp.c: + * + * Copyright (C) 2009 Benjamin Dobell, Glass Echidna + * Copyright (C) 2012 Matthäus G. "Anteru" Chajdas (http://anteru.net) + * Copyright (C) 2015 Vittorio Giovara + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * diff --git a/configs/fragments/decoder-zerocodec/ffmpeg-config.txt b/configs/fragments/decoder-zerocodec/ffmpeg-config.txt new file mode 100644 index 00000000..8e5edc7d --- /dev/null +++ b/configs/fragments/decoder-zerocodec/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-decoder=zerocodec diff --git a/configs/fragments/decoder-zerocodec/license.js b/configs/fragments/decoder-zerocodec/license.js new file mode 100644 index 00000000..e291ac06 --- /dev/null +++ b/configs/fragments/decoder-zerocodec/license.js @@ -0,0 +1,19 @@ + * + * --- + * + * zerocodec.c: + * + * Copyright (c) 2012, Derek Buitenhuis + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * diff --git a/configs/fragments/encoder-cinepak/ffmpeg-config.txt b/configs/fragments/encoder-cinepak/ffmpeg-config.txt new file mode 100644 index 00000000..63f84d42 --- /dev/null +++ b/configs/fragments/encoder-cinepak/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-encoder=cinepak diff --git a/configs/fragments/encoder-cinepak/license.js b/configs/fragments/encoder-cinepak/license.js new file mode 100644 index 00000000..f0fdd2ef --- /dev/null +++ b/configs/fragments/encoder-cinepak/license.js @@ -0,0 +1,29 @@ + * + * --- + * + * cinepakenc.c: + * + * Cinepak encoder (c) 2011 Tomas Härdin + * http://titan.codemill.se/~tomhar/cinepakenc.patch + * + * Fixes and improvements, vintage decoders compatibility + * (c) 2013, 2014 Rl, Aetey Global Technologies AB + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * diff --git a/configs/fragments/encoder-prores/FIXME-jfdctfst b/configs/fragments/encoder-prores/FIXME-jfdctfst new file mode 100644 index 00000000..2357b14c --- /dev/null +++ b/configs/fragments/encoder-prores/FIXME-jfdctfst @@ -0,0 +1 @@ +jfdctfst is used by various encoders, but prores seems like the only one anyone is likely to use nowadays, which is why the license text for it lives here. diff --git a/configs/fragments/encoder-prores/ffmpeg-config.txt b/configs/fragments/encoder-prores/ffmpeg-config.txt new file mode 100644 index 00000000..16b90fc0 --- /dev/null +++ b/configs/fragments/encoder-prores/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-encoder=prores diff --git a/configs/fragments/encoder-prores/license.js b/configs/fragments/encoder-prores/license.js new file mode 100644 index 00000000..c3c80ea5 --- /dev/null +++ b/configs/fragments/encoder-prores/license.js @@ -0,0 +1,38 @@ + * + * --- + * + * jfdctfst.c: + * + * This file is part of the Independent JPEG Group's software. + * + * The authors make NO WARRANTY or representation, either express or implied, + * with respect to this software, its quality, accuracy, merchantability, or + * fitness for a particular purpose. This software is provided "AS IS", and + * you, its user, assume the entire risk as to its quality and accuracy. + * + * This software is copyright (C) 1994-1996, Thomas G. Lane. + * All Rights Reserved except as specified below. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * software (or portions thereof) for any purpose, without fee, subject to + * these conditions: + * (1) If any part of the source code for this software is distributed, then + * this README file must be included, with this copyright and no-warranty + * notice unaltered; and any additions, deletions, or changes to the original + * files must be clearly indicated in accompanying documentation. + * (2) If only executable code is distributed, then the accompanying + * documentation must state that "this software is based in part on the work + * of the Independent JPEG Group". + * (3) Permission for use of this software is granted only if the user accepts + * full responsibility for any undesirable consequences; the authors accept + * NO LIABILITY for damages of any kind. + * + * These conditions apply to any software derived from or based on the IJG + * code, not just to the unmodified library. If you use our work, you ought + * to acknowledge us. + * + * Permission is NOT granted for the use of any IJG author's name or company + * name in advertising or publicity relating to this software or products + * derived from it. This software may be referred to only as "the Independent + * JPEG Group's software". + * diff --git a/configs/fragments/encoder-texturedsp/ffmpeg-config.txt b/configs/fragments/encoder-texturedsp/ffmpeg-config.txt new file mode 100644 index 00000000..0114231f --- /dev/null +++ b/configs/fragments/encoder-texturedsp/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-encoder=texturedsp diff --git a/configs/fragments/encoder-texturedsp/license.js b/configs/fragments/encoder-texturedsp/license.js new file mode 100644 index 00000000..b99db5a6 --- /dev/null +++ b/configs/fragments/encoder-texturedsp/license.js @@ -0,0 +1,27 @@ + * + * --- + * + * texturedspenc.c: + * + * Copyright (C) 2015 Vittorio Giovara + * Based on public domain code by Fabian Giesen, Sean Barrett and Yann Collet. + * + * This file is part of FFmpeg + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * diff --git a/configs/fragments/filter-arnndn/ffmpeg-config.txt b/configs/fragments/filter-arnndn/ffmpeg-config.txt new file mode 100644 index 00000000..aceb06cb --- /dev/null +++ b/configs/fragments/filter-arnndn/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=arnndn diff --git a/configs/fragments/filter-arnndn/license.js b/configs/fragments/filter-arnndn/license.js new file mode 100644 index 00000000..c27850ce --- /dev/null +++ b/configs/fragments/filter-arnndn/license.js @@ -0,0 +1,36 @@ + * + * --- + * + * af_arnndn.c: + * + * Copyright (c) 2018 Gregor Richards + * Copyright (c) 2017 Mozilla + * Copyright (c) 2005-2009 Xiph.Org Foundation + * Copyright (c) 2007-2008 CSIRO + * Copyright (c) 2008-2011 Octasic Inc. + * Copyright (c) Jean-Marc Valin + * Copyright (c) 2019 Paul B Mahol + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * diff --git a/configs/fragments/filter-avgblur/ffmpeg-config.txt b/configs/fragments/filter-avgblur/ffmpeg-config.txt new file mode 100644 index 00000000..56ffdb36 --- /dev/null +++ b/configs/fragments/filter-avgblur/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=avgblur diff --git a/configs/fragments/filter-avgblur/license.js b/configs/fragments/filter-avgblur/license.js new file mode 100644 index 00000000..b487175d --- /dev/null +++ b/configs/fragments/filter-avgblur/license.js @@ -0,0 +1,25 @@ + * + * --- + * + * vf_avgblur.c: + * + * Copyright (c) 2016 Paul B Mahol + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * diff --git a/configs/fragments/filter-bilateral/ffmpeg-config.txt b/configs/fragments/filter-bilateral/ffmpeg-config.txt new file mode 100644 index 00000000..bca439ad --- /dev/null +++ b/configs/fragments/filter-bilateral/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=bilateral diff --git a/configs/fragments/filter-bilateral/license.js b/configs/fragments/filter-bilateral/license.js new file mode 100644 index 00000000..5879587a --- /dev/null +++ b/configs/fragments/filter-bilateral/license.js @@ -0,0 +1,26 @@ + * + * --- + * + * vf_bilateral.c: + * + * Copyright (c) 2017 Ming Yang + * Copyright (c) 2019 Paul B Mahol + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * diff --git a/configs/fragments/filter-bm3d/ffmpeg-config.txt b/configs/fragments/filter-bm3d/ffmpeg-config.txt new file mode 100644 index 00000000..362a5ce7 --- /dev/null +++ b/configs/fragments/filter-bm3d/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=bm3d diff --git a/configs/fragments/filter-bm3d/license.js b/configs/fragments/filter-bm3d/license.js new file mode 100644 index 00000000..be65a122 --- /dev/null +++ b/configs/fragments/filter-bm3d/license.js @@ -0,0 +1,28 @@ + * + * --- + * + * vf_bm3d.c: + * + * Copyright (c) 2015-2016 mawen1250 + * Copyright (c) 2018 Paul B Mahol + * + * This file is part of FFmpeg. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * diff --git a/configs/fragments/filter-deband/ffmpeg-config.txt b/configs/fragments/filter-deband/ffmpeg-config.txt new file mode 100644 index 00000000..d0545a8b --- /dev/null +++ b/configs/fragments/filter-deband/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=deband diff --git a/configs/fragments/filter-deband/license.js b/configs/fragments/filter-deband/license.js new file mode 100644 index 00000000..938a88bb --- /dev/null +++ b/configs/fragments/filter-deband/license.js @@ -0,0 +1,26 @@ + * + * --- + * + * vf_deband.c: + * + * Copyright (c) 2015 Niklas Haas + * Copyright (c) 2015 Paul B Mahol + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * diff --git a/configs/fragments/filter-deesser/ffmpeg-config.txt b/configs/fragments/filter-deesser/ffmpeg-config.txt new file mode 100644 index 00000000..bc906c70 --- /dev/null +++ b/configs/fragments/filter-deesser/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=deesser diff --git a/configs/fragments/filter-deesser/license.js b/configs/fragments/filter-deesser/license.js new file mode 100644 index 00000000..0eaffc06 --- /dev/null +++ b/configs/fragments/filter-deesser/license.js @@ -0,0 +1,25 @@ + * + * --- + * + * af_deesser.c: + * + * Copyright (c) 2018 Chris Johnson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * diff --git a/configs/fragments/filter-gblur/ffmpeg-config.txt b/configs/fragments/filter-gblur/ffmpeg-config.txt new file mode 100644 index 00000000..3cdceb01 --- /dev/null +++ b/configs/fragments/filter-gblur/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=gblur diff --git a/configs/fragments/filter-gblur/license.js b/configs/fragments/filter-gblur/license.js new file mode 100644 index 00000000..85835a3f --- /dev/null +++ b/configs/fragments/filter-gblur/license.js @@ -0,0 +1,30 @@ + * + * --- + * + * vf_gblur.c: + * + * Copyright (c) 2011 Pascal Getreuer + * Copyright (c) 2016 Paul B Mahol + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * diff --git a/configs/fragments/filter-hdcd/ffmpeg-config.txt b/configs/fragments/filter-hdcd/ffmpeg-config.txt new file mode 100644 index 00000000..3849add3 --- /dev/null +++ b/configs/fragments/filter-hdcd/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=hdcd diff --git a/configs/fragments/filter-hdcd/license.js b/configs/fragments/filter-hdcd/license.js new file mode 100644 index 00000000..64b5c0f9 --- /dev/null +++ b/configs/fragments/filter-hdcd/license.js @@ -0,0 +1,34 @@ + * + * --- + * + * af_hdcd.c: + * + * Copyright (C) 2010, Chris Moeller, + * All rights reserved. + * Optimizations by Gumboot + * Additional work by Burt P. + * Original code reverse engineered from HDCD decoder library by Christopher Key, + * which was likely reverse engineered from Windows Media Player. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The names of its contributors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * diff --git a/configs/fragments/filter-hqx/ffmpeg-config.txt b/configs/fragments/filter-hqx/ffmpeg-config.txt new file mode 100644 index 00000000..9ef9f42f --- /dev/null +++ b/configs/fragments/filter-hqx/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=hqx diff --git a/configs/fragments/filter-hqx/license.js b/configs/fragments/filter-hqx/license.js new file mode 100644 index 00000000..bfbaf9e4 --- /dev/null +++ b/configs/fragments/filter-hqx/license.js @@ -0,0 +1,21 @@ + * + * --- + * + * vf_hqx.c: + * + * Copyright (c) 2014 Clément Bœsch + * + * This file is part of FFmpeg. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * diff --git a/configs/fragments/filter-morpho/ffmpeg-config.txt b/configs/fragments/filter-morpho/ffmpeg-config.txt new file mode 100644 index 00000000..ba40bc54 --- /dev/null +++ b/configs/fragments/filter-morpho/ffmpeg-config.txt @@ -0,0 +1 @@ +--enable-filter=morpho diff --git a/configs/fragments/filter-morpho/license.js b/configs/fragments/filter-morpho/license.js new file mode 100644 index 00000000..267791bf --- /dev/null +++ b/configs/fragments/filter-morpho/license.js @@ -0,0 +1,28 @@ + * + * --- + * + * vf_morpho.c: + * + * Copyright (c) 2016 ReneBrals + * Copyright (c) 2021 Paul B Mahol + * + * This file is part of FFmpeg. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * From 6467f39a655e2f8cc27fb8154bdb14cce879a55e Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 20 Sep 2024 15:29:23 -0400 Subject: [PATCH 13/17] Adding a quasi-LICENSE file. --- LICENSE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..88143bbb --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,13 @@ +LGPL. + +The license text for this code is in the source files. +[LICENSE files do more harm than good](https://yahweasel.github.io/license-files-considered-harmful/). + +This file exists because some people expect it to be here. + +libav.js builds include correct license headers. Do not remove them. + +If you make modifications to this repository that involve modifying the +underlying FFmpeg code, you are *legally obligated* to share those changes. If +you do not, you are in violation of FFmpeg's license terms. I'm looking at you, +“my startup is too cool to read licenses” scumbags. From 60673063a7c90250dbbda04046dda10e1b2edfa1 Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Fri, 20 Sep 2024 15:33:05 -0400 Subject: [PATCH 14/17] "Clarifying" the LICENSE text a bit --- LICENSE.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 88143bbb..71d301e1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -7,7 +7,9 @@ This file exists because some people expect it to be here. libav.js builds include correct license headers. Do not remove them. -If you make modifications to this repository that involve modifying the -underlying FFmpeg code, you are *legally obligated* to share those changes. If -you do not, you are in violation of FFmpeg's license terms. I'm looking at you, -“my startup is too cool to read licenses” scumbags. +If you make modifications to this repository beyond configuration changes¹ and +distribute builds with those changes, you are *legally obligated* to share those +changes. If you do not, you are in violation of FFmpeg's license terms. I'm +looking at you, “my startup is too cool to read licenses” scumbags. + +¹ i.e., changes that link to FFmpeg. From 6ace77d89e6f4e52f28ec5666aebbadb8a13367c Mon Sep 17 00:00:00 2001 From: Aiden Liu <31102694+aidenlx@users.noreply.github.com> Date: Sun, 22 Sep 2024 01:20:14 +0800 Subject: [PATCH 15/17] explictly define type for each export fix issue with typescript complainting TS7016 --- package.json | 97 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 79 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 0c856645..9414522a 100644 --- a/package.json +++ b/package.json @@ -4,28 +4,89 @@ "version": "5.4.6", "description": "A compilation of the libraries associated with handling audio and video in ffmpeg—libavformat, libavcodec, libavfilter, libavutil and libswresample—for WebAssembly and asm.js, and thus the web.", "main": "dist/libav-default.js", + "types": "dist/libav.types.d.ts", "exports": { ".": { "import": "./dist/libav-default.mjs", - "default": "./dist/libav-default.js" - }, - "./default": { "import": "./dist/libav-default.mjs", "default": "./dist/libav-default.js" }, - "./default-cli": { "import": "./dist/libav-default-cli.mjs", "default": "./dist/libav-default-cli.js" }, - "./opus": { "import": "./dist/libav-opus.mjs", "default": "./dist/libav-opus.js" }, - "./opus-af": { "import": "./dist/libav-opus-af.mjs", "default": "./dist/libav-opus-af.js" }, - "./flac": { "import": "./dist/libav-flac.mjs", "default": "./dist/libav-flac.js" }, - "./flac-af": { "import": "./dist/libav-flac-af.mjs", "default": "./dist/libav-flac-af.js" }, - "./wav": { "import": "./dist/libav-wav.mjs", "default": "./dist/libav-wav.js" }, - "./wav-af": { "import": "./dist/libav-wav-af.mjs", "default": "./dist/libav-wav-af.js" }, - "./obsolete": { "import": "./dist/libav-obsolete.mjs", "default": "./dist/libav-obsolete.js" }, - "./webm": { "import": "./dist/libav-webm.mjs", "default": "./dist/libav-webm.js" }, - "./webm-cli": { "import": "./dist/libav-webm-cli.mjs", "default": "./dist/libav-webm-cli.js" }, - "./vp8-opus": { "import": "./dist/libav-vp8-opus.mjs", "default": "./dist/libav-vp8-opus.js" }, - "./vp8-opus-avf": { "import": "./dist/libav-vp8-opus-avf.mjs", "default": "./dist/libav-vp8-opus-avf.js" }, - "./webcodecs": { "import": "./dist/libav-webcodecs.mjs", "default": "./dist/libav-webcodecs.js" }, - "./webcodecs-avf": { "import": "./dist/libav-webcodecs-avf.mjs", "default": "./dist/libav-webcodecs-avf.js" } + "default": "./dist/libav-default.js", + "types": "./dist/libav.types.d.ts" + }, + "./default": { + "import": "./dist/libav-default.mjs", + "default": "./dist/libav-default.js", + "types": "./dist/libav.types.d.ts" + }, + "./default-cli": { + "import": "./dist/libav-default-cli.mjs", + "default": "./dist/libav-default-cli.js", + "types": "./dist/libav.types.d.ts" + }, + "./opus": { + "import": "./dist/libav-opus.mjs", + "default": "./dist/libav-opus.js", + "types": "./dist/libav.types.d.ts" + }, + "./opus-af": { + "import": "./dist/libav-opus-af.mjs", + "default": "./dist/libav-opus-af.js", + "types": "./dist/libav.types.d.ts" + }, + "./flac": { + "import": "./dist/libav-flac.mjs", + "default": "./dist/libav-flac.js", + "types": "./dist/libav.types.d.ts" + }, + "./flac-af": { + "import": "./dist/libav-flac-af.mjs", + "default": "./dist/libav-flac-af.js", + "types": "./dist/libav.types.d.ts" + }, + "./wav": { + "import": "./dist/libav-wav.mjs", + "default": "./dist/libav-wav.js", + "types": "./dist/libav.types.d.ts" + }, + "./wav-af": { + "import": "./dist/libav-wav-af.mjs", + "default": "./dist/libav-wav-af.js", + "types": "./dist/libav.types.d.ts" + }, + "./obsolete": { + "import": "./dist/libav-obsolete.mjs", + "default": "./dist/libav-obsolete.js", + "types": "./dist/libav.types.d.ts" + }, + "./webm": { + "import": "./dist/libav-webm.mjs", + "default": "./dist/libav-webm.js", + "types": "./dist/libav.types.d.ts" + }, + "./webm-cli": { + "import": "./dist/libav-webm-cli.mjs", + "default": "./dist/libav-webm-cli.js", + "types": "./dist/libav.types.d.ts" + }, + "./vp8-opus": { + "import": "./dist/libav-vp8-opus.mjs", + "default": "./dist/libav-vp8-opus.js", + "types": "./dist/libav.types.d.ts" + }, + "./vp8-opus-avf": { + "import": "./dist/libav-vp8-opus-avf.mjs", + "default": "./dist/libav-vp8-opus-avf.js", + "types": "./dist/libav.types.d.ts" + }, + "./webcodecs": { + "import": "./dist/libav-webcodecs.mjs", + "default": "./dist/libav-webcodecs.js", + "types": "./dist/libav.types.d.ts" + }, + "./webcodecs-avf": { + "import": "./dist/libav-webcodecs-avf.mjs", + "default": "./dist/libav-webcodecs-avf.js", + "types": "./dist/libav.types.d.ts" + } }, - "types": "dist/libav.types.d.ts", "directories": { "test": "tests" }, From f7f1dad2de49da6cc07fa3842b0f9ecbecc02f11 Mon Sep 17 00:00:00 2001 From: Aiden Liu <31102694+aidenlx@users.noreply.github.com> Date: Sun, 22 Sep 2024 01:28:04 +0800 Subject: [PATCH 16/17] update type exports in package-one-variant.json --- package-one-variant.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package-one-variant.json b/package-one-variant.json index 2e1188cb..d93ba4da 100644 --- a/package-one-variant.json +++ b/package-one-variant.json @@ -3,11 +3,12 @@ "version": "@VER", "description": "A compilation of the libraries associated with handling audio and video in ffmpeg—libavformat, libavcodec, libavfilter, libavutil and libswresample—for WebAssembly and asm.js, and thus the web.", "main": "dist/libav-@VARIANT.js", + "types": "dist/libav.types.d.ts", "exports": { "import": "./dist/libav-@VARIANT.mjs", - "default": "./dist/libav-@VARIANT.js" + "default": "./dist/libav-@VARIANT.js", + "types": "dist/libav.types.d.ts" }, - "types": "dist/libav.types.d.ts", "directories": { "test": "tests" }, From 0d12712a60ce36a9d867101c8f3e343d9a9c916f Mon Sep 17 00:00:00 2001 From: Yahweasel Date: Wed, 25 Sep 2024 16:54:17 -0400 Subject: [PATCH 17/17] Adding support for FileSystemFileHandle writing Reading is already supported through the File interface with readahead files. `mkfsfhfile` supports both the synchronous and asynchronous interface, and uses the synchronous interface preferentially. --- demo/fsfh-demo.html | 147 ++++++++++++++++++++++++++++++++++++++++++++ funcs.json | 2 + post.in.js | 92 ++++++++++++++++++++++++++- 3 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 demo/fsfh-demo.html diff --git a/demo/fsfh-demo.html b/demo/fsfh-demo.html new file mode 100644 index 00000000..8be5b2ea --- /dev/null +++ b/demo/fsfh-demo.html @@ -0,0 +1,147 @@ + + + + + + LibAV.JS FileSystemFileHandle writer demo + + + + + diff --git a/funcs.json b/funcs.json index 482f3317..39da79b1 100644 --- a/funcs.json +++ b/funcs.json @@ -140,6 +140,8 @@ "mkwriterdev", "mkstreamwriterdev", "mountwriterfs", + "mkfsfhfile", + "unlinkfsfhfile", "mkworkerfsfile", "unlinkworkerfsfile" ], diff --git a/post.in.js b/post.in.js index ec8c6366..cf19406d 100644 --- a/post.in.js +++ b/post.in.js @@ -357,7 +357,7 @@ var preReadaheadOnBlockRead = null; function readaheadOnBlockRead(name, position, length) { if (!(name in readaheads)) { if (preReadaheadOnBlockRead) - preReadaheadOnBlockRead(name, position, length); + return preReadaheadOnBlockRead(name, position, length); return; } @@ -438,7 +438,7 @@ Module.unlinkreadaheadfile = function(name) { * @param mode Unix permissions */ /// @types mkwriterdev@sync(name: string, mode?: number): @promise@void@ -Module.mkwriterdev = function(loc, mode) { +var mkwriterdev = Module.mkwriterdev = function(loc, mode) { FS.mkdev(loc, mode?mode:0x1FF, writerDev); return 0; }; @@ -498,6 +498,94 @@ Module.unlinkworkerfsfile = function(name) { FS.rmdir("/" + name + ".d"); }; +// FileSystemFileHandle devices +var fsfhs = {}; + +// Original onwrite +var preFSFHOnWrite = null; + +// Passthru for FSFH writing. +function fsfhOnWrite(name, position, buffer) { + if (!(name in fsfhs)) { + if (preFSFHOnWrite) + return preFSFHOnWrite(name, position, buffer); + return; + } + + var h = fsfhs[name]; + buffer = buffer.slice(0); + + if (h.syncHandle) { + h.syncHandle.write(buffer.buffer, { + at: position + }); + return; + } + + var p = h.promise.then(function() { + return h.handle.write({ + type: "write", + position: position, + data: buffer + }); + }); + + h.promise = p.catch(console.error); + return p; +} + +/** + * Make a FileSystemFileHandle device. This writes via a FileSystemFileHandle, + * synchronously if possible. Note that this overrides onwrite, so if you want + * to support both kinds of files, make sure you set onwrite before calling + * this. + * @param name Filename to create. + * @param fsfh FileSystemFileHandle corresponding to this filename. + */ +/// @types mkfsfhfile(name: string, fsfh: FileSystemFileHandle): Promise +Module.mkfsfhfile = function(name, fsfh) { + if (Module.onwrite !== fsfhOnWrite) { + preFSFHOnWrite = Module.onwrite; + Module.onwrite = fsfhOnWrite; + } + + mkwriterdev(name); + + var h = fsfhs[name] = { + promise: Promise.all([]) + }; + h.promise = h.promise.then(function() { + return fsfh.createSyncAccessHandle(); + }).then(function(syncHandle) { + h.syncHandle = syncHandle; + }).catch(function() { + return fsfh.createWritable(); + }).then(function(handle) { + h.handle = handle; + }); + return h.promise; +}; + +/** + * Unlink a FileSystemFileHandle file. Also closes the file handle. + * @param name Filename to unlink. + */ +/// @types unlinkfsfhfile(name: string): Promise +Module.unlinkfsfhfile = function(name) { + FS.unlink(name); + var h = fsfhs[name]; + delete fsfhs[name]; + + if (h.syncHandle) { + h.syncHandle.close(); + return Promise.all([]); + } + + return h.promise.then(function() { + return h.handle.close(); + }); +} + /** * Send some data to a reader device. To indicate EOF, send null. To indicate an * error, send EOF and include an error code in the options.