summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2020-11-14 17:45:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-17 21:53:14 +0000
commit0de203889ffd7b231bd296c3f7fc7ba71c82ae1d (patch)
treec906f22709dbb84aba88bcd33cdbff0d7c8ea0ec
parent8c193032c5ff222fee92d2fb16142ed6d65ab506 (diff)
downloadpoky-0de203889ffd7b231bd296c3f7fc7ba71c82ae1d.tar.gz
ffmpeg: add srt package config knob
* 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315] (From OE-Core rev: 5b9c0fa129308180d6d3acf0a321433652ecd9dc) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch52
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb2
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch
new file mode 100644
index 0000000000..7635c9196a
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch
@@ -0,0 +1,52 @@
1From aebb72e025cbfbd4a6765354f6f565ad4ac89789 Mon Sep 17 00:00:00 2001
2From: Jun Zhao <barryjzhao@tencent.com>
3Date: Sun, 12 Jul 2020 05:48:48 +0800
4Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1
5
6lavf/srt: fix build fail when used the libsrt 1.4.1
7
8libsrt changed the:
9SRTO_SMOOTHER -> SRTO_CONGESTION
10SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION
11and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC)
12in the header, it's lead to build fail
13
14fix #8760
15
16Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315]
17
18Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
19Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
20---
21 libavformat/libsrt.c | 8 ++++++++
22 1 file changed, 8 insertions(+)
23
24diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
25index 4de575b..4719ce0 100644
26--- a/libavformat/libsrt.c
27+++ b/libavformat/libsrt.c
28@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
29 (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
30 (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
31 #if SRT_VERSION_VALUE >= 0x010302
32+#if SRT_VERSION_VALUE >= 0x010401
33+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
34+#else
35 /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */
36 (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
37+#endif
38 (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) ||
39 (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) ||
40 #endif
41@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
42 (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
43 (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) ||
44 (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
45+#if SRT_VERSION_VALUE >= 0x010401
46+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
47+#else
48 (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
49+#endif
50 (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) ||
51 (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) ||
52 ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) {
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb
index 517dac7f05..72c2fe16ec 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb
@@ -25,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
25 25
26SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ 26SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
27 file://mips64_cpu_detection.patch \ 27 file://mips64_cpu_detection.patch \
28 file://0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch \
28 " 29 "
29SRC_URI[sha256sum] = "ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb" 30SRC_URI[sha256sum] = "ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb"
30 31
@@ -70,6 +71,7 @@ PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
70PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" 71PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
71PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" 72PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
72PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" 73PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
74PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
73PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" 75PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
74PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" 76PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
75PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" 77PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"