diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2019-09-12 11:36:50 +0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2019-09-12 14:45:07 -0300 |
commit | c4ce82a98112297d3964ace38b9ad94a07714b84 (patch) | |
tree | dfc8f8cc01c8771814ccec1a373da53dd319dea7 /recipes-multimedia/gstreamer | |
parent | d5e848a20ad6b58cd6187ac12fc41e8b79865a3e (diff) | |
download | meta-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/gstreamer')
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 @@ | |||
1 | From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Carlos Rafael Giani <dv@pseudoterminal.org> | ||
3 | Date: Sat, 6 Apr 2013 01:22:22 +0200 | ||
4 | Subject: [PATCH] Disable yasm for libav when --disable-yasm | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Signed-off-by: Shane Wang <shane.wang@intel.com> | ||
9 | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> | ||
10 | --- | ||
11 | configure.ac | 4 ++++ | ||
12 | 1 file changed, 4 insertions(+) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index 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 | -- | ||
32 | 1.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 @@ | |||
1 | From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 20 Apr 2017 10:38:18 -0700 | ||
4 | Subject: [PATCH] configure: check for armv7ve variant | ||
5 | |||
6 | OE passes -mcpu and -march via cmdline and if | ||
7 | package tries to detect one of it own then it | ||
8 | should be compatible otherwise, newer gcc7+ will | ||
9 | error out | ||
10 | |||
11 | Check for relevant preprocessor macro to determine | ||
12 | armv7ve architecture | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | gst-libs/ext/libav/configure | 1 + | ||
19 | 1 file changed, 1 insertion(+) | ||
20 | |||
21 | diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure | ||
22 | index 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 | -- | ||
34 | 2.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 @@ | |||
1 | From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 11 Apr 2018 17:14:55 +0800 | ||
4 | Subject: [PATCH] Prevent host contamination | ||
5 | |||
6 | Remove reference to host $(libdir) from .la files. | ||
7 | |||
8 | Upstream-Status: Inappropriate [cross-compile specific] | ||
9 | |||
10 | Signed-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 | |||
15 | diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am | ||
16 | index 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 @@ | |||
1 | It will add -mips64r6 and -mips64r2 to cmdline which will | ||
2 | cause conflicts | ||
3 | |||
4 | in OE we user mips32r2 and mips64r2 for mips arch versions | ||
5 | so there is no benefit of detecting it automatically by | ||
6 | poking at tools especially in cross env | ||
7 | |||
8 | Fixes errors like | ||
9 | |||
10 | linking -mnan=2008 module with previous -mnan=legacy modules | ||
11 | failed to merge target specific data of file | ||
12 | |||
13 | -Khem | ||
14 | Upstream-Status: Inappropriate [OE-Specific] | ||
15 | |||
16 | Index: 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 @@ | |||
1 | Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset | ||
2 | Author: Bernhard Übelacker <bernhardu@vr-web.de> | ||
3 | |||
4 | --- | ||
5 | Bug-Debian: https://bugs.debian.org/783082 | ||
6 | Last-Update: 2015-04-28 | ||
7 | |||
8 | Upstream-Status: Backport [debian] | ||
9 | |||
10 | Signed-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 @@ | |||
1 | SUMMARY = "Libav-based GStreamer 1.x plugin" | ||
2 | HOMEPAGE = "http://gstreamer.freedesktop.org/" | ||
3 | SECTION = "multimedia" | ||
4 | |||
5 | LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" | ||
6 | LICENSE_FLAGS = "commercial" | ||
7 | LIC_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 | |||
15 | SRC_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 | " | ||
22 | SRC_URI[md5sum] = "943045b9e937ffc5c6cfa0bd5c44230d" | ||
23 | SRC_URI[sha256sum] = "fb134b4d3e054746ef8b922ff157b0c7903d1fdd910708a45add66954da7ef89" | ||
24 | |||
25 | S = "${WORKDIR}/gst-libav-${PV}" | ||
26 | |||
27 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz" | ||
28 | |||
29 | inherit 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. | ||
34 | PACKAGECONFIG ??= "orc yasm" | ||
35 | |||
36 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl," | ||
37 | PACKAGECONFIG[libav] = "--with-system-libav,,libav" | ||
38 | PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc" | ||
39 | PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native" | ||
40 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" | ||
41 | |||
42 | GSTREAMER_1_0_DEBUG ?= "--disable-debug" | ||
43 | |||
44 | LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure" | ||
45 | |||
46 | LIBAV_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 | ||
53 | PACKAGECONFIG_remove_linux-gnux32 = "yasm" | ||
54 | LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm" | ||
55 | |||
56 | LIBAV_EXTRA_CONFIGURE_COMMON = \ | ||
57 | '${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"' | ||
58 | |||
59 | EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}" | ||
60 | |||
61 | FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" | ||
62 | FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" | ||
63 | FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" | ||
64 | |||
65 | # http://errors.yoctoproject.org/Errors/Details/20493/ | ||
66 | ARM_INSTRUCTION_SET_armv4 = "arm" | ||
67 | ARM_INSTRUCTION_SET_armv5 = "arm" | ||
68 | |||
69 | # ffmpeg/libav disables PIC on some platforms (e.g. x86-32) | ||
70 | INSANE_SKIP_${PN} = "textrel" | ||