omx: Improve error reporting by formatting the error codes better and also providing their string representation

This commit is contained in:
Sebastian Dröge 2011-07-13 20:22:51 +02:00
parent 5f5d2edd16
commit 0a9fe2f146
3 changed files with 174 additions and 47 deletions

View file

@ -225,7 +225,8 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent,
if (err == OMX_ErrorNone) if (err == OMX_ErrorNone)
break; break;
GST_ERROR_OBJECT (comp->parent, "Got error %d", err); GST_ERROR_OBJECT (comp->parent, "Got error: %s (0x%08x)",
gst_omx_error_to_string (err), err);
/* Error events are always fatal */ /* Error events are always fatal */
gst_omx_component_set_last_error (comp, err); gst_omx_component_set_last_error (comp, err);
@ -408,7 +409,8 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state)
GST_DEBUG_OBJECT (comp->parent, "Setting state from %d to %d", old_state, GST_DEBUG_OBJECT (comp->parent, "Setting state from %d to %d", old_state,
state); state);
if ((err = comp->last_error) != OMX_ErrorNone) { if ((err = comp->last_error) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -428,8 +430,9 @@ done:
g_mutex_unlock (comp->state_lock); g_mutex_unlock (comp->state_lock);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Error setting state from %d to %d: %d", GST_ERROR_OBJECT (comp->parent,
old_state, state, err); "Error setting state from %d to %d: %s (0x%08x)", old_state, state,
gst_omx_error_to_string (err), err);
gst_omx_component_set_last_error (comp, err); gst_omx_component_set_last_error (comp, err);
} }
return err; return err;
@ -452,8 +455,8 @@ gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout)
goto done; goto done;
if (comp->last_error != OMX_ErrorNone) { if (comp->last_error != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", GST_ERROR_OBJECT (comp->parent, "Component in error state: %s (0x%08x)",
comp->last_error); gst_omx_error_to_string (comp->last_error), comp->last_error);
ret = OMX_StateInvalid; ret = OMX_StateInvalid;
goto done; goto done;
} }
@ -481,7 +484,8 @@ gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout)
if (signalled) { if (signalled) {
if (comp->last_error != OMX_ErrorNone) { if (comp->last_error != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Got error while waiting for state change: %d", comp->last_error); "Got error while waiting for state change: %s (0x%08x)",
gst_omx_error_to_string (comp->last_error), comp->last_error);
ret = OMX_StateInvalid; ret = OMX_StateInvalid;
} else if (comp->pending_state == OMX_StateInvalid) { } else if (comp->pending_state == OMX_StateInvalid) {
/* State change finished and everything's fine */ /* State change finished and everything's fine */
@ -533,7 +537,8 @@ gst_omx_component_add_port (GstOMXComponent * comp, guint32 index)
err = OMX_GetParameter (comp->handle, OMX_IndexParamPortDefinition, err = OMX_GetParameter (comp->handle, OMX_IndexParamPortDefinition,
&port_def); &port_def);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Failed to add port %u: %d", index, err); GST_ERROR_OBJECT (comp->parent, "Failed to add port %u: %s (0x%08x)", index,
gst_omx_error_to_string (err), err);
return NULL; return NULL;
} }
@ -617,7 +622,8 @@ gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err)
if (err == OMX_ErrorNone) if (err == OMX_ErrorNone)
return; return;
GST_ERROR_OBJECT (comp->parent, "Setting last error: %d", err); GST_ERROR_OBJECT (comp->parent, "Setting last error: %s (0x%08x)",
gst_omx_error_to_string (err), err);
g_mutex_lock (comp->state_lock); g_mutex_lock (comp->state_lock);
/* We only set the first error ever from which /* We only set the first error ever from which
* we can't recover anymore. * we can't recover anymore.
@ -653,11 +659,20 @@ gst_omx_component_get_last_error (GstOMXComponent * comp)
err = comp->last_error; err = comp->last_error;
g_mutex_unlock (comp->state_lock); g_mutex_unlock (comp->state_lock);
GST_DEBUG_OBJECT (comp->parent, "Returning last error: %d", err); GST_DEBUG_OBJECT (comp->parent, "Returning last error: %s (0x%08x)",
gst_omx_error_to_string (err), err);
return err; return err;
} }
const gchar *
gst_omx_component_get_last_error_string (GstOMXComponent * comp)
{
g_return_val_if_fail (comp != NULL, NULL);
return gst_omx_error_to_string (gst_omx_component_get_last_error (comp));
}
void void
gst_omx_port_get_port_definition (GstOMXPort * port, gst_omx_port_get_port_definition (GstOMXPort * port,
OMX_PARAM_PORTDEFINITIONTYPE * port_def) OMX_PARAM_PORTDEFINITIONTYPE * port_def)
@ -695,8 +710,8 @@ gst_omx_port_update_port_definition (GstOMXPort * port,
OMX_GetParameter (comp->handle, OMX_IndexParamPortDefinition, OMX_GetParameter (comp->handle, OMX_IndexParamPortDefinition,
&port->port_def); &port->port_def);
GST_DEBUG_OBJECT (comp->parent, "Updated port %u definition: %d", GST_DEBUG_OBJECT (comp->parent, "Updated port %u definition: %s (0x%08x)",
port->index, err); port->index, gst_omx_error_to_string (err), err);
g_mutex_unlock (port->port_lock); g_mutex_unlock (port->port_lock);
@ -726,7 +741,8 @@ retry:
/* Check if the component is in an error state */ /* Check if the component is in an error state */
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component is in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component is in error state: %s",
gst_omx_error_to_string (err));
ret = GST_OMX_ACQUIRE_BUFFER_ERROR; ret = GST_OMX_ACQUIRE_BUFFER_ERROR;
goto done; goto done;
} }
@ -755,7 +771,8 @@ retry:
g_mutex_unlock (comp->state_lock); g_mutex_unlock (comp->state_lock);
g_mutex_lock (port->port_lock); g_mutex_lock (port->port_lock);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Got error while waiting: %d", err); GST_ERROR_OBJECT (comp->parent, "Got error while waiting: %s (0x%08x)",
gst_omx_error_to_string (err), err);
ret = GST_OMX_ACQUIRE_BUFFER_ERROR; ret = GST_OMX_ACQUIRE_BUFFER_ERROR;
goto done; goto done;
} else if (port->flushing) { } else if (port->flushing) {
@ -852,7 +869,8 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
g_mutex_lock (port->port_lock); g_mutex_lock (port->port_lock);
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component is in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component is in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -872,8 +890,8 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
} }
done: done:
GST_DEBUG_OBJECT (comp->parent, "Released buffer %p to port %u: %d", GST_DEBUG_OBJECT (comp->parent, "Released buffer %p to port %u: %s (0x%08x)",
buf, port->index, err); buf, port->index, gst_omx_error_to_string (err), err);
g_mutex_unlock (port->port_lock); g_mutex_unlock (port->port_lock);
return err; return err;
@ -899,7 +917,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
} }
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component is in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component is in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -940,7 +959,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
err = OMX_SendCommand (comp->handle, OMX_CommandFlush, port->index, NULL); err = OMX_SendCommand (comp->handle, OMX_CommandFlush, port->index, NULL);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Error sending flush command to port %u: %d", port->index, err); "Error sending flush command to port %u: %s (0x%08x)", port->index,
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -963,7 +983,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
GST_DEBUG_OBJECT (comp->parent, "Port %d flushed", port->index); GST_DEBUG_OBJECT (comp->parent, "Port %d flushed", port->index);
if (last_error != OMX_ErrorNone) { if (last_error != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Got error while flushing port %u: %d", port->index, last_error); "Got error while flushing port %u: %s (0x%08x)", port->index,
gst_omx_error_to_string (last_error), last_error);
err = last_error; err = last_error;
goto done; goto done;
} else if (!signalled) { } else if (!signalled) {
@ -983,7 +1004,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
err = OMX_FillThisBuffer (comp->handle, buf->omx_buf); err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Failed to pass buffer %p to port %u: %d", buf, port->index, err); "Failed to pass buffer %p to port %u: %s (0x%08x)", buf,
port->index, gst_omx_error_to_string (err), err);
goto error; goto error;
} }
} }
@ -991,8 +1013,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
} }
done: done:
GST_DEBUG_OBJECT (comp->parent, "Set port %u to %sflushing: %d", GST_DEBUG_OBJECT (comp->parent, "Set port %u to %sflushing: %s (0x%08x)",
port->index, (flush ? "" : "not "), err); port->index, (flush ? "" : "not "), gst_omx_error_to_string (err), err);
g_mutex_unlock (port->port_lock); g_mutex_unlock (port->port_lock);
return err; return err;
@ -1043,7 +1065,8 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port)
comp = port->comp; comp = port->comp;
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -1068,8 +1091,8 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port)
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Failed to configure number of buffers of port %u: %d", port->index, "Failed to configure number of buffers of port %u: %s (0x%08x)",
err); port->index, gst_omx_error_to_string (err), err);
goto error; goto error;
} }
@ -1095,7 +1118,8 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port)
port->port_def.nBufferSize); port->port_def.nBufferSize);
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Failed to allocate buffer for port %u: %d", port->index, err); "Failed to allocate buffer for port %u: %s (0x%08x)", port->index,
gst_omx_error_to_string (err), err);
goto error; goto error;
} }
@ -1104,8 +1128,8 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port)
} }
done: done:
GST_DEBUG_OBJECT (comp->parent, "Allocated buffers for port %u: %d", GST_DEBUG_OBJECT (comp->parent, "Allocated buffers for port %u: %s (0x%08x)",
port->index, err); port->index, gst_omx_error_to_string (err), err);
return err; return err;
@ -1156,7 +1180,8 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port)
} }
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
/* We still try to deallocate all buffers */ /* We still try to deallocate all buffers */
} }
@ -1183,8 +1208,8 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port)
tmp = OMX_FreeBuffer (comp->handle, port->index, buf->omx_buf); tmp = OMX_FreeBuffer (comp->handle, port->index, buf->omx_buf);
if (tmp != OMX_ErrorNone) { if (tmp != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Failed to deallocate buffer %d of port %u: %d", i, port->index, "Failed to deallocate buffer %d of port %u: %s (0x%08x)", i,
tmp); port->index, gst_omx_error_to_string (tmp), tmp);
if (err == OMX_ErrorNone) if (err == OMX_ErrorNone)
err = tmp; err = tmp;
} }
@ -1201,8 +1226,8 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port)
port->buffers = NULL; port->buffers = NULL;
done: done:
GST_DEBUG_OBJECT (comp->parent, "Deallocated buffers of port %u: %d", GST_DEBUG_OBJECT (comp->parent, "Deallocated buffers of port %u: %s (0x%08x)",
port->index, err); port->index, gst_omx_error_to_string (err), err);
return err; return err;
} }
@ -1234,7 +1259,8 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
comp = port->comp; comp = port->comp;
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); GST_ERROR_OBJECT (comp->parent, "Component in error state: %s (0x%08x)",
gst_omx_error_to_string (err), err);
goto done; goto done;
} }
@ -1260,8 +1286,8 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
if (err != OMX_ErrorNone) { if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Failed to send enable/disable command to port %u: %d", port->index, "Failed to send enable/disable command to port %u: %s (0x%08x)",
err); port->index, gst_omx_error_to_string (err), err);
goto error; goto error;
} }
@ -1283,8 +1309,8 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
if (last_error != OMX_ErrorNone) { if (last_error != OMX_ErrorNone) {
err = last_error; err = last_error;
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Got error while waiting for port %u to release all buffers: %d", "Got error while waiting for port %u to release all buffers: %s (0x%08x)",
port->index, err); port->index, gst_omx_error_to_string (err), err);
goto done; goto done;
} else if (!signalled) { } else if (!signalled) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
@ -1331,15 +1357,16 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
goto error; goto error;
} else if (last_error != OMX_ErrorNone) { } else if (last_error != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, GST_ERROR_OBJECT (comp->parent,
"Got error while waiting for port %u to be %s: %d", "Got error while waiting for port %u to be %s: %s (0x%08x)",
port->index, (enabled ? "enabled" : "disabled"), err); port->index, (enabled ? "enabled" : "disabled"),
gst_omx_error_to_string (err), err);
err = last_error; err = last_error;
} }
done: done:
GST_DEBUG_OBJECT (comp->parent, "Port %u is %s%s: %d", port->index, GST_DEBUG_OBJECT (comp->parent, "Port %u is %s%s: %s (0x%08x)", port->index,
(err == OMX_ErrorNone ? "" : "not "), (err == OMX_ErrorNone ? "" : "not "),
(enabled ? "enabled" : "disabled"), err); (enabled ? "enabled" : "disabled"), gst_omx_error_to_string (err), err);
return err; return err;
@ -1434,7 +1461,8 @@ gst_omx_port_reconfigure (GstOMXPort * port)
} }
done: done:
GST_DEBUG_OBJECT (comp->parent, "Reconfigured port %u: %d", port->index, err); GST_DEBUG_OBJECT (comp->parent, "Reconfigured port %u: %s (0x%08x)",
port->index, gst_omx_error_to_string (err), err);
g_mutex_unlock (port->port_lock); g_mutex_unlock (port->port_lock);
return err; return err;
@ -1452,6 +1480,99 @@ gst_omx_get_configuration (void)
return config; return config;
} }
const gchar *
gst_omx_error_to_string (OMX_ERRORTYPE err)
{
switch (err) {
case OMX_ErrorNone:
return "None";
case OMX_ErrorInsufficientResources:
return "Insufficient resources";
case OMX_ErrorUndefined:
return "Undefined";
case OMX_ErrorInvalidComponentName:
return "Invalid component name";
case OMX_ErrorComponentNotFound:
return "Component not found";
case OMX_ErrorInvalidComponent:
return "Invalid component";
case OMX_ErrorBadParameter:
return "Bad parameter";
case OMX_ErrorNotImplemented:
return "Not implemented";
case OMX_ErrorUnderflow:
return "Underflow";
case OMX_ErrorOverflow:
return "Overflow";
case OMX_ErrorHardware:
return "Hardware";
case OMX_ErrorInvalidState:
return "Invalid state";
case OMX_ErrorStreamCorrupt:
return "Stream corrupt";
case OMX_ErrorPortsNotCompatible:
return "Ports not compatible";
case OMX_ErrorResourcesLost:
return "Resources lost";
case OMX_ErrorNoMore:
return "No more";
case OMX_ErrorVersionMismatch:
return "Version mismatch";
case OMX_ErrorNotReady:
return "Not ready";
case OMX_ErrorTimeout:
return "Timeout";
case OMX_ErrorSameState:
return "Same state";
case OMX_ErrorResourcesPreempted:
return "Resources preempted";
case OMX_ErrorPortUnresponsiveDuringAllocation:
return "Port unresponsive during allocation";
case OMX_ErrorPortUnresponsiveDuringDeallocation:
return "Port unresponsive during deallocation";
case OMX_ErrorPortUnresponsiveDuringStop:
return "Port unresponsive during stop";
case OMX_ErrorIncorrectStateTransition:
return "Incorrect state transition";
case OMX_ErrorIncorrectStateOperation:
return "Incorrect state operation";
case OMX_ErrorUnsupportedSetting:
return "Unsupported setting";
case OMX_ErrorUnsupportedIndex:
return "Unsupported index";
case OMX_ErrorBadPortIndex:
return "Bad port index";
case OMX_ErrorPortUnpopulated:
return "Port unpopulated";
case OMX_ErrorComponentSuspended:
return "Component suspended";
case OMX_ErrorDynamicResourcesUnavailable:
return "Dynamic resources unavailable";
case OMX_ErrorMbErrorsInFrame:
return "Macroblock errors in frame";
case OMX_ErrorFormatNotDetected:
return "Format not detected";
case OMX_ErrorContentPipeOpenFailed:
return "Content pipe open failed";
case OMX_ErrorContentPipeCreationFailed:
return "Content pipe creation failed";
case OMX_ErrorSeperateTablesUsed:
return "Seperate tables used";
case OMX_ErrorTunnelingUnsupported:
return "Tunneling unsupported";
default:
if (err >= (guint32) OMX_ErrorKhronosExtensions
&& err < (guint32) OMX_ErrorVendorStartUnused) {
return "Khronos extension error";
} else if (err >= (guint32) OMX_ErrorVendorStartUnused
&& err < (guint32) OMX_ErrorMax) {
return "Vendor specific error";
} else {
return "Unknown error";
}
}
}
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {

View file

@ -149,6 +149,8 @@ extern GQuark gst_omx_element_name_quark;
GKeyFile * gst_omx_get_configuration (void); GKeyFile * gst_omx_get_configuration (void);
const gchar * gst_omx_error_to_string (OMX_ERRORTYPE err);
GstOMXCore * gst_omx_core_acquire (const gchar * filename); GstOMXCore * gst_omx_core_acquire (const gchar * filename);
void gst_omx_core_release (GstOMXCore * core); void gst_omx_core_release (GstOMXCore * core);
@ -161,6 +163,7 @@ OMX_STATETYPE gst_omx_component_get_state (GstOMXComponent * comp, GstClockT
void gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err); void gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err);
OMX_ERRORTYPE gst_omx_component_get_last_error (GstOMXComponent * comp); OMX_ERRORTYPE gst_omx_component_get_last_error (GstOMXComponent * comp);
const gchar * gst_omx_component_get_last_error_string (GstOMXComponent * comp);
GstOMXPort * gst_omx_component_add_port (GstOMXComponent * comp, guint32 index); GstOMXPort * gst_omx_component_add_port (GstOMXComponent * comp, guint32 index);
GstOMXPort * gst_omx_component_get_port (GstOMXComponent * comp, guint32 index); GstOMXPort * gst_omx_component_get_port (GstOMXComponent * comp, guint32 index);

View file

@ -545,7 +545,8 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
component_error: component_error:
{ {
GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
("OpenMAX component in error state %d", ("OpenMAX component in error state %s (0x%08x)",
gst_omx_component_get_last_error_string (self->component),
gst_omx_component_get_last_error (self->component))); gst_omx_component_get_last_error (self->component)));
gst_pad_push_event (GST_BASE_VIDEO_CODEC_SRC_PAD (self), gst_pad_push_event (GST_BASE_VIDEO_CODEC_SRC_PAD (self),
gst_event_new_eos ()); gst_event_new_eos ());
@ -736,7 +737,8 @@ gst_omx_video_dec_set_format (GstBaseVideoDecoder * decoder,
gst_omx_port_set_flushing (self->out_port, FALSE); gst_omx_port_set_flushing (self->out_port, FALSE);
if (gst_omx_component_get_last_error (self->component) != OMX_ErrorNone) { if (gst_omx_component_get_last_error (self->component) != OMX_ErrorNone) {
GST_ERROR_OBJECT (self, "Component in error state: %d", GST_ERROR_OBJECT (self, "Component in error state: %s (0x%08x)",
gst_omx_component_get_last_error_string (self->component),
gst_omx_component_get_last_error (self->component)); gst_omx_component_get_last_error (self->component));
return FALSE; return FALSE;
} }
@ -913,7 +915,8 @@ too_large_codec_data:
component_error: component_error:
{ {
GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
("OpenMAX component in error state %d", ("OpenMAX component in error state %s (0x%08x)",
gst_omx_component_get_last_error_string (self->component),
gst_omx_component_get_last_error (self->component))); gst_omx_component_get_last_error (self->component)));
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }