From 3d3cea12bea4df7f8e3f95b78ea3cd9dd8674f1f Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 22 Mar 2021 11:17:34 +0100 Subject: [PATCH] Sync ffmpeg-custom with regular ffmpeg package --- ffmpeg/custom/016-ffmpeg-srt-1.4.2-fix.patch | 50 -------------------- ffmpeg/custom/PKGBUILD | 16 +++---- 2 files changed, 7 insertions(+), 59 deletions(-) delete mode 100644 ffmpeg/custom/016-ffmpeg-srt-1.4.2-fix.patch diff --git a/ffmpeg/custom/016-ffmpeg-srt-1.4.2-fix.patch b/ffmpeg/custom/016-ffmpeg-srt-1.4.2-fix.patch deleted file mode 100644 index fcb73f34..00000000 --- a/ffmpeg/custom/016-ffmpeg-srt-1.4.2-fix.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001 -From: Jun Zhao -Date: Sun, 12 Jul 2020 13:48:48 +0800 -Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1 - -libsrt changed the: -SRTO_SMOOTHER -> SRTO_CONGESTION -SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION -and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC) -in the header, it's lead to build fail - -fix #8760 - -Signed-off-by: Jun Zhao ---- - libavformat/libsrt.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c -index 4de575b..4719ce0 100644 ---- a/libavformat/libsrt.c -+++ b/libavformat/libsrt.c -@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd) - (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) || - (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) || - #if SRT_VERSION_VALUE >= 0x010302 -+#if SRT_VERSION_VALUE >= 0x010401 -+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || -+#else - /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */ - (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || -+#endif - (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) || - (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) || - #endif -@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd) - (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) || - (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) || - (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) || -+#if SRT_VERSION_VALUE >= 0x010401 -+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) || -+#else - (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || -+#endif - (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) || - (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) || - ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) { --- -2.7.4 - diff --git a/ffmpeg/custom/PKGBUILD b/ffmpeg/custom/PKGBUILD index c46121e4..2070c85f 100644 --- a/ffmpeg/custom/PKGBUILD +++ b/ffmpeg/custom/PKGBUILD @@ -9,7 +9,7 @@ _name=ffmpeg pkgname=ffmpeg-custom -pkgver=4.3.1 +pkgver=4.3.2 _svt_hevc_ver='1.5.0' _svt_av1_ver='0.8.4' _svt_vp9_ver='0.3.0' @@ -62,6 +62,7 @@ depends=( libxml2 libxv libxvidcore.so + libzimg.so opencore-amr openjpeg2 opus @@ -77,7 +78,7 @@ depends=( libfdk-aac librsvg svt-av1 - glslang + #glslang - see note below svt-hevc svt-av1 svt-vp9 @@ -115,11 +116,10 @@ provides=( ) conflicts=("$_name") -_tag=6b6b9e593dd4d3aaf75f48d40a13ef03bdef9fdb +_tag=f719f869907764e6412a6af6e178c46e5f915d25 source=( git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag} 'vmaf-model-path.patch' - '016-ffmpeg-srt-1.4.2-fix.patch'::'https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315' '017-ffmpeg-glslang-11.0-fix.patch'::'https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/4dab04622a6cf2a31da26a51dedb60ec44ac89a4' "020-ffmpeg-add-svt-hevc-${_svt_hevc_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v${_svt_hevc_ver}/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch" "030-ffmpeg-add-svt-hevc-docs-${_svt_hevc_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch" @@ -128,7 +128,6 @@ source=( ) sha256sums=('SKIP' '8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d' - '960fd930955cd126e33c543eb5bf300fc050efdd4238626ee4aad2a50d353fa7' '5b6815fc088d4acdc046eb223350a964bc998b0759aef90acf0591f65e7c98cb' 'b37d43d5d8692599347c6f1f316c13b9a9addc66d3ceb7e6e02341c494af7cdc' '1499e419dda72b1604dc5e3959668f3843292ff56bfba78734e31510ba576de0' @@ -144,9 +143,6 @@ sha256sums=('SKIP' prepare() { cd ffmpeg - # fix compilation against libsrt 1.4.2 - patch -Np1 -i "${srcdir}/016-ffmpeg-srt-1.4.2-fix.patch" - # fix glslang patch -Np1 -i "${srcdir}/017-ffmpeg-glslang-11.0-fix.patch" @@ -211,6 +207,7 @@ build() { --enable-libxcb \ --enable-libxml2 \ --enable-libxvid \ + --enable-libzimg \ --enable-nvdec \ --enable-nvenc \ --enable-omx \ @@ -225,10 +222,11 @@ build() { --enable-vdpau \ --enable-opencl \ --enable-openal \ - --enable-libglslang \ --enable-vulkan \ --enable-nonfree + # note: removing --enable-libglslang for now due to "ERROR: libglslang not found" + make make tools/qt-faststart make doc/ff{mpeg,play}.1