diff options
author | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-03-23 15:53:21 +0000 |
---|---|---|
committer | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-03-23 15:53:21 +0000 |
commit | 389b91cb7d972073c310449394ed6d9801e1d3b6 (patch) | |
tree | 17ca41d789db0615da527cd980c23e88db056a86 | |
parent | a3bbd5fceeee29002d8ddb44af49e224354a2a9a (diff) |
viddec2: By default set padAlloc property to TRUE on dm36x and omap3 platform. Also adding check to ensure that peer buffer is requested only when we know stream height/width.
In case of container format, demuxer element provides these information and for elementary one can add parses to get these information.
tested the following pipelines:
# gst-launch filesrc location=sample.264 ! typefind ! h264parse ! TIViddec2 ! tidisplaysink2 /* this automatically uses peer alloc feature */
# gst-launch filesrc location=sample.264 ! typefind ! TIViddec2 ! tidisplaysink2 /* this does not use peer alloc */
git-svn-id: https://gstreamer.ti.com/svn/gstreamer_ti/trunk@929 24075187-2e39-4e88-bbb8-bc8aa768f540
-rw-r--r-- | gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c index 1c1901a..83a13a3 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c @@ -66,17 +66,20 @@ #define DEFAULT_GENTIMESTAMP TRUE #define DEFAULT_RTCODECTHREAD TRUE #define DEFAULT_DISPLAY_BUFFER FALSE -#define DEFAULT_PADALLOC FALSE /* define platform specific defaults */ #if defined(Platform_dm365) || defined(Platform_dm368) #define DEFAULT_ENGINE_NAME "codecServer" + #define DEFAULT_PADALLOC TRUE #elif defined(Platform_dm3730) || defined(Platform_omap3530) #define DEFAULT_ENGINE_NAME "codecServer" + #define DEFAULT_PADALLOC TRUE #elif defined(Platform_dm6467) || defined(Platform_dm6467t) #define DEFAULT_ENGINE_NAME "codecServer" + #define DEFAULT_PADALLOC FALSE #else #define DEFAULT_ENGINE_NAME "decode" + #define DEFAULT_PADALLOC FALSE #endif /* Declare variable used to categorize GST_LOG output */ @@ -1473,6 +1476,14 @@ static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2, *padBuffer = NULL; if (viddec2->padAllocOutbufs) { + if (viddec2->width == 0 || viddec2->height == 0) { + g_object_set(viddec2, "padAllocOutbufs", 0, NULL); + GST_WARNING_OBJECT(viddec2, "upstream cap does not provide height and width, disabling peer-alloc." + "if you are decoding elemenatary stream then consider adding parses (h264parse,mpeg4parse,mpegvideoparse)"); + *padBuffer = NULL; + goto alloc_buffer; + } + if (gst_pad_alloc_buffer(viddec2->srcpad, 0, Vdec2_getOutBufSize(viddec2->hVd), GST_PAD_CAPS(viddec2->srcpad), padBuffer) != GST_FLOW_OK) { @@ -1500,6 +1511,7 @@ static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2, } } + alloc_buffer: /* If we can't use pad-allocated buffers, allocate our own BufTab for * output buffers to push downstream. */ |