summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-03-03 09:45:38 +0100
committerKoen Kooi <koen@openembedded.org>2009-03-03 09:45:38 +0100
commite212730995a79893b77f977a98358200cbc304c9 (patch)
tree989bee166dce74cbfb127dabe988c5b942f3dc60 /packages
parent12565c572f2877a6859400777d136ac4117705cb (diff)
gstreamer-ti: add patch to make more sinks work
Diffstat (limited to 'packages')
-rw-r--r--packages/dsplink/gstreamer-ti/gst-buffsize.diff113
-rw-r--r--packages/dsplink/gstreamer-ti_svn.bb5
2 files changed, 116 insertions, 2 deletions
diff --git a/packages/dsplink/gstreamer-ti/gst-buffsize.diff b/packages/dsplink/gstreamer-ti/gst-buffsize.diff
new file mode 100644
index 0000000000..2d71286498
--- /dev/null
+++ b/packages/dsplink/gstreamer-ti/gst-buffsize.diff
@@ -0,0 +1,113 @@
+ ChangeLog | 10 ++++++++++
+ src/gsttividdec2.c | 25 +++++++++++++++++++++----
+ src/gsttividdec2.h | 2 ++
+ 3 files changed, 33 insertions(+), 4 deletions(-)
+
+diff -Nurd --exclude .svn trunk/gstreamer_ti/ti_build/ticodecplugin/ChangeLog branches/BRANCH_DDOMPE_BUFFERSIZES/gstreamer_ti/ti_build/ticodecplugin/ChangeLog
+--- ticodecplugin/ChangeLog 2009-03-03 08:57:50.000000000 +0100
++++ ticodecplugin/ChangeLog 2009-03-03 08:59:20.000000000 +0100
+@@ -1,3 +1,13 @@
++2009-03-01 Diego Dompe, RidgeRun
++ * src/gsttividdec2.{c.h}:
++ Create the output buffer tab using the recently added height and width
++ attributes passed by the capabilities. This solves integration problems
++ with other elements like ffmpegcolorspace and xvimagesink, where they
++ will fail because the second buffer pushed over the src pad of the
++ decoder has a size different from the first one. Using the input caps
++ for the creation of the buffer tab we have a more educated guess on the
++ output buffer size, and the resizing won't be required.
++
+ 2009-02-25 Brijesh Singh, Texas Instruments, Inc.
+ * src/{gsttividenc1.{c,h},gsttividenc.{c,h},gsttividdec1.{c,h},gsttividdec.
+ {c,h},gsttiauddec1.{c,h},gsttiauddec.{c,h},gsttiimgdec1.{c,h},gsttiimgenc1.
+diff -Nurd --exclude .svn trunk/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c branches/BRANCH_DDOMPE_BUFFERSIZES/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c
+--- ticodecplugin/src/gsttividdec2.c 2009-03-03 08:57:50.000000000 +0100
++++ ticodecplugin/src/gsttividdec2.c 2009-03-03 08:59:20.000000000 +0100
+@@ -21,7 +21,11 @@
+ * Original Author:
+ * Don Darling, Texas Instruments, Inc.
+ *
++ * Contributors:
++ * Diego Dompe, RidgeRun
++ *
+ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/
++ * Copyright (C) $year RidgeRun
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+@@ -350,6 +354,8 @@
+
+ viddec2->framerateNum = 0;
+ viddec2->framerateDen = 0;
++ viddec2->height = 0;
++ viddec2->width = 0;
+
+ viddec2->numOutputBufs = 0UL;
+ viddec2->hOutBufTab = NULL;
+@@ -484,6 +490,14 @@
+ viddec2->framerateNum = framerateNum;
+ viddec2->framerateDen = framerateDen;
+ }
++
++ if (!gst_structure_get_int(capStruct, "height", &viddec2->height)) {
++ viddec2->height = 0;
++ }
++
++ if (!gst_structure_get_int(capStruct, "width", &viddec2->width)) {
++ viddec2->width = 0;
++ }
+ }
+
+ /* MPEG Decode */
+@@ -1048,6 +1062,7 @@
+ Cpu_Device device;
+ ColorSpace_Type colorSpace;
+ Int defaultNumBufs;
++ Int outBufSize;
+
+ /* Open the codec engine */
+ GST_LOG("opening codec engine \"%s\"\n", viddec2->engineName);
+@@ -1116,8 +1131,8 @@
+ /* Create codec output buffers */
+ GST_LOG("creating output buffer table\n");
+ gfxAttrs.colorSpace = colorSpace;
+- gfxAttrs.dim.width = params.maxWidth;
+- gfxAttrs.dim.height = params.maxHeight;
++ gfxAttrs.dim.width = viddec2->width;
++ gfxAttrs.dim.height = viddec2->height;
+ gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(
+ gfxAttrs.dim.width, gfxAttrs.colorSpace);
+
+@@ -1125,8 +1140,10 @@
+ gfxAttrs.bAttrs.useMask = gst_tidmaibuffertransport_GST_FREE |
+ gst_tividdec2_CODEC_FREE;
+
++ outBufSize = gfxAttrs.dim.lineLength * viddec2->height;
++
+ viddec2->hOutBufTab =
+- BufTab_create(viddec2->numOutputBufs, Vdec2_getOutBufSize(viddec2->hVd),
++ BufTab_create(viddec2->numOutputBufs, outBufSize,
+ BufferGfx_getBufferAttrs(&gfxAttrs));
+
+ if (viddec2->hOutBufTab == NULL) {
+@@ -1295,7 +1312,7 @@
+ */
+ outBuf = gst_tidmaibuffertransport_new(hDstBuf);
+ gst_buffer_set_data(outBuf, GST_BUFFER_DATA(outBuf),
+- Buffer_getNumBytesUsed(hDstBuf));
++ Vdec2_getOutBufSize(viddec2->hVd));
+ gst_buffer_set_caps(outBuf, GST_PAD_CAPS(viddec2->srcpad));
+
+ /* If we have a valid time stamp, set it on the buffer */
+diff -Nurd --exclude .svn trunk/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h branches/BRANCH_DDOMPE_BUFFERSIZES/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h
+--- ticodecplugin/src/gsttividdec2.h 2009-03-03 08:57:50.000000000 +0100
++++ ticodecplugin/src/gsttividdec2.h 2009-03-03 08:59:20.000000000 +0100
+@@ -96,6 +96,8 @@
+ /* Framerate (Num/Den) */
+ gint framerateNum;
+ gint framerateDen;
++ gint height;
++ gint width;
+
+ /* Buffer management */
+ UInt32 numOutputBufs;
diff --git a/packages/dsplink/gstreamer-ti_svn.bb b/packages/dsplink/gstreamer-ti_svn.bb
index dc5f69cf27..824bbd21fe 100644
--- a/packages/dsplink/gstreamer-ti_svn.bb
+++ b/packages/dsplink/gstreamer-ti_svn.bb
@@ -1,9 +1,10 @@
DEPENDS = "ti-codec-engine ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly libid3tag liboil libmad"
-SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd=''"
+SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \
+ file://gst-buffsize.diff;patch=1"
SRCREV = "127"
-PR = "r3"
+PR = "r4"
# Again, no '.' in PWD allowed :(
PV = "0+svnr${SRCREV}"