mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
omx: Add a hacks flag for the Qualcomm 7x30 OMX_FillThisBuffer() race and make it optional
This commit is contained in:
parent
cba41896a6
commit
aced7478ab
2 changed files with 13 additions and 2 deletions
|
@ -1124,8 +1124,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
|
|||
if (port->port_def.eDir == OMX_DirOutput && port->buffers) {
|
||||
GstOMXBuffer *buf;
|
||||
|
||||
/* FIXME: Workaround for QCOM 7x30 race condition */
|
||||
g_usleep (G_USEC_PER_SEC / 10);
|
||||
if (comp->hacks & GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE)
|
||||
g_usleep (G_USEC_PER_SEC / 10);
|
||||
|
||||
/* Enqueue all buffers for the component to fill */
|
||||
while ((buf = g_queue_pop_head (port->pending_buffers))) {
|
||||
|
@ -1500,6 +1500,9 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
|
|||
if (enabled && port->port_def.eDir == OMX_DirOutput) {
|
||||
GstOMXBuffer *buf;
|
||||
|
||||
if (comp->hacks & GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE)
|
||||
g_usleep (G_USEC_PER_SEC / 10);
|
||||
|
||||
/* Enqueue all buffers for the component to fill */
|
||||
while ((buf = g_queue_pop_head (port->pending_buffers))) {
|
||||
g_assert (!buf->used);
|
||||
|
@ -1827,6 +1830,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, "qcom-7x30-fill-this-buffer-race"))
|
||||
hacks_flags |= GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE;
|
||||
else
|
||||
GST_WARNING ("Unknown hack: %s", *hacks);
|
||||
hacks++;
|
||||
|
|
|
@ -55,6 +55,12 @@ G_BEGIN_DECLS
|
|||
* Happens with the Bellagio ffmpegdist video encoder.
|
||||
*/
|
||||
#define GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED G_GUINT64_CONSTANT (0x0000000000000008)
|
||||
/* Qualcomm 7x30 sometimes fails with an undefined error after
|
||||
* allocating buffers, setting the state to Idle when calling
|
||||
* OMX_FillThisBuffer() on all output buffers too early.
|
||||
*/
|
||||
#define GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE G_GUINT64_CONSTANT (0x0000000000000010)
|
||||
|
||||
|
||||
typedef struct _GstOMXCore GstOMXCore;
|
||||
typedef struct _GstOMXPort GstOMXPort;
|
||||
|
|
Loading…
Reference in a new issue