omx: Add hack to disable setting roles to components.

Conflicts:

	omx/gstomx.c
This commit is contained in:
George Kiagiadakis 2012-04-20 14:51:34 +00:00 committed by Sebastian Dröge
parent 7ca067be28
commit 5c15caef8e
2 changed files with 8 additions and 1 deletions

View file

@ -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 (&param);
@ -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++;

View file

@ -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;