From 6080d94ac0c1d9c985f4cf677000b4cd50e1e9ae Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Sun, 9 May 2010 11:21:07 -0500 Subject: gstreamer_ti: use latest svn rev and apply the patches from tracker 1055. * move the common build logic in gstreamer-ti.inc * rebase patches to latest svn rev. * add profile .sh to disable XDM 0.9 elements. * Except beagleboard, do not autoload kernel module in initscript. this is mainly because gst-ti loadmodule is not enough for all application (e.g dvsdk demo, dmai etc). And since beagle community is not installing dvsdk demo's hence its safe to install those kernel modules as the boot time. Signed-off-by: Brijesh Singh Signed-off-by: Koen Kooi --- recipes/ti/gstreamer-ti.inc | 121 ++ .../0001-gstreamer-ti-tracker-1055.patch | 994 ++++++++++++++ .../gstreamer-ti/0002-add-omapl138-support.patch | 288 +++++ .../gstreamer-ti/0003-add-omapl137-support.patch | 200 +++ ...004-gstreamer-ti-dm6467-usesinglecsserver.patch | 49 + .../gstreamer-ti/0005-remove-mp3-mime-type.patch | 42 + .../0006-gstreamer-ti-tracker-462.patch | 83 ++ .../ti/gstreamer-ti/0007-add-omapdmaifbsink.patch | 1365 ++++++++++++++++++++ recipes/ti/gstreamer-ti/dm355-evm/gst-ti.sh | 12 + recipes/ti/gstreamer-ti/dm365-evm/gst-ti.sh | 12 + recipes/ti/gstreamer-ti/dm365-evm/loadmodules.sh | 27 + recipes/ti/gstreamer-ti/gst-ti.sh | 9 + .../ti/gstreamer-ti/gstreamer-ti-add-omapfb.patch | 1335 ------------------- recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh | 61 - recipes/ti/gstreamer-ti/gstreamer-ti-dm365-rc.sh | 54 - recipes/ti/gstreamer-ti/gstreamer-ti-dm6446-rc.sh | 71 - recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-rc.sh | 71 - .../gstreamer-ti-dm6467-usesinglecsserver.patch | 36 - .../ti/gstreamer-ti/gstreamer-ti-omap3530-rc.sh | 71 - .../ti/gstreamer-ti/gstreamer-ti-omapl137-rc.sh | 54 - .../ti/gstreamer-ti/gstreamer-ti-omapl137.patch | 267 ---- .../ti/gstreamer-ti/gstreamer-ti-omapl138-rc.sh | 54 - .../ti/gstreamer-ti/gstreamer-ti-omapl138.patch | 267 ---- recipes/ti/gstreamer-ti/gstreamer-ti-rc.sh | 29 + ...ti-remove-mp3-decode-support-from-auddec1.patch | 26 - .../ti/gstreamer-ti/gstreamer-ti-tracker-462.patch | 68 - .../ti/gstreamer-ti/gstreamer-ti-tracker-824.patch | 147 --- recipes/ti/gstreamer-ti/omap3/gstreamer-ti-rc.sh | 42 + recipes/ti/gstreamer-ti/omap3/loadmodules.sh | 20 + .../ti/gstreamer-ti/omap3evm/gstreamer-ti-rc.sh | 29 + recipes/ti/gstreamer-ti/omapl137/loadmodules.sh | 12 + recipes/ti/gstreamer-ti/omapl138/loadmodules.sh | 13 + recipes/ti/gstreamer-ti_svn.bb | 176 +-- 33 files changed, 3369 insertions(+), 2736 deletions(-) create mode 100644 recipes/ti/gstreamer-ti.inc create mode 100644 recipes/ti/gstreamer-ti/0001-gstreamer-ti-tracker-1055.patch create mode 100644 recipes/ti/gstreamer-ti/0002-add-omapl138-support.patch create mode 100644 recipes/ti/gstreamer-ti/0003-add-omapl137-support.patch create mode 100644 recipes/ti/gstreamer-ti/0004-gstreamer-ti-dm6467-usesinglecsserver.patch create mode 100644 recipes/ti/gstreamer-ti/0005-remove-mp3-mime-type.patch create mode 100644 recipes/ti/gstreamer-ti/0006-gstreamer-ti-tracker-462.patch create mode 100644 recipes/ti/gstreamer-ti/0007-add-omapdmaifbsink.patch create mode 100644 recipes/ti/gstreamer-ti/dm355-evm/gst-ti.sh create mode 100644 recipes/ti/gstreamer-ti/dm365-evm/gst-ti.sh create mode 100644 recipes/ti/gstreamer-ti/dm365-evm/loadmodules.sh create mode 100644 recipes/ti/gstreamer-ti/gst-ti.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-add-omapfb.patch delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-dm365-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-dm6446-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-usesinglecsserver.patch delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-omap3530-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-omapl137-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-omapl137.patch delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-omapl138-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-omapl138.patch create mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-rc.sh delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-tracker-462.patch delete mode 100644 recipes/ti/gstreamer-ti/gstreamer-ti-tracker-824.patch create mode 100644 recipes/ti/gstreamer-ti/omap3/gstreamer-ti-rc.sh create mode 100644 recipes/ti/gstreamer-ti/omap3/loadmodules.sh create mode 100644 recipes/ti/gstreamer-ti/omap3evm/gstreamer-ti-rc.sh create mode 100644 recipes/ti/gstreamer-ti/omapl137/loadmodules.sh create mode 100644 recipes/ti/gstreamer-ti/omapl138/loadmodules.sh (limited to 'recipes') diff --git a/recipes/ti/gstreamer-ti.inc b/recipes/ti/gstreamer-ti.inc new file mode 100644 index 0000000000..afcc59b0c7 --- /dev/null +++ b/recipes/ti/gstreamer-ti.inc @@ -0,0 +1,121 @@ +DESCRIPTION = "GSTREAMER Plugin (gstreamer-ti) for TI ARM/DSP processors" +HOMEPAGE = "https://gforge.ti.com/gf/project/gstreamer_ti/" +SECTION = "multimedia" +LICENSE = "LGPL" + +# TODO :: Replace omapl137 with official support in GST (currently linking to omapl138) +# TODO :: Codec Server Environment Variables shouldn't be required +# TODO :: Add (and check) rc scripts for all targets (just copied for now) (365,6467,omapl137) +# TODO :: Check if CPPFLAGS_append is still required +# TODO :: Remove ENCODE/DECODE combo exports - these are not used anymore (check?) + +inherit autotools +inherit update-rc.d +require ti-paths.inc +require ti-staging.inc + +# Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc +PR = "r58+${MACHINE_KERNEL_PR}" + +DEPENDS = "ti-dmai gstreamer gst-plugins-base" + +# gstreamer_ti picks up some config variables from the environment +# - variables are used in the gstreamer makefile +# - PLATFORM, XDC_PLATFORM, XDC_TARGET, MVTOOL_DIR +# - others used by config.bld (which it gets from the dmai config.bld) +# - CROSS_COMPILE, PLATFORM_XDC + +PLATFORM_dm6446 = "dm6446" +PLATFORM_dm6467 = "dm6467" +PLATFORM_dm6467t = "dm6467t" +PLATFORM_omap3 = "omap3530" +PLATFORM_dm355 = "dm355" +PLATFORM_dm365 = "dm365" +PLATFORM_omapl137 = "omapl137" +PLATFORM_omapl138 = "omapl138" +PLATFORM ?= "" +GST_TI_PLATFORM = ${PLATFORM} + +XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446" +XDC_PLATFORM_dm6467 = "ti.platforms.evmDM6467" +XDC_PLATFORM_omap3 = "ti.platforms.evm3530" +XDC_PLATFORM_dm355 = "ti.platforms.evmDM355" +XDC_PLATFORM_dm365 = "ti.platforms.evmDM365" +XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137" +XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" +XDC_PLATFORM ?= "" + +export PLATFORM +export GST_TI_PLATFORM +export XDC_PLATFORM +export XDC_TARGET = "gnu.targets.arm.GCArmv5T" +export PLATFORM_XDC = ${XDC_PLATFORM} +export MVTOOL_DIR = "${TOOLCHAIN_PATH}" +export CROSS_COMPILE = "${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" +export LINK_XDC_ROOT = "${LINK_INSTALL_DIR}" + +# export codec combo (or server) locations +# Why do we need to do this?? - These will get picked up from CODEC_INSTALL_DIR? +# Sould only need this if we change from default server + +export CODEC_SERVER = "${installdir}/ti-codecs-server/cs.x64P" +CPPFLAGS_append = " -DPlatform_${PLATFORM}" + +do_install_prepend () { + + install -d ${D}/${installdir}/gst/${PLATFORM} + + # copy gstreamer demo scripts + cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst + + # If we have loadmodule.sh in WORKDIR then give preference to this over + # the default gst-ti loadmdules.sh + if [ -f ${WORKDIR}/loadmodules.sh ]; then + cp ${WORKDIR}/loadmodules.sh ${D}/${installdir}/gst/${PLATFORM} + else + cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst + fi + + # replace insmod with modprobe + sed -i 's/insmod/modprobe/g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + sed -i 's/.ko//g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + + if [ "${PLATFORM}" = "omap3530" ]; then + echo "modprobe sdmak" >> ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + fi + + # FIXME: add depmod -a after #!/bin/sh + sed -i '/#!\/bin\/sh/a\depmod -a' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + + # delete .svn files + find ${D}/${installdir}/gst -name .svn -type d | xargs rm -rf + chmod 0755 ${D}/${installdir}/gst -R + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init + install -d ${D}${sysconfdir}/profile.d/ + install -m 0755 ${WORKDIR}/gst-ti.sh ${D}${sysconfdir}/profile.d/ +} + +RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" +RRECOMMENDS_${PN}_append_dm6467 += "ti-codecs-dm6467 ti-cmem-module ti-dsplink-module" +RRECOMMENDS_${PN}_append_omap3 += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module" +RRECOMMENDS_${PN}_append_dm355 += "ti-codecs-dm355 ti-cmem-module ti-dm355mm-module" +RRECOMMENDS_${PN}_append_dm365 += "ti-codecs-dm365 ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module" +RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" +RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" + +FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" + +pkg_postinst_${PN} () { + if [ -d ${installdir}/ti-codecs-server/ ]; then + ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/ + fi +} + + +INITSCRIPT_NAME = "gstti-init" +INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." + diff --git a/recipes/ti/gstreamer-ti/0001-gstreamer-ti-tracker-1055.patch b/recipes/ti/gstreamer-ti/0001-gstreamer-ti-tracker-1055.patch new file mode 100644 index 0000000000..99a94a5561 --- /dev/null +++ b/recipes/ti/gstreamer-ti/0001-gstreamer-ti-tracker-1055.patch @@ -0,0 +1,994 @@ +From 455900e8cbb7a88d3ec05cba5393f4ca0bf22adc Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:21:19 -0500 +Subject: [PATCH] gstreamer ti tracker 1055 + +--- + Makefile.external | 49 +++++++--- + src/Makefile.am | 4 +- + src/gstticodecplugin_dm355.cfg | 143 ++++++++++++----------------- + src/gstticodecplugin_dm365.cfg | 185 ++++++++++++++++++-------------------- + src/gstticodecplugin_dm6467t.cfg | 34 +++++++ + src/gstticodecs_dm355.c | 11 +-- + src/gstticodecs_dm365.c | 23 ++++-- + src/gstticodecs_dm6467.c | 2 +- + src/gstticodecs_dm6467t.c | 69 ++++++++++++++ + src/gsttidmaivideosink.c | 25 ++++- + src/gsttividdec2.c | 73 ++++++++------- + src/gsttividenc1.c | 10 ++- + src/gsttividresize.c | 4 + + 13 files changed, 380 insertions(+), 252 deletions(-) + create mode 100644 src/gstticodecplugin_dm6467t.cfg + create mode 100644 src/gstticodecs_dm6467t.c + +diff --git a/Makefile.external b/Makefile.external +index ca14b49..1f67783 100644 +--- a/Makefile.external ++++ b/Makefile.external +@@ -3,8 +3,7 @@ + # + # The only customization required below is defining the DVSDK_PATH + # and, if your DVSDK doesn't include DMAI, the set DMAI_INSTALL_DIR variable +-# appropriately. If your DVSDK does include DMAI, then delete the line +-# setting the DMAI_INSTALL_DIR variable below. ++# appropriately. + # + # Copyright (C) 2009 Ridgerun + # +@@ -17,15 +16,16 @@ DMAI_INSTALL_DIR=undefined + ifeq ($(DVSDK_PATH),undefined) + $(error You need to define the environment variable DVSDK_PATH) + endif ++include $(DVSDK_PATH)/Rules.make ++ + ifeq ($(DMAI_INSTALL_DIR),undefined) + $(error You need to define the environment variable DMAI_INSTALL_DIR) + endif + + default: +- @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm365" ++ @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm6467t, dm365" + +-include $(DVSDK_PATH)/Rules.make +-export PLATFORM=$(MAKECMDGOALS) ++export GST_TI_PLATFORM=$(MAKECMDGOALS) + export BIOS_INSTALL_DIR + export CE_INSTALL_DIR + export CMEM_INSTALL_DIR +@@ -33,6 +33,7 @@ export CODEC_INSTALL_DIR + export DMAI_INSTALL_DIR + export FC_INSTALL_DIR + export LINK_INSTALL_DIR ++export LINK_XDC_ROOT = $(LINK_INSTALL_DIR)/packages + export LINUXKERNEL_INSTALL_DIR + export LPM_INSTALL_DIR + export MVTOOL_DIR +@@ -41,34 +42,49 @@ export XDAIS_INSTALL_DIR + export XDC_INSTALL_DIR + export EDMA3_LLD_INSTALL_DIR + +-ifeq ($(PLATFORM), dm355) +- export XDC_TARGET = gnu.targets.MVArm9 +- export XDC_PLATFORM = ti.platforms.evmDM355 ++ifeq ($(GST_TI_PLATFORM), dm355) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM355 ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} + endif + +-ifeq ($(PLATFORM), dm6446) ++ifeq ($(GST_TI_PLATFORM), dm6446) + export XDC_TARGET = gnu.targets.MVArm9 + export XDC_PLATFORM = ti.platforms.evmDM6446 + endif + +-ifeq ($(PLATFORM), dm6467) ++ifeq ($(GST_TI_PLATFORM), dm6467) + export XDC_TARGET = gnu.targets.MVArm9 + export XDC_PLATFORM = ti.platforms.evmDM6467 + endif + +-ifeq ($(PLATFORM), dm365) +- export XDC_TARGET = gnu.targets.MVArm9 +- export XDC_PLATFORM = ti.platforms.evmDM365 ++ifeq ($(GST_TI_PLATFORM), dm6467t) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM6467 ++ export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} + endif + +-ifeq ($(PLATFORM), omap3530) ++ifeq ($(GST_TI_PLATFORM), dm365) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM365 ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} ++endif ++ ++ifeq ($(GST_TI_PLATFORM), omap3530) + export XDC_TARGET = gnu.targets.arm.GCArmv5T + export XDC_PLATFORM = ti.platforms.evm3530 + export MVTOOL_PREFIX = $(CSTOOL_PREFIX) + export MVTOOL_DIR = $(CSTOOL_DIR) + endif + +-CPPFLAGS=-DPlatform_$(PLATFORM) ++CPPFLAGS=-DPlatform_$(GST_TI_PLATFORM) + HOST=arm-none-linux-gnueabi + + configure: +@@ -86,6 +102,9 @@ dm6446: Makefile + dm6467: Makefile + $(MAKE) -f Makefile + ++dm6467t: Makefile ++ $(MAKE) -f Makefile ++ + dm355: Makefile + $(MAKE) -f Makefile + +diff --git a/src/Makefile.am b/src/Makefile.am +index 231beb0..95973a8 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,6 +1,6 @@ + # plugindir is set in configure + +-XDC_CONFIG_BASENAME = gstticodecplugin_$(PLATFORM) ++XDC_CONFIG_BASENAME = gstticodecplugin_$(GST_TI_PLATFORM) + plugin_LTLIBRARIES = libgstticodecplugin.la + + # sources used to compile this plug-in +@@ -21,7 +21,7 @@ BUILT_SOURCES = $(XDC_CONFIG_BASENAME)/compiler.opt $(XDC_CONFIG_BASENAME)/linke + XDC_PATH = .;$(XDC_INSTALL_DIR)/packages;$(LINK_XDC_ROOT);$(FC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(XDAIS_INSTALL_DIR)/packages;$(CODEC_INSTALL_DIR)/packages;$(CMEM_INSTALL_DIR)/packages;$(DMAI_INSTALL_DIR)/packages;$(LPM_INSTALL_DIR)/packages;$(XDC_USER_PATH);$(EDMA3_LLD_INSTALL_DIR)/packages; + + gstticodecs_platform.c : +- ln -s $(srcdir)/gstticodecs_$(PLATFORM).c gstticodecs_platform.c ++ ln -s $(srcdir)/gstticodecs_$(GST_TI_PLATFORM).c gstticodecs_platform.c + + %/compiler.opt %/linker.cmd : %.cfg + XDCPATH="$(XDC_PATH)" $(CONFIGURO) -c $(MVTOOL_DIR) -o $(XDC_CONFIG_BASENAME) -t $(XDC_TARGET) -p $(XDC_PLATFORM) -b $(DMAI_INSTALL_DIR)/packages/config.bld $< +diff --git a/src/gstticodecplugin_dm355.cfg b/src/gstticodecplugin_dm355.cfg +index 7ceae4f..bf533f0 100644 +--- a/src/gstticodecplugin_dm355.cfg ++++ b/src/gstticodecplugin_dm355.cfg +@@ -1,84 +1,59 @@ +-/* +- * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as +- * published by the Free Software Foundation version 2.1 of the License. +- * +- * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +- * whether express or implied; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. +- * +- */ +- +-prog.build.platform = "ti.platforms.evmDM355"; +- +-/* Load support for the Codec Engine OSAL */ +-var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); +- +-/* Configure CE to use it's DSP Link Linux version */ +-osalGlobal.runtimeEnv = osalGlobal.LINUX; +- +-/* +- * ======== Engine Configuration ======== +- */ +-var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); +-var imgenc = xdc.module('ti.sdo.ce.image1.IIMGENC1'); +-var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.dm355.ce.MPEG4DEC'); +-var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.dm355.ce.MPEG4ENC'); +-var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.dm355.ce.JPEGENC'); +-var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.dm355.ce.JPEGDEC'); +- +-var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var decodeEngine = Engine.create("decode", [ +- {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, +- {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1}, +-]); +- +-var encodeEngine = Engine.create("encode", [ +- {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, +- {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1}, +-]); +- +-/* Load support for the 'Davinci Multimedia Application Interface' modules */ +-var DMAI = xdc.loadPackage('ti.sdo.dmai'); +- +-/* +- * ======== DMAN3 Configuration ======== +- */ +- +-var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3'); +- +-/* give DMAN3 all TCCs except those hard-coded by The JPEG & MPEG Enc & Decs */ +- +-/* +- * For the 32-63 range, configure tccAllocationMaskH to exclude used channels +- * JPEG Dec: {33-47, 52-57} +- * JPEG Enc: {34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49} +- * MPEG Dec: {32-63} +- * MPEG Enc: {12, 13, 34, 35, 40,41,42,43,44,45,46,47,48,49,50,52,53, +- * 54,55,56,57,63} +- */ +-DMAN3.tccAllocationMaskH = 0x0; /* everthing 32-63 hardcoded and unavailable */ +- +-/* Give DMAN3 all lower TCCs except what's taken by Linux kernel and a Codec: +- * Based on the info from montavista: {2, 3, 8, 9, 26, 27, 30, 31} +- * and MPEG Enc taking up: {12, 13} +- */ +-DMAN3.tccAllocationMaskL = 0x33ffccf3; +- +-/* Following assignments will give DMAN3 control of PaRAMs above 78: */ +-DMAN3.paRamBaseIndex = 64; +-DMAN3.numPaRamEntries = 48; +-DMAN3.nullPaRamIndex = 127; +- +-/* Configure Scratch Group's DMAN3 resources */ +-DMAN3.numTccGroup[1] = 0; +-DMAN3.numPaRamGroup[1] = 32; +- +-DMAN3.qdmaChannels = [0, 1, 2, 3, 4, 5, 6, 7]; +-DMAN3.maxQdmaChannels = 8; +-DMAN3.numQdmaChannels = 8; +-DMAN3.maxTCs = 2; +- ++/* =========================================================================== ++ * Copyright (c) Texas Instruments Incorporated 2009 ++ * ++ * Use of this software is controlled by the terms and conditions found in ++ * the license agreement under which this software has been supplied or ++ * provided. ++ * =========================================================================== ++ */ ++ ++/* Load support for the Codec Engine OSAL */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++/* Configure CE to use it's DSP Link Linux version */ ++osalGlobal.runtimeEnv = osalGlobal.LINUX; ++ ++/* Configure RMAN */ ++var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN'); ++RMAN.useDSKT2 = false; ++RMAN.persistentAllocFxn = "__ALG_allocMemory"; ++RMAN.persistentFreeFxn = "__ALG_freeMemory"; ++RMAN.semCreateFxn = "Sem_create"; ++RMAN.semDeleteFxn = "Sem_delete"; ++RMAN.semPendFxn = "Sem_pend"; ++RMAN.semPostFxn = "Sem_post"; ++RMAN.tableSize = 10; ++ ++var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings'); ++var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN'); ++var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); ++var VICPLU = xdc.useModule('ti.sdo.linuxutils.vicp.VICP'); ++var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2'); ++var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC'); ++var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); ++var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); ++ ++/* ++ * ======== Engine Configuration ======== ++ */ ++var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); ++var auddec = xdc.module('ti.sdo.ce.audio.IAUDDEC'); ++var videnc = xdc.module('ti.sdo.ce.video1.IVIDENC1'); ++var audenc = xdc.module('ti.sdo.ce.audio.IAUDENC'); ++ ++var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.ce.MPEG4DEC'); ++var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC'); ++var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC'); ++var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC'); ++ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var myEngine = Engine.create("codecServer", [ ++ {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, ++ {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1}, ++ {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, ++ {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1} ++]); ++ ++/* Load support for the 'Davinci Multimedia Application Interface' modules */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); ++ +diff --git a/src/gstticodecplugin_dm365.cfg b/src/gstticodecplugin_dm365.cfg +index 6442dce..0e94a35 100644 +--- a/src/gstticodecplugin_dm365.cfg ++++ b/src/gstticodecplugin_dm365.cfg +@@ -1,99 +1,86 @@ +-/* +- * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as +- * published by the Free Software Foundation version 2.1 of the License. +- * +- * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +- * whether express or implied; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. +- * +- */ +- +-prog.build.platform = "ti.platforms.evmDM365"; +- +-/* Load support for the Codec Engine OSAL */ +-var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); +- +-/* Configure CE to use it's DSP Link Linux version */ +-osalGlobal.runtimeEnv = osalGlobal.LINUX; +- +-/* +- * ======== Engine Configuration ======== +- */ +-var videnc = xdc.module('ti.sdo.ce.video1.IVIDENC1'); +-var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); +- +-var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC'); +-var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC'); +-var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.ce.MPEG4DEC'); +-var H264DEC = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC'); +-var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC'); +-var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC'); +- +-var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var encodeEngine = Engine.create("encode", [ +- {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, +- {name: "h264enc", mod: H264ENC, local: true, groupId: 1}, +- {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1}, +-]); +-var decodeEngine = Engine.create("decode", [ +- {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, +- {name: "h264dec", mod: H264DEC, local: true, groupId: 1}, +- {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1}, +-]); +- +-/* Load support for the 'Davinci Multimedia Application Interface' modules */ +-var DMAI = xdc.loadPackage('ti.sdo.dmai'); +- +-/* Load support for SimpleWidget */ +-/*var SW = xdc.loadPackage('ti.sdo.simplewidget');*/ +- +- +-/* Configure RMAN */ +-var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN'); +-RMAN.useDSKT2 = false; +-RMAN.persistentAllocFxn = "__ALG_allocMemory"; +-RMAN.persistentFreeFxn = "__ALG_freeMemory"; +-RMAN.semCreateFxn = "Sem_create"; +-RMAN.semDeleteFxn = "Sem_delete"; +-RMAN.semPendFxn = "Sem_pend"; +-RMAN.semPostFxn = "Sem_post"; +-RMAN.tableSize = 10; +- +-/* Configure VICPSYNC */ +-var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC'); +- +-/* Configure HDVICPSYNC */ +-var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC'); +- +-/* Configure MEMUTILS */ +-var MEMUTILS = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS'); +- +-var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings'); +- +-var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP'); +- +-var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2'); +- +-var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); +- +-var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN'); +- +-var LSP = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); +- +-var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); +- +- +-/* Uncomment these lines if you wish to debug FC and enable FC trace */ +- +-/* +-xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace"; +-xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace"; +-xdc.loadPackage('ti.sdo.fc.rman').profile = "debug_trace"; +-xdc.loadPackage('ti.sdo.fc.edma3').profile = "debug_trace"; +-EDMA3CHAN.trace = true; +-EDMA3CHAN.debug = true; +-*/ ++/* ============================================================================ ++ * Copyright (c) Texas Instruments Incorporated 2009 ++ * ++ * Use of this software is controlled by the terms and conditions found in the ++ * license agreement under which this software has been supplied or provided. ++ * ============================================================================ ++ */ ++ ++/* Load support for the Codec Engine OSAL */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++/* Configure CE to use it's DSP Link Linux version */ ++osalGlobal.runtimeEnv = osalGlobal.LINUX; ++ ++/* ++ * ======== Engine Configuration ======== ++ */ ++var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); ++var auddec = xdc.module('ti.sdo.ce.audio.IAUDDEC'); ++ ++var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec_hdvicp.ce.MPEG4DEC_HDVICP'); ++var MPEG2DEC = xdc.useModule('ti.sdo.codecs.mpeg2dec.ce.MPEG2DEC'); ++var H264DEC = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC'); ++var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc_hdvicp.ce.MPEG4ENC_HDVICP'); ++var MPEG2ENC = xdc.useModule('ti.sdo.codecs.mpeg2enc.ce.MPEG2ENC'); ++var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC'); ++ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var myEngine = Engine.create("codecServer", [ ++ {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, ++ {name: "mpeg2dec", mod: MPEG2DEC, local: true, groupId: 1}, ++ {name: "h264dec", mod: H264DEC, local: true, groupId: 1}, ++ {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, ++ {name: "mpeg2enc", mod: MPEG2ENC, local: true, groupId: 1}, ++ {name: "h264enc", mod: H264ENC, local: true, groupId: 1}, ++]); ++ ++ ++ ++/* Load support for the 'Davinci Multimedia Application Interface' modules */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); ++ ++/* Configure RMAN */ ++var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN'); ++RMAN.useDSKT2 = false; ++RMAN.persistentAllocFxn = "__ALG_allocMemory"; ++RMAN.persistentFreeFxn = "__ALG_freeMemory"; ++RMAN.semCreateFxn = "Sem_create"; ++RMAN.semDeleteFxn = "Sem_delete"; ++RMAN.semPendFxn = "Sem_pend"; ++RMAN.semPostFxn = "Sem_post"; ++RMAN.tableSize = 10; ++ ++/* Configure VICPSYNC */ ++var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC'); ++ ++/* Configure HDVICPSYNC */ ++var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC'); ++ ++/* Configure MEMUTILS */ ++var MEMUTILS = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS'); ++ ++var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings'); ++ ++var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP'); ++ ++var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2'); ++ ++var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN'); ++ ++var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); ++ ++var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); ++ ++var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); ++ ++/* Uncomment these lines if you wish to debug FC and enable FC trace */ ++/* ++/* ++xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace"; ++xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace"; ++xdc.loadPackage('ti.sdo.fc.rman').profile = "debug_trace"; ++xdc.loadPackage('ti.sdo.fc.edma3').profile = "debug_trace"; ++EDMA3CHAN.trace = true; ++EDMA3CHAN.debug = true; ++*/ +diff --git a/src/gstticodecplugin_dm6467t.cfg b/src/gstticodecplugin_dm6467t.cfg +new file mode 100644 +index 0000000..686cfeb +--- /dev/null ++++ b/src/gstticodecplugin_dm6467t.cfg +@@ -0,0 +1,34 @@ ++/* ============================================================================ ++ * Copyright (c) Texas Instruments Incorporated 2009 ++ * ++ * Use of this software is controlled by the terms and conditions found in the ++ * license agreement under which this software has been supplied or provided. ++ * ============================================================================ ++ */ ++ ++/* Load support for the Codec Engine OSAL */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++ * ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the 'Davinci Multimedia Application Interface' modules */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff --git a/src/gstticodecs_dm355.c b/src/gstticodecs_dm355.c +index a372b06..9d4325b 100644 +--- a/src/gstticodecs_dm355.c ++++ b/src/gstticodecs_dm355.c +@@ -22,8 +22,7 @@ + #include "gstticodecs.h" + + /* Declaration of the production engine and decoders shipped with the DVSDK */ +-static Char decodeEngine[] = "decode"; +-static Char encodeEngine[] = "encode"; ++static Char codecServer[] = "codecServer"; + + /* NULL terminated list of speech decoders in the engine to use in the demo */ + GstTICodec gst_ticodec_codecs[] = { +@@ -32,25 +31,25 @@ GstTICodec gst_ticodec_codecs[] = { + { + "MPEG4 Video Decoder", /* String name of codec used by plugin */ + "mpeg4dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "MPEG4 Video Encoder", /* String name of codec used by plugin */ + "mpeg4enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + /* Imaging Codecs */ + { + "JPEG Image Encoder", + "jpegenc", +- encodeEngine ++ codecServer + }, + { + "JPEG Image Decoder", + "jpegdec", +- decodeEngine ++ codecServer + }, + + { NULL } +diff --git a/src/gstticodecs_dm365.c b/src/gstticodecs_dm365.c +index 9572403..cf81e6f 100644 +--- a/src/gstticodecs_dm365.c ++++ b/src/gstticodecs_dm365.c +@@ -22,8 +22,7 @@ + #include "gstticodecs.h" + + /* Declaration of the production engine and decoders shipped with the DVSDK */ +-static Char decodeEngine[] = "decode"; +-static Char encodeEngine[] = "encode"; ++static Char codecServer[] = "codecServer"; + + /* NULL terminated list of speech decoders in the engine to use in the demo */ + GstTICodec gst_ticodec_codecs[] = { +@@ -32,25 +31,37 @@ GstTICodec gst_ticodec_codecs[] = { + { + "MPEG4 Video Decoder", /* String name of codec used by plugin */ + "mpeg4dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { ++ "MPEG2 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg2dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "MPEG4 Video Encoder", /* String name of codec used by plugin */ + "mpeg4enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { ++ "MPEG2 Video Encoder", /* String name of codec used by plugin */ ++ "mpeg2enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "H.264 Video Decoder", /* String name of codec used by plugin */ + "h264dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "H.264 Video Encoder", /* String name of codec used by plugin */ + "h264enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { NULL } +diff --git a/src/gstticodecs_dm6467.c b/src/gstticodecs_dm6467.c +index b9b0499..cbb6520 100644 +--- a/src/gstticodecs_dm6467.c ++++ b/src/gstticodecs_dm6467.c +@@ -1,5 +1,5 @@ + /* +- * gstticodecs_dm6446.c ++ * gstticodecs_dm6467.c + * + * This file provides information for available codecs on the DM6446 platform. + * +diff --git a/src/gstticodecs_dm6467t.c b/src/gstticodecs_dm6467t.c +new file mode 100644 +index 0000000..fe597d5 +--- /dev/null ++++ b/src/gstticodecs_dm6467t.c +@@ -0,0 +1,69 @@ ++/* ++ * gstticodecs_dm6467t.c ++ * ++ * This file provides information for available codecs on the DM6446 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Speech Codecs */ ++ { ++ "G.711 Speech Decoder", /* String name of codec used by plugin */ ++ "g711dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "G.711 Speech Encoder", /* String name of codec used by plugin */ ++ "g711enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Audio Codecs */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Codecs */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "H.264 BP/HP Decoder", /* Name of codec used by plugin */ ++ "h2641080p60vdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG2 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg2dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ +diff --git a/src/gsttidmaivideosink.c b/src/gsttidmaivideosink.c +index 5f6a5b3..81bdac7 100644 +--- a/src/gsttidmaivideosink.c ++++ b/src/gsttidmaivideosink.c +@@ -32,11 +32,12 @@ + /* Define sink (input) pad capabilities. + * + * UYVY - YUV 422 interleaved corresponding to V4L2_PIX_FMT_UYVY in v4l2 +- * Y8C8 - YUV 422 semi planar. The dm6467 VDCE outputs this format after a ++ * NV16 - YUV 422 semi planar. The dm6467 VDCE outputs this format after a + * color conversion.The format consists of two planes: one with the + * Y component and one with the CbCr components interleaved (hence semi) * + * See the LSP VDCE documentation for a thorough description of this + * format. ++ * Y8C8 - Same as NV16. Y8C8 was used in MVL-based LSPs. + * NV12 - YUV 420 semi planar corresponding to V4L2_PIX_FMT_NV12 in v4l2. + * The format consists of two planes: one with the + * Y component and one with the CbCr components interleaved with +@@ -62,6 +63,11 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ];" + "video/x-raw-yuv, " ++ "format=(fourcc)NV16, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ];" ++ "video/x-raw-yuv, " + "format=(fourcc)NV12, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +@@ -219,7 +225,7 @@ static void gst_tidmaivideosink_class_init(GstTIDmaiVideoSinkClass * klass) + "Video Standard used\n" + "\tAUTO (if supported), CIF, SIF_NTSC, SIF_PAL, VGA, D1_NTSC\n" + "\tD1_PAL, 480P, 576P, 720P_60, 720P_50, 1080I_30, 1080I_25\n" +- "\t1080P_30, 1080P_25, 1080P_24\n", ++ "\t1080P_30, 1080P_60, 1080P_25, 1080P_24\n", + NULL, G_PARAM_READWRITE)); + + g_object_class_install_property(gobject_class, PROP_VIDEOOUTPUT, +@@ -661,6 +667,9 @@ static int gst_tidmaivideosink_videostd_get_attrs(VideoStd_Type videoStd, + break; + case VideoStd_480P: + case VideoStd_720P_60: ++ #if defined(Platform_dm6467t) ++ case VideoStd_1080P_60: ++ #endif + vattrs->framerate = 60; + break; + +@@ -715,6 +724,9 @@ static int gst_tidmaivideosink_videostd_get_refresh_latency( + + case VideoStd_480P: + case VideoStd_720P_60: ++ #if defined(Platform_dm6467t) ++ case VideoStd_1080P_60: ++ #endif + return 16667; + + #if defined(Platform_omap3530) +@@ -949,6 +961,10 @@ static int gst_tidmaivideosink_convert_attrs(int attr, + return VideoStd_1080P_25; + else if (!strcmp(sink->videoStd, "1080P_24")) + return VideoStd_1080P_24; ++ #if defined(Platform_dm6467t) ++ else if (!strcmp(sink->videoStd, "1080P_60")) ++ return VideoStd_1080P_60; ++ #endif + #if defined(Platform_omap3530) + else if (!strcmp(sink->videoStd, "VGA")) + return VideoStd_VGA; +@@ -958,7 +974,7 @@ static int gst_tidmaivideosink_convert_attrs(int attr, + "Please choose from:\n" + "\tAUTO (if supported), CIF, SIF_NTSC, SIF_PAL, VGA, D1_NTSC\n" + "\tD1_PAL, 480P, 576P, 720P_60, 720P_50, 1080I_30, 1080I_25\n" +- "\t1080P_30, 1080P_25, 1080P_24\n", sink->videoStd); ++ "\t1080P_30, 1080P_60, 1080P_25, 1080P_24\n", sink->videoStd); + return -1; + } + break; +@@ -1307,14 +1323,13 @@ static gboolean gst_tidmaivideosink_process_caps(GstBaseSink * bsink, + case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): + inBufColorSpace = ColorSpace_UYVY; + break; ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): + case GST_MAKE_FOURCC('Y', '8', 'C', '8'): + inBufColorSpace = ColorSpace_YUV422PSEMI; + break; +- #if defined(Platform_dm365) + case GST_MAKE_FOURCC('N', 'V', '1', '2'): + inBufColorSpace = ColorSpace_YUV420PSEMI; + break; +- #endif + default: + GST_ERROR("unsupported fourcc\n"); + return FALSE; +diff --git a/src/gsttividdec2.c b/src/gsttividdec2.c +index 0804065..79b28a5 100644 +--- a/src/gsttividdec2.c ++++ b/src/gsttividdec2.c +@@ -674,16 +674,8 @@ static gboolean gst_tividdec2_set_source_caps( + given buffer */ + BufferGfx_getDimensions(hBuf, &dim); + +-#if !defined(Platform_dm365) +- caps = +- gst_caps_new_simple("video/x-raw-yuv", +- "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U','Y','V','Y'), +- "framerate", GST_TYPE_FRACTION, viddec2->framerateNum, +- viddec2->framerateDen, +- "width", G_TYPE_INT, dim.width, +- "height", G_TYPE_INT, dim.height, +- NULL); +-#else ++#if defined(Platform_dm365) || defined(Platform_dm6467) || \ ++ defined(Platform_dm6467t) + caps = + gst_caps_new_simple("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('N','V','1','2'), +@@ -692,6 +684,15 @@ static gboolean gst_tividdec2_set_source_caps( + "width", G_TYPE_INT, dim.width, + "height", G_TYPE_INT, dim.height, + NULL); ++#else ++ caps = ++ gst_caps_new_simple("video/x-raw-yuv", ++ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U','Y','V','Y'), ++ "framerate", GST_TYPE_FRACTION, viddec2->framerateNum, ++ viddec2->framerateDen, ++ "width", G_TYPE_INT, dim.width, ++ "height", G_TYPE_INT, dim.height, ++ NULL); + #endif + + /* Set the source pad caps */ +@@ -1227,29 +1228,35 @@ static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2) + + /* Set up codec parameters depending on device */ + switch(device) { +- case Cpu_Device_DM6467: +- params.forceChromaFormat = XDM_YUV_420P; +- params.maxWidth = VideoStd_1080I_WIDTH; +- params.maxHeight = VideoStd_1080I_HEIGHT + 8; +- colorSpace = ColorSpace_YUV420PSEMI; +- defaultNumBufs = 5; +- break; +-#if defined(Platform_dm365) +- case Cpu_Device_DM365: +- params.forceChromaFormat = XDM_YUV_420SP; +- params.maxWidth = VideoStd_720P_WIDTH; +- params.maxHeight = VideoStd_720P_HEIGHT; +- colorSpace = ColorSpace_YUV420PSEMI; +- defaultNumBufs = 5; +- break; +-#endif +- default: +- params.forceChromaFormat = XDM_YUV_422ILE; +- params.maxWidth = VideoStd_D1_WIDTH; +- params.maxHeight = VideoStd_D1_PAL_HEIGHT; +- colorSpace = ColorSpace_UYVY; +- defaultNumBufs = 3; +- break; ++ case Cpu_Device_DM6467: ++ #if defined(Platform_dm6467t) ++ params.forceChromaFormat = XDM_YUV_420SP; ++ params.maxFrameRate = 60000; ++ params.maxBitRate = 30000000; ++ #else ++ params.forceChromaFormat = XDM_YUV_420P; ++ #endif ++ params.maxWidth = VideoStd_1080I_WIDTH; ++ params.maxHeight = VideoStd_1080I_HEIGHT + 8; ++ colorSpace = ColorSpace_YUV420PSEMI; ++ defaultNumBufs = 5; ++ break; ++ #if defined(Platform_dm365) ++ case Cpu_Device_DM365: ++ params.forceChromaFormat = XDM_YUV_420SP; ++ params.maxWidth = VideoStd_720P_WIDTH; ++ params.maxHeight = VideoStd_720P_HEIGHT; ++ colorSpace = ColorSpace_YUV420PSEMI; ++ defaultNumBufs = 4; ++ break; ++ #endif ++ default: ++ params.forceChromaFormat = XDM_YUV_422ILE; ++ params.maxWidth = VideoStd_D1_WIDTH; ++ params.maxHeight = VideoStd_D1_PAL_HEIGHT; ++ colorSpace = ColorSpace_UYVY; ++ defaultNumBufs = 3; ++ break; + } + + GST_LOG("opening video decoder \"%s\"\n", viddec2->codecName); +diff --git a/src/gsttividenc1.c b/src/gsttividenc1.c +index f9c6f1a..2e1fb31 100644 +--- a/src/gsttividenc1.c ++++ b/src/gsttividenc1.c +@@ -133,6 +133,11 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ];" ++ "video/x-raw-yuv, " /* NV16 - YUV422 semi planar */ ++ "format=(fourcc)NV16, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ];" + "video/x-raw-yuv, " /* NV12 - YUV420 semi planar */ + "format=(fourcc)NV12, " + "framerate=(fraction)[ 0, MAX ], " +@@ -290,7 +295,7 @@ static void gst_tividenc1_class_init(GstTIVidenc1Class *klass) + + g_object_class_install_property(gobject_class, PROP_IN_COLORSPACE, + g_param_spec_string("iColorSpace", "Input colorspace", +- "Input color space (UYVY, Y8C8 or NV12)", ++ "Input color space (UYVY, Y8C8, NV16 or NV12)", + "unspecified", G_PARAM_READWRITE)); + + g_object_class_install_property(gobject_class, PROP_BITRATE, +@@ -456,6 +461,8 @@ static ColorSpace_Type gst_tividenc1_find_colorSpace (const gchar *colorSpace) + { + if (!strcmp(colorSpace, "UYVY")) + return ColorSpace_UYVY; ++ else if (!strcmp(colorSpace, "NV16")) ++ return ColorSpace_YUV422PSEMI; + else if (!strcmp(colorSpace, "Y8C8")) + return ColorSpace_YUV422PSEMI; + else if (!strcmp(colorSpace, "NV12")) +@@ -665,6 +672,7 @@ static gboolean gst_tividenc1_set_sink_caps(GstPad *pad, GstCaps *caps) + videnc1->colorSpace = ColorSpace_UYVY; + break; + ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): + case GST_MAKE_FOURCC('Y', '8', 'C', '8'): + videnc1->colorSpace = ColorSpace_YUV422PSEMI; + break; +diff --git a/src/gsttividresize.c b/src/gsttividresize.c +index 5757705..c200787 100644 +--- a/src/gsttividresize.c ++++ b/src/gsttividresize.c +@@ -90,6 +90,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ( GST_VIDEO_CAPS_YUV("UYVY")";" ++ GST_VIDEO_CAPS_YUV("NV16")";" + GST_VIDEO_CAPS_YUV("Y8C8")";" + GST_VIDEO_CAPS_YUV("NV12") + ) +@@ -101,6 +102,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ( GST_VIDEO_CAPS_YUV("UYVY")";" ++ GST_VIDEO_CAPS_YUV("NV16")";" + GST_VIDEO_CAPS_YUV("Y8C8")";" + GST_VIDEO_CAPS_YUV("NV12") + ) +@@ -583,6 +585,7 @@ static GstCaps * gst_tividresize_transform_caps (GstBaseTransform *trans, + int i; + static const guint32 supported_fmt[] = { + GST_MAKE_FOURCC('U','Y','V','Y'), ++ GST_MAKE_FOURCC('N','V','1','6'), + GST_MAKE_FOURCC('Y','8','C','8'), + GST_MAKE_FOURCC('N','V','1','2'), + }; +@@ -649,6 +652,7 @@ ColorSpace_Type gst_tividresize_get_colorSpace (guint32 fourcc) + switch (fourcc) { + case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): + return ColorSpace_UYVY; ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): + case GST_MAKE_FOURCC('Y', '8', 'C', '8'): + return ColorSpace_YUV422PSEMI; + case GST_MAKE_FOURCC('N', 'V', '1', '2'): +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0002-add-omapl138-support.patch b/recipes/ti/gstreamer-ti/0002-add-omapl138-support.patch new file mode 100644 index 0000000000..7ddbe648c3 --- /dev/null +++ b/recipes/ti/gstreamer-ti/0002-add-omapl138-support.patch @@ -0,0 +1,288 @@ +From f19ff5f127764d42d497d47bcefeeca1e0af5f28 Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:23:59 -0500 +Subject: [PATCH] add omapl138 support + +--- + src/gstticodecplugin_omapl138.cfg | 41 +++++++++++++++++++ + src/gstticodecs_omapl138.c | 81 +++++++++++++++++++++++++++++++++++++ + src/gsttidmaivideosink.c | 73 ++++++++++++++++++++++++++------- + src/gsttividenc1.c | 3 + + 4 files changed, 183 insertions(+), 15 deletions(-) + create mode 100644 src/gstticodecplugin_omapl138.cfg + create mode 100644 src/gstticodecs_omapl138.c + +diff --git a/src/gstticodecplugin_omapl138.cfg b/src/gstticodecplugin_omapl138.cfg +new file mode 100644 +index 0000000..af1ad41 +--- /dev/null ++++ b/src/gstticodecplugin_omapl138.cfg +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++/* Load the Codec Engine 'Operating System Abstraction Layer' */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++* ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the DMAI module */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff --git a/src/gstticodecs_omapl138.c b/src/gstticodecs_omapl138.c +new file mode 100644 +index 0000000..edab54f +--- /dev/null ++++ b/src/gstticodecs_omapl138.c +@@ -0,0 +1,81 @@ ++/* ++ * gstticodecs_omapl138.c ++ * ++ * This file provides information for available codecs on the OMAP3530 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Audio Decoders */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Decoders */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG4 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg4dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Decoders */ ++ { ++ "JPEG Image Decoder", /* String name of codec used by plugin */ ++ "jpegdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Encoders */ ++ { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Encoders */ ++ { ++ "JPEG Image Encoder", /* String name of codec used by plugin */ ++ "jpegenc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ ++ ++/****************************************************************************** ++ * Custom ViM Settings for editing this file ++ ******************************************************************************/ ++#if 0 ++ Tabs (use 4 spaces for indentation) ++ vim:set tabstop=4: /* Use 4 spaces for tabs */ ++ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ ++ vim:set expandtab: /* Expand tabs into white spaces */ ++#endif +diff --git a/src/gsttidmaivideosink.c b/src/gsttidmaivideosink.c +index 81bdac7..65e0406 100644 +--- a/src/gsttidmaivideosink.c ++++ b/src/gsttidmaivideosink.c +@@ -52,6 +52,19 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ++#if defined(Platform_omapl138) ++ ("video/x-raw-rgb, " ++ "bpp=(int)16, " ++ "depth=(int)16, " ++ "endianness=(int)1234, " ++ "red_mask=(int)63488, " ++ "green_mask=(int)2016, " ++ "blue_mask=(int)31, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[1, MAX ] " ++ ) ++#else + ("video/x-raw-yuv, " + "format=(fourcc)UYVY, " + "framerate=(fraction)[ 0, MAX ], " +@@ -73,6 +86,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ]" + ) ++#endif + ); + + GST_DEBUG_CATEGORY_STATIC (gst_tidmaivideosink_debug); +@@ -673,6 +687,12 @@ static int gst_tidmaivideosink_videostd_get_attrs(VideoStd_Type videoStd, + vattrs->framerate = 60; + break; + ++ #if defined(Platform_omapl138) ++ case VideoStd_QVGA: ++ vattrs->framerate = 30; ++ break; ++ #endif ++ + #if defined(Platform_omap3530) + case VideoStd_VGA: + vattrs->framerate = 60; +@@ -1051,6 +1071,12 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink, + sink->dAttrs.colorSpace = colorSpace; + break; + #endif ++ #if defined(Platform_omapl138) ++ case Cpu_Device_OMAPL138: ++ sink->dAttrs = Display_Attrs_OMAPL138_OSD_DEFAULT; ++ sink->dAttrs.colorSpace = colorSpace; ++ break; ++ #endif + default: + sink->dAttrs = Display_Attrs_DM6446_DM355_VID_DEFAULT; + break; +@@ -1307,8 +1333,10 @@ static gboolean gst_tidmaivideosink_process_caps(GstBaseSink * bsink, + ColorSpace_Type inBufColorSpace; + gint framerateDen; + gint framerateNum; ++ const gchar *mime; + + structure = gst_caps_get_structure(caps, 0); ++ mime = gst_structure_get_name(structure); + + /* The width and height of the input buffer are collected here so that it + * can be checked against the width and height of the display buffer. +@@ -1316,23 +1344,38 @@ static gboolean gst_tidmaivideosink_process_caps(GstBaseSink * bsink, + gst_structure_get_int(structure, "width", &width); + gst_structure_get_int(structure, "height", &height); + +- /* Map input buffer fourcc to dmai color space */ +- gst_structure_get_fourcc(structure, "format", &fourcc); ++ if (!strcmp(mime, "video/x-raw-rgb")) { ++ gint rm,gm,bm; + +- switch (fourcc) { +- case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): +- inBufColorSpace = ColorSpace_UYVY; +- break; +- case GST_MAKE_FOURCC('N', 'V', '1', '6'): +- case GST_MAKE_FOURCC('Y', '8', 'C', '8'): +- inBufColorSpace = ColorSpace_YUV422PSEMI; +- break; +- case GST_MAKE_FOURCC('N', 'V', '1', '2'): +- inBufColorSpace = ColorSpace_YUV420PSEMI; +- break; +- default: +- GST_ERROR("unsupported fourcc\n"); ++ gst_structure_get_int(structure,"red_mask",&rm); ++ gst_structure_get_int(structure,"green_mask",&gm); ++ gst_structure_get_int(structure,"blue_mask",&bm); ++ if ((rm == 63488) && (gm == 2016) && (bm == 31)){ ++ inBufColorSpace = ColorSpace_RGB565; ++ } else { ++ GST_ERROR("unsupported color space\n"); + return FALSE; ++ } ++ } else { ++ ++ /* Map input buffer fourcc to dmai color space */ ++ gst_structure_get_fourcc(structure, "format", &fourcc); ++ ++ switch (fourcc) { ++ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): ++ inBufColorSpace = ColorSpace_UYVY; ++ break; ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): ++ case GST_MAKE_FOURCC('Y', '8', 'C', '8'): ++ inBufColorSpace = ColorSpace_YUV422PSEMI; ++ break; ++ case GST_MAKE_FOURCC('N', 'V', '1', '2'): ++ inBufColorSpace = ColorSpace_YUV420PSEMI; ++ break; ++ default: ++ GST_ERROR("unsupported fourcc\n"); ++ return FALSE; ++ } + } + + /* Read the frame rate */ +diff --git a/src/gsttividenc1.c b/src/gsttividenc1.c +index 2e1fb31..60bf9e4 100644 +--- a/src/gsttividenc1.c ++++ b/src/gsttividenc1.c +@@ -1488,6 +1488,9 @@ static gboolean gst_tividenc1_codec_start (GstTIVidenc1 *videnc1) + #if defined(Platform_omap3530) + case Cpu_Device_OMAP3530: + #endif ++ #if defined(Platform_omapl138) ++ case Cpu_Device_OMAPL138: ++ #endif + case Cpu_Device_DM6446: + params.inputChromaFormat = XDM_YUV_422ILE; + break; +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0003-add-omapl137-support.patch b/recipes/ti/gstreamer-ti/0003-add-omapl137-support.patch new file mode 100644 index 0000000000..d1183e051c --- /dev/null +++ b/recipes/ti/gstreamer-ti/0003-add-omapl137-support.patch @@ -0,0 +1,200 @@ +From 00f97a599ad3a87fc5cd46e0cf67b0039527a87b Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:25:30 -0500 +Subject: [PATCH] add omapl137 support + +--- + src/gstticodecplugin_omapl137.cfg | 41 +++++++++++++++++++ + src/gstticodecs_omapl137.c | 81 +++++++++++++++++++++++++++++++++++++ + src/gsttidmaivideosink.c | 10 ++++- + src/gsttividenc1.c | 3 + + 4 files changed, 133 insertions(+), 2 deletions(-) + create mode 100644 src/gstticodecplugin_omapl137.cfg + create mode 100644 src/gstticodecs_omapl137.c + +diff --git a/src/gstticodecplugin_omapl137.cfg b/src/gstticodecplugin_omapl137.cfg +new file mode 100644 +index 0000000..af1ad41 +--- /dev/null ++++ b/src/gstticodecplugin_omapl137.cfg +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++/* Load the Codec Engine 'Operating System Abstraction Layer' */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++* ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the DMAI module */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff --git a/src/gstticodecs_omapl137.c b/src/gstticodecs_omapl137.c +new file mode 100644 +index 0000000..05b0e9f +--- /dev/null ++++ b/src/gstticodecs_omapl137.c +@@ -0,0 +1,81 @@ ++/* ++ * gstticodecs_omapl137.c ++ * ++ * This file provides information for available codecs on the OMAP3530 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Audio Decoders */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Decoders */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG4 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg4dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Decoders */ ++ { ++ "JPEG Image Decoder", /* String name of codec used by plugin */ ++ "jpegdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Encoders */ ++ { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Encoders */ ++ { ++ "JPEG Image Encoder", /* String name of codec used by plugin */ ++ "jpegenc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ ++ ++/****************************************************************************** ++ * Custom ViM Settings for editing this file ++ ******************************************************************************/ ++#if 0 ++ Tabs (use 4 spaces for indentation) ++ vim:set tabstop=4: /* Use 4 spaces for tabs */ ++ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ ++ vim:set expandtab: /* Expand tabs into white spaces */ ++#endif +diff --git a/src/gsttidmaivideosink.c b/src/gsttidmaivideosink.c +index 65e0406..1c365e4 100644 +--- a/src/gsttidmaivideosink.c ++++ b/src/gsttidmaivideosink.c +@@ -52,7 +52,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS +-#if defined(Platform_omapl138) ++#if defined(Platform_omapl138) || defined(Platform_omapl137) + ("video/x-raw-rgb, " + "bpp=(int)16, " + "depth=(int)16, " +@@ -687,7 +687,7 @@ static int gst_tidmaivideosink_videostd_get_attrs(VideoStd_Type videoStd, + vattrs->framerate = 60; + break; + +- #if defined(Platform_omapl138) ++ #if defined(Platform_omapl138) || defined(Platform_omapl137) + case VideoStd_QVGA: + vattrs->framerate = 30; + break; +@@ -1077,6 +1077,12 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink, + sink->dAttrs.colorSpace = colorSpace; + break; + #endif ++ #if defined(Platform_omapl137) ++ case Cpu_Device_OMAPL137: ++ sink->dAttrs = Display_Attrs_OMAPL137_OSD_DEFAULT; ++ sink->dAttrs.colorSpace = colorSpace; ++ break; ++ #endif + default: + sink->dAttrs = Display_Attrs_DM6446_DM355_VID_DEFAULT; + break; +diff --git a/src/gsttividenc1.c b/src/gsttividenc1.c +index 60bf9e4..74a738f 100644 +--- a/src/gsttividenc1.c ++++ b/src/gsttividenc1.c +@@ -1491,6 +1491,9 @@ static gboolean gst_tividenc1_codec_start (GstTIVidenc1 *videnc1) + #if defined(Platform_omapl138) + case Cpu_Device_OMAPL138: + #endif ++ #if defined(Platform_omapl137) ++ case Cpu_Device_OMAPL137: ++ #endif + case Cpu_Device_DM6446: + params.inputChromaFormat = XDM_YUV_422ILE; + break; +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0004-gstreamer-ti-dm6467-usesinglecsserver.patch b/recipes/ti/gstreamer-ti/0004-gstreamer-ti-dm6467-usesinglecsserver.patch new file mode 100644 index 0000000000..eac35766f1 --- /dev/null +++ b/recipes/ti/gstreamer-ti/0004-gstreamer-ti-dm6467-usesinglecsserver.patch @@ -0,0 +1,49 @@ +From 35f013c24fb78d6ae7257abb4b4ed5f356cac36b Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:27:41 -0500 +Subject: [PATCH] gstreamer ti dm6467 usesinglecsserver + +--- + src/gstticodecplugin_dm6467.cfg | 24 +++++++----------------- + 1 files changed, 7 insertions(+), 17 deletions(-) + +diff --git a/src/gstticodecplugin_dm6467.cfg b/src/gstticodecplugin_dm6467.cfg +index a141f03..9e64775 100644 +--- a/src/gstticodecplugin_dm6467.cfg ++++ b/src/gstticodecplugin_dm6467.cfg +@@ -29,25 +29,15 @@ TraceUtil.attrs = TraceUtil.SOCRATES_TRACING; + * ======== Engine Configuration ======== + */ + var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var decodeEngine = Engine.createFromServer( +- "decode", +- "./decodeCombo.x64P", +- "ti.sdo.servers.decode" ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" + ); +-var encodeEngine = Engine.createFromServer( +- "encode", +- "./encodeCombo.x64P", +- "ti.sdo.servers.encode" +- ); +- +-var encpath = "" + java.lang.System.getenv("ENCODE_COMBO"); +-if (encpath != "" && encpath != "null") { +- encodeEngine.server = java.lang.System.getenv("ENCODE_COMBO"); +-} + +-var decpath = "" + java.lang.System.getenv("DECODE_COMBO"); +-if (decpath != "" && decpath != "null") { +- decodeEngine.server = java.lang.System.getenv("DECODE_COMBO"); ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); + } + + /* Load support for the 'Davinci Multimedia Application Interface' modules */ +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0005-remove-mp3-mime-type.patch b/recipes/ti/gstreamer-ti/0005-remove-mp3-mime-type.patch new file mode 100644 index 0000000000..90cdc6e442 --- /dev/null +++ b/recipes/ti/gstreamer-ti/0005-remove-mp3-mime-type.patch @@ -0,0 +1,42 @@ +From 193b6fe6bca945b3c69d600ebcddd7639aff8f25 Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:29:17 -0500 +Subject: [PATCH] remove mp3 mime type + +This patch removes mp3 decoder cap from auddec elements. mp3 decoder is not +part of tspa combo. If you are adding mp3 decoder support in your combo then +do not apply this patch. +--- + src/gsttiauddec.c | 2 +- + src/gsttiauddec1.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gsttiauddec.c b/src/gsttiauddec.c +index 2df2464..337cb0f 100644 +--- a/src/gsttiauddec.c ++++ b/src/gsttiauddec.c +@@ -85,7 +85,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("audio/mpeg, " +- "mpegversion = (int) { 1, 4 }") ++ "mpegversion = (int) { 4 }") + ); + + /* Constants */ +diff --git a/src/gsttiauddec1.c b/src/gsttiauddec1.c +index 6e56f4b..bf121e3 100644 +--- a/src/gsttiauddec1.c ++++ b/src/gsttiauddec1.c +@@ -85,7 +85,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("audio/mpeg, " +- "mpegversion = (int) { 1, 4 }") ++ "mpegversion = (int) { 4 }") + ); + + /* Define source (output) pad capabilities. Currently, RAW is supported. */ +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0006-gstreamer-ti-tracker-462.patch b/recipes/ti/gstreamer-ti/0006-gstreamer-ti-tracker-462.patch new file mode 100644 index 0000000000..3fd1ac272a --- /dev/null +++ b/recipes/ti/gstreamer-ti/0006-gstreamer-ti-tracker-462.patch @@ -0,0 +1,83 @@ +From e227c83e6b857c7b87758741e0ab7a8b8c424a50 Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 05:34:03 -0500 +Subject: [PATCH] gstreamer ti tracker 462 + +--- + src/gsttividdec.c | 10 ++++++++-- + src/gsttividdec2.c | 10 ++++++++-- + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/src/gsttividdec.c b/src/gsttividdec.c +index e3714d6..51da81d 100644 +--- a/src/gsttividdec.c ++++ b/src/gsttividdec.c +@@ -83,7 +83,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("video/mpeg, " +- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ ++ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "systemstream=(boolean)false, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +@@ -91,7 +91,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + "video/x-h264, " /* H264 */ + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +- "height=(int)[ 1, MAX ]" ++ "height=(int)[ 1, MAX ] ;" ++ "video/x-xvid" /* XVID */ + ) + ); + +@@ -606,6 +607,11 @@ static gboolean gst_tividdec_set_sink_caps(GstPad *pad, GstCaps *caps) + codec = gst_ticodec_get_codec("H.264 Video Decoder"); + } + ++ /* XVID Decode */ ++ else if (!strcmp(mime, "video/x-xvid")) { ++ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); ++ } ++ + /* Mime type not supported */ + else { + GST_ELEMENT_ERROR(viddec, STREAM, NOT_IMPLEMENTED, +diff --git a/src/gsttividdec2.c b/src/gsttividdec2.c +index 79b28a5..6bf421b 100644 +--- a/src/gsttividdec2.c ++++ b/src/gsttividdec2.c +@@ -84,7 +84,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("video/mpeg, " +- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ ++ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "systemstream=(boolean)false, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +@@ -92,7 +92,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( + "video/x-h264, " /* H264 */ + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +- "height=(int)[ 1, MAX ]" ++ "height=(int)[ 1, MAX ] ;" ++ "video/x-xvid" /* XVID */ + ) + ); + +@@ -616,6 +617,11 @@ static gboolean gst_tividdec2_set_sink_caps(GstPad *pad, GstCaps *caps) + codec = gst_ticodec_get_codec("H.264 Video Decoder"); + } + ++ /* XVID Decode */ ++ else if (!strcmp(mime, "video/x-xvid")) { ++ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); ++ } ++ + /* Mime type not supported */ + else { + GST_ELEMENT_ERROR(viddec2, STREAM, NOT_IMPLEMENTED, +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/0007-add-omapdmaifbsink.patch b/recipes/ti/gstreamer-ti/0007-add-omapdmaifbsink.patch new file mode 100644 index 0000000000..be6f899f0c --- /dev/null +++ b/recipes/ti/gstreamer-ti/0007-add-omapdmaifbsink.patch @@ -0,0 +1,1365 @@ +From 6bd18e8107d55a5900bb9b9efa40c9f099d16942 Mon Sep 17 00:00:00 2001 +From: Brijesh Singh +Date: Sun, 9 May 2010 08:46:18 -0500 +Subject: [PATCH] add omapdmaifbsink + +--- + configure.ac | 1 + + src/Makefile.am | 8 +- + src/gstticodecplugin.c | 8 + + src/omapfb.c | 1005 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/omapfb.h | 142 +++++++ + src/yuv.S | 117 ++++++ + 6 files changed, 1277 insertions(+), 4 deletions(-) + create mode 100644 src/omapfb.c + create mode 100644 src/omapfb.h + create mode 100644 src/yuv.S + +diff --git a/configure.ac b/configure.ac +index 32f8304..c8f102c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,7 @@ dnl make aclocal work in maintainer mode + AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") + + AM_CONFIG_HEADER(config.h) ++AM_PROG_AS + + dnl check for tools + AC_PROG_CC +diff --git a/src/Makefile.am b/src/Makefile.am +index 95973a8..acbad81 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -4,16 +4,16 @@ XDC_CONFIG_BASENAME = gstticodecplugin_$(GST_TI_PLATFORM) + plugin_LTLIBRARIES = libgstticodecplugin.la + + # sources used to compile this plug-in +-libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec.c gsttiauddec1.c gsttividdec.c gsttividdec2.c gsttiimgenc1.c gsttiimgenc.c gsttiimgdec1.c gsttiimgdec.c gsttidmaibuffertransport.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c ++libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec.c gsttiauddec1.c gsttividdec.c gsttividdec2.c gsttiimgenc1.c gsttiimgenc.c gsttiimgdec1.c gsttiimgdec.c gsttidmaibuffertransport.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c omapfb.c yuv.S + + # flags used to compile this plugin + # add other _CFLAGS and _LIBS as needed +-libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) +-libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm ++libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) -I$(LINUXKERNEL_INSTALL_DIR)/include ++libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm -lX11 + libgstticodecplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,$(XDC_CONFIG_BASENAME)/linker.cmd + + # headers we need but don't want installed +-noinst_HEADERS = gsttiauddec.h gsttiauddec1.h gsttividdec.h gsttividdec2.h gsttiimgenc1.h gsttiimgenc.h gsttiimgdec1.h gsttiimgdec.h gsttidmaibuffertransport.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h ++noinst_HEADERS = gsttiauddec.h gsttiauddec1.h gsttividdec.h gsttividdec2.h gsttiimgenc1.h gsttiimgenc.h gsttiimgdec1.h gsttiimgdec.h gsttidmaibuffertransport.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h omapfb.h + + # XDC Configuration + CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro +diff --git a/src/gstticodecplugin.c b/src/gstticodecplugin.c +index e98832d..8f8e938 100644 +--- a/src/gstticodecplugin.c ++++ b/src/gstticodecplugin.c +@@ -47,6 +47,7 @@ + #include "gsttiaudenc1.h" + #include "gsttividresize.h" + #include "gsttidmaiperf.h" ++#include "omapfb.h" + + /* entry point to initialize the plug-in + * initialize the plug-in itself +@@ -161,6 +162,13 @@ TICodecPlugin_init (GstPlugin * TICodecPlugin) + GST_TYPE_DMAIPERF)) + return FALSE; + ++ env_value = getenv("GST_omapdmaifbsink_DISABLE"); ++ ++ if ((!env_value || strcmp(env_value,"1")) && !gst_element_register( ++ TICodecPlugin, "omapdmaifbsink", GST_RANK_PRIMARY, ++ GST_OMAPFB_SINK_TYPE)) ++ return FALSE; ++ + return TRUE; + } + +diff --git a/src/omapfb.c b/src/omapfb.c +new file mode 100644 +index 0000000..0fb4eef +--- /dev/null ++++ b/src/omapfb.c +@@ -0,0 +1,1005 @@ ++/* ++ * Copyright (C) 2008 Felipe Contreras ++ * Copyright (C) 2009 Tim Yamin ++ * Copyright (C) 2009 Brijesh Singh ++ * ++ * X code largely copied from ximagesink by Julien Moutte and ++ * vo_omapfb.c by Gregoire Gentil. ++ * ++ * Use DMAI hw framecopy module to copy the dmai transport buffers. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "omapfb.h" ++#include ++ ++static GstVideoSinkClass *parent_class = NULL; ++ ++extern void yuv420_to_yuv422(__uint8_t *yuv, __uint8_t *y, __uint8_t *u, __uint8_t *v, ++ int w, int h, int yw, int cw, int dw); ++ ++static void x11_get_window_abs_position(Display *display, Window window, ++ int *wx, int *wy, int *ww, int *wh) ++{ ++ Window root, parent; ++ Window *child; ++ unsigned int n_children; ++ XWindowAttributes attribs; ++ ++ /* Get window attributes */ ++ XGetWindowAttributes(display, window, &attribs); ++ ++ /* Get relative position of given window */ ++ *wx = attribs.x; ++ *wy = attribs.y; ++ if (ww) ++ *ww = attribs.width; ++ if (wh) ++ *wh = attribs.height; ++ ++ /* Query window tree information */ ++ XQueryTree(display, window, &root, &parent, &child, &n_children); ++ if (parent) ++ { ++ int x, y; ++ ++ /* If we have a parent we must go there and discover his position */ ++ x11_get_window_abs_position(display, parent, &x, &y, NULL, NULL); ++ *wx += x; ++ *wy += y; ++ } ++ ++ /* If we had children, free them */ ++ if(n_children) ++ XFree(child); ++} ++ ++static GstXWindow * ++gst_omapfbsink_xwindow_new (GstOmapFbSink * omapfbsink, gint width, gint height) ++{ ++ GstXWindow *xwindow = NULL; ++ XGCValues values; ++ ++ if(!omapfbsink->xcontext) ++ return NULL; ++ ++ xwindow = g_new0 (GstXWindow, 1); ++ xwindow->width = width; ++ xwindow->height = height; ++ xwindow->internal = TRUE; ++ ++ g_mutex_lock (omapfbsink->x_lock); ++ xwindow->win = XCreateSimpleWindow (omapfbsink->xcontext->disp, ++ omapfbsink->xcontext->root, ++ 0, 0, xwindow->width, xwindow->height, ++ 0, 0, omapfbsink->colorKey); ++ ++ /* We have to do that to prevent X from redrawing the background on ++ ConfigureNotify. This takes away flickering of video when resizing. */ ++ XSetWindowBackgroundPixmap (omapfbsink->xcontext->disp, xwindow->win, None); ++ ++ if (omapfbsink->handle_events) { ++ Atom wm_delete; ++ ++ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | ++ StructureNotifyMask | PointerMotionMask | KeyPressMask | ++ KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); ++ ++ /* Tell the window manager we'd like delete client messages instead of ++ * being killed */ ++ wm_delete = XInternAtom (omapfbsink->xcontext->disp, ++ "WM_DELETE_WINDOW", False); ++ (void) XSetWMProtocols (omapfbsink->xcontext->disp, xwindow->win, ++ &wm_delete, 1); ++ } ++ ++ xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, ++ 0, &values); ++ ++ XMapRaised (omapfbsink->xcontext->disp, xwindow->win); ++ XSync (omapfbsink->xcontext->disp, FALSE); ++ ++ g_mutex_unlock (omapfbsink->x_lock); ++ gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (omapfbsink), xwindow->win); ++ ++ return xwindow; ++} ++ ++static gboolean gst_omapfbsink_update_plane (GstOmapFbSink *omapfbsink) ++{ ++ int wx, wy, ww, wh; ++ if (!omapfbsink->xcontext) ++ { ++ if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) ++ return FALSE; ++ return TRUE; ++ } ++ ++ if (omapfbsink->plane_info.enabled != 1) ++ return FALSE; ++ ++ x11_get_window_abs_position(omapfbsink->xcontext->disp, ++ omapfbsink->xwindow->win, &wx, &wy, &ww, &wh); ++ ++ if (wx != omapfbsink->xwindow->wx || wy != omapfbsink->xwindow->wy || ++ wh != omapfbsink->xwindow->height || ww != omapfbsink->xwindow->width) { ++ omapfbsink->plane_info.out_width = omapfbsink->xwindow->width = ww; ++ omapfbsink->plane_info.out_height = omapfbsink->xwindow->height = wh; ++ omapfbsink->plane_info.pos_x = omapfbsink->xwindow->wx = wx; ++ omapfbsink->plane_info.pos_y = omapfbsink->xwindow->wy = wy; ++ ++ GST_DEBUG_OBJECT(omapfbsink, "updating geometry to: (%d,%d) %dx%d", wx, wy, ww, wh); ++ ++ XSetForeground (omapfbsink->xcontext->disp, omapfbsink->xwindow->gc, omapfbsink->colorKey); ++ XFillRectangle (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, omapfbsink->xwindow->gc, 0, 0, ww, wh); ++ ++ if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++static void ++gst_omapfbsink_expose (GstXOverlay * overlay) ++{ ++ gst_omapfbsink_update_plane(GST_OMAPFB_SINK (overlay)); ++} ++ ++static void ++gst_omapfbsink_xwindow_destroy (GstOmapFbSink * omapfbsink, ++ GstXWindow * xwindow) ++{ ++ g_return_if_fail (xwindow != NULL); ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ /* If we did not create that window we just free the GC and let it live */ ++ if (xwindow->internal) ++ XDestroyWindow (omapfbsink->xcontext->disp, xwindow->win); ++ else ++ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, 0); ++ ++ XFreeGC (omapfbsink->xcontext->disp, xwindow->gc); ++ XSync (omapfbsink->xcontext->disp, FALSE); ++ g_mutex_unlock (omapfbsink->x_lock); ++ g_free (xwindow); ++} ++ ++/* This function handles XEvents that might be in the queue. It generates ++ GstEvent that will be sent upstream in the pipeline to handle interactivity ++ and navigation.*/ ++static void ++gst_omapfbsink_handle_xevents (GstOmapFbSink * omapfbsink) ++{ ++ XEvent e; ++ g_mutex_lock (omapfbsink->flow_lock); ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ while (XCheckWindowEvent (omapfbsink->xcontext->disp, ++ omapfbsink->xwindow->win, ExposureMask | StructureNotifyMask, &e)) { ++ switch (e.type) { ++ case Expose: ++ case ConfigureNotify: ++ gst_omapfbsink_update_plane (omapfbsink); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ /* Handle Display events */ ++ while (XPending (omapfbsink->xcontext->disp)) { ++ XNextEvent (omapfbsink->xcontext->disp, &e); ++ ++ switch (e.type) { ++ case ClientMessage:{ ++ Atom wm_delete; ++ ++ wm_delete = XInternAtom (omapfbsink->xcontext->disp, ++ "WM_DELETE_WINDOW", False); ++ if (wm_delete == (Atom) e.xclient.data.l[0]) { ++ /* Handle window deletion by posting an error on the bus */ ++ GST_ELEMENT_ERROR (omapfbsink, RESOURCE, NOT_FOUND, ++ ("Output window was closed"), (NULL)); ++ ++ g_mutex_unlock (omapfbsink->x_lock); ++ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); ++ omapfbsink->xwindow = NULL; ++ g_mutex_lock (omapfbsink->x_lock); ++ } ++ break; ++ } ++ default: ++ break; ++ } ++ } ++ ++ g_mutex_unlock (omapfbsink->x_lock); ++ g_mutex_unlock (omapfbsink->flow_lock); ++} ++ ++static gpointer ++gst_omapfbsink_event_thread (GstOmapFbSink * omapfbsink) ++{ ++ GST_OBJECT_LOCK (omapfbsink); ++ while (omapfbsink->running) { ++ GST_OBJECT_UNLOCK (omapfbsink); ++ ++ if (omapfbsink->xwindow) ++ gst_omapfbsink_handle_xevents (omapfbsink); ++ g_usleep (100000); ++ ++ GST_OBJECT_LOCK (omapfbsink); ++ } ++ GST_OBJECT_UNLOCK (omapfbsink); ++ ++ return NULL; ++} ++ ++/* This function gets the X Display and global info about it. Everything is ++ stored in our object and will be cleaned when the object is disposed. */ ++static GstXContext * ++gst_omapfbsink_xcontext_get (GstOmapFbSink * omapfbsink) ++{ ++ GstXContext *xcontext = g_new0 (GstXContext, 1); ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ xcontext->disp = XOpenDisplay (omapfbsink->display_name); ++ ++ if (!xcontext->disp) { ++ g_mutex_unlock (omapfbsink->x_lock); ++ g_free (xcontext); ++ GST_ELEMENT_WARNING (omapfbsink, RESOURCE, WRITE, ++ ("Could not initialise X output"), ++ ("Could not open display")); ++ return NULL; ++ } ++ ++ xcontext->screen = DefaultScreenOfDisplay (xcontext->disp); ++ xcontext->screen_num = DefaultScreen (xcontext->disp); ++ xcontext->visual = DefaultVisual (xcontext->disp, xcontext->screen_num); ++ xcontext->root = DefaultRootWindow (xcontext->disp); ++ ++ xcontext->width = DisplayWidth (xcontext->disp, xcontext->screen_num); ++ xcontext->height = DisplayHeight (xcontext->disp, xcontext->screen_num); ++ ++ g_mutex_unlock (omapfbsink->x_lock); ++ ++ /* Setup our event listening thread */ ++ GST_OBJECT_LOCK (omapfbsink); ++ omapfbsink->running = TRUE; ++ omapfbsink->event_thread = g_thread_create ( ++ (GThreadFunc) gst_omapfbsink_event_thread, omapfbsink, TRUE, NULL); ++ GST_OBJECT_UNLOCK (omapfbsink); ++ ++ return xcontext; ++} ++ ++static void ++gst_omapfbsink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id) ++{ ++ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); ++ GstXWindow *xwindow = NULL; ++ XWindowAttributes attr; ++ ++ /* If we already use that window, return */ ++ if (omapfbsink->xwindow && (xwindow_id == omapfbsink->xwindow->win)) ++ return; ++ ++ /* If the element has not initialized the X11 context try to do so */ ++ if (!omapfbsink->xcontext && ++ !(omapfbsink->xcontext = gst_omapfbsink_xcontext_get (omapfbsink))) { ++ g_mutex_unlock (omapfbsink->flow_lock); ++ return; ++ } ++ ++ /* If a window is there already we destroy it */ ++ if (omapfbsink->xwindow) { ++ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); ++ omapfbsink->xwindow = NULL; ++ } ++ ++ /* If the xid is 0 we go back to an internal window */ ++ if (xwindow_id == 0) { ++ /* If no width/height caps nego did not happen window will be created ++ during caps nego then */ ++ if (GST_VIDEO_SINK_WIDTH (omapfbsink) && GST_VIDEO_SINK_HEIGHT (omapfbsink)) { ++ xwindow = gst_omapfbsink_xwindow_new (omapfbsink, ++ GST_VIDEO_SINK_WIDTH (omapfbsink), ++ GST_VIDEO_SINK_HEIGHT (omapfbsink)); ++ } ++ } else { ++ xwindow = g_new0 (GstXWindow, 1); ++ xwindow->wx = xwindow->wy = -1; ++ xwindow->win = xwindow_id; ++ ++ /* We get window geometry, set the event we want to receive, ++ and create a GC */ ++ g_mutex_lock (omapfbsink->x_lock); ++ XGetWindowAttributes (omapfbsink->xcontext->disp, xwindow->win, &attr); ++ xwindow->width = attr.width; ++ xwindow->height = attr.height; ++ xwindow->internal = FALSE; ++ if (omapfbsink->handle_events) { ++ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | ++ StructureNotifyMask | PointerMotionMask | KeyPressMask | ++ KeyReleaseMask); ++ } ++ ++ xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, 0, NULL); ++ g_mutex_unlock (omapfbsink->x_lock); ++ } ++ ++ if (xwindow) { ++ omapfbsink->xwindow = xwindow; ++ ++ g_mutex_lock (omapfbsink->x_lock); ++ gst_omapfbsink_update_plane(omapfbsink); ++ g_mutex_unlock (omapfbsink->x_lock); ++ } ++} ++ ++static void ++gst_omapfbsink_xwindow_clear (GstOmapFbSink * omapfbsink, ++ GstXWindow * xwindow) ++{ ++ g_return_if_fail (xwindow != NULL); ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ XSetForeground (omapfbsink->xcontext->disp, xwindow->gc, ++ XBlackPixel (omapfbsink->xcontext->disp, ++ omapfbsink->xcontext->screen_num)); ++ ++ XFillRectangle (omapfbsink->xcontext->disp, xwindow->win, xwindow->gc, ++ 0, 0, xwindow->width, xwindow->height); ++ ++ XSync (omapfbsink->xcontext->disp, FALSE); ++ g_mutex_unlock (omapfbsink->x_lock); ++} ++ ++static void ++gst_omapfbsink_set_event_handling (GstXOverlay * overlay, ++ gboolean handle_events) ++{ ++ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); ++ omapfbsink->handle_events = handle_events; ++ ++ g_mutex_lock (omapfbsink->flow_lock); ++ ++ if (G_UNLIKELY (!omapfbsink->xwindow)) { ++ g_mutex_unlock (omapfbsink->flow_lock); ++ return; ++ } ++ ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ if (handle_events) { ++ if (omapfbsink->xwindow->internal) { ++ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, ++ ExposureMask | StructureNotifyMask | PointerMotionMask | ++ KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); ++ } else { ++ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, ++ ExposureMask | StructureNotifyMask | PointerMotionMask | ++ KeyPressMask | KeyReleaseMask); ++ } ++ } else { ++ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, 0); ++ } ++ ++ g_mutex_unlock (omapfbsink->x_lock); ++ g_mutex_unlock (omapfbsink->flow_lock); ++} ++ ++static void ++gst_omapfbsink_xoverlay_init (GstXOverlayClass * iface) ++{ ++ iface->set_xwindow_id = gst_omapfbsink_set_xwindow_id; ++ iface->expose = gst_omapfbsink_expose; ++ iface->handle_events = gst_omapfbsink_set_event_handling; ++} ++ ++static GstCaps * ++generate_sink_template (void) ++{ ++ GstCaps *caps; ++ GstStructure *struc; ++ ++ caps = gst_caps_new_empty (); ++ ++ struc = gst_structure_new ("video/x-raw-yuv", ++ "width", GST_TYPE_INT_RANGE, 16, 4096, ++ "height", GST_TYPE_INT_RANGE, 16, 4096, ++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 30, 1, ++ NULL); ++ ++ { ++ GValue list; ++ GValue val; ++ ++ list.g_type = val.g_type = 0; ++ ++ g_value_init (&list, GST_TYPE_LIST); ++ g_value_init (&val, GST_TYPE_FOURCC); ++ ++#if 0 ++ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2')); ++ gst_value_list_append_value (&list, &val); ++#else ++ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('I', '4', '2', '0')); ++ gst_value_list_append_value (&list, &val); ++ ++ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')); ++ gst_value_list_append_value (&list, &val); ++#endif ++ ++ gst_structure_set_value (struc, "format", &list); ++ ++ g_value_unset (&val); ++ g_value_unset (&list); ++ } ++ ++ gst_caps_append_structure (caps, struc); ++ ++ return caps; ++} ++ ++static GstFlowReturn ++buffer_alloc (GstBaseSink *bsink, ++ guint64 offset, ++ guint size, ++ GstCaps *caps, ++ GstBuffer **buf) ++{ ++ GstOmapFbSink *self; ++ GstBuffer *buffer = NULL; ++ GstFlowReturn ret = GST_FLOW_OK; ++ self = GST_OMAPFB_SINK (bsink); ++ ++ if(self->row_skip) { ++ buffer = gst_buffer_new (); ++ GST_BUFFER_DATA (buffer) = self->buffer = self->framebuffer; ++ GST_BUFFER_SIZE (buffer) = self->buffer_size = size; ++ gst_buffer_set_caps (buffer, caps); ++ } else { ++ if(self->buffer && size == self->buffer_size) { ++ buffer = gst_buffer_new (); ++ GST_BUFFER_DATA (buffer) = self->buffer; ++ GST_BUFFER_SIZE (buffer) = size; ++ gst_buffer_set_caps (buffer, caps); ++ } else { ++ if(self->buffer) ++ free(self->buffer); ++ if(posix_memalign(&self->buffer, 16, (size_t) size) == 0) { ++ buffer = gst_buffer_new (); ++ GST_BUFFER_DATA (buffer) = self->buffer; ++ GST_BUFFER_SIZE (buffer) = self->buffer_size = size; ++ gst_buffer_set_caps (buffer, caps); ++ } else { ++ GST_ELEMENT_ERROR (self, RESOURCE, WRITE, ("Could not allocate aligned buf!"), ++ ("Could not alloc aligned buf!")); ++ } ++ } ++ } ++ ++ *buf = buffer; ++ return ret; ++} ++ ++static void ++x_memcpy (GstOmapFbSink *omapfbsink, __uint8_t *outBuf, __uint8_t *inBuf) ++{ ++ BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; ++ Buffer_Handle hInBuf = NULL, hOutBuf = NULL; ++ Framecopy_Attrs fcAttrs = Framecopy_Attrs_DEFAULT; ++ int size; ++ ++ if (omapfbsink->hFc == NULL) { ++ fcAttrs.accel = TRUE; ++ omapfbsink->hFc = Framecopy_create(&fcAttrs); ++ if (omapfbsink->hFc == NULL) { ++ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to create dmai framecopy handle"), ("failed to create dmai framecopy handle")); ++ goto cleanup; ++ } ++ } ++ ++ gfxAttrs.bAttrs.reference = TRUE; ++ gfxAttrs.dim.width = GST_VIDEO_SINK_WIDTH (omapfbsink); ++ gfxAttrs.dim.height = GST_VIDEO_SINK_HEIGHT (omapfbsink); ++ gfxAttrs.colorSpace = ColorSpace_UYVY; ++ gfxAttrs.dim.lineLength = omapfbsink->fixinfo.line_length; ++ size = gfxAttrs.dim.height * gfxAttrs.dim.width * 2; ++ ++ hInBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); ++ if (hInBuf == NULL) { ++ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); ++ goto cleanup; ++ } ++ Buffer_setUserPtr(hInBuf, (Int8*) inBuf); ++ Buffer_setNumBytesUsed(hInBuf,Buffer_getSize(hInBuf)); ++ ++ hOutBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); ++ if (hOutBuf == NULL) { ++ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); ++ goto cleanup; ++ } ++ Buffer_setUserPtr(hOutBuf, (Int8*) outBuf); ++ Buffer_setNumBytesUsed(hOutBuf,Buffer_getSize(hOutBuf)); ++ ++ ++ if (Framecopy_config(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { ++ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to configure dmai framecopy handle"), ("failed to configure dmai framecopy handle")); ++ goto cleanup; ++ } ++ ++ if (Framecopy_execute(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { ++ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to execute dmai framecopy handle"), ("failed to configure dmai framecopy handle")); ++ goto cleanup; ++ } ++ cleanup: ++ ++ if (hInBuf) ++ Buffer_delete(hInBuf); ++ if (hOutBuf) ++ Buffer_delete(hOutBuf); ++} ++ ++static GstFlowReturn ++render (GstBaseSink * bsink, GstBuffer * buf) ++{ ++ int i, w, h; ++ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK(bsink); ++ __uint8_t *fb = omapfbsink->framebuffer, *data = GST_BUFFER_DATA(buf); ++ gboolean useXcopy = FALSE; ++ ++ if (GST_IS_TIDMAIBUFFERTRANSPORT(buf)) { ++ GST_LOG("found dmai transport buffer, enabling hw framecopy.\n"); ++ useXcopy = TRUE; ++ } ++ ++ if(omapfbsink->plane_info.enabled == 2) ++ { ++ omapfbsink->plane_info.enabled = 1; ++ ++ g_mutex_lock (omapfbsink->x_lock); ++ gst_omapfbsink_update_plane(omapfbsink); ++ g_mutex_unlock (omapfbsink->x_lock); ++ } ++ ++ /* If a buffer which wasn't supplied by us is given to us to render with, ++ we need to copy to our buffer first so that memory alignment constraints ++ are met. */ ++ if((data != omapfbsink->buffer && GST_BUFFER_SIZE(buf) <= omapfbsink->buffer_size) && !useXcopy) ++ { ++ memcpy(omapfbsink->buffer, data, GST_BUFFER_SIZE(buf)); ++ data = omapfbsink->buffer; ++ } ++ ++ /* buffer_alloc gave a direct buffer, so we have nothing to ++ do here... */ ++ if(omapfbsink->row_skip) ++ return GST_FLOW_OK; ++ ++ switch(omapfbsink->image_format) { ++ case GST_MAKE_FOURCC('I', '4', '2', '0'): ++ /* Convert to YUV422 and send to FB */ ++ ++ h = GST_VIDEO_SINK_HEIGHT (omapfbsink); ++ w = GST_VIDEO_SINK_WIDTH (omapfbsink); ++ ++ __uint8_t *y, *u, *v; ++ y = data; ++ u = y + w * h; ++ v = u + w / 2 * h / 2; ++ yuv420_to_yuv422(fb, y, u, v, w & ~15, h, w, w / 2, omapfbsink->fixinfo.line_length); ++ break; ++ ++ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): ++ /* Send to FB, taking into account line_length */ ++ if (useXcopy) { ++ x_memcpy(omapfbsink, fb, data); ++ } ++ else { ++ ++ w = 2 * GST_VIDEO_SINK_WIDTH (omapfbsink); ++ for(i = 0; i < GST_VIDEO_SINK_HEIGHT (omapfbsink); i++) ++ { ++ memcpy(fb, data, w); ++ ++ fb += omapfbsink->fixinfo.line_length; ++ data += w; ++ } ++ } ++ break; ++ } ++ ++ return GST_FLOW_OK; ++} ++ ++static gboolean ++setcaps (GstBaseSink *bsink, ++ GstCaps *vscapslist) ++{ ++ GstOmapFbSink *self; ++ GstStructure *structure; ++ ++ gint width, height; ++ struct omapfb_color_key color_key; ++ ++ self = GST_OMAPFB_SINK (bsink); ++ ++ structure = gst_caps_get_structure (vscapslist, 0); ++ ++ gst_structure_get_int (structure, "width", &width); ++ gst_structure_get_int (structure, "height", &height); ++ ++ self->overlay_info.xres = MIN (self->varinfo.xres, width) & ~15; ++ self->overlay_info.yres = MIN (self->varinfo.yres, height) & ~15; ++ self->overlay_info.xres_virtual = self->overlay_info.xres; ++ self->overlay_info.yres_virtual = self->overlay_info.yres; ++ ++ self->overlay_info.xoffset = 0; ++ self->overlay_info.yoffset = 0; ++ ++ gst_structure_get_fourcc (structure, "format", &self->image_format); ++ switch(self->image_format) { ++ case GST_MAKE_FOURCC('I', '4', '2', '0'): ++ self->row_skip = FALSE; /* Colorspace conversion required */ ++ self->overlay_info.nonstd = OMAPFB_COLOR_YUY422; ++ break; ++ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): ++ /* Can data be pushed straight to the FB or do we need to interleave? */ ++ if (self->fixinfo.line_length != 2 * width) ++ self->row_skip = FALSE; ++ else ++ self->row_skip = TRUE; ++ self->overlay_info.nonstd = OMAPFB_COLOR_YUV422; ++ break; ++ } ++ ++ if (ioctl (self->overlay_fd, FBIOPUT_VSCREENINFO, &self->overlay_info)) ++ return FALSE; ++ ++ GST_VIDEO_SINK_WIDTH (self) = width; ++ GST_VIDEO_SINK_HEIGHT (self) = height; ++ if (!self->xwindow) { ++ self->xwindow = gst_omapfbsink_xwindow_new (self, ++ GST_VIDEO_SINK_WIDTH (self), GST_VIDEO_SINK_HEIGHT (self)); ++ } ++ ++ color_key.channel_out = OMAPFB_CHANNEL_OUT_LCD; ++ color_key.background = 0x0; ++ color_key.trans_key = self->colorKey; ++ if (self->xwindow) ++ color_key.key_type = OMAPFB_COLOR_KEY_GFX_DST; ++ else ++ color_key.key_type = OMAPFB_COLOR_KEY_DISABLED; ++ ++ if (ioctl (self->overlay_fd, OMAPFB_SET_COLOR_KEY, &color_key)) ++ return FALSE; ++ ++ self->plane_info.pos_x = 0; ++ self->plane_info.pos_y = 0; ++ self->plane_info.out_width = self->overlay_info.xres; ++ self->plane_info.out_height = self->overlay_info.yres; ++ self->plane_info.enabled = 2; ++ ++ if (ioctl (self->overlay_fd, FBIOGET_FSCREENINFO, &self->fixinfo)) ++ return FALSE; ++ ++ self->enabled = TRUE; ++ return TRUE; ++} ++ ++static gboolean ++start (GstBaseSink *bsink) ++{ ++ GstOmapFbSink *self; ++ int fd; ++ ++ self = GST_OMAPFB_SINK (bsink); ++ ++ fd = open ("/dev/fb0", O_RDWR); ++ ++ if (fd == -1) ++ return FALSE; ++ ++ if (ioctl (fd, FBIOGET_VSCREENINFO, &self->varinfo)) ++ { ++ close (fd); ++ return FALSE; ++ } ++ ++ if (close (fd)) ++ return FALSE; ++ ++ self->overlay_fd = open ("/dev/fb1", O_RDWR); ++ ++ if (self->overlay_fd == -1) ++ return FALSE; ++ ++ if (ioctl (self->overlay_fd, FBIOGET_VSCREENINFO, &self->overlay_info)) ++ return FALSE; ++ ++ if (ioctl (self->overlay_fd, OMAPFB_QUERY_PLANE, &self->plane_info)) ++ return FALSE; ++ ++ if (ioctl (self->overlay_fd, OMAPFB_QUERY_MEM, &self->mem_info)) ++ return FALSE; ++ ++ self->framebuffer = mmap (NULL, self->mem_info.size, PROT_WRITE, MAP_SHARED, self->overlay_fd, 0); ++ if (self->framebuffer == MAP_FAILED) ++ return FALSE; ++ ++ return TRUE; ++} ++ ++static gboolean ++stop (GstBaseSink *bsink) ++{ ++ GstOmapFbSink *self; ++ ++ self = GST_OMAPFB_SINK (bsink); ++ ++ if (self->enabled) ++ { ++ self->plane_info.enabled = 0; ++ ++ if (ioctl (self->overlay_fd, OMAPFB_SETUP_PLANE, &self->plane_info)) ++ return FALSE; ++ } ++ ++ if (munmap (self->framebuffer, self->mem_info.size)) ++ return FALSE; ++ ++ if (close (self->overlay_fd)) ++ return FALSE; ++ ++ if (self->hFc) ++ Framecopy_delete(self->hFc); ++ ++ return TRUE; ++} ++ ++/* This function cleans the X context. Closing the Display and unrefing the ++ caps for supported formats. */ ++static void ++gst_omapfbsink_xcontext_clear (GstOmapFbSink * omapfbsink) ++{ ++ GstXContext *xcontext; ++ GST_OBJECT_LOCK (omapfbsink); ++ if (omapfbsink->xcontext == NULL) { ++ GST_OBJECT_UNLOCK (omapfbsink); ++ return; ++ } ++ ++ xcontext = omapfbsink->xcontext; ++ omapfbsink->xcontext = NULL; ++ ++ GST_OBJECT_UNLOCK (omapfbsink); ++ g_mutex_lock (omapfbsink->x_lock); ++ ++ XCloseDisplay (xcontext->disp); ++ g_mutex_unlock (omapfbsink->x_lock); ++ g_free (xcontext); ++} ++ ++static void ++gst_omapfbsink_reset (GstOmapFbSink *omapfbsink) ++{ ++ GThread *thread; ++ ++ GST_OBJECT_LOCK (omapfbsink); ++ omapfbsink->running = FALSE; ++ /* grab thread and mark it as NULL */ ++ thread = omapfbsink->event_thread; ++ omapfbsink->event_thread = NULL; ++ GST_OBJECT_UNLOCK (omapfbsink); ++ ++ /* Wait for our event thread to finish before we clean up our stuff. */ ++ if (thread) ++ g_thread_join (thread); ++ ++ g_mutex_lock (omapfbsink->flow_lock); ++ if (omapfbsink->xwindow) { ++ gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); ++ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); ++ omapfbsink->xwindow = NULL; ++ } ++ g_mutex_unlock (omapfbsink->flow_lock); ++ gst_omapfbsink_xcontext_clear (omapfbsink); ++} ++ ++static GstStateChangeReturn ++gst_omapfbsink_change_state (GstElement * element, GstStateChange transition) ++{ ++ GstOmapFbSink *omapfbsink; ++ GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; ++ GstXContext *xcontext = NULL; ++ ++ omapfbsink = GST_OMAPFB_SINK (element); ++ ++ switch (transition) { ++ case GST_STATE_CHANGE_NULL_TO_READY: ++ ++ /* Initializing the XContext */ ++ if (omapfbsink->xcontext == NULL) { ++ xcontext = gst_omapfbsink_xcontext_get (omapfbsink); ++ ++ GST_OBJECT_LOCK (omapfbsink); ++ omapfbsink->xcontext = xcontext; ++ GST_OBJECT_UNLOCK (omapfbsink); ++ } ++ break; ++ case GST_STATE_CHANGE_READY_TO_PAUSED: ++ g_mutex_lock (omapfbsink->flow_lock); ++ if (omapfbsink->xwindow) ++ gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); ++ g_mutex_unlock (omapfbsink->flow_lock); ++ break; ++ case GST_STATE_CHANGE_PAUSED_TO_PLAYING: ++ break; ++ default: ++ break; ++ } ++ ++ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); ++ ++ switch (transition) { ++ case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ break; ++ case GST_STATE_CHANGE_PAUSED_TO_READY: ++ GST_VIDEO_SINK_WIDTH (omapfbsink) = 0; ++ GST_VIDEO_SINK_HEIGHT (omapfbsink) = 0; ++ break; ++ case GST_STATE_CHANGE_READY_TO_NULL: ++ gst_omapfbsink_reset (omapfbsink); ++ break; ++ default: ++ break; ++ } ++ ++ return ret; ++} ++ ++static void ++type_class_init (gpointer g_class, ++ gpointer class_data) ++{ ++ GstElementClass *element_class; ++ GstBaseSinkClass *base_sink_class; ++ ++ element_class = (GstElementClass *) g_class; ++ base_sink_class = (GstBaseSinkClass *) g_class; ++ ++ parent_class = g_type_class_peek_parent (g_class); ++ ++ base_sink_class->set_caps = GST_DEBUG_FUNCPTR (setcaps); ++ base_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR (buffer_alloc); ++ base_sink_class->render = GST_DEBUG_FUNCPTR (render); ++ base_sink_class->start = GST_DEBUG_FUNCPTR (start); ++ base_sink_class->stop = GST_DEBUG_FUNCPTR (stop); ++ ++ element_class->change_state = gst_omapfbsink_change_state; ++} ++ ++static void ++type_base_init (gpointer g_class) ++{ ++ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); ++ ++ { ++ GstElementDetails details; ++ ++ details.longname = "Linux OMAP framebuffer sink"; ++ details.klass = "Sink/Video"; ++ details.description = "Renders video with omapfb"; ++ details.author = "Felipe Contreras"; ++ ++ gst_element_class_set_details (element_class, &details); ++ } ++ ++ { ++ GstPadTemplate *template; ++ ++ template = gst_pad_template_new ("sink", GST_PAD_SINK, ++ GST_PAD_ALWAYS, ++ generate_sink_template ()); ++ ++ gst_element_class_add_pad_template (element_class, template); ++ } ++} ++ ++static gboolean ++gst_omapfbsink_interface_supported (GstImplementsInterface * iface, GType type) ++{ ++ g_assert (type == GST_TYPE_X_OVERLAY); ++ return TRUE; ++} ++ ++static void ++gst_omapfbsink_interface_init (GstImplementsInterfaceClass * klass) ++{ ++ klass->supported = gst_omapfbsink_interface_supported; ++} ++ ++static void ++gst_omapfbsink_init (GstOmapFbSink * omapfbsink) ++{ ++ omapfbsink->display_name = NULL; ++ omapfbsink->xcontext = NULL; ++ omapfbsink->xwindow = NULL; ++ ++ omapfbsink->event_thread = NULL; ++ omapfbsink->running = FALSE; ++ ++ omapfbsink->x_lock = g_mutex_new (); ++ omapfbsink->flow_lock = g_mutex_new (); ++ ++ omapfbsink->handle_events = TRUE; ++ omapfbsink->colorKey = 0xff0; ++ ++ omapfbsink->plane_info.enabled = 0; ++ omapfbsink->row_skip = FALSE; ++ ++ omapfbsink->buffer = NULL; ++ omapfbsink->buffer_size = 0; ++ omapfbsink->hFc = NULL; ++} ++ ++GType ++gst_omapfbsink_get_type (void) ++{ ++ static GType type = 0; ++ ++ if (G_UNLIKELY (type == 0)) ++ { ++ GTypeInfo *type_info; ++ static const GInterfaceInfo iface_info = { ++ (GInterfaceInitFunc) gst_omapfbsink_interface_init, ++ NULL, ++ NULL, ++ }; ++ static const GInterfaceInfo overlay_info = { ++ (GInterfaceInitFunc) gst_omapfbsink_xoverlay_init, ++ NULL, ++ NULL, ++ }; ++ type_info = g_new0 (GTypeInfo, 1); ++ type_info->class_size = sizeof (GstOmapFbSinkClass); ++ type_info->base_init = type_base_init; ++ type_info->class_init = type_class_init; ++ type_info->instance_size = sizeof (GstOmapFbSink); ++ type_info->instance_init = (GInstanceInitFunc) gst_omapfbsink_init; ++ ++ type = g_type_register_static (GST_TYPE_BASE_SINK, "GstOmapFbSink", type_info, 0); ++ g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info); ++ g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &overlay_info); ++ ++ g_free (type_info); ++ } ++ ++ return type; ++} +diff --git a/src/omapfb.h b/src/omapfb.h +new file mode 100644 +index 0000000..6103b49 +--- /dev/null ++++ b/src/omapfb.h +@@ -0,0 +1,142 @@ ++/* ++ * Copyright (C) 2008 Felipe Contreras ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA ++ */ ++ ++#ifndef GST_OMAPFB_H ++#define GST_OMAPFB_H ++ ++#include ++#include ++ ++#include "gsttidmaibuffertransport.h" ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++ ++ ++G_BEGIN_DECLS ++ ++#define GST_OMAPFB_SINK_TYPE (gst_omapfbsink_get_type ()) ++#define GST_OMAPFB_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_OMAPFB_SINK_TYPE, GstOmapFbSink)) ++ ++typedef struct GstXContext GstXContext; ++typedef struct GstXWindow GstXWindow; ++typedef struct GstOmapFbSink GstOmapFbSink; ++typedef struct GstOmapFbSinkClass GstOmapFbSinkClass; ++ ++/** ++ * GstXWindow: ++ * @win: the Window ID of this X11 window ++ * @width: the width in pixels of Window @win ++ * @height: the height in pixels of Window @win ++ * @internal: used to remember if Window @win was created internally or passed ++ * through the #GstXOverlay interface ++ * @gc: the Graphical Context of Window @win ++ * ++ * Structure used to store informations about a Window. ++ */ ++struct GstXWindow { ++ Window win; ++ gint width, height; ++ gboolean internal; ++ GC gc; ++ ++ gint wx, wy; ++}; ++ ++/** ++ * GstXContext: ++ * @disp: the X11 Display of this context ++ * @screen: the default Screen of Display @disp ++ * @screen_num: the Screen number of @screen ++ * @visual: the default Visual of Screen @screen ++ * @root: the root Window of Display @disp ++ * @white: the value of a white pixel on Screen @screen ++ * @black: the value of a black pixel on Screen @screen ++ * @depth: the color depth of Display @disp ++ * @bpp: the number of bits per pixel on Display @disp ++ * @endianness: the endianness of image bytes on Display @disp ++ * @width: the width in pixels of Display @disp ++ * @height: the height in pixels of Display @disp ++ * ++ * Structure used to store various informations collected/calculated for a ++ * Display. ++ */ ++struct GstXContext { ++ Display *disp; ++ Screen *screen; ++ gint screen_num; ++ ++ Visual *visual; ++ Window root; ++ ++ gint depth; ++ gint bpp; ++ ++ gint width, height; ++}; ++ ++struct GstOmapFbSink ++{ ++ GstVideoSink videosink; ++ ++ struct fb_fix_screeninfo fixinfo; ++ struct fb_var_screeninfo varinfo; ++ struct fb_var_screeninfo overlay_info; ++ struct omapfb_mem_info mem_info; ++ struct omapfb_plane_info plane_info; ++ ++ int overlay_fd; ++ unsigned char *framebuffer; ++ gboolean enabled; ++ ++ GMutex *x_lock; ++ GMutex *flow_lock; ++ ++ GstXContext *xcontext; ++ GstXWindow *xwindow; ++ ++ gulong colorKey; ++ char *display_name; ++ GThread *event_thread; ++ ++ void *buffer; ++ guint buffer_size; ++ guint image_format; ++ ++ gboolean row_skip; ++ gboolean handle_events; ++ gboolean running; ++ Framecopy_Handle hFc; ++}; ++ ++struct GstOmapFbSinkClass ++{ ++ GstBaseSinkClass parent_class; ++}; ++ ++GType gst_omapfbsink_get_type (void); ++ ++G_END_DECLS ++ ++#endif /* GST_OMAPFB_H */ +diff --git a/src/yuv.S b/src/yuv.S +new file mode 100644 +index 0000000..52113fa +--- /dev/null ++++ b/src/yuv.S +@@ -0,0 +1,117 @@ ++/* ++ Copyright (C) 2008 Mans Rullgard ++ ++ Permission is hereby granted, free of charge, to any person ++ obtaining a copy of this software and associated documentation ++ files (the "Software"), to deal in the Software without ++ restriction, including without limitation the rights to use, copy, ++ modify, merge, publish, distribute, sublicense, and/or sell copies ++ of the Software, and to permit persons to whom the Software is ++ furnished to do so, subject to the following conditions: ++ ++ The above copyright notice and this permission notice shall be ++ included in all copies or substantial portions of the Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ DEALINGS IN THE SOFTWARE. ++*/ ++ ++ .fpu neon ++ .text ++ ++@ yuv420_to_yuv422(uint8_t *yuv, uint8_t *y, uint8_t *u, uint8_t *v, ++@ int w, int h, int yw, int cw, int dw) ++ ++#define yuv r0 ++#define y r1 ++#define u r2 ++#define v r3 ++#define w r4 ++#define h r5 ++#define yw r6 ++#define cw r7 ++#define dw r8 ++ ++#define tyuv r9 ++#define ty r10 ++#define tu r11 ++#define tv r12 ++#define i lr ++ ++ .global yuv420_to_yuv422 ++ .func yuv420_to_yuv422 ++yuv420_to_yuv422: ++ push {r4-r11,lr} ++ add r4, sp, #36 ++ ldm r4, {r4-r8} ++1: ++ mov tu, u ++ mov tv, v ++ vld1.64 {d2}, [u,:64], cw @ u0 ++ vld1.64 {d3}, [v,:64], cw @ v0 ++ mov tyuv, yuv ++ mov ty, y ++ vzip.8 d2, d3 @ u0v0 ++ mov i, #16 ++2: ++ pld [y, #64] ++ vld1.64 {d0, d1}, [y,:128], yw @ y0 ++ pld [u, #64] ++ subs i, i, #4 ++ vld1.64 {d6}, [u,:64], cw @ u2 ++ pld [y, #64] ++ vld1.64 {d4, d5}, [y,:128], yw @ y1 ++ pld [v, #64] ++ vld1.64 {d7}, [v,:64], cw @ v2 ++ pld [y, #64] ++ vld1.64 {d16,d17}, [y,:128], yw @ y2 ++ vzip.8 d6, d7 @ u2v2 ++ pld [u, #64] ++ vld1.64 {d22}, [u,:64], cw @ u4 ++ pld [v, #64] ++ vld1.64 {d23}, [v,:64], cw @ v4 ++ pld [y, #64] ++ vld1.64 {d20,d21}, [y,:128], yw @ y3 ++ vmov q9, q3 @ u2v2 ++ vzip.8 d22, d23 @ u4v4 ++ vrhadd.u8 q3, q1, q3 @ u1v1 ++ vzip.8 q0, q1 @ y0u0y0v0 ++ vmov q12, q11 @ u4v4 ++ vzip.8 q2, q3 @ y1u1y1v1 ++ vrhadd.u8 q11, q9, q11 @ u3v3 ++ vst1.64 {d0-d3}, [yuv,:128], dw @ y0u0y0v0 ++ vzip.8 q8, q9 @ y2u2y2v2 ++ vst1.64 {d4-d7}, [yuv,:128], dw @ y1u1y1v1 ++ vzip.8 q10, q11 @ y3u3y3v3 ++ vst1.64 {d16-d19}, [yuv,:128], dw @ y2u2y2v2 ++ vmov q1, q12 ++ vst1.64 {d20-d23}, [yuv,:128], dw @ y3u3y3v3 ++ bgt 2b ++ subs w, w, #16 ++ add yuv, tyuv, #32 ++ add y, ty, #16 ++ add u, tu, #8 ++ add v, tv, #8 ++ bgt 1b ++ ++ ldr w, [sp, #36] ++ subs h, h, #16 ++ add yuv, yuv, dw, lsl #4 ++ sub yuv, yuv, w, lsl #1 ++ add y, y, yw, lsl #4 ++ sub y, y, w ++ add u, u, cw, lsl #3 ++ sub u, u, w, asr #1 ++ add v, v, cw, lsl #3 ++ sub v, v, w, asr #1 ++ bgt 1b ++ ++ pop {r4-r11,pc} ++ .endfunc ++ +-- +1.5.4.3 + diff --git a/recipes/ti/gstreamer-ti/dm355-evm/gst-ti.sh b/recipes/ti/gstreamer-ti/dm355-evm/gst-ti.sh new file mode 100644 index 0000000000..5467a67be0 --- /dev/null +++ b/recipes/ti/gstreamer-ti/dm355-evm/gst-ti.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Disable XDM 0.9 elements +export GST_TI_TIViddec_DISABLE=1 +export GST_TI_TIAuddec_DISABLE=1 +export GST_TI_TIVidenc_DISABLE=1 +export GST_TI_TIImgdec_DISABLE=1 +export GST_TI_TIImgenc_DISABLE=1 + +# Disable XDM 1.x audio decoder +export GST_TI_TIAuddec1_DISABLE=1 + diff --git a/recipes/ti/gstreamer-ti/dm365-evm/gst-ti.sh b/recipes/ti/gstreamer-ti/dm365-evm/gst-ti.sh new file mode 100644 index 0000000000..5467a67be0 --- /dev/null +++ b/recipes/ti/gstreamer-ti/dm365-evm/gst-ti.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Disable XDM 0.9 elements +export GST_TI_TIViddec_DISABLE=1 +export GST_TI_TIAuddec_DISABLE=1 +export GST_TI_TIVidenc_DISABLE=1 +export GST_TI_TIImgdec_DISABLE=1 +export GST_TI_TIImgenc_DISABLE=1 + +# Disable XDM 1.x audio decoder +export GST_TI_TIAuddec1_DISABLE=1 + diff --git a/recipes/ti/gstreamer-ti/dm365-evm/loadmodules.sh b/recipes/ti/gstreamer-ti/dm365-evm/loadmodules.sh new file mode 100644 index 0000000000..28358afb32 --- /dev/null +++ b/recipes/ti/gstreamer-ti/dm365-evm/loadmodules.sh @@ -0,0 +1,27 @@ +#!/bin/sh +rmmod cmemk 2>/dev/null +rmmod irqk 2>/dev/null +rmmod edmak 2>/dev/null +rmmod dm365mmap 2>/dev/null + +# Pools configuration +insmod cmemk.ko phys_start=0x84d00000 phys_end=0x88000000 pools=1x16539648,1x4841472,4x1843200,14x1646592,1x282624,1x176128,1x147456,1x69632,1x61440,1x32768,2x20480,1x12288,1x8192,72x4096 + +# Decode + Display +#insmod cmemk.ko phys_start=0x83c00000 phys_end=0x88000000 pools=1x16539648,1x4841472,14x1646592,1x282624,1x176128,1x147456,1x69632,1x61440,1x32768,2x20480,1x12288,1x8192,64x4096 + +# Capture + Encode +#insmod cmemk.ko phys_start=0x83c00000 phys_end=0x88000000 pools=1x3112960,1x2764800,3x1536000,1x65536,1x61440,1x49152,1x20480,1x16384,2x8192,87x4096 + +# Resizer +#insmod cmemk.ko phys_start=0x83c00000 phys_end=0x88000000 pools=3x1843200 + +# Non-accel display +#insmod cmemk.ko phys_start=0x83c00000 phys_end=0x88000000 pools=1x1843200 + +insmod irqk.ko +insmod edmak.ko +insmod dm365mmap.ko + +rm -f /dev/dm365mmap +mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0 diff --git a/recipes/ti/gstreamer-ti/gst-ti.sh b/recipes/ti/gstreamer-ti/gst-ti.sh new file mode 100644 index 0000000000..9fd904ddc3 --- /dev/null +++ b/recipes/ti/gstreamer-ti/gst-ti.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Disable XDM 0.9 elements +export GST_TI_TIViddec_DISABLE=1 +export GST_TI_TIAuddec_DISABLE=1 +export GST_TI_TIVidenc_DISABLE=1 +export GST_TI_TIImgdec_DISABLE=1 +export GST_TI_TIImgenc_DISABLE=1 + diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-add-omapfb.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-add-omapfb.patch deleted file mode 100644 index 1389d25e25..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-add-omapfb.patch +++ /dev/null @@ -1,1335 +0,0 @@ -diff -uNr ticodecplugin/configure.ac ticodecplugin.new/configure.ac ---- ticodecplugin/configure.ac 2009-09-05 00:04:51.000000000 -0500 -+++ ticodecplugin.new/configure.ac 2009-10-28 06:35:20.000000000 -0500 -@@ -25,6 +25,7 @@ - AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") - - AM_CONFIG_HEADER(config.h) -+AM_PROG_AS - - dnl check for tools - AC_PROG_CC -diff -uNr ticodecplugin/src/gstticodecplugin.c ticodecplugin.new/src/gstticodecplugin.c ---- ticodecplugin/src/gstticodecplugin.c 2009-10-28 06:27:14.000000000 -0500 -+++ ticodecplugin.new/src/gstticodecplugin.c 2009-10-28 06:36:28.000000000 -0500 -@@ -47,6 +47,7 @@ - #include "gsttiaudenc1.h" - #include "gsttividresize.h" - #include "gsttidmaiperf.h" -+#include "omapfb.h" - - /* entry point to initialize the plug-in - * initialize the plug-in itself -@@ -161,6 +162,13 @@ - GST_TYPE_DMAIPERF)) - return FALSE; - -+ env_value = getenv("GST_omapdmaifbsink_DISABLE"); -+ -+ if ((!env_value || strcmp(env_value,"1")) && !gst_element_register( -+ TICodecPlugin, "omapdmaifbsink", GST_RANK_PRIMARY, -+ GST_OMAPFB_SINK_TYPE)) -+ return FALSE; -+ - return TRUE; - } - -diff -uNr ticodecplugin/src/omapfb.c ticodecplugin.new/src/omapfb.c ---- ticodecplugin/src/omapfb.c 1969-12-31 18:00:00.000000000 -0600 -+++ ticodecplugin.new/src/omapfb.c 2009-10-28 06:35:20.000000000 -0500 -@@ -0,0 +1,1005 @@ -+/* -+ * Copyright (C) 2008 Felipe Contreras -+ * Copyright (C) 2009 Tim Yamin -+ * Copyright (C) 2009 Brijesh Singh -+ * -+ * X code largely copied from ximagesink by Julien Moutte and -+ * vo_omapfb.c by Gregoire Gentil. -+ * -+ * Use DMAI hw framecopy module to copy the dmai transport buffers. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation -+ * version 2.1 of the License. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "omapfb.h" -+#include -+ -+static GstVideoSinkClass *parent_class = NULL; -+ -+extern void yuv420_to_yuv422(__uint8_t *yuv, __uint8_t *y, __uint8_t *u, __uint8_t *v, -+ int w, int h, int yw, int cw, int dw); -+ -+static void x11_get_window_abs_position(Display *display, Window window, -+ int *wx, int *wy, int *ww, int *wh) -+{ -+ Window root, parent; -+ Window *child; -+ unsigned int n_children; -+ XWindowAttributes attribs; -+ -+ /* Get window attributes */ -+ XGetWindowAttributes(display, window, &attribs); -+ -+ /* Get relative position of given window */ -+ *wx = attribs.x; -+ *wy = attribs.y; -+ if (ww) -+ *ww = attribs.width; -+ if (wh) -+ *wh = attribs.height; -+ -+ /* Query window tree information */ -+ XQueryTree(display, window, &root, &parent, &child, &n_children); -+ if (parent) -+ { -+ int x, y; -+ -+ /* If we have a parent we must go there and discover his position */ -+ x11_get_window_abs_position(display, parent, &x, &y, NULL, NULL); -+ *wx += x; -+ *wy += y; -+ } -+ -+ /* If we had children, free them */ -+ if(n_children) -+ XFree(child); -+} -+ -+static GstXWindow * -+gst_omapfbsink_xwindow_new (GstOmapFbSink * omapfbsink, gint width, gint height) -+{ -+ GstXWindow *xwindow = NULL; -+ XGCValues values; -+ -+ if(!omapfbsink->xcontext) -+ return NULL; -+ -+ xwindow = g_new0 (GstXWindow, 1); -+ xwindow->width = width; -+ xwindow->height = height; -+ xwindow->internal = TRUE; -+ -+ g_mutex_lock (omapfbsink->x_lock); -+ xwindow->win = XCreateSimpleWindow (omapfbsink->xcontext->disp, -+ omapfbsink->xcontext->root, -+ 0, 0, xwindow->width, xwindow->height, -+ 0, 0, omapfbsink->colorKey); -+ -+ /* We have to do that to prevent X from redrawing the background on -+ ConfigureNotify. This takes away flickering of video when resizing. */ -+ XSetWindowBackgroundPixmap (omapfbsink->xcontext->disp, xwindow->win, None); -+ -+ if (omapfbsink->handle_events) { -+ Atom wm_delete; -+ -+ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | -+ StructureNotifyMask | PointerMotionMask | KeyPressMask | -+ KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); -+ -+ /* Tell the window manager we'd like delete client messages instead of -+ * being killed */ -+ wm_delete = XInternAtom (omapfbsink->xcontext->disp, -+ "WM_DELETE_WINDOW", False); -+ (void) XSetWMProtocols (omapfbsink->xcontext->disp, xwindow->win, -+ &wm_delete, 1); -+ } -+ -+ xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, -+ 0, &values); -+ -+ XMapRaised (omapfbsink->xcontext->disp, xwindow->win); -+ XSync (omapfbsink->xcontext->disp, FALSE); -+ -+ g_mutex_unlock (omapfbsink->x_lock); -+ gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (omapfbsink), xwindow->win); -+ -+ return xwindow; -+} -+ -+static gboolean gst_omapfbsink_update_plane (GstOmapFbSink *omapfbsink) -+{ -+ int wx, wy, ww, wh; -+ if (!omapfbsink->xcontext) -+ { -+ if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) -+ return FALSE; -+ return TRUE; -+ } -+ -+ if (omapfbsink->plane_info.enabled != 1) -+ return FALSE; -+ -+ x11_get_window_abs_position(omapfbsink->xcontext->disp, -+ omapfbsink->xwindow->win, &wx, &wy, &ww, &wh); -+ -+ if (wx != omapfbsink->xwindow->wx || wy != omapfbsink->xwindow->wy || -+ wh != omapfbsink->xwindow->height || ww != omapfbsink->xwindow->width) { -+ omapfbsink->plane_info.out_width = omapfbsink->xwindow->width = ww; -+ omapfbsink->plane_info.out_height = omapfbsink->xwindow->height = wh; -+ omapfbsink->plane_info.pos_x = omapfbsink->xwindow->wx = wx; -+ omapfbsink->plane_info.pos_y = omapfbsink->xwindow->wy = wy; -+ -+ GST_DEBUG_OBJECT(omapfbsink, "updating geometry to: (%d,%d) %dx%d", wx, wy, ww, wh); -+ -+ XSetForeground (omapfbsink->xcontext->disp, omapfbsink->xwindow->gc, omapfbsink->colorKey); -+ XFillRectangle (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, omapfbsink->xwindow->gc, 0, 0, ww, wh); -+ -+ if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+static void -+gst_omapfbsink_expose (GstXOverlay * overlay) -+{ -+ gst_omapfbsink_update_plane(GST_OMAPFB_SINK (overlay)); -+} -+ -+static void -+gst_omapfbsink_xwindow_destroy (GstOmapFbSink * omapfbsink, -+ GstXWindow * xwindow) -+{ -+ g_return_if_fail (xwindow != NULL); -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ /* If we did not create that window we just free the GC and let it live */ -+ if (xwindow->internal) -+ XDestroyWindow (omapfbsink->xcontext->disp, xwindow->win); -+ else -+ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, 0); -+ -+ XFreeGC (omapfbsink->xcontext->disp, xwindow->gc); -+ XSync (omapfbsink->xcontext->disp, FALSE); -+ g_mutex_unlock (omapfbsink->x_lock); -+ g_free (xwindow); -+} -+ -+/* This function handles XEvents that might be in the queue. It generates -+ GstEvent that will be sent upstream in the pipeline to handle interactivity -+ and navigation.*/ -+static void -+gst_omapfbsink_handle_xevents (GstOmapFbSink * omapfbsink) -+{ -+ XEvent e; -+ g_mutex_lock (omapfbsink->flow_lock); -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ while (XCheckWindowEvent (omapfbsink->xcontext->disp, -+ omapfbsink->xwindow->win, ExposureMask | StructureNotifyMask, &e)) { -+ switch (e.type) { -+ case Expose: -+ case ConfigureNotify: -+ gst_omapfbsink_update_plane (omapfbsink); -+ break; -+ default: -+ break; -+ } -+ } -+ -+ /* Handle Display events */ -+ while (XPending (omapfbsink->xcontext->disp)) { -+ XNextEvent (omapfbsink->xcontext->disp, &e); -+ -+ switch (e.type) { -+ case ClientMessage:{ -+ Atom wm_delete; -+ -+ wm_delete = XInternAtom (omapfbsink->xcontext->disp, -+ "WM_DELETE_WINDOW", False); -+ if (wm_delete == (Atom) e.xclient.data.l[0]) { -+ /* Handle window deletion by posting an error on the bus */ -+ GST_ELEMENT_ERROR (omapfbsink, RESOURCE, NOT_FOUND, -+ ("Output window was closed"), (NULL)); -+ -+ g_mutex_unlock (omapfbsink->x_lock); -+ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); -+ omapfbsink->xwindow = NULL; -+ g_mutex_lock (omapfbsink->x_lock); -+ } -+ break; -+ } -+ default: -+ break; -+ } -+ } -+ -+ g_mutex_unlock (omapfbsink->x_lock); -+ g_mutex_unlock (omapfbsink->flow_lock); -+} -+ -+static gpointer -+gst_omapfbsink_event_thread (GstOmapFbSink * omapfbsink) -+{ -+ GST_OBJECT_LOCK (omapfbsink); -+ while (omapfbsink->running) { -+ GST_OBJECT_UNLOCK (omapfbsink); -+ -+ if (omapfbsink->xwindow) -+ gst_omapfbsink_handle_xevents (omapfbsink); -+ g_usleep (100000); -+ -+ GST_OBJECT_LOCK (omapfbsink); -+ } -+ GST_OBJECT_UNLOCK (omapfbsink); -+ -+ return NULL; -+} -+ -+/* This function gets the X Display and global info about it. Everything is -+ stored in our object and will be cleaned when the object is disposed. */ -+static GstXContext * -+gst_omapfbsink_xcontext_get (GstOmapFbSink * omapfbsink) -+{ -+ GstXContext *xcontext = g_new0 (GstXContext, 1); -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ xcontext->disp = XOpenDisplay (omapfbsink->display_name); -+ -+ if (!xcontext->disp) { -+ g_mutex_unlock (omapfbsink->x_lock); -+ g_free (xcontext); -+ GST_ELEMENT_WARNING (omapfbsink, RESOURCE, WRITE, -+ ("Could not initialise X output"), -+ ("Could not open display")); -+ return NULL; -+ } -+ -+ xcontext->screen = DefaultScreenOfDisplay (xcontext->disp); -+ xcontext->screen_num = DefaultScreen (xcontext->disp); -+ xcontext->visual = DefaultVisual (xcontext->disp, xcontext->screen_num); -+ xcontext->root = DefaultRootWindow (xcontext->disp); -+ -+ xcontext->width = DisplayWidth (xcontext->disp, xcontext->screen_num); -+ xcontext->height = DisplayHeight (xcontext->disp, xcontext->screen_num); -+ -+ g_mutex_unlock (omapfbsink->x_lock); -+ -+ /* Setup our event listening thread */ -+ GST_OBJECT_LOCK (omapfbsink); -+ omapfbsink->running = TRUE; -+ omapfbsink->event_thread = g_thread_create ( -+ (GThreadFunc) gst_omapfbsink_event_thread, omapfbsink, TRUE, NULL); -+ GST_OBJECT_UNLOCK (omapfbsink); -+ -+ return xcontext; -+} -+ -+static void -+gst_omapfbsink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id) -+{ -+ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); -+ GstXWindow *xwindow = NULL; -+ XWindowAttributes attr; -+ -+ /* If we already use that window, return */ -+ if (omapfbsink->xwindow && (xwindow_id == omapfbsink->xwindow->win)) -+ return; -+ -+ /* If the element has not initialized the X11 context try to do so */ -+ if (!omapfbsink->xcontext && -+ !(omapfbsink->xcontext = gst_omapfbsink_xcontext_get (omapfbsink))) { -+ g_mutex_unlock (omapfbsink->flow_lock); -+ return; -+ } -+ -+ /* If a window is there already we destroy it */ -+ if (omapfbsink->xwindow) { -+ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); -+ omapfbsink->xwindow = NULL; -+ } -+ -+ /* If the xid is 0 we go back to an internal window */ -+ if (xwindow_id == 0) { -+ /* If no width/height caps nego did not happen window will be created -+ during caps nego then */ -+ if (GST_VIDEO_SINK_WIDTH (omapfbsink) && GST_VIDEO_SINK_HEIGHT (omapfbsink)) { -+ xwindow = gst_omapfbsink_xwindow_new (omapfbsink, -+ GST_VIDEO_SINK_WIDTH (omapfbsink), -+ GST_VIDEO_SINK_HEIGHT (omapfbsink)); -+ } -+ } else { -+ xwindow = g_new0 (GstXWindow, 1); -+ xwindow->wx = xwindow->wy = -1; -+ xwindow->win = xwindow_id; -+ -+ /* We get window geometry, set the event we want to receive, -+ and create a GC */ -+ g_mutex_lock (omapfbsink->x_lock); -+ XGetWindowAttributes (omapfbsink->xcontext->disp, xwindow->win, &attr); -+ xwindow->width = attr.width; -+ xwindow->height = attr.height; -+ xwindow->internal = FALSE; -+ if (omapfbsink->handle_events) { -+ XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | -+ StructureNotifyMask | PointerMotionMask | KeyPressMask | -+ KeyReleaseMask); -+ } -+ -+ xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, 0, NULL); -+ g_mutex_unlock (omapfbsink->x_lock); -+ } -+ -+ if (xwindow) { -+ omapfbsink->xwindow = xwindow; -+ -+ g_mutex_lock (omapfbsink->x_lock); -+ gst_omapfbsink_update_plane(omapfbsink); -+ g_mutex_unlock (omapfbsink->x_lock); -+ } -+} -+ -+static void -+gst_omapfbsink_xwindow_clear (GstOmapFbSink * omapfbsink, -+ GstXWindow * xwindow) -+{ -+ g_return_if_fail (xwindow != NULL); -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ XSetForeground (omapfbsink->xcontext->disp, xwindow->gc, -+ XBlackPixel (omapfbsink->xcontext->disp, -+ omapfbsink->xcontext->screen_num)); -+ -+ XFillRectangle (omapfbsink->xcontext->disp, xwindow->win, xwindow->gc, -+ 0, 0, xwindow->width, xwindow->height); -+ -+ XSync (omapfbsink->xcontext->disp, FALSE); -+ g_mutex_unlock (omapfbsink->x_lock); -+} -+ -+static void -+gst_omapfbsink_set_event_handling (GstXOverlay * overlay, -+ gboolean handle_events) -+{ -+ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); -+ omapfbsink->handle_events = handle_events; -+ -+ g_mutex_lock (omapfbsink->flow_lock); -+ -+ if (G_UNLIKELY (!omapfbsink->xwindow)) { -+ g_mutex_unlock (omapfbsink->flow_lock); -+ return; -+ } -+ -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ if (handle_events) { -+ if (omapfbsink->xwindow->internal) { -+ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, -+ ExposureMask | StructureNotifyMask | PointerMotionMask | -+ KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); -+ } else { -+ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, -+ ExposureMask | StructureNotifyMask | PointerMotionMask | -+ KeyPressMask | KeyReleaseMask); -+ } -+ } else { -+ XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, 0); -+ } -+ -+ g_mutex_unlock (omapfbsink->x_lock); -+ g_mutex_unlock (omapfbsink->flow_lock); -+} -+ -+static void -+gst_omapfbsink_xoverlay_init (GstXOverlayClass * iface) -+{ -+ iface->set_xwindow_id = gst_omapfbsink_set_xwindow_id; -+ iface->expose = gst_omapfbsink_expose; -+ iface->handle_events = gst_omapfbsink_set_event_handling; -+} -+ -+static GstCaps * -+generate_sink_template (void) -+{ -+ GstCaps *caps; -+ GstStructure *struc; -+ -+ caps = gst_caps_new_empty (); -+ -+ struc = gst_structure_new ("video/x-raw-yuv", -+ "width", GST_TYPE_INT_RANGE, 16, 4096, -+ "height", GST_TYPE_INT_RANGE, 16, 4096, -+ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 30, 1, -+ NULL); -+ -+ { -+ GValue list; -+ GValue val; -+ -+ list.g_type = val.g_type = 0; -+ -+ g_value_init (&list, GST_TYPE_LIST); -+ g_value_init (&val, GST_TYPE_FOURCC); -+ -+#if 0 -+ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2')); -+ gst_value_list_append_value (&list, &val); -+#else -+ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('I', '4', '2', '0')); -+ gst_value_list_append_value (&list, &val); -+ -+ gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')); -+ gst_value_list_append_value (&list, &val); -+#endif -+ -+ gst_structure_set_value (struc, "format", &list); -+ -+ g_value_unset (&val); -+ g_value_unset (&list); -+ } -+ -+ gst_caps_append_structure (caps, struc); -+ -+ return caps; -+} -+ -+static GstFlowReturn -+buffer_alloc (GstBaseSink *bsink, -+ guint64 offset, -+ guint size, -+ GstCaps *caps, -+ GstBuffer **buf) -+{ -+ GstOmapFbSink *self; -+ GstBuffer *buffer = NULL; -+ GstFlowReturn ret = GST_FLOW_OK; -+ self = GST_OMAPFB_SINK (bsink); -+ -+ if(self->row_skip) { -+ buffer = gst_buffer_new (); -+ GST_BUFFER_DATA (buffer) = self->buffer = self->framebuffer; -+ GST_BUFFER_SIZE (buffer) = self->buffer_size = size; -+ gst_buffer_set_caps (buffer, caps); -+ } else { -+ if(self->buffer && size == self->buffer_size) { -+ buffer = gst_buffer_new (); -+ GST_BUFFER_DATA (buffer) = self->buffer; -+ GST_BUFFER_SIZE (buffer) = size; -+ gst_buffer_set_caps (buffer, caps); -+ } else { -+ if(self->buffer) -+ free(self->buffer); -+ if(posix_memalign(&self->buffer, 16, (size_t) size) == 0) { -+ buffer = gst_buffer_new (); -+ GST_BUFFER_DATA (buffer) = self->buffer; -+ GST_BUFFER_SIZE (buffer) = self->buffer_size = size; -+ gst_buffer_set_caps (buffer, caps); -+ } else { -+ GST_ELEMENT_ERROR (self, RESOURCE, WRITE, ("Could not allocate aligned buf!"), -+ ("Could not alloc aligned buf!")); -+ } -+ } -+ } -+ -+ *buf = buffer; -+ return ret; -+} -+ -+static void -+x_memcpy (GstOmapFbSink *omapfbsink, __uint8_t *outBuf, __uint8_t *inBuf) -+{ -+ BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; -+ Buffer_Handle hInBuf = NULL, hOutBuf = NULL; -+ Framecopy_Attrs fcAttrs = Framecopy_Attrs_DEFAULT; -+ int size; -+ -+ if (omapfbsink->hFc == NULL) { -+ fcAttrs.accel = TRUE; -+ omapfbsink->hFc = Framecopy_create(&fcAttrs); -+ if (omapfbsink->hFc == NULL) { -+ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to create dmai framecopy handle"), ("failed to create dmai framecopy handle")); -+ goto cleanup; -+ } -+ } -+ -+ gfxAttrs.bAttrs.reference = TRUE; -+ gfxAttrs.dim.width = GST_VIDEO_SINK_WIDTH (omapfbsink); -+ gfxAttrs.dim.height = GST_VIDEO_SINK_HEIGHT (omapfbsink); -+ gfxAttrs.colorSpace = ColorSpace_UYVY; -+ gfxAttrs.dim.lineLength = omapfbsink->fixinfo.line_length; -+ size = gfxAttrs.dim.height * gfxAttrs.dim.width * 2; -+ -+ hInBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); -+ if (hInBuf == NULL) { -+ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); -+ goto cleanup; -+ } -+ Buffer_setUserPtr(hInBuf, (Int8*) inBuf); -+ Buffer_setNumBytesUsed(hInBuf,Buffer_getSize(hInBuf)); -+ -+ hOutBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); -+ if (hOutBuf == NULL) { -+ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); -+ goto cleanup; -+ } -+ Buffer_setUserPtr(hOutBuf, (Int8*) outBuf); -+ Buffer_setNumBytesUsed(hOutBuf,Buffer_getSize(hOutBuf)); -+ -+ -+ if (Framecopy_config(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { -+ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to configure dmai framecopy handle"), ("failed to configure dmai framecopy handle")); -+ goto cleanup; -+ } -+ -+ if (Framecopy_execute(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { -+ GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to execute dmai framecopy handle"), ("failed to configure dmai framecopy handle")); -+ goto cleanup; -+ } -+ cleanup: -+ -+ if (hInBuf) -+ Buffer_delete(hInBuf); -+ if (hOutBuf) -+ Buffer_delete(hOutBuf); -+} -+ -+static GstFlowReturn -+render (GstBaseSink * bsink, GstBuffer * buf) -+{ -+ int i, w, h; -+ GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK(bsink); -+ __uint8_t *fb = omapfbsink->framebuffer, *data = GST_BUFFER_DATA(buf); -+ gboolean useXcopy = FALSE; -+ -+ if (GST_IS_TIDMAIBUFFERTRANSPORT(buf)) { -+ GST_LOG("found dmai transport buffer, enabling hw framecopy.\n"); -+ useXcopy = TRUE; -+ } -+ -+ if(omapfbsink->plane_info.enabled == 2) -+ { -+ omapfbsink->plane_info.enabled = 1; -+ -+ g_mutex_lock (omapfbsink->x_lock); -+ gst_omapfbsink_update_plane(omapfbsink); -+ g_mutex_unlock (omapfbsink->x_lock); -+ } -+ -+ /* If a buffer which wasn't supplied by us is given to us to render with, -+ we need to copy to our buffer first so that memory alignment constraints -+ are met. */ -+ if((data != omapfbsink->buffer && GST_BUFFER_SIZE(buf) <= omapfbsink->buffer_size) && !useXcopy) -+ { -+ memcpy(omapfbsink->buffer, data, GST_BUFFER_SIZE(buf)); -+ data = omapfbsink->buffer; -+ } -+ -+ /* buffer_alloc gave a direct buffer, so we have nothing to -+ do here... */ -+ if(omapfbsink->row_skip) -+ return GST_FLOW_OK; -+ -+ switch(omapfbsink->image_format) { -+ case GST_MAKE_FOURCC('I', '4', '2', '0'): -+ /* Convert to YUV422 and send to FB */ -+ -+ h = GST_VIDEO_SINK_HEIGHT (omapfbsink); -+ w = GST_VIDEO_SINK_WIDTH (omapfbsink); -+ -+ __uint8_t *y, *u, *v; -+ y = data; -+ u = y + w * h; -+ v = u + w / 2 * h / 2; -+ yuv420_to_yuv422(fb, y, u, v, w & ~15, h, w, w / 2, omapfbsink->fixinfo.line_length); -+ break; -+ -+ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -+ /* Send to FB, taking into account line_length */ -+ if (useXcopy) { -+ x_memcpy(omapfbsink, fb, data); -+ } -+ else { -+ -+ w = 2 * GST_VIDEO_SINK_WIDTH (omapfbsink); -+ for(i = 0; i < GST_VIDEO_SINK_HEIGHT (omapfbsink); i++) -+ { -+ memcpy(fb, data, w); -+ -+ fb += omapfbsink->fixinfo.line_length; -+ data += w; -+ } -+ } -+ break; -+ } -+ -+ return GST_FLOW_OK; -+} -+ -+static gboolean -+setcaps (GstBaseSink *bsink, -+ GstCaps *vscapslist) -+{ -+ GstOmapFbSink *self; -+ GstStructure *structure; -+ -+ gint width, height; -+ struct omapfb_color_key color_key; -+ -+ self = GST_OMAPFB_SINK (bsink); -+ -+ structure = gst_caps_get_structure (vscapslist, 0); -+ -+ gst_structure_get_int (structure, "width", &width); -+ gst_structure_get_int (structure, "height", &height); -+ -+ self->overlay_info.xres = MIN (self->varinfo.xres, width) & ~15; -+ self->overlay_info.yres = MIN (self->varinfo.yres, height) & ~15; -+ self->overlay_info.xres_virtual = self->overlay_info.xres; -+ self->overlay_info.yres_virtual = self->overlay_info.yres; -+ -+ self->overlay_info.xoffset = 0; -+ self->overlay_info.yoffset = 0; -+ -+ gst_structure_get_fourcc (structure, "format", &self->image_format); -+ switch(self->image_format) { -+ case GST_MAKE_FOURCC('I', '4', '2', '0'): -+ self->row_skip = FALSE; /* Colorspace conversion required */ -+ self->overlay_info.nonstd = OMAPFB_COLOR_YUY422; -+ break; -+ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -+ /* Can data be pushed straight to the FB or do we need to interleave? */ -+ if (self->fixinfo.line_length != 2 * width) -+ self->row_skip = FALSE; -+ else -+ self->row_skip = TRUE; -+ self->overlay_info.nonstd = OMAPFB_COLOR_YUV422; -+ break; -+ } -+ -+ if (ioctl (self->overlay_fd, FBIOPUT_VSCREENINFO, &self->overlay_info)) -+ return FALSE; -+ -+ GST_VIDEO_SINK_WIDTH (self) = width; -+ GST_VIDEO_SINK_HEIGHT (self) = height; -+ if (!self->xwindow) { -+ self->xwindow = gst_omapfbsink_xwindow_new (self, -+ GST_VIDEO_SINK_WIDTH (self), GST_VIDEO_SINK_HEIGHT (self)); -+ } -+ -+ color_key.channel_out = OMAPFB_CHANNEL_OUT_LCD; -+ color_key.background = 0x0; -+ color_key.trans_key = self->colorKey; -+ if (self->xwindow) -+ color_key.key_type = OMAPFB_COLOR_KEY_GFX_DST; -+ else -+ color_key.key_type = OMAPFB_COLOR_KEY_DISABLED; -+ -+ if (ioctl (self->overlay_fd, OMAPFB_SET_COLOR_KEY, &color_key)) -+ return FALSE; -+ -+ self->plane_info.pos_x = 0; -+ self->plane_info.pos_y = 0; -+ self->plane_info.out_width = self->overlay_info.xres; -+ self->plane_info.out_height = self->overlay_info.yres; -+ self->plane_info.enabled = 2; -+ -+ if (ioctl (self->overlay_fd, FBIOGET_FSCREENINFO, &self->fixinfo)) -+ return FALSE; -+ -+ self->enabled = TRUE; -+ return TRUE; -+} -+ -+static gboolean -+start (GstBaseSink *bsink) -+{ -+ GstOmapFbSink *self; -+ int fd; -+ -+ self = GST_OMAPFB_SINK (bsink); -+ -+ fd = open ("/dev/fb0", O_RDWR); -+ -+ if (fd == -1) -+ return FALSE; -+ -+ if (ioctl (fd, FBIOGET_VSCREENINFO, &self->varinfo)) -+ { -+ close (fd); -+ return FALSE; -+ } -+ -+ if (close (fd)) -+ return FALSE; -+ -+ self->overlay_fd = open ("/dev/fb1", O_RDWR); -+ -+ if (self->overlay_fd == -1) -+ return FALSE; -+ -+ if (ioctl (self->overlay_fd, FBIOGET_VSCREENINFO, &self->overlay_info)) -+ return FALSE; -+ -+ if (ioctl (self->overlay_fd, OMAPFB_QUERY_PLANE, &self->plane_info)) -+ return FALSE; -+ -+ if (ioctl (self->overlay_fd, OMAPFB_QUERY_MEM, &self->mem_info)) -+ return FALSE; -+ -+ self->framebuffer = mmap (NULL, self->mem_info.size, PROT_WRITE, MAP_SHARED, self->overlay_fd, 0); -+ if (self->framebuffer == MAP_FAILED) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+static gboolean -+stop (GstBaseSink *bsink) -+{ -+ GstOmapFbSink *self; -+ -+ self = GST_OMAPFB_SINK (bsink); -+ -+ if (self->enabled) -+ { -+ self->plane_info.enabled = 0; -+ -+ if (ioctl (self->overlay_fd, OMAPFB_SETUP_PLANE, &self->plane_info)) -+ return FALSE; -+ } -+ -+ if (munmap (self->framebuffer, self->mem_info.size)) -+ return FALSE; -+ -+ if (close (self->overlay_fd)) -+ return FALSE; -+ -+ if (self->hFc) -+ Framecopy_delete(self->hFc); -+ -+ return TRUE; -+} -+ -+/* This function cleans the X context. Closing the Display and unrefing the -+ caps for supported formats. */ -+static void -+gst_omapfbsink_xcontext_clear (GstOmapFbSink * omapfbsink) -+{ -+ GstXContext *xcontext; -+ GST_OBJECT_LOCK (omapfbsink); -+ if (omapfbsink->xcontext == NULL) { -+ GST_OBJECT_UNLOCK (omapfbsink); -+ return; -+ } -+ -+ xcontext = omapfbsink->xcontext; -+ omapfbsink->xcontext = NULL; -+ -+ GST_OBJECT_UNLOCK (omapfbsink); -+ g_mutex_lock (omapfbsink->x_lock); -+ -+ XCloseDisplay (xcontext->disp); -+ g_mutex_unlock (omapfbsink->x_lock); -+ g_free (xcontext); -+} -+ -+static void -+gst_omapfbsink_reset (GstOmapFbSink *omapfbsink) -+{ -+ GThread *thread; -+ -+ GST_OBJECT_LOCK (omapfbsink); -+ omapfbsink->running = FALSE; -+ /* grab thread and mark it as NULL */ -+ thread = omapfbsink->event_thread; -+ omapfbsink->event_thread = NULL; -+ GST_OBJECT_UNLOCK (omapfbsink); -+ -+ /* Wait for our event thread to finish before we clean up our stuff. */ -+ if (thread) -+ g_thread_join (thread); -+ -+ g_mutex_lock (omapfbsink->flow_lock); -+ if (omapfbsink->xwindow) { -+ gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); -+ gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); -+ omapfbsink->xwindow = NULL; -+ } -+ g_mutex_unlock (omapfbsink->flow_lock); -+ gst_omapfbsink_xcontext_clear (omapfbsink); -+} -+ -+static GstStateChangeReturn -+gst_omapfbsink_change_state (GstElement * element, GstStateChange transition) -+{ -+ GstOmapFbSink *omapfbsink; -+ GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; -+ GstXContext *xcontext = NULL; -+ -+ omapfbsink = GST_OMAPFB_SINK (element); -+ -+ switch (transition) { -+ case GST_STATE_CHANGE_NULL_TO_READY: -+ -+ /* Initializing the XContext */ -+ if (omapfbsink->xcontext == NULL) { -+ xcontext = gst_omapfbsink_xcontext_get (omapfbsink); -+ -+ GST_OBJECT_LOCK (omapfbsink); -+ omapfbsink->xcontext = xcontext; -+ GST_OBJECT_UNLOCK (omapfbsink); -+ } -+ break; -+ case GST_STATE_CHANGE_READY_TO_PAUSED: -+ g_mutex_lock (omapfbsink->flow_lock); -+ if (omapfbsink->xwindow) -+ gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); -+ g_mutex_unlock (omapfbsink->flow_lock); -+ break; -+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING: -+ break; -+ default: -+ break; -+ } -+ -+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); -+ -+ switch (transition) { -+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED: -+ break; -+ case GST_STATE_CHANGE_PAUSED_TO_READY: -+ GST_VIDEO_SINK_WIDTH (omapfbsink) = 0; -+ GST_VIDEO_SINK_HEIGHT (omapfbsink) = 0; -+ break; -+ case GST_STATE_CHANGE_READY_TO_NULL: -+ gst_omapfbsink_reset (omapfbsink); -+ break; -+ default: -+ break; -+ } -+ -+ return ret; -+} -+ -+static void -+type_class_init (gpointer g_class, -+ gpointer class_data) -+{ -+ GstElementClass *element_class; -+ GstBaseSinkClass *base_sink_class; -+ -+ element_class = (GstElementClass *) g_class; -+ base_sink_class = (GstBaseSinkClass *) g_class; -+ -+ parent_class = g_type_class_peek_parent (g_class); -+ -+ base_sink_class->set_caps = GST_DEBUG_FUNCPTR (setcaps); -+ base_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR (buffer_alloc); -+ base_sink_class->render = GST_DEBUG_FUNCPTR (render); -+ base_sink_class->start = GST_DEBUG_FUNCPTR (start); -+ base_sink_class->stop = GST_DEBUG_FUNCPTR (stop); -+ -+ element_class->change_state = gst_omapfbsink_change_state; -+} -+ -+static void -+type_base_init (gpointer g_class) -+{ -+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); -+ -+ { -+ GstElementDetails details; -+ -+ details.longname = "Linux OMAP framebuffer sink"; -+ details.klass = "Sink/Video"; -+ details.description = "Renders video with omapfb"; -+ details.author = "Felipe Contreras"; -+ -+ gst_element_class_set_details (element_class, &details); -+ } -+ -+ { -+ GstPadTemplate *template; -+ -+ template = gst_pad_template_new ("sink", GST_PAD_SINK, -+ GST_PAD_ALWAYS, -+ generate_sink_template ()); -+ -+ gst_element_class_add_pad_template (element_class, template); -+ } -+} -+ -+static gboolean -+gst_omapfbsink_interface_supported (GstImplementsInterface * iface, GType type) -+{ -+ g_assert (type == GST_TYPE_X_OVERLAY); -+ return TRUE; -+} -+ -+static void -+gst_omapfbsink_interface_init (GstImplementsInterfaceClass * klass) -+{ -+ klass->supported = gst_omapfbsink_interface_supported; -+} -+ -+static void -+gst_omapfbsink_init (GstOmapFbSink * omapfbsink) -+{ -+ omapfbsink->display_name = NULL; -+ omapfbsink->xcontext = NULL; -+ omapfbsink->xwindow = NULL; -+ -+ omapfbsink->event_thread = NULL; -+ omapfbsink->running = FALSE; -+ -+ omapfbsink->x_lock = g_mutex_new (); -+ omapfbsink->flow_lock = g_mutex_new (); -+ -+ omapfbsink->handle_events = TRUE; -+ omapfbsink->colorKey = 0xff0; -+ -+ omapfbsink->plane_info.enabled = 0; -+ omapfbsink->row_skip = FALSE; -+ -+ omapfbsink->buffer = NULL; -+ omapfbsink->buffer_size = 0; -+ omapfbsink->hFc = NULL; -+} -+ -+GType -+gst_omapfbsink_get_type (void) -+{ -+ static GType type = 0; -+ -+ if (G_UNLIKELY (type == 0)) -+ { -+ GTypeInfo *type_info; -+ static const GInterfaceInfo iface_info = { -+ (GInterfaceInitFunc) gst_omapfbsink_interface_init, -+ NULL, -+ NULL, -+ }; -+ static const GInterfaceInfo overlay_info = { -+ (GInterfaceInitFunc) gst_omapfbsink_xoverlay_init, -+ NULL, -+ NULL, -+ }; -+ type_info = g_new0 (GTypeInfo, 1); -+ type_info->class_size = sizeof (GstOmapFbSinkClass); -+ type_info->base_init = type_base_init; -+ type_info->class_init = type_class_init; -+ type_info->instance_size = sizeof (GstOmapFbSink); -+ type_info->instance_init = (GInstanceInitFunc) gst_omapfbsink_init; -+ -+ type = g_type_register_static (GST_TYPE_BASE_SINK, "GstOmapFbSink", type_info, 0); -+ g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info); -+ g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &overlay_info); -+ -+ g_free (type_info); -+ } -+ -+ return type; -+} -diff -uNr ticodecplugin/src/omapfb.h ticodecplugin.new/src/omapfb.h ---- ticodecplugin/src/omapfb.h 1969-12-31 18:00:00.000000000 -0600 -+++ ticodecplugin.new/src/omapfb.h 2009-10-28 06:35:20.000000000 -0500 -@@ -0,0 +1,142 @@ -+/* -+ * Copyright (C) 2008 Felipe Contreras -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation -+ * version 2.1 of the License. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA -+ */ -+ -+#ifndef GST_OMAPFB_H -+#define GST_OMAPFB_H -+ -+#include -+#include -+ -+#include "gsttidmaibuffertransport.h" -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+ -+ -+G_BEGIN_DECLS -+ -+#define GST_OMAPFB_SINK_TYPE (gst_omapfbsink_get_type ()) -+#define GST_OMAPFB_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_OMAPFB_SINK_TYPE, GstOmapFbSink)) -+ -+typedef struct GstXContext GstXContext; -+typedef struct GstXWindow GstXWindow; -+typedef struct GstOmapFbSink GstOmapFbSink; -+typedef struct GstOmapFbSinkClass GstOmapFbSinkClass; -+ -+/** -+ * GstXWindow: -+ * @win: the Window ID of this X11 window -+ * @width: the width in pixels of Window @win -+ * @height: the height in pixels of Window @win -+ * @internal: used to remember if Window @win was created internally or passed -+ * through the #GstXOverlay interface -+ * @gc: the Graphical Context of Window @win -+ * -+ * Structure used to store informations about a Window. -+ */ -+struct GstXWindow { -+ Window win; -+ gint width, height; -+ gboolean internal; -+ GC gc; -+ -+ gint wx, wy; -+}; -+ -+/** -+ * GstXContext: -+ * @disp: the X11 Display of this context -+ * @screen: the default Screen of Display @disp -+ * @screen_num: the Screen number of @screen -+ * @visual: the default Visual of Screen @screen -+ * @root: the root Window of Display @disp -+ * @white: the value of a white pixel on Screen @screen -+ * @black: the value of a black pixel on Screen @screen -+ * @depth: the color depth of Display @disp -+ * @bpp: the number of bits per pixel on Display @disp -+ * @endianness: the endianness of image bytes on Display @disp -+ * @width: the width in pixels of Display @disp -+ * @height: the height in pixels of Display @disp -+ * -+ * Structure used to store various informations collected/calculated for a -+ * Display. -+ */ -+struct GstXContext { -+ Display *disp; -+ Screen *screen; -+ gint screen_num; -+ -+ Visual *visual; -+ Window root; -+ -+ gint depth; -+ gint bpp; -+ -+ gint width, height; -+}; -+ -+struct GstOmapFbSink -+{ -+ GstVideoSink videosink; -+ -+ struct fb_fix_screeninfo fixinfo; -+ struct fb_var_screeninfo varinfo; -+ struct fb_var_screeninfo overlay_info; -+ struct omapfb_mem_info mem_info; -+ struct omapfb_plane_info plane_info; -+ -+ int overlay_fd; -+ unsigned char *framebuffer; -+ gboolean enabled; -+ -+ GMutex *x_lock; -+ GMutex *flow_lock; -+ -+ GstXContext *xcontext; -+ GstXWindow *xwindow; -+ -+ gulong colorKey; -+ char *display_name; -+ GThread *event_thread; -+ -+ void *buffer; -+ guint buffer_size; -+ guint image_format; -+ -+ gboolean row_skip; -+ gboolean handle_events; -+ gboolean running; -+ Framecopy_Handle hFc; -+}; -+ -+struct GstOmapFbSinkClass -+{ -+ GstBaseSinkClass parent_class; -+}; -+ -+GType gst_omapfbsink_get_type (void); -+ -+G_END_DECLS -+ -+#endif /* GST_OMAPFB_H */ -diff -uNr ticodecplugin/src/yuv.S ticodecplugin.new/src/yuv.S ---- ticodecplugin/src/yuv.S 1969-12-31 18:00:00.000000000 -0600 -+++ ticodecplugin.new/src/yuv.S 2009-10-28 06:35:20.000000000 -0500 -@@ -0,0 +1,117 @@ -+/* -+ Copyright (C) 2008 Mans Rullgard -+ -+ Permission is hereby granted, free of charge, to any person -+ obtaining a copy of this software and associated documentation -+ files (the "Software"), to deal in the Software without -+ restriction, including without limitation the rights to use, copy, -+ modify, merge, publish, distribute, sublicense, and/or sell copies -+ of the Software, and to permit persons to whom the Software is -+ furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice shall be -+ included in all copies or substantial portions of the Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+*/ -+ -+ .fpu neon -+ .text -+ -+@ yuv420_to_yuv422(uint8_t *yuv, uint8_t *y, uint8_t *u, uint8_t *v, -+@ int w, int h, int yw, int cw, int dw) -+ -+#define yuv r0 -+#define y r1 -+#define u r2 -+#define v r3 -+#define w r4 -+#define h r5 -+#define yw r6 -+#define cw r7 -+#define dw r8 -+ -+#define tyuv r9 -+#define ty r10 -+#define tu r11 -+#define tv r12 -+#define i lr -+ -+ .global yuv420_to_yuv422 -+ .func yuv420_to_yuv422 -+yuv420_to_yuv422: -+ push {r4-r11,lr} -+ add r4, sp, #36 -+ ldm r4, {r4-r8} -+1: -+ mov tu, u -+ mov tv, v -+ vld1.64 {d2}, [u,:64], cw @ u0 -+ vld1.64 {d3}, [v,:64], cw @ v0 -+ mov tyuv, yuv -+ mov ty, y -+ vzip.8 d2, d3 @ u0v0 -+ mov i, #16 -+2: -+ pld [y, #64] -+ vld1.64 {d0, d1}, [y,:128], yw @ y0 -+ pld [u, #64] -+ subs i, i, #4 -+ vld1.64 {d6}, [u,:64], cw @ u2 -+ pld [y, #64] -+ vld1.64 {d4, d5}, [y,:128], yw @ y1 -+ pld [v, #64] -+ vld1.64 {d7}, [v,:64], cw @ v2 -+ pld [y, #64] -+ vld1.64 {d16,d17}, [y,:128], yw @ y2 -+ vzip.8 d6, d7 @ u2v2 -+ pld [u, #64] -+ vld1.64 {d22}, [u,:64], cw @ u4 -+ pld [v, #64] -+ vld1.64 {d23}, [v,:64], cw @ v4 -+ pld [y, #64] -+ vld1.64 {d20,d21}, [y,:128], yw @ y3 -+ vmov q9, q3 @ u2v2 -+ vzip.8 d22, d23 @ u4v4 -+ vrhadd.u8 q3, q1, q3 @ u1v1 -+ vzip.8 q0, q1 @ y0u0y0v0 -+ vmov q12, q11 @ u4v4 -+ vzip.8 q2, q3 @ y1u1y1v1 -+ vrhadd.u8 q11, q9, q11 @ u3v3 -+ vst1.64 {d0-d3}, [yuv,:128], dw @ y0u0y0v0 -+ vzip.8 q8, q9 @ y2u2y2v2 -+ vst1.64 {d4-d7}, [yuv,:128], dw @ y1u1y1v1 -+ vzip.8 q10, q11 @ y3u3y3v3 -+ vst1.64 {d16-d19}, [yuv,:128], dw @ y2u2y2v2 -+ vmov q1, q12 -+ vst1.64 {d20-d23}, [yuv,:128], dw @ y3u3y3v3 -+ bgt 2b -+ subs w, w, #16 -+ add yuv, tyuv, #32 -+ add y, ty, #16 -+ add u, tu, #8 -+ add v, tv, #8 -+ bgt 1b -+ -+ ldr w, [sp, #36] -+ subs h, h, #16 -+ add yuv, yuv, dw, lsl #4 -+ sub yuv, yuv, w, lsl #1 -+ add y, y, yw, lsl #4 -+ sub y, y, w -+ add u, u, cw, lsl #3 -+ sub u, u, w, asr #1 -+ add v, v, cw, lsl #3 -+ sub v, v, w, asr #1 -+ bgt 1b -+ -+ pop {r4-r11,pc} -+ .endfunc -+ ---- /tmp/Makefile.am 2010-01-13 09:13:19.000000000 +0100 -+++ ticodecplugin/src/Makefile.am 2010-01-13 09:14:38.000000000 +0100 -@@ -4,16 +4,16 @@ - plugin_LTLIBRARIES = libgstticodecplugin.la - - # sources used to compile this plug-in --libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec.c gsttiauddec1.c gsttividdec.c gsttividdec2.c gsttiimgenc1.c gsttiimgenc.c gsttiimgdec1.c gsttiimgdec.c gsttidmaibuffertransport.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c -+libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec.c gsttiauddec1.c gsttividdec.c gsttividdec2.c gsttiimgenc1.c gsttiimgenc.c gsttiimgdec1.c gsttiimgdec.c gsttidmaibuffertransport.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c omapfb.c yuv.S - - # flags used to compile this plugin - # add other _CFLAGS and _LIBS as needed --libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) --libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm -+libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) -I$(LINUXKERNEL_INSTALL_DIR)/include -+libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm -lX11 - libgstticodecplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,$(XDC_CONFIG_BASENAME)/linker.cmd - - # headers we need but don't want installed --noinst_HEADERS = gsttiauddec.h gsttiauddec1.h gsttividdec.h gsttividdec2.h gsttiimgenc1.h gsttiimgenc.h gsttiimgdec1.h gsttiimgdec.h gsttidmaibuffertransport.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h -+noinst_HEADERS = gsttiauddec.h gsttiauddec1.h gsttividdec.h gsttividdec2.h gsttiimgenc1.h gsttiimgenc.h gsttiimgdec1.h gsttiimgdec.h gsttidmaibuffertransport.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h omapfb.h - - # XDC Configuration - CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh deleted file mode 100644 index d95658e44b..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # CMEM Allocation - # 1x3628800 Circular buffer - # 4x829440 Video buffers (max D1 PAL) - # 1x829440 Underlying software components (codecs, etc.) - # 1x518400 Underlying software components (codecs, etc.) - # 1x4948 Underlying software components (codecs, etc.) - # 1x1505280 Underlying software components (codecs, etc.) - # 1x5760 Underlying software components (codecs, etc.) - # 1x8192 Underlying software components (codecs, etc.) - # 1x1 Dummy buffer used during final flush - modprobe cmemk phys_start=0x87400000 phys_end=0x88000000 \ - pools=1x3628800,5x829440,1x518400,1x4948,1x1505280,1x5760,1x8192,1x1 - - modprobe dm350mmap - rm -f /dev/dm350mmap - mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0 - -} - -unload_module() { - rmmod cmemk - rmmod dm350mmap -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-dm365-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-dm365-rc.sh deleted file mode 100644 index f1aa8ee6da..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-dm365-rc.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # insert cmem - modprobe cmemk phys_start=0x85400000 phys_end=0x88000000 \ - pools=1x6651904,1x3670016,18x1548288,1x282624,1x159744,1x49152,1x32768,1x28672,1x16384,3x12288,2x8192,36x4096 - - modprobe irqk - modprobe edmak - modprobe dm365mmap - rm -f /dev/dm365mmap - mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0 -} - -unload_module() { - rmmod cmemk 2>/dev/null - rmmod irqk 2>/dev/null - rmmod edmak 2>/dev/null - rmmod dm365mmap 2>/dev/null -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6446-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-dm6446-rc.sh deleted file mode 100644 index 69468977bd..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6446-rc.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # insert cmemk, tell it to occupy physical 118MB-128MB. - # - # CMEM Allocation - # 1x5250000 Circular buffer - # 2x829440 Video buffers (max D1 PAL) - # 3x1036800 Video buffers (larger size needed for MPEG4 encoder) - # 1x8192 Underlying software components (codecs, etc.) - # 1x1 Dummy buffer used during final flush - modprobe cmemk phys_start=0x87600000 phys_end=0x88000000 \ - pools=1x5250000,2x829440,3x1036800,1x8192,1x1 - - # Notes on using the "playbin" element: - # ------------------------------------- - # Playbin requires one 6 video buffers, and we have only allocated five. - # If you replace the "2x829440,3x1036800" with "6x829440" it should work, but - # you will not be able to use the MPEG4 encoder. - # - #insmod cmemk.ko phys_start=0x87600000 phys_end=0x88000000 \ - # pools=1x5250000,6x829440,1x8192,1x1 - - # insert dsplinkk - modprobe dsplinkk - - # make /dev/dsplink - rm -f /dev/dsplink - mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 -} - -unload_module() { - rmmod cmemk - rmmod dsplinkk - rm -f /dev/dsplink -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-rc.sh deleted file mode 100644 index 69468977bd..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-rc.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # insert cmemk, tell it to occupy physical 118MB-128MB. - # - # CMEM Allocation - # 1x5250000 Circular buffer - # 2x829440 Video buffers (max D1 PAL) - # 3x1036800 Video buffers (larger size needed for MPEG4 encoder) - # 1x8192 Underlying software components (codecs, etc.) - # 1x1 Dummy buffer used during final flush - modprobe cmemk phys_start=0x87600000 phys_end=0x88000000 \ - pools=1x5250000,2x829440,3x1036800,1x8192,1x1 - - # Notes on using the "playbin" element: - # ------------------------------------- - # Playbin requires one 6 video buffers, and we have only allocated five. - # If you replace the "2x829440,3x1036800" with "6x829440" it should work, but - # you will not be able to use the MPEG4 encoder. - # - #insmod cmemk.ko phys_start=0x87600000 phys_end=0x88000000 \ - # pools=1x5250000,6x829440,1x8192,1x1 - - # insert dsplinkk - modprobe dsplinkk - - # make /dev/dsplink - rm -f /dev/dsplink - mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 -} - -unload_module() { - rmmod cmemk - rmmod dsplinkk - rm -f /dev/dsplink -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-usesinglecsserver.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-usesinglecsserver.patch deleted file mode 100644 index 3fb34cf744..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-dm6467-usesinglecsserver.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -uNr ticodecplugin/src/gstticodecplugin_dm6467.cfg ticodecplugin/src/gstticodecplugin_dm6467.cfg ---- ticodecplugin/src/gstticodecplugin_dm6467.cfg 2010-03-01 10:31:05.000000000 +0000 -+++ ticodecplugin/src/gstticodecplugin_dm6467.cfg 2010-03-01 11:12:14.000000000 +0000 -@@ -29,25 +29,15 @@ - * ======== Engine Configuration ======== - */ - var Engine = xdc.useModule('ti.sdo.ce.Engine'); --var decodeEngine = Engine.createFromServer( -- "decode", -- "./decodeCombo.x64P", -- "ti.sdo.servers.decode" -+var demoEngine = Engine.createFromServer( -+ "codecServer", -+ "./bin/cs.x64P", -+ "ti.sdo.server.cs" - ); --var encodeEngine = Engine.createFromServer( -- "encode", -- "./encodeCombo.x64P", -- "ti.sdo.servers.encode" -- ); -- --var encpath = "" + java.lang.System.getenv("ENCODE_COMBO"); --if (encpath != "" && encpath != "null") { -- encodeEngine.server = java.lang.System.getenv("ENCODE_COMBO"); --} - --var decpath = "" + java.lang.System.getenv("DECODE_COMBO"); --if (decpath != "" && decpath != "null") { -- decodeEngine.server = java.lang.System.getenv("DECODE_COMBO"); -+var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); -+if (combopath != "" && combopath != "null") { -+ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); - } - - /* Load support for the 'Davinci Multimedia Application Interface' modules */ diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-omap3530-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-omap3530-rc.sh deleted file mode 100644 index b61b40c176..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-omap3530-rc.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# -# Default Memory Map -# -# Start Addr Size Description -# ------------------------------------------- -# 0x80000000 99 MB Linux -# 0x86300000 16 MB CMEM -# 0x87300000 13 MB CODEC SERVER -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # - # CMEM Allocation - # 1x5250000 Circular buffer - # 6x829440,1x691200 Video buffers (max D1 PAL) - # 1x345600 Underlying software components (codecs, etc.) - # 1x1 Dummy buffer used during final flush - modprobe cmemk allowOverlap=1 phys_start=0x86300000 phys_end=0x87300000 \ - pools=1x5250000,6x829440,1x345600,1x691200,1x1 - - # insert DSP/BIOS Link driver - modprobe dsplinkk - - # insert Local Power Manager driver - modprobe lpm_omap3530 - - # insert SDMA driver - modprobe sdmak -} - -unload_module() { - rmmod cmemk - rmmod lpm_omap3530 - rmmod dsplinkk - rmmod sdmak -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137-rc.sh deleted file mode 100644 index 353758b3a7..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137-rc.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # insert cmemk, tell it to occupy physical 34MB-64MB. - # - modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ - pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 - - modprobe dsplinkk - - rm -f /dev/dsplink - mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 -} - -unload_module() { - rmmod cmemk - rmmod dsplinkk - rm -f /dev/dsplink -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137.patch deleted file mode 100644 index a2fe2c0559..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl137.patch +++ /dev/null @@ -1,267 +0,0 @@ -Index: ticodecplugin/src/gstticodecplugin_omapl137.cfg -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ ticodecplugin/src/gstticodecplugin_omapl137.cfg 2010-01-08 09:27:23.529399692 -0600 -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as -+ * published by the Free Software Foundation version 2.1 of the License. -+ * -+ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, -+ * whether express or implied; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ */ -+ -+/* Load the Codec Engine 'Operating System Abstraction Layer' */ -+var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); -+ -+var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); -+osalGlobal.os = os; -+ -+/* Configure CE to use it's DSP Link Linux version */ -+var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); -+ipc.commType = ipc.COMM_DSPLINK; -+ -+/* -+* ======== Engine Configuration ======== -+ */ -+var Engine = xdc.useModule('ti.sdo.ce.Engine'); -+var demoEngine = Engine.createFromServer( -+ "codecServer", -+ "./bin/cs.x64P", -+ "ti.sdo.server.cs" -+ ); -+ -+var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); -+if (combopath != "" && combopath != "null") { -+ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); -+} -+ -+/* Load support for the DMAI module */ -+var DMAI = xdc.loadPackage('ti.sdo.dmai'); -Index: ticodecplugin/src/gstticodecs_omapl137.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ ticodecplugin/src/gstticodecs_omapl137.c 2010-01-08 09:27:23.529399692 -0600 -@@ -0,0 +1,81 @@ -+/* -+ * gstticodecs_omapl137.c -+ * -+ * This file provides information for available codecs on the OMAP3530 platform. -+ * -+ * Original Author: -+ * Don Darling, Texas Instruments, Inc. -+ * -+ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as -+ * published by the Free Software Foundation version 2.1 of the License. -+ * -+ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, -+ * whether express or implied; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ */ -+ -+#include "gstticodecs.h" -+ -+/* Declaration of the production engine and decoders shipped with the DVSDK */ -+static Char codecServer[] = "codecServer"; -+ -+/* NULL terminated list of speech decoders in the engine to use in the demo */ -+GstTICodec gst_ticodec_codecs[] = { -+ -+ /* Audio Decoders */ -+ { -+ "AAC Audio Decoder", /* String name of codec used by plugin */ -+ "aachedec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Video Decoders */ -+ { -+ "H.264 Video Decoder", /* String name of codec used by plugin */ -+ "h264dec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, { -+ "MPEG4 Video Decoder", /* String name of codec used by plugin */ -+ "mpeg4dec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Image Decoders */ -+ { -+ "JPEG Image Decoder", /* String name of codec used by plugin */ -+ "jpegdec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Video Encoders */ -+ { -+ "H.264 Video Encoder", /* String name of codec used by plugin */ -+ "h264enc", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Image Encoders */ -+ { -+ "JPEG Image Encoder", /* String name of codec used by plugin */ -+ "jpegenc", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ { NULL } -+}; -+ -+ -+/****************************************************************************** -+ * Custom ViM Settings for editing this file -+ ******************************************************************************/ -+#if 0 -+ Tabs (use 4 spaces for indentation) -+ vim:set tabstop=4: /* Use 4 spaces for tabs */ -+ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ -+ vim:set expandtab: /* Expand tabs into white spaces */ -+#endif -Index: ticodecplugin/src/gsttividenc1.c -=================================================================== ---- ticodecplugin.orig/src/gsttividenc1.c 2010-01-07 15:15:37.000000000 -0600 -+++ ticodecplugin/src/gsttividenc1.c 2010-01-08 09:27:23.529399692 -0600 -@@ -1455,6 +1455,7 @@ - #if defined(Platform_omap3530) - case Cpu_Device_OMAP3530: - #endif -+ case Cpu_Device_OMAPL137: - case Cpu_Device_DM6446: - params.inputChromaFormat = XDM_YUV_422ILE; - break; -Index: ticodecplugin/src/gsttidmaivideosink.c -=================================================================== ---- ticodecplugin.orig/src/gsttidmaivideosink.c 2010-01-08 14:17:38.533747453 -0600 -+++ ticodecplugin/src/gsttidmaivideosink.c 2010-01-08 15:55:46.881680839 -0600 -@@ -51,6 +51,19 @@ - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS -+#if defined(Platform_omapl137) -+ ("video/x-raw-rgb, " -+ "bpp=(int)16, " -+ "depth=(int)16, " -+ "endianness=(int)1234, " -+ "red_mask=(int)63488, " -+ "green_mask=(int)2016, " -+ "blue_mask=(int)31, " -+ "framerate=(fraction)[ 0, MAX ], " -+ "width=(int)[ 1, MAX ], " -+ "height=(int)[1, MAX ] " -+ ) -+#else - ("video/x-raw-yuv, " - "format=(fourcc)UYVY, " - "framerate=(fraction)[ 0, MAX ], " -@@ -67,6 +80,7 @@ - "width=(int)[ 1, MAX ], " - "height=(int)[ 1, MAX ]" - ) -+#endif - ); - - GST_DEBUG_CATEGORY_STATIC (gst_tidmaivideosink_debug); -@@ -664,6 +678,11 @@ - vattrs->framerate = 60; - break; - -+ #if defined(Platform_omapl137) -+ case VideoStd_QVGA: -+ vattrs->framerate = 30; -+ break; -+ #endif - #if defined(Platform_omap3530) - case VideoStd_VGA: - vattrs->framerate = 60; -@@ -1035,6 +1054,12 @@ - sink->dAttrs.colorSpace = colorSpace; - break; - #endif -+ #if defined(Platform_omapl137) -+ case Cpu_Device_OMAPL137: -+ sink->dAttrs = Display_Attrs_OMAPL137_OSD_DEFAULT; -+ sink->dAttrs.colorSpace = colorSpace; -+ break; -+ #endif - default: - sink->dAttrs = Display_Attrs_DM6446_DM355_VID_DEFAULT; - break; -@@ -1291,8 +1316,10 @@ - ColorSpace_Type inBufColorSpace; - gint framerateDen; - gint framerateNum; -+ const gchar *mime; - - structure = gst_caps_get_structure(caps, 0); -+ mime = gst_structure_get_name(structure); - - /* The width and height of the input buffer are collected here so that it - * can be checked against the width and height of the display buffer. -@@ -1300,24 +1327,38 @@ - gst_structure_get_int(structure, "width", &width); - gst_structure_get_int(structure, "height", &height); - -- /* Map input buffer fourcc to dmai color space */ -- gst_structure_get_fourcc(structure, "format", &fourcc); -+ if (!strcmp(mime, "video/x-raw-rgb")) { -+ gint rm,gm,bm; - -- switch (fourcc) { -- case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -- inBufColorSpace = ColorSpace_UYVY; -- break; -- case GST_MAKE_FOURCC('Y', '8', 'C', '8'): -- inBufColorSpace = ColorSpace_YUV422PSEMI; -- break; -- #if defined(Platform_dm365) -- case GST_MAKE_FOURCC('N', 'V', '1', '2'): -- inBufColorSpace = ColorSpace_YUV420PSEMI; -- break; -- #endif -- default: -- GST_ERROR("unsupported fourcc\n"); -+ gst_structure_get_int(structure,"red_mask",&rm); -+ gst_structure_get_int(structure,"green_mask",&gm); -+ gst_structure_get_int(structure,"blue_mask",&bm); -+ if ((rm == 63488) && (gm == 2016) && (bm == 31)){ -+ inBufColorSpace = ColorSpace_RGB565; -+ } else { -+ GST_ERROR("unsupported color space\n"); - return FALSE; -+ } -+ } else { -+ /* Map input buffer fourcc to dmai color space */ -+ gst_structure_get_fourcc(structure, "format", &fourcc); -+ -+ switch (fourcc) { -+ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -+ inBufColorSpace = ColorSpace_UYVY; -+ break; -+ case GST_MAKE_FOURCC('Y', '8', 'C', '8'): -+ inBufColorSpace = ColorSpace_YUV422PSEMI; -+ break; -+ #if defined(Platform_dm365) -+ case GST_MAKE_FOURCC('N', 'V', '1', '2'): -+ inBufColorSpace = ColorSpace_YUV420PSEMI; -+ break; -+ #endif -+ default: -+ GST_ERROR("unsupported fourcc\n"); -+ return FALSE; -+ } - } - - /* Read the frame rate */ diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138-rc.sh deleted file mode 100644 index 353758b3a7..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138-rc.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# configure kernel modules for TI DSP based gstreamer plugin -# - -# Disable XDM 0.9 elements -export GST_TI_TIViddec_DISABLE=1 -export GST_TI_TIAuddec_DISABLE=1 -export GST_TI_TIVidenc_DISABLE=1 -export GST_TI_TIImgdec_DISABLE=1 -export GST_TI_TIImgenc_DISABLE=1 - -load_module() { - # insert cmemk, tell it to occupy physical 34MB-64MB. - # - modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ - pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 - - modprobe dsplinkk - - rm -f /dev/dsplink - mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 -} - -unload_module() { - rmmod cmemk - rmmod dsplinkk - rm -f /dev/dsplink -} - -case "$1" in - start) - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - stop) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - ;; - restart) - echo -n "Unloading kernel module ..." - unload_module - echo " done" - echo -n "Loading kernel modules for gstreamer-ti... " - load_module - echo " done" - ;; - *) - echo "$0 " - ;; -esac - diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138.patch deleted file mode 100644 index ca6bf65829..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-omapl138.patch +++ /dev/null @@ -1,267 +0,0 @@ -Index: ticodecplugin/src/gstticodecplugin_omapl138.cfg -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ ticodecplugin/src/gstticodecplugin_omapl138.cfg 2010-01-08 09:27:23.529399692 -0600 -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as -+ * published by the Free Software Foundation version 2.1 of the License. -+ * -+ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, -+ * whether express or implied; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ */ -+ -+/* Load the Codec Engine 'Operating System Abstraction Layer' */ -+var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); -+ -+var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); -+osalGlobal.os = os; -+ -+/* Configure CE to use it's DSP Link Linux version */ -+var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); -+ipc.commType = ipc.COMM_DSPLINK; -+ -+/* -+* ======== Engine Configuration ======== -+ */ -+var Engine = xdc.useModule('ti.sdo.ce.Engine'); -+var demoEngine = Engine.createFromServer( -+ "codecServer", -+ "./bin/cs.x64P", -+ "ti.sdo.server.cs" -+ ); -+ -+var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); -+if (combopath != "" && combopath != "null") { -+ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); -+} -+ -+/* Load support for the DMAI module */ -+var DMAI = xdc.loadPackage('ti.sdo.dmai'); -Index: ticodecplugin/src/gstticodecs_omapl138.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ ticodecplugin/src/gstticodecs_omapl138.c 2010-01-08 09:27:23.529399692 -0600 -@@ -0,0 +1,81 @@ -+/* -+ * gstticodecs_omapl138.c -+ * -+ * This file provides information for available codecs on the OMAP3530 platform. -+ * -+ * Original Author: -+ * Don Darling, Texas Instruments, Inc. -+ * -+ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as -+ * published by the Free Software Foundation version 2.1 of the License. -+ * -+ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, -+ * whether express or implied; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ */ -+ -+#include "gstticodecs.h" -+ -+/* Declaration of the production engine and decoders shipped with the DVSDK */ -+static Char codecServer[] = "codecServer"; -+ -+/* NULL terminated list of speech decoders in the engine to use in the demo */ -+GstTICodec gst_ticodec_codecs[] = { -+ -+ /* Audio Decoders */ -+ { -+ "AAC Audio Decoder", /* String name of codec used by plugin */ -+ "aachedec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Video Decoders */ -+ { -+ "H.264 Video Decoder", /* String name of codec used by plugin */ -+ "h264dec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, { -+ "MPEG4 Video Decoder", /* String name of codec used by plugin */ -+ "mpeg4dec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Image Decoders */ -+ { -+ "JPEG Image Decoder", /* String name of codec used by plugin */ -+ "jpegdec", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Video Encoders */ -+ { -+ "H.264 Video Encoder", /* String name of codec used by plugin */ -+ "h264enc", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ /* Image Encoders */ -+ { -+ "JPEG Image Encoder", /* String name of codec used by plugin */ -+ "jpegenc", /* String name of codec used by CE */ -+ codecServer /* Engine that contains this codec */ -+ }, -+ -+ { NULL } -+}; -+ -+ -+/****************************************************************************** -+ * Custom ViM Settings for editing this file -+ ******************************************************************************/ -+#if 0 -+ Tabs (use 4 spaces for indentation) -+ vim:set tabstop=4: /* Use 4 spaces for tabs */ -+ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ -+ vim:set expandtab: /* Expand tabs into white spaces */ -+#endif -Index: ticodecplugin/src/gsttividenc1.c -=================================================================== ---- ticodecplugin.orig/src/gsttividenc1.c 2010-01-07 15:15:37.000000000 -0600 -+++ ticodecplugin/src/gsttividenc1.c 2010-01-08 09:27:23.529399692 -0600 -@@ -1455,6 +1455,7 @@ - #if defined(Platform_omap3530) - case Cpu_Device_OMAP3530: - #endif -+ case Cpu_Device_OMAPL138: - case Cpu_Device_DM6446: - params.inputChromaFormat = XDM_YUV_422ILE; - break; -Index: ticodecplugin/src/gsttidmaivideosink.c -=================================================================== ---- ticodecplugin.orig/src/gsttidmaivideosink.c 2010-01-08 14:17:38.533747453 -0600 -+++ ticodecplugin/src/gsttidmaivideosink.c 2010-01-08 15:55:46.881680839 -0600 -@@ -51,6 +51,19 @@ - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS -+#if defined(Platform_omapl138) -+ ("video/x-raw-rgb, " -+ "bpp=(int)16, " -+ "depth=(int)16, " -+ "endianness=(int)1234, " -+ "red_mask=(int)63488, " -+ "green_mask=(int)2016, " -+ "blue_mask=(int)31, " -+ "framerate=(fraction)[ 0, MAX ], " -+ "width=(int)[ 1, MAX ], " -+ "height=(int)[1, MAX ] " -+ ) -+#else - ("video/x-raw-yuv, " - "format=(fourcc)UYVY, " - "framerate=(fraction)[ 0, MAX ], " -@@ -67,6 +80,7 @@ - "width=(int)[ 1, MAX ], " - "height=(int)[ 1, MAX ]" - ) -+#endif - ); - - GST_DEBUG_CATEGORY_STATIC (gst_tidmaivideosink_debug); -@@ -664,6 +678,11 @@ - vattrs->framerate = 60; - break; - -+ #if defined(Platform_omapl138) -+ case VideoStd_QVGA: -+ vattrs->framerate = 30; -+ break; -+ #endif - #if defined(Platform_omap3530) - case VideoStd_VGA: - vattrs->framerate = 60; -@@ -1035,6 +1054,12 @@ - sink->dAttrs.colorSpace = colorSpace; - break; - #endif -+ #if defined(Platform_omapl138) -+ case Cpu_Device_OMAPL138: -+ sink->dAttrs = Display_Attrs_OMAPL138_OSD_DEFAULT; -+ sink->dAttrs.colorSpace = colorSpace; -+ break; -+ #endif - default: - sink->dAttrs = Display_Attrs_DM6446_DM355_VID_DEFAULT; - break; -@@ -1291,8 +1316,10 @@ - ColorSpace_Type inBufColorSpace; - gint framerateDen; - gint framerateNum; -+ const gchar *mime; - - structure = gst_caps_get_structure(caps, 0); -+ mime = gst_structure_get_name(structure); - - /* The width and height of the input buffer are collected here so that it - * can be checked against the width and height of the display buffer. -@@ -1300,24 +1327,38 @@ - gst_structure_get_int(structure, "width", &width); - gst_structure_get_int(structure, "height", &height); - -- /* Map input buffer fourcc to dmai color space */ -- gst_structure_get_fourcc(structure, "format", &fourcc); -+ if (!strcmp(mime, "video/x-raw-rgb")) { -+ gint rm,gm,bm; - -- switch (fourcc) { -- case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -- inBufColorSpace = ColorSpace_UYVY; -- break; -- case GST_MAKE_FOURCC('Y', '8', 'C', '8'): -- inBufColorSpace = ColorSpace_YUV422PSEMI; -- break; -- #if defined(Platform_dm365) -- case GST_MAKE_FOURCC('N', 'V', '1', '2'): -- inBufColorSpace = ColorSpace_YUV420PSEMI; -- break; -- #endif -- default: -- GST_ERROR("unsupported fourcc\n"); -+ gst_structure_get_int(structure,"red_mask",&rm); -+ gst_structure_get_int(structure,"green_mask",&gm); -+ gst_structure_get_int(structure,"blue_mask",&bm); -+ if ((rm == 63488) && (gm == 2016) && (bm == 31)){ -+ inBufColorSpace = ColorSpace_RGB565; -+ } else { -+ GST_ERROR("unsupported color space\n"); - return FALSE; -+ } -+ } else { -+ /* Map input buffer fourcc to dmai color space */ -+ gst_structure_get_fourcc(structure, "format", &fourcc); -+ -+ switch (fourcc) { -+ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): -+ inBufColorSpace = ColorSpace_UYVY; -+ break; -+ case GST_MAKE_FOURCC('Y', '8', 'C', '8'): -+ inBufColorSpace = ColorSpace_YUV422PSEMI; -+ break; -+ #if defined(Platform_dm365) -+ case GST_MAKE_FOURCC('N', 'V', '1', '2'): -+ inBufColorSpace = ColorSpace_YUV420PSEMI; -+ break; -+ #endif -+ default: -+ GST_ERROR("unsupported fourcc\n"); -+ return FALSE; -+ } - } - - /* Read the frame rate */ diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-rc.sh b/recipes/ti/gstreamer-ti/gstreamer-ti-rc.sh new file mode 100644 index 0000000000..da844f4f62 --- /dev/null +++ b/recipes/ti/gstreamer-ti/gstreamer-ti-rc.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# configure kernel modules to run gst-ti plugins elements +# + +load_module() { + echo + echo -n "Running /usr/share/ti/gst//loadmodule.sh" + echo " (skipped)" + # /usr/share/ti/gst//loadmodule.sh +} + +case "$1" in + start) + echo -n "Loading kernel modules for gstreamer-ti... " + load_module + echo " done" + ;; + stop) + echo "Nothing to do" + ;; + restart) + echo "Nothing to do" + ;; + *) + echo "$0 " + ;; +esac + diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch deleted file mode 100644 index 0fb7861a1c..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch +++ /dev/null @@ -1,26 +0,0 @@ -This patch removes mp3 decoder cap from auddec elements. mp3 decoder is not part of tspa combo. If you are adding mp3 decoder support in your combo then do not apply this patch. - -diff -uNr ticodecplugin/src/gsttiauddec1.c ticodecplugin.new/src/gsttiauddec1.c ---- ticodecplugin/src/gsttiauddec1.c 2009-09-05 00:04:51.000000000 -0500 -+++ ticodecplugin.new/src/gsttiauddec1.c 2009-09-15 03:28:28.000000000 -0500 -@@ -85,7 +85,7 @@ - GST_PAD_ALWAYS, - GST_STATIC_CAPS - ("audio/mpeg, " -- "mpegversion = (int) { 1, 4 }") -+ "mpegversion = (int) { 4 }") - ); - - /* Define source (output) pad capabilities. Currently, RAW is supported. */ -diff -uNr ticodecplugin/src/gsttiauddec.c ticodecplugin.new/src/gsttiauddec.c ---- ticodecplugin/src/gsttiauddec.c 2009-09-05 00:04:51.000000000 -0500 -+++ ticodecplugin.new/src/gsttiauddec.c 2009-09-16 07:51:24.000000000 -0500 -@@ -85,7 +85,7 @@ - GST_PAD_ALWAYS, - GST_STATIC_CAPS - ("audio/mpeg, " -- "mpegversion = (int) { 1, 4 }") -+ "mpegversion = (int) { 4 }") - ); - - /* Constants */ diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-462.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-462.patch deleted file mode 100644 index c115161dcc..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-462.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -uNr ticodecplugin/src/gsttividdec.c ticodecplugin.new/src/gsttividdec.c ---- ticodecplugin/src/gsttividdec.c 2009-09-05 00:04:51.000000000 -0500 -+++ ticodecplugin.new/src/gsttividdec.c 2009-09-05 03:54:42.000000000 -0500 -@@ -82,7 +82,7 @@ - GST_PAD_ALWAYS, - GST_STATIC_CAPS - ("video/mpeg, " -- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ -+ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ - "systemstream=(boolean)false, " - "framerate=(fraction)[ 0, MAX ], " - "width=(int)[ 1, MAX ], " -@@ -90,7 +90,8 @@ - "video/x-h264, " /* H264 */ - "framerate=(fraction)[ 0, MAX ], " - "width=(int)[ 1, MAX ], " -- "height=(int)[ 1, MAX ]" -+ "height=(int)[ 1, MAX ] ;" -+ "video/x-xvid" /* XVID */ - ) - ); - -@@ -614,6 +615,11 @@ - codec = gst_ticodec_get_codec("H.264 Video Decoder"); - } - -+ /* XVID Decode */ -+ else if (!strcmp(mime, "video/x-xvid")) { -+ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); -+ } -+ - /* Mime type not supported */ - else { - GST_ERROR("stream type not supported"); -diff -uNr ticodecplugin/src/gsttividdec2.c ticodecplugin.new/src/gsttividdec2.c ---- ticodecplugin/src/gsttividdec2.c 2009-09-05 00:04:51.000000000 -0500 -+++ ticodecplugin.new/src/gsttividdec2.c 2009-09-05 03:54:42.000000000 -0500 -@@ -83,7 +83,7 @@ - GST_PAD_ALWAYS, - GST_STATIC_CAPS - ("video/mpeg, " -- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ -+ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ - "systemstream=(boolean)false, " - "framerate=(fraction)[ 0, MAX ], " - "width=(int)[ 1, MAX ], " -@@ -91,7 +91,8 @@ - "video/x-h264, " /* H264 */ - "framerate=(fraction)[ 0, MAX ], " - "width=(int)[ 1, MAX ], " -- "height=(int)[ 1, MAX ]" -+ "height=(int)[ 1, MAX ] ;" -+ "video/x-xvid" /* XVID */ - ) - ); - -@@ -625,6 +626,11 @@ - codec = gst_ticodec_get_codec("H.264 Video Decoder"); - } - -+ /* XVID Decode */ -+ else if (!strcmp(mime, "video/x-xvid")) { -+ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); -+ } -+ - /* Mime type not supported */ - else { - GST_ERROR("stream type not supported"); diff --git a/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-824.patch b/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-824.patch deleted file mode 100644 index 634fa4aaf6..0000000000 --- a/recipes/ti/gstreamer-ti/gstreamer-ti-tracker-824.patch +++ /dev/null @@ -1,147 +0,0 @@ ---- ticodecplugin/ChangeLog -+++ ticodecplugin.new/ChangeLog -@@ -1,3 +1,7 @@ -+2009-08-14 Don Darling, Texas Instruments, Inc. -+ * src/{gstticodecplugin_omap3530.cfg,gstticodecs_omap3530.c}: -+ Update OMAP3530 Support to use DVSDK 3.00.00.40. -+ - 2009-07-28 Brijesh Singh, Texas Instruments, Inc. - * src/{gstticircbuffer.c}: - Fix potential memory leak in circular buffer when accel framecopy flag is ---- ticodecplugin/src/gstticodecplugin_omap3530.cfg -+++ ticodecplugin.new/src/gstticodecplugin_omap3530.cfg -@@ -12,8 +12,6 @@ - * - */ - --prog.build.platform = "ti.platforms.evm3530"; -- - /* Load the Codec Engine 'Operating System Abstraction Layer' */ - var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); - -@@ -27,31 +25,20 @@ ipc.commType = ipc.COMM_DSPLINK; - /* - * ======== Engine Configuration ======== - */ --var Engine = xdc.useModule('ti.sdo.ce.Engine'); --var encEngine = Engine.createFromServer( -- "encode", -- "./encodeCombo.x64P", -- "ti.sdo.servers.encode" -- ); --var decEngine = Engine.createFromServer( -- "decode", -- "./decodeCombo.x64P", -- "ti.sdo.servers.decode" -+var Engine = xdc.useModule('ti.sdo.ce.Engine'); -+var demoEngine = Engine.createFromServer( -+ "codecServer", -+ "./bin/cs.x64P", -+ "ti.sdo.server.cs" - ); - --var encpath = "" + java.lang.System.getenv("ENCODE_COMBO"); --if (encpath != "" && encpath != "null") { -- encEngine.server = java.lang.System.getenv("ENCODE_COMBO"); --} -- --var decpath = "" + java.lang.System.getenv("DECODE_COMBO"); --if (decpath != "" && decpath != "null") { -- decEngine.server = java.lang.System.getenv("DECODE_COMBO"); -+var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); -+if (combopath != "" && combopath != "null") { -+ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); - } - - /* Load support for the DMAI module */ - var DMAI = xdc.loadPackage('ti.sdo.dmai'); - --/* Load support for user space DMA */ --var SCPY = xdc.useModule("ti.sdo.fc.scpy.SCPY"); --var SDMA = xdc.useModule("ti.sdo.linuxutils.sdma.SDMA"); -+var SCPY = xdc.useModule('ti.sdo.fc.scpy.SCPY'); -+var SDMA = xdc.useModule('ti.sdo.linuxutils.sdma.SDMA'); ---- ticodecplugin/src/gstticodecs_omap3530.c -+++ ticodecplugin.new/src/gstticodecs_omap3530.c -@@ -22,8 +22,7 @@ - #include "gstticodecs.h" - - /* Declaration of the production engine and decoders shipped with the DVSDK */ --static Char decodeEngine[] = "decode"; --static Char encodeEngine[] = "encode"; -+static Char codecServer[] = "codecServer"; - - /* NULL terminated list of speech decoders in the engine to use in the demo */ - GstTICodec gst_ticodec_codecs[] = { -@@ -32,59 +31,55 @@ GstTICodec gst_ticodec_codecs[] = { - { - "AAC Audio Decoder", /* String name of codec used by plugin */ - "aachedec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, { - "MPEG1L2 Audio Decoder", /* String name of codec used by plugin */ - "mp3dec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, { - "MPEG1L3 Audio Decoder", /* String name of codec used by plugin */ - "mp3dec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -- }, { -- "WMA Audio Decoder", /* String name of codec used by plugin */ -- "wmadec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, -- -+ - /* Video Decoders */ - { - "H.264 Video Decoder", /* String name of codec used by plugin */ - "h264dec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, { - "MPEG4 Video Decoder", /* String name of codec used by plugin */ - "mpeg4dec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, { - "MPEG2 Video Decoder", /* String name of codec used by plugin */ - "mpeg2dec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, - - /* Image Decoders */ - { - "JPEG Image Decoder", /* String name of codec used by plugin */ - "jpegdec", /* String name of codec used by CE */ -- decodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, - - /* Video Encoders */ - { - "H.264 Video Encoder", /* String name of codec used by plugin */ - "h264enc", /* String name of codec used by CE */ -- encodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, { - "MPEG4 Video Encoder", /* String name of codec used by plugin */ - "mpeg4enc", /* String name of codec used by CE */ -- encodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, - - /* Image Encoders */ - { - "JPEG Image Encoder", /* String name of codec used by plugin */ - "jpegenc", /* String name of codec used by CE */ -- encodeEngine /* Engine that contains this codec */ -+ codecServer /* Engine that contains this codec */ - }, - - { NULL } - diff --git a/recipes/ti/gstreamer-ti/omap3/gstreamer-ti-rc.sh b/recipes/ti/gstreamer-ti/omap3/gstreamer-ti-rc.sh new file mode 100644 index 0000000000..c7cbaa432b --- /dev/null +++ b/recipes/ti/gstreamer-ti/omap3/gstreamer-ti-rc.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# configure kernel modules to run gst-ti plugins elements +# + +load_module() { + echo + echo -n "Running /usr/share/ti/gst/omap3530/loadmodule.sh" + sh /usr/share/ti/gst/omap3530/loadmodule.sh +} + +unload_module() { + rmmod cmemk + rmmod lpm_omap3530 + rmmod dsplinkk + rmmod sdmak +} + +case "$1" in + start) + echo -n "Loading kernel modules for gstreamer-ti... " + load_module + echo " done" + ;; + stop) + echo -n "Unloading kernel module ..." + unload_module + echo " done" + ;; + restart) + echo -n "Unloading kernel module ..." + unload_module + echo " done" + echo -n "Loading kernel modules for gstreamer-ti... " + load_module + echo " done" + ;; + *) + echo "$0 " + ;; +esac + diff --git a/recipes/ti/gstreamer-ti/omap3/loadmodules.sh b/recipes/ti/gstreamer-ti/omap3/loadmodules.sh new file mode 100644 index 0000000000..e4d592fff7 --- /dev/null +++ b/recipes/ti/gstreamer-ti/omap3/loadmodules.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# +# CMEM Allocation +# 1x5250000 Circular buffer +# 6x829440,1x691200 Video buffers (max D1 PAL) +# 1x345600 Underlying software components (codecs, etc.) +# 1x1 Dummy buffer used during final flush +modprobe cmemk allowOverlap=1 phys_start=0x86300000 phys_end=0x87300000 \ + pools=1x5250000,6x829440,1x345600,1x691200,1x1 + +# insert DSP/BIOS Link driver +modprobe dsplinkk + +# insert Local Power Manager driver +modprobe lpm_omap3530 + +# insert SDMA driver +modprobe sdmak + diff --git a/recipes/ti/gstreamer-ti/omap3evm/gstreamer-ti-rc.sh b/recipes/ti/gstreamer-ti/omap3evm/gstreamer-ti-rc.sh new file mode 100644 index 0000000000..da844f4f62 --- /dev/null +++ b/recipes/ti/gstreamer-ti/omap3evm/gstreamer-ti-rc.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# configure kernel modules to run gst-ti plugins elements +# + +load_module() { + echo + echo -n "Running /usr/share/ti/gst//loadmodule.sh" + echo " (skipped)" + # /usr/share/ti/gst//loadmodule.sh +} + +case "$1" in + start) + echo -n "Loading kernel modules for gstreamer-ti... " + load_module + echo " done" + ;; + stop) + echo "Nothing to do" + ;; + restart) + echo "Nothing to do" + ;; + *) + echo "$0 " + ;; +esac + diff --git a/recipes/ti/gstreamer-ti/omapl137/loadmodules.sh b/recipes/ti/gstreamer-ti/omapl137/loadmodules.sh new file mode 100644 index 0000000000..d031188109 --- /dev/null +++ b/recipes/ti/gstreamer-ti/omapl137/loadmodules.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +# configure kernel modules for TI DSP based gstreamer plugin +# + +# insert cmemk, tell it to occupy physical 34MB-64MB. +# +modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ + pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 + +modprobe dsplinkk + diff --git a/recipes/ti/gstreamer-ti/omapl138/loadmodules.sh b/recipes/ti/gstreamer-ti/omapl138/loadmodules.sh new file mode 100644 index 0000000000..64d3c933c4 --- /dev/null +++ b/recipes/ti/gstreamer-ti/omapl138/loadmodules.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# configure kernel modules for TI DSP based gstreamer plugin +# + +modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ + pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 + +modprobe dsplinkk + +rm -f /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 + diff --git a/recipes/ti/gstreamer-ti_svn.bb b/recipes/ti/gstreamer-ti_svn.bb index df0705c2ba..cf0c7d64c9 100644 --- a/recipes/ti/gstreamer-ti_svn.bb +++ b/recipes/ti/gstreamer-ti_svn.bb @@ -1,164 +1,32 @@ -DESCRIPTION = "GSTREAMER Plugin (gstreamer-ti) for TI ARM/DSP processors" -HOMEPAGE = "https://gforge.ti.com/gf/project/gstreamer_ti/" -SECTION = "multimedia" - -# TODO :: Replace omapl137 with official support in GST (currently linking to omapl138) -# TODO :: Codec Server Environment Variables shouldn't be required -# TODO :: Add (and check) rc scripts for all targets (just copied for now) (365,6467,omapl137) -# TODO :: Check if CPPFLAGS_append is still required -# TODO :: Remove ENCODE/DECODE combo exports - these are not used anymore (check?) - -inherit autotools -inherit update-rc.d - -require ti-paths.inc -require ti-staging.inc - -PROVIDES += "gstreamer-ti-demo-script" +require gstreamer-ti.inc PV = "svnr${SRCREV}" -# Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc -PR = "r50+${MACHINE_KERNEL_PR}" - S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin" -GST_TI_RC_SCRIPT_dm6446 = "gstreamer-ti-dm6446-rc.sh" -GST_TI_RC_SCRIPT_dm6467 = "gstreamer-ti-dm6467-rc.sh" -GST_TI_RC_SCRIPT_omap3 = "gstreamer-ti-omap3530-rc.sh" -GST_TI_RC_SCRIPT_dm355 = "gstreamer-ti-dm355-rc.sh" -GST_TI_RC_SCRIPT_dm365 = "gstreamer-ti-dm365-rc.sh" -GST_TI_RC_SCRIPT_omapl137 = "gstreamer-ti-omapl137-rc.sh" -GST_TI_RC_SCRIPT_omapl138 = "gstreamer-ti-omapl138-rc.sh" - -SRCREV = "573" +SRCREV = "612" SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ - file://gstreamer-ti-tracker-462.patch \ - file://gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch \ - file://mpeg2-caps.patch;striplevel=4\ - file://${GST_TI_RC_SCRIPT} \ -" - -SRC_URI_append_omap3 = " \ - file://gstreamer-ti-add-omapfb.patch \ -" - -SRC_URI_append_omapl137 = " \ - file://gstreamer-ti-omapl137.patch \ -" - -SRC_URI_append_omapl138 = " \ - file://gstreamer-ti-omapl138.patch \ -" - -SRC_URI_append_dm6467 = " \ - file://gstreamer-ti-dm6467-usesinglecsserver.patch \ + file://0001-gstreamer-ti-tracker-1055.patch \ + file://0002-add-omapl138-support.patch \ + file://0003-add-omapl137-support.patch \ + file://0004-gstreamer-ti-dm6467-usesinglecsserver.patch \ + file://0005-remove-mp3-mime-type.patch \ + file://0006-gstreamer-ti-tracker-462.patch \ + file://mpeg2-caps.patch;striplevel=4 \ + file://gstreamer-ti-rc.sh \ + file://gst-ti.sh \ " -DEPENDS = "ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly" - -# gstreamer_ti picks up some config variables from the environment -# - variables are used in the gstreamer makefile -# - PLATFORM, XDC_PLATFORM, XDC_TARGET, MVTOOL_DIR -# - others used by config.bld (which it gets from the dmai config.bld) -# - CROSS_COMPILE, PLATFORM_XDC - -PLATFORM_dm6446 = "dm6446" -PLATFORM_dm6467 = "dm6467" -PLATFORM_omap3 = "omap3530" -PLATFORM_dm355 = "dm355" -PLATFORM_dm365 = "dm365" -PLATFORM_omapl137 = "omapl137" -PLATFORM_omapl138 = "omapl138" -PLATFORM ?= "" - -XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446" -XDC_PLATFORM_dm6467 = "ti.platforms.evmDM6467" -XDC_PLATFORM_omap3 = "ti.platforms.evm3530" -XDC_PLATFORM_dm355 = "ti.platforms.evmDM355" -XDC_PLATFORM_dm365 = "ti.platforms.evmDM365" -XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137" -XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" -XDC_PLATFORM ?= "" - -export PLATFORM -export XDC_PLATFORM -export XDC_TARGET = "gnu.targets.arm.GCArmv5T" -export PLATFORM_XDC = ${XDC_PLATFORM} -export MVTOOL_DIR = "${TOOLCHAIN_PATH}" -export CROSS_COMPILE = "${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" - -# Makefile also expects to be able to find the kernel headers from the envirionment -export LINUXKERNEL_INSTALL_DIR = ${STAGING_KERNEL_DIR} - -# export codec combo (or server) locations -# Why do we need to do this?? - These will get picked up from CODEC_INSTALL_DIR? -# Sould only need this if we change from default server - -export HMJCP_COMBO = "${installdir}/ti-codecs-server/hmjcp.accel" -export CODEC_SERVER = "${installdir}/ti-codecs-server/cs.x64P" - -# TODO :: These 2 can be removed now since dm6467 uses single CS server (like omap/omapl) -export ENCODE_COMBO = "${installdir}/ti-codecs-server/encodeCombo.x64P" -export DECODE_COMBO = "${installdir}/ti-codecs-server/decodeCombo.x64P" - -CPPFLAGS_append = " -DPlatform_${PLATFORM}" - -do_configure_prepend() { - sed -i -e 's:(LINK_INSTALL_DIR)/packages:(LINK_INSTALL_DIR):g' ${S}/src/Makefile.am - - # TODO :: Is this still true? - # PSP kernel is based on older DSS. we need to replace linux/omapfb.h with mach/omapfb.h - if ! [ -e ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ] ; then - sed -i -e s:linux/omapfb:mach/omapfb:g ${S}/src/omapfb.h || true - fi -} - -do_install_prepend () { - - # install gstreamer demo scripts - install -d ${D}/${installdir}/gst - cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst - - if [ -d ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ] ; then - cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst - - # default loadmodules script is hard-coded for insmod, change to modprobe - sed -i 's/insmod/modprobe/g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh - sed -i 's/.ko//g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh - - if [ "${PLATFORM}" = "omap3530" ]; then - echo "modprobe sdmak" >> ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh - fi - fi - - chmod 0755 ${D}/${installdir}/gst -R - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/${GST_TI_RC_SCRIPT} ${D}${sysconfdir}/init.d/gstti-init -} - -RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" -RRECOMMENDS_${PN}_append_dm6467 += "ti-codecs-dm6467 ti-cmem-module ti-dsplink-module" -RRECOMMENDS_${PN}_append_omap3 += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module" -RRECOMMENDS_${PN}_append_dm355 += "ti-codecs-dm355 ti-cmem-module ti-dm355mm-module" -RRECOMMENDS_${PN}_append_dm365 += "ti-codecs-dm365 ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module" -RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" -RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" - -FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir}" -FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" -FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" - -PACKAGES += "gstreamer-ti-demo-script" -RDEPENDS_gstreamer-ti-demo-script = "${PN}" - -FILES_gstreamer-ti-demo-script = "${installdir}/gst/*" - -pkg_postinst_gstreamer-ti-demo-script () { - ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/ -} - -INITSCRIPT_NAME = "gstti-init" -INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." +# use local loadmodules.sh for these platform +# TODO: must be removed onces these loadmodules goes in gstreamer.ti.com +SRC_URI_append_dm365 = "file://loadmodules.sh" +SRC_URI_append_omapl137 = "file://loadmodules.sh" +SRC_URI_append_omapl138 = "file://loadmodules.sh " + +# apply omapdmaifbsink patch on omap3 platform +# NOTE: this patch need's X11 header/libs +#SRC_URI_append_omap3 = "file://0007-add-omapdmaifbsink.patch;patch=1 \ +# file://loadmodules.sh \ +# " -- cgit v1.2.3