summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2019-09-12 11:36:50 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2019-09-12 14:45:07 -0300
commitc4ce82a98112297d3964ace38b9ad94a07714b84 (patch)
treedfc8f8cc01c8771814ccec1a373da53dd319dea7 /recipes-multimedia
parentd5e848a20ad6b58cd6187ac12fc41e8b79865a3e (diff)
downloadmeta-freescale-c4ce82a98112297d3964ace38b9ad94a07714b84.tar.gz
gstreamer1.0-libav_1.14.0: add gstreamer1.0-libav recipe
Newer versions of libav have dependencies on the newer gst versions. To use the gstreamer-imx fork we also need this older version of libav. Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch33
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch35
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch26
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb70
6 files changed, 232 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
new file mode 100644
index 00000000..1d99ad12
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
@@ -0,0 +1,33 @@
1From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <dv@pseudoterminal.org>
3Date: Sat, 6 Apr 2013 01:22:22 +0200
4Subject: [PATCH] Disable yasm for libav when --disable-yasm
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Shane Wang <shane.wang@intel.com>
9Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
10---
11 configure.ac | 4 ++++
12 1 file changed, 4 insertions(+)
13
14diff --git a/configure.ac b/configure.ac
15index 22ede88..ef3c050 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -305,6 +305,12 @@ else
19 emblibav_configure_args="$emblibav_configure_args --enable-gpl"
20 fi
21
22+ AC_ARG_ENABLE(yasm,
23+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
24+ if test "x$enable_yasm" = "xno"; then
25+ emblibav_configure_args="$emblibav_configure_args --disable-yasm"
26+ fi
27+
28 # if we are cross-compiling, tell libav so
29 case $host in
30 *android*)
31--
321.8.2
33
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
new file mode 100644
index 00000000..b80d0739
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
@@ -0,0 +1,35 @@
1From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 20 Apr 2017 10:38:18 -0700
4Subject: [PATCH] configure: check for armv7ve variant
5
6OE passes -mcpu and -march via cmdline and if
7package tries to detect one of it own then it
8should be compatible otherwise, newer gcc7+ will
9error out
10
11Check for relevant preprocessor macro to determine
12armv7ve architecture
13
14Upstream-Status: Pending
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 gst-libs/ext/libav/configure | 1 +
19 1 file changed, 1 insertion(+)
20
21diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
22index 4a5e477..727818e 100755
23--- a/gst-libs/ext/libav/configure
24+++ b/gst-libs/ext/libav/configure
25@@ -4295,6 +4295,7 @@ elif enabled arm; then
26 elif check_arm_arch 6Z; then echo armv6z
27 elif check_arm_arch 6ZK; then echo armv6zk
28 elif check_arm_arch 6T2; then echo armv6t2
29+ elif check_arm_arch EXT_IDIV; then echo armv7ve
30 elif check_arm_arch 7; then echo armv7
31 elif check_arm_arch 7A 7_A; then echo armv7-a
32 elif check_arm_arch 7S; then echo armv7-a
33--
342.12.2
35
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
new file mode 100644
index 00000000..120c0798
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
@@ -0,0 +1,36 @@
1From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 11 Apr 2018 17:14:55 +0800
4Subject: [PATCH] Prevent host contamination
5
6Remove reference to host $(libdir) from .la files.
7
8Upstream-Status: Inappropriate [cross-compile specific]
9
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 gst-libs/ext/Makefile.am | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am
16index 6cdc048..a19d255 100644
17--- a/gst-libs/ext/Makefile.am
18+++ b/gst-libs/ext/Makefile.am
19@@ -49,7 +49,7 @@ echo " GEN $1.la" && \
20 echo "library_names=''" && \
21 echo "old_library='$1.a'" && \
22 echo "inherited_linker_flags=''" && \
23- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
24+ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
25 echo "weak_library_names=''" && \
26 echo "current=" && \
27 echo "age=" && \
28@@ -58,7 +58,7 @@ echo " GEN $1.la" && \
29 echo "shouldnotlink=no" && \
30 echo "dlopen=''" && \
31 echo "dlpreopen=''" && \
32- echo "libdir='$(libdir)'") > $1.la
33+ echo "libdir=''") > $1.la
34 endef
35
36 libavutil.la:
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
new file mode 100644
index 00000000..7a0b4488
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
@@ -0,0 +1,32 @@
1It will add -mips64r6 and -mips64r2 to cmdline which will
2cause conflicts
3
4in OE we user mips32r2 and mips64r2 for mips arch versions
5so there is no benefit of detecting it automatically by
6poking at tools especially in cross env
7
8Fixes errors like
9
10linking -mnan=2008 module with previous -mnan=legacy modules
11failed to merge target specific data of file
12
13-Khem
14Upstream-Status: Inappropriate [OE-Specific]
15
16Index: gst-libav-1.10.1/gst-libs/ext/libav/configure
17===================================================================
18--- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure
19+++ gst-libav-1.10.1/gst-libs/ext/libav/configure
20@@ -5269,12 +5269,9 @@ elif enabled mips; then
21
22 # Enable minimum ISA based on selected options
23 if enabled mips64; then
24- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
25 enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
26 disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
27 else
28- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
29- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
30 enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
31 disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
32 fi
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
new file mode 100644
index 00000000..36abf860
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
@@ -0,0 +1,26 @@
1Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset
2Author: Bernhard Übelacker <bernhardu@vr-web.de>
3
4---
5Bug-Debian: https://bugs.debian.org/783082
6Last-Update: 2015-04-28
7
8Upstream-Status: Backport [debian]
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11
12--- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c
13+++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c
14@@ -2020,7 +2020,11 @@ decode_intra_mb:
15 // In deblocking, the quantizer is 0
16 h->cur_pic.qscale_table[mb_xy] = 0;
17 // All coeffs are present
18- memset(h->non_zero_count[mb_xy], 16, 48);
19+ /*memset(h->non_zero_count[mb_xy], 16, 48);*/
20+ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */
21+ for (size_t i = 0; i < 48; i++) {
22+ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16;
23+ }
24 h->cur_pic.mb_type[mb_xy] = mb_type;
25 sl->last_qscale_diff = 0;
26 return 0;
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb
new file mode 100644
index 00000000..64454464
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb
@@ -0,0 +1,70 @@
1SUMMARY = "Libav-based GStreamer 1.x plugin"
2HOMEPAGE = "http://gstreamer.freedesktop.org/"
3SECTION = "multimedia"
4
5LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
6LICENSE_FLAGS = "commercial"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
9 file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
10 file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
11 file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
12 file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
13 file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
14
15SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
16 file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
17 file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
18 file://mips64_cpu_detection.patch \
19 file://0001-configure-check-for-armv7ve-variant.patch \
20 file://0001-fix-host-contamination.patch \
21 "
22SRC_URI[md5sum] = "943045b9e937ffc5c6cfa0bd5c44230d"
23SRC_URI[sha256sum] = "fb134b4d3e054746ef8b922ff157b0c7903d1fdd910708a45add66954da7ef89"
24
25S = "${WORKDIR}/gst-libav-${PV}"
26
27DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
28
29inherit autotools pkgconfig upstream-version-is-even gtk-doc
30
31# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
32# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
33# libav copy included in the gst-libav package.
34PACKAGECONFIG ??= "orc yasm"
35
36PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
37PACKAGECONFIG[libav] = "--with-system-libav,,libav"
38PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
39PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native"
40PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
41
42GSTREAMER_1_0_DEBUG ?= "--disable-debug"
43
44LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
45
46LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
47 --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
48 --ranlib='${RANLIB}' \
49 ${GSTREAMER_1_0_DEBUG} \
50 --cross-prefix='${HOST_PREFIX}'"
51
52# Disable assembly optimizations for X32, as this libav lacks the support
53PACKAGECONFIG_remove_linux-gnux32 = "yasm"
54LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
55
56LIBAV_EXTRA_CONFIGURE_COMMON = \
57'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
58
59EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
60
61FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
62FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
63FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
64
65# http://errors.yoctoproject.org/Errors/Details/20493/
66ARM_INSTRUCTION_SET_armv4 = "arm"
67ARM_INSTRUCTION_SET_armv5 = "arm"
68
69# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
70INSANE_SKIP_${PN} = "textrel"