mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
omx: Add hack for Qualcomm's OMX implementation to manually reset nOffset in EmptyBufferDone
This commit is contained in:
parent
7dbf68a232
commit
837fc4ca66
2 changed files with 13 additions and 0 deletions
|
@ -332,6 +332,12 @@ EmptyBufferDone (OMX_HANDLETYPE hComponent, OMX_PTR pAppData,
|
||||||
GST_DEBUG_OBJECT (comp->parent, "Port %u emptied buffer %p",
|
GST_DEBUG_OBJECT (comp->parent, "Port %u emptied buffer %p",
|
||||||
port->index, buf);
|
port->index, buf);
|
||||||
buf->used = FALSE;
|
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_queue_push_tail (port->pending_buffers, buf);
|
||||||
g_cond_broadcast (port->port_cond);
|
g_cond_broadcast (port->port_cond);
|
||||||
g_mutex_unlock (port->port_lock);
|
g_mutex_unlock (port->port_lock);
|
||||||
|
@ -1888,6 +1894,8 @@ gst_omx_parse_hacks (gchar ** hacks)
|
||||||
hacks_flags |= GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER;
|
hacks_flags |= GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER;
|
||||||
else if (g_str_equal (*hacks, "syncframe-flag-not-used"))
|
else if (g_str_equal (*hacks, "syncframe-flag-not-used"))
|
||||||
hacks_flags |= GST_OMX_HACK_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
|
else
|
||||||
GST_WARNING ("Unknown hack: %s", *hacks);
|
GST_WARNING ("Unknown hack: %s", *hacks);
|
||||||
hacks++;
|
hacks++;
|
||||||
|
|
|
@ -55,6 +55,11 @@ G_BEGIN_DECLS
|
||||||
* Happens with the Bellagio ffmpegdist video encoder.
|
* Happens with the Bellagio ffmpegdist video encoder.
|
||||||
*/
|
*/
|
||||||
#define GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED G_GUINT64_CONSTANT (0x0000000000000008)
|
#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 _GstOMXCore GstOMXCore;
|
||||||
typedef struct _GstOMXPort GstOMXPort;
|
typedef struct _GstOMXPort GstOMXPort;
|
||||||
|
|
Loading…
Reference in a new issue