From: Sebastian Dröge Date: Mon, 26 Sep 2011 11:04:18 +0000 (+0200) Subject: omx: Add hack for Qualcomm's OMX implementation to manually reset nOffset in EmptyBuf... X-Git-Tag: 1.19.3~501^2~906 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=837fc4ca66a750f742b734a3f222986d6c33cbc1;p=platform%2Fupstream%2Fgstreamer.git omx: Add hack for Qualcomm's OMX implementation to manually reset nOffset in EmptyBufferDone --- diff --git a/omx/gstomx.c b/omx/gstomx.c index b2a55c6..76b347a 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -332,6 +332,12 @@ EmptyBufferDone (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, GST_DEBUG_OBJECT (comp->parent, "Port %u emptied buffer %p", port->index, buf); buf->used = FALSE; + + if (comp->hacks & GST_OMX_HACK_NO_NOFFSET_RESET) { + g_assert (buf->omx_buf->nFilledLen == 0); + buf->omx_buf->nOffset = 0; + } + g_queue_push_tail (port->pending_buffers, buf); g_cond_broadcast (port->port_cond); g_mutex_unlock (port->port_lock); @@ -1888,6 +1894,8 @@ gst_omx_parse_hacks (gchar ** hacks) hacks_flags |= GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER; else if (g_str_equal (*hacks, "syncframe-flag-not-used")) hacks_flags |= GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED; + else if (g_str_equal (*hacks, "no-noffset-reset")) + hacks_flags |= GST_OMX_HACK_NO_NOFFSET_RESET; else GST_WARNING ("Unknown hack: %s", *hacks); hacks++; diff --git a/omx/gstomx.h b/omx/gstomx.h index 1f2d207..af797fc 100644 --- a/omx/gstomx.h +++ b/omx/gstomx.h @@ -55,6 +55,11 @@ G_BEGIN_DECLS * Happens with the Bellagio ffmpegdist video encoder. */ #define GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED G_GUINT64_CONSTANT (0x0000000000000008) +/* If the nOffset field of buffers is not reset in EmptyBufferDone. + * Happens with Qualcomm's OpenMAX implementation. + */ +#define GST_OMX_HACK_NO_NOFFSET_RESET G_GUINT64_CONSTANT (0x0000000000000010) + typedef struct _GstOMXCore GstOMXCore; typedef struct _GstOMXPort GstOMXPort;