gstreamer-ti_svn: various updates
[openembedded.git] / recipes / ti / gstreamer-ti.inc
blobee45194f64689ab549fe91b440476a9f5cf8ded7
1 DESCRIPTION = "GSTREAMER Plugin (gstreamer-ti) for TI ARM/DSP processors"
2 HOMEPAGE = "https://gforge.ti.com/gf/project/gstreamer_ti/"
3 SECTION = "multimedia"
4 LICENSE = "LGPL"
6 # TODO :: Replace omapl137 with official support in GST (currently linking to omapl138)
7 # TODO :: Codec Server Environment Variables shouldn't be required
8 # TODO :: Add (and check) rc scripts for all targets (just copied for now) (365,6467,omapl137)
9 # TODO :: Check if CPPFLAGS_append is still required
10 # TODO :: Remove ENCODE/DECODE combo exports - these are not used anymore (check?)
12 inherit autotools
13 inherit update-rc.d
14 require ti-paths.inc
15 require ti-staging.inc
17 # Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc
18 PR = "r79+${MACHINE_KERNEL_PR}"
20 DEPENDS = "ti-dmai gstreamer gst-plugins-base"
22 # enable c6accel elements on omapl138 and omap3
23 DEPENDS_append_omapl138 = " ti-c6accel "
24 EXTRA_OECONF_omapl138 = "--enable-c6accel"
25 DEPENDS_append_omap3 = " ti-c6accel "
26 EXTRA_OECONF_omap3 = "--enable-c6accel"
27 export C6ACCEL_INSTALL_DIR
29 # gstreamer_ti picks up some config variables from the environment
30 # - variables are used in the gstreamer makefile
31 #   - PLATFORM, XDC_PLATFORM, XDC_TARGET, MVTOOL_DIR  
32 # - others used by config.bld (which it gets from the dmai config.bld)
33 #   - CROSS_COMPILE, PLATFORM_XDC
35 PLATFORM_dm6446        = "dm6446"
36 PLATFORM_dm6467        = "dm6467"
37 PLATFORM_dm6467t       = "dm6467t"
38 PLATFORM_omap3         = "omap3530"
39 PLATFORM_dm355         = "dm355"
40 PLATFORM_dm365         = "dm365"
41 PLATFORM_omapl137      = "omapl137"
42 PLATFORM_omapl138      = "omapl138"
43 PLATFORM              ?= "<UNDEFINED_PLATFORM>"
44 GST_TI_PLATFORM = ${PLATFORM}
46 XDC_PLATFORM_dm6446    = "ti.platforms.evmDM6446"
47 XDC_PLATFORM_dm6467    = "ti.platforms.evmDM6467"
48 XDC_PLATFORM_omap3     = "ti.platforms.evm3530"
49 XDC_PLATFORM_dm355     = "ti.platforms.evmDM355"
50 XDC_PLATFORM_dm365     = "ti.platforms.evmDM365"
51 XDC_PLATFORM_omapl137  = "ti.platforms.evmOMAPL137"
52 XDC_PLATFORM_omapl138  = "ti.platforms.evmOMAPL138"
53 XDC_PLATFORM          ?= "<UNDEFINED_XDC_PLATFORM>"
55 export PLATFORM
56 export GST_TI_PLATFORM
57 export XDC_PLATFORM
58 export XDC_TARGET      = "gnu.targets.arm.GCArmv5T"
59 export PLATFORM_XDC    = ${XDC_PLATFORM}
60 export MVTOOL_DIR      = "${TOOLCHAIN_PATH}"
61 export CROSS_COMPILE   = "${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}"
62 export LINK_XDC_ROOT   = "${LINK_INSTALL_DIR}"
64 # export codec combo (or server) locations
65 # Why do we need to do this?? - These will get picked up from CODEC_INSTALL_DIR?
66 # Sould only need this if we change from default server
68 export CODEC_SERVER  = "${installdir}/ti-codecs-server/cs.x64P"
69 CPPFLAGS_append = " -DPlatform_${PLATFORM}"
71 # We are still using encode/decode combo for DM6446
72 export ENCODE_COMBO    = "${installdir}/ti-codecs-server/encodeCombo.x64P"
73 export DECODE_COMBO    = "${installdir}/ti-codecs-server/decodeCombo.x64P"
74 # Makefile also expects to be able to find the kernel headers from the envirionment
75 export LINUXKERNEL_INSTALL_DIR = "${STAGING_KERNEL_DIR}"
77 do_configure_prepend() {
78         # PSP kernel is based on older DSS. we need to replace linux/omapfb.h with mach/omapfb.h
79         if ! [ -e ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ] ; then
80                 sed -i -e s:linux/omapfb:mach/omapfb:g ${S}/src/omapfb.h || true
81         fi
84 do_install_prepend () {
86     install -d ${D}/${installdir}/gst/${PLATFORM}
88     # copy gstreamer demo scripts
89     cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst
91     # If we have loadmodules.sh in WORKDIR then give preference to this over
92     # the default gst-ti loadmdules.sh
93     if [ -f ${WORKDIR}/loadmodules.sh ]; then
94        cp ${WORKDIR}/loadmodules.sh ${D}/${installdir}/gst/${PLATFORM}
95     else
96        cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst
97     fi   
99     # delete .svn files
100     find ${D}/${installdir}/gst -name .svn -type d | xargs rm -rf
101     chmod 0755 ${D}/${installdir}/gst -R
103     install -d ${D}${sysconfdir}/init.d/
104     install -m 0755  ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init
106     sed -i -e 's|<platform>|${PLATFORM}|g' ${D}${sysconfdir}/init.d/gstti-init
109 RRECOMMENDS_${PN}_append_dm6446    += "ti-codecs-dm6446-server   ti-cmem-module ti-dsplink-module"
110 RRECOMMENDS_${PN}_append_dm6467    += "ti-codecs-dm6467          ti-cmem-module ti-dsplink-module"
111 RRECOMMENDS_${PN}_append_omap3     += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module"
112 RRECOMMENDS_${PN}_append_dm355     += "ti-codecs-dm355           ti-cmem-module ti-dm355mm-module"
113 RRECOMMENDS_${PN}_append_dm365     += "ti-codecs-dm365           ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module"
114 RRECOMMENDS_${PN}_append_omapl137  += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module"
115 RRECOMMENDS_${PN}_append_omapl138  += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module"
117 FILES_${PN}     += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}"
118 FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
119 FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
121 pkg_postinst_${PN} () {
122         if [ -d ${installdir}/ti-codecs-server/ ]; then
123         ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/
124         fi
127 INITSCRIPT_NAME = "gstti-init"
128 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."