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