diff options
author | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-01-18 17:02:13 +0000 |
---|---|---|
committer | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-01-18 17:02:13 +0000 |
commit | 7dc5e20cd6e62fa85f7fa3d26acfb2935c630dc5 (patch) | |
tree | 83c755f5beb9ffa45f2d76fc360b3ecc040f22c3 | |
parent | b9f1f00360e25d616ca29671b87dcf494561c699 (diff) |
DM3730 DVSDK 4.01 defines PLATFORM=dm3730 in its Rules.make file. And since Gstreamer Makefile.common depends on DVSDK Rules.make hence adding a seperate DM3730 target.
git-svn-id: https://gstreamer.ti.com/svn/gstreamer_ti/trunk@896 24075187-2e39-4e88-bbb8-bc8aa768f540
8 files changed, 207 insertions, 7 deletions
diff --git a/gstreamer_ti/Makefile.common b/gstreamer_ti/Makefile.common index 4d2127e..ca29bc9 100644 --- a/gstreamer_ti/Makefile.common +++ b/gstreamer_ti/Makefile.common @@ -212,6 +212,20 @@ ifeq ($(GST_TI_PLATFORM), omap3530) export LIBTOOL_SYSROOT_PATH=$(LINUXLIBS_INSTALL_DIR)/.. endif +ifeq ($(GST_TI_PLATFORM), dm3730) + export XDC_TARGET = gnu.targets.arm.GCArmv5T + export XDC_PLATFORM = ti.platforms.evm3530 + export MVTOOL_PREFIX = $(CSTOOL_PREFIX) + export MVTOOL_DIR = $(CSTOOL_DIR) + export PLATFORM_XDC = ${XDC_PLATFORM} + export CROSS_COMPILE = ${CSTOOL_PREFIX} + export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) + export C6ACCEL_INSTALL_DIR + export ENABLE_C6ACCEL = true + export C6ACCEL_PLATFORM = omap3530 + export LIBTOOL_SYSROOT_PATH=$(LINUXLIBS_INSTALL_DIR)/.. +endif + ifeq ($(GST_TI_PLATFORM), omapl138) export XDC_TARGET = gnu.targets.arm.GCArmv5T export XDC_PLATFORM = ti.platforms.evmOMAPL138 @@ -260,6 +274,7 @@ CPPFLAGS_dm365 = -I$(LINUXLIBS_INSTALL_DIR)/include CPPFLAGS_dm365 += -I$(LINUXKERNEL_INSTALL_DIR)/include CPPFLAGS_dm6467t = -I$(LINUXLIBS_INSTALL_DIR)/include CPPFLAGS_omap3530 = -I$(LINUXLIBS_INSTALL_DIR)/include +CPPFLAGS_dm3730 = -I$(LINUXLIBS_INSTALL_DIR)/include CPPFLAGS_omapl138 = -I$(LINUXLIBS_INSTALL_DIR)/include CFLAGS_all = -O2 @@ -271,12 +286,15 @@ CFLAGS_dm6467t = -march=armv5te -mtune=arm926ej-s CFLAGS_omapl138 = -march=armv5te -mtune=arm926ej-s CFLAGS_omap3530 = -march=armv7-a -mtune=cortex-a8 CFLAGS_omap3530 += -mfpu=neon -mfloat-abi=softfp +CFLAGS_dm3730 = -march=armv7-a -mtune=cortex-a8 +CFLAGS_dm3730 += -mfpu=neon -mfloat-abi=softfp LDFLAGS_all = -L$(TARGET_GSTREAMER_DIR)/lib LDFLAGS_dm355 = -L$(LINUXLIBS_INSTALL_DIR)/lib LDFLAGS_dm365 = -L$(LINUXLIBS_INSTALL_DIR)/lib LDFLAGS_dm6467t = -L$(LINUXLIBS_INSTALL_DIR)/lib LDFLAGS_omap3530 = -L$(LINUXLIBS_INSTALL_DIR)/lib +LDFLAGS_dm3730 = -L$(LINUXLIBS_INSTALL_DIR)/lib LDFLAGS_omapl138 = -L$(LINUXLIBS_INSTALL_DIR)/lib #------------------------------------------------------------------------------ diff --git a/gstreamer_ti/gstreamer_demo/dm3730/loadmodule.sh b/gstreamer_ti/gstreamer_demo/dm3730/loadmodule.sh new file mode 100644 index 0000000..fbad3b5 --- /dev/null +++ b/gstreamer_ti/gstreamer_demo/dm3730/loadmodule.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Use DVSDK loamodule-rc script to reload the kernel modules + +/etc/init.d/loadmodules-rc restart + diff --git a/gstreamer_ti/ti_build/ticodecplugin/Makefile.external b/gstreamer_ti/ti_build/ticodecplugin/Makefile.external index 18f27f1..d070ef2 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/Makefile.external +++ b/gstreamer_ti/ti_build/ticodecplugin/Makefile.external @@ -8,7 +8,7 @@ # Copyright (C) 2009 Ridgerun # -.PHONY: default configure dm6446 omap3530 dm355 dm6467 dm365 omapl138 omap3530_dv400 +.PHONY: default configure dm6446 omap3530 dm355 dm6467 dm365 omapl138 dm3730 DVSDK_PATH=undefined DMAI_INSTALL_DIR=undefined @@ -106,6 +106,19 @@ ifeq ($(GST_TI_PLATFORM), omap3530) export ENABLE_C6ACCEL ="--enable-c6accel" endif +ifeq ($(GST_TI_PLATFORM), dm3730) + export XDC_TARGET = gnu.targets.arm.GCArmv5T + export XDC_PLATFORM = ti.platforms.evm3530 + export MVTOOL_PREFIX = $(CSTOOL_PREFIX) + export MVTOOL_DIR = $(CSTOOL_DIR) + export PLATFORM_XDC = ${XDC_PLATFORM} + export CROSS_COMPILE = ${CSTOOL_PREFIX} + export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) + export C6ACCEL_INSTALL_DIR + export C6ACCEL_PLATFORM = omap3530 + export ENABLE_C6ACCEL ="--enable-c6accel" +endif + CPPFLAGS=-DPlatform_$(GST_TI_PLATFORM) HOST=arm-none-linux-gnueabi @@ -136,3 +149,5 @@ dm365: Makefile omapl138: Makefile $(MAKE) -f Makefile +dm3730: Makefile + $(MAKE) -f Makefile diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecplugin_dm3730.cfg b/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecplugin_dm3730.cfg new file mode 100644 index 0000000..90f4edf --- /dev/null +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecplugin_dm3730.cfg @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2008-2010 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'); + +var SCPY = xdc.useModule('ti.sdo.fc.scpy.SCPY'); +var SDMA = xdc.useModule('ti.sdo.linuxutils.sdma.SDMA'); diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecs_dm3730.c b/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecs_dm3730.c new file mode 100644 index 0000000..cd715d6 --- /dev/null +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gstticodecs_dm3730.c @@ -0,0 +1,97 @@ +/* + * gstticodecs_omap3530.c + * + * This file provides information for available codecs on the OMAP3530 platform. + * + * Original Author: + * Don Darling, Texas Instruments, Inc. + * + * Copyright (C) 2008-2010 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 */ + }, { + "MPEG1L2 Audio Decoder", /* String name of codec used by plugin */ + "mp3dec", /* String name of codec used by CE */ + codecServer /* Engine that contains this codec */ + }, { + "MPEG1L3 Audio Decoder", /* String name of codec used by plugin */ + "mp3dec", /* 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 */ + }, { + "MPEG2 Video Decoder", /* String name of codec used by plugin */ + "mpeg2dec", /* 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 */ + }, { + "MPEG4 Video Encoder", /* String name of codec used by plugin */ + "mpeg4enc", /* 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/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c index 7abd9e6..d64760f 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c @@ -269,7 +269,7 @@ static void gst_tidmaivideosink_class_init(GstTIDmaiVideoSinkClass * klass) g_object_class_install_property(gobject_class, PROP_ROTATION, g_param_spec_int("rotation", "Rotation angle", "Rotation angle " - "(OMAP3530 only)", -1, G_MAXINT, -1, G_PARAM_READWRITE)); + "(OMAP3530/DM3730 only)", -1, G_MAXINT, -1, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, PROP_FRAMERATE, gst_param_spec_fraction("framerate", "frame rate of video", @@ -359,8 +359,9 @@ static void gst_tidmaivideosink_class_init(GstTIDmaiVideoSinkClass * klass) gstbase_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR(gst_tidmaivideosink_buffer_alloc); - /* Pad-buffer allocation is currently only supported for DM365 */ - #if !defined(Platform_dm365) && !defined(Platform_omap3530) + /* Pad-buffer allocation is currently supported on DM365, OMAP3530 and DM3730 */ + #if !defined(Platform_dm365) && !defined(Platform_omap3530) && \ + !defined(Platform_dm3730) gstbase_sink_class->buffer_alloc = NULL; #endif } @@ -1176,6 +1177,11 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink, case Cpu_Device_OMAP3530: sink->dAttrs = Display_Attrs_O3530_VID_DEFAULT; break; + #if defined(Platform_dm3730) + case Cpu_Device_DM3730: + sink->dAttrs = Display_Attrs_O3530_VID_DEFAULT; + break; + #endif #if defined(Platform_dm365) case Cpu_Device_DM365: sink->dAttrs = Display_Attrs_DM365_VID_DEFAULT; @@ -1222,11 +1228,13 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink, #endif } - /* Set rotation on OMAP35xx */ - if (sink->cpu_dev == Cpu_Device_OMAP3530) { + /* Set rotation on OMAP35xx/DM3730 */ + #if defined(Platform_omap3530) || defined(Platform_dm3730) + if (sink->cpu_dev == Cpu_Device_OMAP3530 || sink->cpu_dev == Cpu_Device_DM3730) { sink->dAttrs.rotation = sink->rotation == -1 ? sink->dAttrs.rotation : sink->rotation; } + #endif /* Validate that the inputs the user gave are correct. */ if (sink->dAttrs.displayStd == -1) { @@ -1394,7 +1402,8 @@ static gboolean gst_tidmaivideosink_init_display(GstTIDmaiVideoSink * sink) * display until we call Display_put for the first time. */ if (sink->hDispBufTab) { - #if defined(Platform_dm365) || defined(Platform_omap3530) + #if defined(Platform_dm365) || defined(Platform_omap3530) || \ + defined(Platform_dm3730) sink->dAttrs.delayStreamon = TRUE; #else GST_ERROR("delayed V4L2 streamon not supported\n"); diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c index 1208e16..47481ca 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c @@ -1342,6 +1342,15 @@ static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2, defaultNumBufs = 3; break; #endif + #if defined(Platform_dm3730) + case Cpu_Device_DM3730: + params.maxWidth = VideoStd_720P_WIDTH; + params.maxHeight = VideoStd_720P_HEIGHT; + params.forceChromaFormat = XDM_YUV_422ILE; + colorSpace = ColorSpace_UYVY; + defaultNumBufs = 3; + break; + #endif default: params.forceChromaFormat = XDM_YUV_422ILE; params.maxWidth = VideoStd_D1_WIDTH; diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c index 536093f..780224c 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c @@ -1168,6 +1168,9 @@ static gboolean gst_tividenc1_codec_start (GstTIVidenc1 *videnc1) #if defined(Platform_omapl138) case Cpu_Device_OMAPL138: #endif + #if defined(Platform_dm3730) + case Cpu_Device_DM3730: + #endif case Cpu_Device_DM6446: params.inputChromaFormat = XDM_YUV_422ILE; break; |