1 ChangeLog | 10 ++++++++++
2 src/gsttividdec2.c | 25 +++++++++++++++++++++----
3 src/gsttividdec2.h | 2 ++
4 3 files changed, 33 insertions(+), 4 deletions(-)
6 diff -Nurd --exclude .svn trunk/gstreamer_ti/ti_build/ticodecplugin/ChangeLog branches/BRANCH_DDOMPE_BUFFERSIZES/gstreamer_ti/ti_build/ticodecplugin/ChangeLog
7 --- ticodecplugin/ChangeLog 2009-03-03 08:57:50.000000000 +0100
8 +++ ticodecplugin/ChangeLog 2009-03-03 08:59:20.000000000 +0100
10 +2009-03-01 Diego Dompe, RidgeRun
11 + * src/gsttividdec2.{c.h}:
12 + Create the output buffer tab using the recently added height and width
13 + attributes passed by the capabilities. This solves integration problems
14 + with other elements like ffmpegcolorspace and xvimagesink, where they
15 + will fail because the second buffer pushed over the src pad of the
16 + decoder has a size different from the first one. Using the input caps
17 + for the creation of the buffer tab we have a more educated guess on the
18 + output buffer size, and the resizing won't be required.
20 2009-02-25 Brijesh Singh, Texas Instruments, Inc.
21 * src/{gsttividenc1.{c,h},gsttividenc.{c,h},gsttividdec1.{c,h},gsttividdec.
22 {c,h},gsttiauddec1.{c,h},gsttiauddec.{c,h},gsttiimgdec1.{c,h},gsttiimgenc1.
23 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
24 --- ticodecplugin/src/gsttividdec2.c 2009-03-03 08:57:50.000000000 +0100
25 +++ ticodecplugin/src/gsttividdec2.c 2009-03-03 08:59:20.000000000 +0100
28 * Don Darling, Texas Instruments, Inc.
31 + * Diego Dompe, RidgeRun
33 * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/
34 + * Copyright (C) $year RidgeRun
36 * This program is free software; you can redistribute it and/or modify
37 * it under the terms of the GNU Lesser General Public License as
40 viddec2->framerateNum = 0;
41 viddec2->framerateDen = 0;
42 + viddec2->height = 0;
45 viddec2->numOutputBufs = 0UL;
46 viddec2->hOutBufTab = NULL;
48 viddec2->framerateNum = framerateNum;
49 viddec2->framerateDen = framerateDen;
52 + if (!gst_structure_get_int(capStruct, "height", &viddec2->height)) {
53 + viddec2->height = 0;
56 + if (!gst_structure_get_int(capStruct, "width", &viddec2->width)) {
64 ColorSpace_Type colorSpace;
68 /* Open the codec engine */
69 GST_LOG("opening codec engine \"%s\"\n", viddec2->engineName);
71 /* Create codec output buffers */
72 GST_LOG("creating output buffer table\n");
73 gfxAttrs.colorSpace = colorSpace;
74 - gfxAttrs.dim.width = params.maxWidth;
75 - gfxAttrs.dim.height = params.maxHeight;
76 + gfxAttrs.dim.width = viddec2->width;
77 + gfxAttrs.dim.height = viddec2->height;
78 gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(
79 gfxAttrs.dim.width, gfxAttrs.colorSpace);
81 @@ -1125,8 +1140,10 @@
82 gfxAttrs.bAttrs.useMask = gst_tidmaibuffertransport_GST_FREE |
83 gst_tividdec2_CODEC_FREE;
85 + outBufSize = gfxAttrs.dim.lineLength * viddec2->height;
88 - BufTab_create(viddec2->numOutputBufs, Vdec2_getOutBufSize(viddec2->hVd),
89 + BufTab_create(viddec2->numOutputBufs, outBufSize,
90 BufferGfx_getBufferAttrs(&gfxAttrs));
92 if (viddec2->hOutBufTab == NULL) {
95 outBuf = gst_tidmaibuffertransport_new(hDstBuf);
96 gst_buffer_set_data(outBuf, GST_BUFFER_DATA(outBuf),
97 - Buffer_getNumBytesUsed(hDstBuf));
98 + Vdec2_getOutBufSize(viddec2->hVd));
99 gst_buffer_set_caps(outBuf, GST_PAD_CAPS(viddec2->srcpad));
101 /* If we have a valid time stamp, set it on the buffer */
102 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
103 --- ticodecplugin/src/gsttividdec2.h 2009-03-03 08:57:50.000000000 +0100
104 +++ ticodecplugin/src/gsttividdec2.h 2009-03-03 08:59:20.000000000 +0100
106 /* Framerate (Num/Den) */
112 /* Buffer management */
113 UInt32 numOutputBufs;