From 0e7de0eb75945fab46941ff012d180f6e00510b3 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 15 Jun 2018 10:51:45 +0200 Subject: [PATCH] gstreamer1.0: re-add missing recipes Commit 105ab7a89b10 removed all gstreamer plugins recipes but NXP meta-fsl-bsp-release still contains .bbappends that this commit re-adds. Besides, the imx-gst1.0-plugin recipe contained a patch by Digi that was also wrongly removed and that this commit re-adds without the version on the filename. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-6029 --- .../gstreamer1.0-plugins-bad_1.12.%.bbappend | 54 ++++++++++++ .../gstreamer1.0-plugins-base_1.12.%.bbappend | 32 +++++++ .../gstreamer1.0-plugins-good_1.12.%.bbappend | 17 ++++ .../gstreamer/gstreamer1.0_1.12.%.bbappend | 16 ++++ ...gstimxv4l2-map-dev-video1-to-dev-fb0.patch | 30 +++++++ .../gstreamer/imx-gst1.0-plugin_%.bbappend | 5 ++ .../gstreamer/imx-gst1.0-plugin_4.3.1.bb | 86 +++++++++++++++++++ 7 files changed, 240 insertions(+) create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.%.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.%.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.%.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.12.%.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-gstimxv4l2-map-dev-video1-to-dev-fb0.patch create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_%.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.3.1.bb diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.%.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.%.bbappend new file mode 100644 index 000000000..da16b5774 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.%.bbappend @@ -0,0 +1,54 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS_append_imxgpu2d = " virtual/libg2d" +DEPENDS_append_mx7ulp = " libdrm" + +PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" +PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" + +PACKAGECONFIG_append_mx6q = " opencv" +PACKAGECONFIG_append_mx6qp = " opencv" +PACKAGECONFIG_append_mx8 = " opencv kms" +PACKAGECONFIG_remove_mx6sl = " gles2" + +#revert poky fido commit:cdc2c8aeaa96b07dfc431a4cf0bf51ef7f8802a3: move EGL to Wayland +PACKAGECONFIG[gles2] = "--enable-gles2 --enable-egl,--disable-gles2 --disable-egl,virtual/libgles2 virtual/egl" +PACKAGECONFIG[wayland] = "--enable-wayland --disable-x11,--disable-wayland,wayland-native wayland wayland-protocols libdrm" + +# Disable introspection to fix [GstGL-1.0.gir] Error +EXTRA_OECONF_append = " --disable-introspection" + +EXTRA_OECONF_remove = " --disable-sdl --disable-nas --disable-libvisual --disable-xvid --disable-mimic \ + --disable-pvr --disable-sdltest --disable-wininet --disable-timidity \ + --disable-linsys --disable-sndio --disable-apexsink \ +" +# Use i.MX fork of GST for customizations +SRC_URI_remove_imx = " \ + http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ +" + +GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" +SRCBRANCH = "MM_04.03.05_1804_L4.9.88_MX7ULP_GA" + +SRC_URI_append_imx = " \ + ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ +" + +SRCREV_imx = "3bf09ef9cda8220b53459b45fe5384a99a7b1c6b" + +# This remove "--exclude=autopoint" option from autoreconf argument to avoid +# configure.ac:30: error: required file './ABOUT-NLS' not found +EXTRA_AUTORECONF = "" + +# include fragment shaders +FILES_${PN}-opengl += "/usr/share/*.fs" + +PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" + +# Fix libgstbadion-1.0.so.0 which is under built directory cannot be found +do_compile_prepend () { + export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/ion/.libs" +} + +S_imx = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.%.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.%.bbappend new file mode 100644 index 000000000..11c5fa7fc --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.%.bbappend @@ -0,0 +1,32 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +# Enable pango lib +PACKAGECONFIG_append = " pango " + +# ion allocator will be enabled only when detecting the ion.h exists, which is built out from kernel. +# Now, ion allocator can be supported on all i.MX platform +DEPENDS_append = " virtual/kernel" + +# Remove gio-unix-2.0 as it does not seem to exist anywhere +PACKAGECONFIG_remove = "gio-unix-2.0" +# Overwrite the unrecognised option which is set in gstreamer1.0-plugins-base.inc under poky layer +PACKAGECONFIG[gio-unix-2.0] = "" + +# Use i.MX fork of GST for customizations +SRC_URI_remove_imx = " \ + http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ + file://get-caps-from-src-pad-when-query-caps.patch \ +" + +GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" +SRCBRANCH = "MM_04.03.05_1804_L4.9.88_MX7ULP_GA" + +SRC_URI_append_imx = " \ + ${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \ +" +SRCREV_imx = "7b637f65e7ce2b03c5adb7624501e74c575ac0f2" + +EXTRA_AUTORECONF = "" + +S_imx = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.%.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.%.bbappend new file mode 100644 index 000000000..a84621956 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.%.bbappend @@ -0,0 +1,17 @@ +# Use i.MX fork of GST for customizations +SRC_URI_remove_imx = " \ + http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ + file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \ +" + +GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https" +SRCBRANCH = "imx-1.12.x" + +SRC_URI_append_imx = " \ + ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ +" +SRCREV_imx = "b2c850f295a0fe49310fb60784ac6af4a29bceae" + +EXTRA_AUTORECONF = "" + +S_imx = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.12.%.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.12.%.bbappend new file mode 100644 index 000000000..f037cdb5e --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.12.%.bbappend @@ -0,0 +1,16 @@ +# Use i.MX fork of GST for customizations +GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" +SRCBRANCH = "imx-1.12.x" + +SRC_URI_remove_imx = "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz " +SRC_URI_append_imx = " ${GST1.0_SRC};branch=${SRCBRANCH}" +SRCREV_imx = "cca1ebf223bd423ed5fc21031014ee1f3ce497a1" + +EXTRA_AUTORECONF = "" + +DEPENDS += " elfutils" + +# Unrecognised options, need to remove them +EXTRA_OECONF_remove = " --disable-docbook --disable-trace" + +S_imx = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-gstimxv4l2-map-dev-video1-to-dev-fb0.patch b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-gstimxv4l2-map-dev-video1-to-dev-fb0.patch new file mode 100644 index 000000000..4aa2a1b7f --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-gstimxv4l2-map-dev-video1-to-dev-fb0.patch @@ -0,0 +1,30 @@ +From: Hector Palacios +Date: Wed, 21 Dec 2016 16:28:05 +0100 +Subject: [PATCH] gstimxv4l2: map /dev/video1 to /dev/fb0 + +On the i.MX6UL, the CSI camera is probed before the video PXP device. +In this case the camera is registered as /dev/video0 and the video device +is registered as /dev/video1. + +In the mappings for video devices we must map /dev/video1 to /dev/fb0 so +that the imxv4l2sink can work with it. + +Signed-off-by: Hector Palacios + +https://jira.digi.com/browse/DEL-3399 +--- + libs/v4l2_core/gstimxv4l2.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c +index 52f43794a71d..633f267df4b8 100755 +--- a/libs/v4l2_core/gstimxv4l2.c ++++ b/libs/v4l2_core/gstimxv4l2.c +@@ -208,6 +208,7 @@ static guint g_camera_format_PXP[] = { + + static IMXV4l2DeviceMap g_device_maps[] = { + {"/dev/video0", FALSE, "/dev/fb0"}, ++ {"/dev/video1", FALSE, "/dev/fb0"}, + {"/dev/video16", TRUE, "/dev/fb0"}, + {"/dev/video17", FALSE, "/dev/fb0"}, + {"/dev/video18", TRUE, "/dev/fb2"}, diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_%.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_%.bbappend new file mode 100644 index 000000000..0910aca5a --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_%.bbappend @@ -0,0 +1,5 @@ +# Copyright (C) 2016-2018 Digi International + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" + +SRC_URI += "file://0001-gstimxv4l2-map-dev-video1-to-dev-fb0.patch" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.3.1.bb b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.3.1.bb new file mode 100644 index 000000000..067a36527 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.3.1.bb @@ -0,0 +1,86 @@ +# Copyright (C) 2014,2016 Freescale Semiconductor +# Copyright 2017 NXP +# Copyright (C) 2012-2015 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Gstreamer freescale plugins" +LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1" +SECTION = "multimedia" + +DEPENDS = "imx-codec imx-parser virtual/kernel gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" +DEPENDS_append_mx6 = " imx-lib" +DEPENDS_append_mx7 = " imx-lib" +DEPENDS_append_imxvpu = " imx-vpuwrap" + +# For backwards compatibility +RREPLACES_${PN} = "gst1.0-fsl-plugin" +RPROVIDES_${PN} = "gst1.0-fsl-plugin" +RCONFLICTS_${PN} = "gst1.0-fsl-plugin" + +LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24" + +IMXGST_SRC ?= "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https" +SRCBRANCH = "MM_04.03.01_1710_L4.9.51_MX8_BETA1" + +SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}" +SRCREV = "6d489bb8fbbd04076a2893f0e43e79cc378ccab2" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +# Make sure kernel sources are available +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +PLATFORM_mx6 = "MX6" +PLATFORM_mx6sl = "MX6SL" +PLATFORM_mx6sx = "MX6SX" +PLATFORM_mx6ul = "MX6UL" +PLATFORM_mx6sll = "MX6SLL" +PLATFORM_mx7= "MX7D" +PLATFORM_mx7ulp= "MX7ULP" +PLATFORM_mx8 = "MX8" + +# Todo add a mechanism to map possible build targets +EXTRA_OECONF = "PLATFORM=${PLATFORM} \ + CPPFLAGS="-I${STAGING_KERNEL_BUILDDIR}/include/generated/uapi -I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include" \ + CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', bb.utils.contains('DISTRO_FEATURES', 'x11', '--disable-x11', '', d), '', d)}" + +PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" + +# Add codec list that the beep plugin run-time depended +BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis" +RDEPENDS_${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux " + +# overlaysink rely on G2D, +# cannot be supported on i.MX6SLL & i.MX6UL & i.MX6ULL & i.MX7D +PACKAGECONFIG ?= "" +PACKAGECONFIG_imxgpu2d = "overlaysink" + + +# FIXME: Add all features +# feature from excluded mm packages +PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec" +# feature from special mm packages +PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec" +MSDEPENDS = "imx-msparser imx-mscodec" +PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}" +PACKAGECONFIG[wma8enc] += "--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}" +OVDEPENDS = "virtual/libg2d" +PACKAGECONFIG[overlaysink] += "--enable-overlaysink,--disable-overlaysink, ${OVDEPENDS}" + +FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" + +FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc" +FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" +FILES_${PN}-gplay = "${bindir}/gplay-1.0" +FILES_${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}" +FILES_${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}" +FILES_${PN}-grecorder = "${bindir}/grecorder-1.0" +FILES_${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}" +FILES_${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"