if (port->enabled_pending || port->disabled_pending) {
GST_ERROR_OBJECT (comp->parent, "%s port %d enabled/disabled pending "
"already", comp->name, port->index);
+#if OMX_VERSION_MINOR == 2
+ err = OMX_ErrorBadParameter;
+#else
err = OMX_ErrorInvalidState;
+#endif
goto done;
}
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 "Overflow";
case OMX_ErrorHardware:
return "Hardware";
- case OMX_ErrorInvalidState:
- return "Invalid state";
case OMX_ErrorStreamCorrupt:
return "Stream corrupt";
case OMX_ErrorPortsNotCompatible:
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 "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 "Separate tables used";
case OMX_ErrorTunnelingUnsupported:
return "Tunneling unsupported";
+#if OMX_VERSION_MINOR == 1
+ case OMX_ErrorInvalidComponent:
+ return "Invalid component";
+ case OMX_ErrorInvalidState:
+ return "Invalid state";
+ 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_ErrorContentPipeOpenFailed:
+ return "Content pipe open failed";
+ case OMX_ErrorContentPipeCreationFailed:
+ return "Content pipe creation failed";
+#endif
default:
if (err_u >= (guint) OMX_ErrorKhronosExtensions
&& err_u < (guint) OMX_ErrorVendorStartUnused) {
} G_STMT_END
#endif
+/* OMX_StateInvalid does not exist in 1.2.0 spec. The initial state is now
+ * StateLoaded. Problem is that gst-omx still needs an initial state different
+ * than StateLoaded. Otherwise gst_omx_component_set_state(StateLoaded) will
+ * early return because it will think it is already in StateLoaded. Also note
+ * that there is no call to gst_omx_component_set_state(StateInvalid) so this
+ * also shows that StateInvalid is used as a helper in gst-omx.
+ */
+#if OMX_VERSION_MINOR == 2
+#define OMX_StateInvalid OMX_StateReserved_0x00000000
+#endif
+
/* Different hacks that are required to work around
* bugs in different OpenMAX implementations
*/