31 case OMX_EventCmdComplete:
return QStringLiteral(
"CmdComplete");
32 case OMX_EventError:
return QStringLiteral(
"Error");
33 case OMX_EventMark:
return QStringLiteral(
"Mark");
34 case OMX_EventPortSettingsChanged:
return QStringLiteral(
"PortSettingsChanged");
35 case OMX_EventBufferFlag:
return QStringLiteral(
"BufferFlag");
36 case OMX_EventResourcesAcquired:
return QStringLiteral(
"ResourcesAcquired");
37 case OMX_EventComponentResumed:
return QStringLiteral(
"ComponentResumed");
38 case OMX_EventDynamicResourcesAvailable:
return QStringLiteral(
"DynamicResourcesAvailable");
39 case OMX_EventPortFormatDetected:
return QStringLiteral(
"PortFormatDetected");
43 return QStringLiteral(
"Unknown %1").arg(Event);
50 case OMX_StateInvalid:
return QStringLiteral(
"Invalid");
51 case OMX_StateLoaded:
return QStringLiteral(
"Loaded");
52 case OMX_StateIdle:
return QStringLiteral(
"Idle");
53 case OMX_StateExecuting:
return QStringLiteral(
"Executing");
54 case OMX_StatePause:
return QStringLiteral(
"Pause");
55 case OMX_StateWaitForResources:
return QStringLiteral(
"WaitForResources");
58 return QStringLiteral(
"Unknown %1").arg(State);
65 case OMX_ErrorNone:
return QStringLiteral(
"None");
66 case OMX_ErrorInsufficientResources:
return QStringLiteral(
"InsufficientResources");
67 case OMX_ErrorUndefined:
return QStringLiteral(
"Undefined");
68 case OMX_ErrorInvalidComponentName:
return QStringLiteral(
"InvalidComponentName");
69 case OMX_ErrorComponentNotFound:
return QStringLiteral(
"ComponentNotFound");
70 case OMX_ErrorInvalidComponent:
return QStringLiteral(
"InvalidComponent");
71 case OMX_ErrorBadParameter:
return QStringLiteral(
"BadParameter");
72 case OMX_ErrorNotImplemented:
return QStringLiteral(
"NotImplemented");
73 case OMX_ErrorUnderflow:
return QStringLiteral(
"Underflow");
74 case OMX_ErrorOverflow:
return QStringLiteral(
"Overflow");
75 case OMX_ErrorHardware:
return QStringLiteral(
"Hardware");
76 case OMX_ErrorInvalidState:
return QStringLiteral(
"InvalidState");
77 case OMX_ErrorStreamCorrupt:
return QStringLiteral(
"StreamCorrupt");
78 case OMX_ErrorPortsNotCompatible:
return QStringLiteral(
"PortsNotCompatible");
79 case OMX_ErrorResourcesLost:
return QStringLiteral(
"ResourcesLost");
80 case OMX_ErrorNoMore:
return QStringLiteral(
"NoMore");
81 case OMX_ErrorVersionMismatch:
return QStringLiteral(
"VersionMismatch");
82 case OMX_ErrorNotReady:
return QStringLiteral(
"NotReady");
83 case OMX_ErrorTimeout:
return QStringLiteral(
"Timeout");
84 case OMX_ErrorSameState:
return QStringLiteral(
"SameState");
85 case OMX_ErrorResourcesPreempted:
return QStringLiteral(
"ResourcesPreempted");
86 case OMX_ErrorPortUnresponsiveDuringAllocation:
return QStringLiteral(
"PortUnresponsiveDuringAllocation");
87 case OMX_ErrorPortUnresponsiveDuringDeallocation:
return QStringLiteral(
"PortUnresponsiveDuringDeallocation");
88 case OMX_ErrorPortUnresponsiveDuringStop:
return QStringLiteral(
"PortUnresponsiveDuringStop");
89 case OMX_ErrorIncorrectStateTransition:
return QStringLiteral(
"IncorrectStateTransition");
90 case OMX_ErrorIncorrectStateOperation:
return QStringLiteral(
"IncorrectStateOperation");
91 case OMX_ErrorUnsupportedSetting:
return QStringLiteral(
"UnsupportedSetting");
92 case OMX_ErrorUnsupportedIndex:
return QStringLiteral(
"UnsupportedIndex");
93 case OMX_ErrorBadPortIndex:
return QStringLiteral(
"BadPortIndex");
94 case OMX_ErrorPortUnpopulated:
return QStringLiteral(
"PortUnpopulated");
95 case OMX_ErrorComponentSuspended:
return QStringLiteral(
"ComponentSuspended");
96 case OMX_ErrorDynamicResourcesUnavailable:
return QStringLiteral(
"DynamicResourcesUnavailable");
97 case OMX_ErrorMbErrorsInFrame:
return QStringLiteral(
"MbErrorsInFrame");
98 case OMX_ErrorFormatNotDetected:
return QStringLiteral(
"FormatNotDetected");
99 case OMX_ErrorContentPipeOpenFailed:
return QStringLiteral(
"ContentPipeOpenFailed");
100 case OMX_ErrorContentPipeCreationFailed:
return QStringLiteral(
"ContentPipeCreationFailed");
101 case OMX_ErrorSeperateTablesUsed:
return QStringLiteral(
"SeperateTablesUsed");
102 case OMX_ErrorTunnelingUnsupported:
return QStringLiteral(
"TunnelingUnsupported");
103 case OMX_ErrorMax:
return QStringLiteral(
"Max");
107 return QStringLiteral(
"Unknown error 0x%1").arg(Error, 0, 16);
114 case OMX_CommandStateSet:
return QStringLiteral(
"StateSet");
115 case OMX_CommandFlush:
return QStringLiteral(
"Flush");
116 case OMX_CommandPortDisable:
return QStringLiteral(
"PortDisable");
117 case OMX_CommandPortEnable:
return QStringLiteral(
"PortEnable");
118 case OMX_CommandMarkBuffer:
return QStringLiteral(
"MarkBuffer");
119 case OMX_CommandMax:
return QStringLiteral(
"Max");
123 return QStringLiteral(
"Unknown %1").arg(Command);
130 case OMX_IndexParamAudioInit:
return QStringLiteral(
"Audio");
131 case OMX_IndexParamImageInit:
return QStringLiteral(
"Image");
132 case OMX_IndexParamVideoInit:
return QStringLiteral(
"Video");
133 case OMX_IndexParamOtherInit:
return QStringLiteral(
"Other");
137 return QStringLiteral(
"Unknown");
142 OMX_ERRORTYPE error = OMX_Init();
143 if (OMX_ErrorNone != error)
145 LOG(VB_GENERAL, LOG_ERR, QStringLiteral(
"Failed to initialise OMXCore (Error '%1')").arg(
ErrorToString(error)));
149 LOG(VB_GENERAL, LOG_INFO, QStringLiteral(
"Available OMX components:"));
151 char componentname[128];
152 while (OMX_ComponentNameEnum(&componentname[0], 128, index++) == OMX_ErrorNone)
153 LOG(VB_GENERAL, LOG_INFO, QString(componentname));
158 LOG(VB_GENERAL, LOG_INFO, QStringLiteral(
"Closing OpenMax Core"));
QString StateToString(OMX_STATETYPE State)
QString ErrorToString(OMX_ERRORTYPE Error)
QString CommandToString(OMX_COMMANDTYPE Command)
QString DomainToString(OMX_INDEXTYPE Domain)
#define LOG(_MASK_, _LEVEL_, _STRING_)
QString EventToString(OMX_EVENTTYPE Event)