Sync ffmpeg-custom with regular ffmpeg package

This commit is contained in:
Martchus 2021-03-22 11:17:34 +01:00
parent 847841ff91
commit 3d3cea12be
2 changed files with 7 additions and 59 deletions

View File

@ -1,50 +0,0 @@
From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001
From: Jun Zhao <barryjzhao@tencent.com>
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 <barryjzhao@tencent.com>
---
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

View File

@ -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