From f0ca145c90637c2c89027f5a00e36662b9e23e1b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 11 Mar 2023 10:27:46 -0800 Subject: gstreamer1.0-omx: Add 1.20.3.imx recipe Signed-off-by: Khem Raj --- conf/machine/include/imx-base.inc | 1 + .../gstreamer/gstreamer1.0-omx_1.20.3.imx.bb | 52 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.imx.bb diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index eeef28be..10f74c5d 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -481,6 +481,7 @@ PREFERRED_VERSION_gstreamer1.0-libav:mx8-nxp-bsp ??= "1.20.3.imx" PREFERRED_VERSION_gstreamer1.0-rtsp-server:mx8-nxp-bsp ??= "1.20.3.imx" PREFERRED_VERSION_gstreamer1.0-python:mx8-nxp-bsp ??= "1.20.3.imx" PREFERRED_VERSION_gstreamer1.0-vaapi:mx8-nxp-bsp ??= "1.20.3.imx" +PREFERRED_VERSION_gstreamer1.0-omx:mx8-nxp-bsp ??= "1.20.3.imx" PREFERRED_VERSION_ffmpeg:mx8-nxp-bsp ??= "4.4.1" # Determines if the SoC has support for Vivante kernel driver diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.imx.bb new file mode 100644 index 00000000..dc1c8ba0 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.imx.bb @@ -0,0 +1,52 @@ +SUMMARY = "OpenMAX IL plugins for GStreamer" +DESCRIPTION = "Wraps available OpenMAX IL components and makes them available as standard GStreamer elements." +HOMEPAGE = "http://gstreamer.freedesktop.org/" +SECTION = "multimedia" + +LICENSE = "LGPL-2.1-or-later" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${@get_gst_ver('${PV}')}.tar.xz" + +SRC_URI[sha256sum] = "8db48040bb41f09edf8d17ff6d16c54888d7777ba4501c2c69f0083350ea9a15" + +S = "${WORKDIR}/gst-omx-${@get_gst_ver('${PV}')}" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad virtual/libomxil" + +inherit meson pkgconfig upstream-version-is-even + +GSTREAMER_1_0_OMX_TARGET ?= "bellagio" +GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0" + +EXTRA_OEMESON += "-Dtarget=${GSTREAMER_1_0_OMX_TARGET}" + +python __anonymous () { + omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET") + if omx_target in ['generic', 'bellagio']: + # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,# + # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros); + # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this + d.appendVar("CFLAGS", " -I${S}/omx/openmax") + elif omx_target == "rpi": + # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific + d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH")) +} + +set_omx_core_name() { + sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf" +} + +# Drop .imx from PV +def get_gst_ver(v): + return oe.utils.trim_version(v, 3) + +do_install[postfuncs] += " set_omx_core_name " + +FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" + +VIRTUAL-RUNTIME_libomxil ?= "libomxil" +RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_libomxil}" -- cgit v1.2.3-54-g00ecf