mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
omx: Add hack to disable setting roles to components.
Conflicts: omx/gstomx.c
This commit is contained in:
parent
7ca067be28
commit
5c15caef8e
2 changed files with 8 additions and 1 deletions
|
@ -433,7 +433,7 @@ gst_omx_component_new (GstObject * parent, const GstOMXClassData * cdata)
|
|||
comp->last_error = OMX_ErrorNone;
|
||||
|
||||
/* Set component role if any */
|
||||
if (cdata->component_role) {
|
||||
if (cdata->component_role && !(cdata->hacks & GST_OMX_HACK_NO_COMPONENT_ROLE)) {
|
||||
OMX_PARAM_COMPONENTROLETYPE param;
|
||||
|
||||
GST_OMX_INIT_STRUCT (¶m);
|
||||
|
@ -1976,6 +1976,8 @@ gst_omx_parse_hacks (gchar ** hacks)
|
|||
hacks_flags |= GST_OMX_HACK_NO_EMPTY_EOS_BUFFER;
|
||||
else if (g_str_equal (*hacks, "drain-may-not-return"))
|
||||
hacks_flags |= GST_OMX_HACK_DRAIN_MAY_NOT_RETURN;
|
||||
else if (g_str_equal (*hacks, "no-component-role"))
|
||||
hacks_flags |= GST_OMX_HACK_NO_COMPONENT_ROLE;
|
||||
else
|
||||
GST_WARNING ("Unknown hack: %s", *hacks);
|
||||
hacks++;
|
||||
|
|
|
@ -71,6 +71,11 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
#define GST_OMX_HACK_DRAIN_MAY_NOT_RETURN G_GUINT64_CONSTANT (0x0000000000000040)
|
||||
|
||||
/* If the component doesn't allow any component role to be set.
|
||||
* Happens with Broadcom's OpenMAX implementation.
|
||||
*/
|
||||
#define GST_OMX_HACK_NO_COMPONENT_ROLE G_GUINT64_CONSTANT (0x0000000000000080)
|
||||
|
||||
|
||||
typedef struct _GstOMXCore GstOMXCore;
|
||||
typedef struct _GstOMXPort GstOMXPort;
|
||||
|
|
Loading…
Reference in a new issue