[rcar-gen3] Backported gstreamer from poky krogoth
[AGL/meta-agl.git] / meta-agl-bsp / meta-rcar-gen3 / recipes-backport / gstreamer_bp_krogoth / gstreamer1.0-omx.inc
1 SUMMARY = "OpenMAX IL plugins for GStreamer"
2 HOMEPAGE = "http://gstreamer.freedesktop.org/"
3 SECTION = "multimedia"
4
5 LICENSE = "LGPLv2.1"
6 LICENSE_FLAGS = "commercial"
7
8 DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
9
10 inherit autotools pkgconfig gettext
11
12 acpaths = "-I ${S}/common/m4 -I ${S}/m4"
13
14 PR = "r1"
15
16 GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
17 GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
18
19 EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
20
21 python __anonymous () {
22     omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True)
23     if omx_target in ['generic', 'bellagio']:
24         # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
25         # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
26         # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this
27         d.appendVar("CFLAGS", " -I${S}/omx/openmax")
28     elif omx_target == "rpi":
29         # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
30         d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True))
31 }
32
33 set_omx_core_name() {
34         sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
35 }
36
37 do_install[postfuncs] += " set_omx_core_name "
38
39 FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
40 FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
41 FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
42
43 RDEPENDS_${PN} = "libomxil"