1 /* 2 * Copyright 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /* NOTE: This file contains several sections for individual OMX include files. 18 Each section has its own include guard. This file should be included AFTER 19 the OMX include files. */ 20 21 #ifdef OMX_Audio_h 22 /* asString definitions if media/openmax/OMX_Audio.h was included */ 23 24 #ifndef AS_STRING_FOR_OMX_AUDIO_H 25 #define AS_STRING_FOR_OMX_AUDIO_H 26 27 inline static const char *asString(OMX_AUDIO_CODINGTYPE i, const char *def = "??") { 28 switch (i) { 29 case OMX_AUDIO_CodingUnused: return "Unused"; // unused 30 case OMX_AUDIO_CodingAutoDetect: return "AutoDetect"; // unused 31 case OMX_AUDIO_CodingPCM: return "PCM"; 32 case OMX_AUDIO_CodingADPCM: return "ADPCM"; // unused 33 case OMX_AUDIO_CodingAMR: return "AMR"; 34 case OMX_AUDIO_CodingGSMFR: return "GSMFR"; 35 case OMX_AUDIO_CodingGSMEFR: return "GSMEFR"; // unused 36 case OMX_AUDIO_CodingGSMHR: return "GSMHR"; // unused 37 case OMX_AUDIO_CodingPDCFR: return "PDCFR"; // unused 38 case OMX_AUDIO_CodingPDCEFR: return "PDCEFR"; // unused 39 case OMX_AUDIO_CodingPDCHR: return "PDCHR"; // unused 40 case OMX_AUDIO_CodingTDMAFR: return "TDMAFR"; // unused 41 case OMX_AUDIO_CodingTDMAEFR: return "TDMAEFR"; // unused 42 case OMX_AUDIO_CodingQCELP8: return "QCELP8"; // unused 43 case OMX_AUDIO_CodingQCELP13: return "QCELP13"; // unused 44 case OMX_AUDIO_CodingEVRC: return "EVRC"; // unused 45 case OMX_AUDIO_CodingSMV: return "SMV"; // unused 46 case OMX_AUDIO_CodingG711: return "G711"; 47 case OMX_AUDIO_CodingG723: return "G723"; // unused 48 case OMX_AUDIO_CodingG726: return "G726"; // unused 49 case OMX_AUDIO_CodingG729: return "G729"; // unused 50 case OMX_AUDIO_CodingAAC: return "AAC"; 51 case OMX_AUDIO_CodingMP3: return "MP3"; 52 case OMX_AUDIO_CodingSBC: return "SBC"; // unused 53 case OMX_AUDIO_CodingVORBIS: return "VORBIS"; 54 case OMX_AUDIO_CodingWMA: return "WMA"; // unused 55 case OMX_AUDIO_CodingRA: return "RA"; // unused 56 case OMX_AUDIO_CodingMIDI: return "MIDI"; // unused 57 case OMX_AUDIO_CodingFLAC: return "FLAC"; 58 default: return def; 59 } 60 } 61 62 inline static const char *asString(OMX_AUDIO_PCMMODETYPE i, const char *def = "??") { 63 switch (i) { 64 case OMX_AUDIO_PCMModeLinear: return "Linear"; 65 case OMX_AUDIO_PCMModeALaw: return "ALaw"; 66 case OMX_AUDIO_PCMModeMULaw: return "MULaw"; 67 default: return def; 68 } 69 } 70 71 inline static const char *asString(OMX_AUDIO_CHANNELTYPE i, const char *def = "??") { 72 switch (i) { 73 case OMX_AUDIO_ChannelNone: return "None"; // unused 74 case OMX_AUDIO_ChannelLF: return "LF"; 75 case OMX_AUDIO_ChannelRF: return "RF"; 76 case OMX_AUDIO_ChannelCF: return "CF"; 77 case OMX_AUDIO_ChannelLS: return "LS"; 78 case OMX_AUDIO_ChannelRS: return "RS"; 79 case OMX_AUDIO_ChannelLFE: return "LFE"; 80 case OMX_AUDIO_ChannelCS: return "CS"; 81 case OMX_AUDIO_ChannelLR: return "LR"; 82 case OMX_AUDIO_ChannelRR: return "RR"; 83 default: return def; 84 } 85 } 86 87 inline static const char *asString(OMX_AUDIO_CHANNELMODETYPE i, const char *def = "??") { 88 switch (i) { 89 case OMX_AUDIO_ChannelModeStereo: return "Stereo"; 90 // case OMX_AUDIO_ChannelModeJointStereo: return "JointStereo"; 91 // case OMX_AUDIO_ChannelModeDual: return "Dual"; 92 case OMX_AUDIO_ChannelModeMono: return "Mono"; 93 default: return def; 94 } 95 } 96 97 inline static const char *asString(OMX_AUDIO_AACSTREAMFORMATTYPE i, const char *def = "??") { 98 switch (i) { 99 // case OMX_AUDIO_AACStreamFormatMP2ADTS: return "MP2ADTS"; 100 case OMX_AUDIO_AACStreamFormatMP4ADTS: return "MP4ADTS"; 101 // case OMX_AUDIO_AACStreamFormatMP4LOAS: return "MP4LOAS"; 102 // case OMX_AUDIO_AACStreamFormatMP4LATM: return "MP4LATM"; 103 // case OMX_AUDIO_AACStreamFormatADIF: return "ADIF"; 104 case OMX_AUDIO_AACStreamFormatMP4FF: return "MP4FF"; 105 // case OMX_AUDIO_AACStreamFormatRAW: return "RAW"; 106 default: return def; 107 } 108 } 109 110 inline static const char *asString(OMX_AUDIO_AMRFRAMEFORMATTYPE i, const char *def = "??") { 111 switch (i) { 112 // case OMX_AUDIO_AMRFrameFormatConformance: return "Conformance"; 113 // case OMX_AUDIO_AMRFrameFormatIF1: return "IF1"; 114 // case OMX_AUDIO_AMRFrameFormatIF2: return "IF2"; 115 case OMX_AUDIO_AMRFrameFormatFSF: return "FSF"; 116 // case OMX_AUDIO_AMRFrameFormatRTPPayload: return "RTPPayload"; 117 // case OMX_AUDIO_AMRFrameFormatITU: return "ITU"; 118 default: return def; 119 } 120 } 121 122 inline static const char *asString(OMX_AUDIO_AMRBANDMODETYPE i, const char *def = "??") { 123 switch (i) { 124 case OMX_AUDIO_AMRBandModeUnused: return "Unused"; 125 case OMX_AUDIO_AMRBandModeNB0: return "NB0"; 126 case OMX_AUDIO_AMRBandModeNB1: return "NB1"; 127 case OMX_AUDIO_AMRBandModeNB2: return "NB2"; 128 case OMX_AUDIO_AMRBandModeNB3: return "NB3"; 129 case OMX_AUDIO_AMRBandModeNB4: return "NB4"; 130 case OMX_AUDIO_AMRBandModeNB5: return "NB5"; 131 case OMX_AUDIO_AMRBandModeNB6: return "NB6"; 132 case OMX_AUDIO_AMRBandModeNB7: return "NB7"; 133 case OMX_AUDIO_AMRBandModeWB0: return "WB0"; 134 case OMX_AUDIO_AMRBandModeWB1: return "WB1"; 135 case OMX_AUDIO_AMRBandModeWB2: return "WB2"; 136 case OMX_AUDIO_AMRBandModeWB3: return "WB3"; 137 case OMX_AUDIO_AMRBandModeWB4: return "WB4"; 138 case OMX_AUDIO_AMRBandModeWB5: return "WB5"; 139 case OMX_AUDIO_AMRBandModeWB6: return "WB6"; 140 case OMX_AUDIO_AMRBandModeWB7: return "WB7"; 141 case OMX_AUDIO_AMRBandModeWB8: return "WB8"; 142 default: return def; 143 } 144 } 145 146 inline static const char *asString(OMX_AUDIO_AMRDTXMODETYPE i, const char *def = "??") { 147 switch (i) { 148 case OMX_AUDIO_AMRDTXModeOff: return "ModeOff"; 149 // case OMX_AUDIO_AMRDTXModeOnVAD1: return "ModeOnVAD1"; 150 // case OMX_AUDIO_AMRDTXModeOnVAD2: return "ModeOnVAD2"; 151 // case OMX_AUDIO_AMRDTXModeOnAuto: return "ModeOnAuto"; 152 // case OMX_AUDIO_AMRDTXasEFR: return "asEFR"; 153 default: return def; 154 } 155 } 156 157 #endif // AS_STRING_FOR_OMX_AUDIO_H 158 159 #endif // OMX_Audio_h 160 161 #ifdef OMX_AudioExt_h 162 /* asString definitions if media/openmax/OMX_AudioExt.h was included */ 163 164 #ifndef AS_STRING_FOR_OMX_AUDIOEXT_H 165 #define AS_STRING_FOR_OMX_AUDIOEXT_H 166 167 inline static const char *asString(OMX_AUDIO_CODINGEXTTYPE i, const char *def = "??") { 168 switch (i) { 169 case OMX_AUDIO_CodingAndroidAC3: return "AndroidAC3"; 170 case OMX_AUDIO_CodingAndroidOPUS: return "AndroidOPUS"; 171 default: return asString((OMX_AUDIO_CODINGTYPE)i, def); 172 } 173 } 174 175 #endif // AS_STRING_FOR_OMX_AUDIOEXT_H 176 177 #endif // OMX_AudioExt_h 178 179 #ifdef OMX_Component_h 180 /* asString definitions if media/openmax/OMX_Component.h was included */ 181 182 #ifndef AS_STRING_FOR_OMX_COMPONENT_H 183 #define AS_STRING_FOR_OMX_COMPONENT_H 184 185 inline static const char *asString(OMX_PORTDOMAINTYPE i, const char *def = "??") { 186 switch (i) { 187 case OMX_PortDomainAudio: return "Audio"; 188 case OMX_PortDomainVideo: return "Video"; 189 case OMX_PortDomainImage: return "Image"; 190 // case OMX_PortDomainOther: return "Other"; 191 default: return def; 192 } 193 } 194 195 #endif // AS_STRING_FOR_OMX_COMPONENT_H 196 197 #endif // OMX_Component_h 198 199 #ifdef OMX_Core_h 200 /* asString definitions if media/openmax/OMX_Core.h was included */ 201 202 #ifndef AS_STRING_FOR_OMX_CORE_H 203 #define AS_STRING_FOR_OMX_CORE_H 204 205 inline static const char *asString(OMX_COMMANDTYPE i, const char *def = "??") { 206 switch (i) { 207 case OMX_CommandStateSet: return "StateSet"; 208 case OMX_CommandFlush: return "Flush"; 209 case OMX_CommandPortDisable: return "PortDisable"; 210 case OMX_CommandPortEnable: return "PortEnable"; 211 // case OMX_CommandMarkBuffer: return "MarkBuffer"; 212 default: return def; 213 } 214 } 215 216 inline static const char *asString(OMX_STATETYPE i, const char *def = "??") { 217 switch (i) { 218 case OMX_StateInvalid: return "Invalid"; 219 case OMX_StateLoaded: return "Loaded"; 220 case OMX_StateIdle: return "Idle"; 221 case OMX_StateExecuting: return "Executing"; 222 // case OMX_StatePause: return "Pause"; 223 // case OMX_StateWaitForResources: return "WaitForResources"; 224 default: return def; 225 } 226 } 227 228 inline static const char *asString(OMX_ERRORTYPE i, const char *def = "??") { 229 switch (i) { 230 case OMX_ErrorNone: return "None"; 231 case OMX_ErrorInsufficientResources: return "InsufficientResources"; 232 case OMX_ErrorUndefined: return "Undefined"; 233 case OMX_ErrorInvalidComponentName: return "InvalidComponentName"; 234 case OMX_ErrorComponentNotFound: return "ComponentNotFound"; 235 case OMX_ErrorInvalidComponent: return "InvalidComponent"; // unused 236 case OMX_ErrorBadParameter: return "BadParameter"; 237 case OMX_ErrorNotImplemented: return "NotImplemented"; 238 case OMX_ErrorUnderflow: return "Underflow"; // unused 239 case OMX_ErrorOverflow: return "Overflow"; // unused 240 case OMX_ErrorHardware: return "Hardware"; // unused 241 case OMX_ErrorInvalidState: return "InvalidState"; 242 case OMX_ErrorStreamCorrupt: return "StreamCorrupt"; 243 case OMX_ErrorPortsNotCompatible: return "PortsNotCompatible"; // unused 244 case OMX_ErrorResourcesLost: return "ResourcesLost"; 245 case OMX_ErrorNoMore: return "NoMore"; 246 case OMX_ErrorVersionMismatch: return "VersionMismatch"; // unused 247 case OMX_ErrorNotReady: return "NotReady"; // unused 248 case OMX_ErrorTimeout: return "Timeout"; // unused 249 case OMX_ErrorSameState: return "SameState"; // unused 250 case OMX_ErrorResourcesPreempted: return "ResourcesPreempted"; // unused 251 case OMX_ErrorPortUnresponsiveDuringAllocation: 252 return "PortUnresponsiveDuringAllocation"; // unused 253 case OMX_ErrorPortUnresponsiveDuringDeallocation: 254 return "PortUnresponsiveDuringDeallocation"; // unused 255 case OMX_ErrorPortUnresponsiveDuringStop: 256 return "PortUnresponsiveDuringStop"; // unused 257 case OMX_ErrorIncorrectStateTransition: 258 return "IncorrectStateTransition"; // unused 259 case OMX_ErrorIncorrectStateOperation: 260 return "IncorrectStateOperation"; // unused 261 case OMX_ErrorUnsupportedSetting: return "UnsupportedSetting"; 262 case OMX_ErrorUnsupportedIndex: return "UnsupportedIndex"; 263 case OMX_ErrorBadPortIndex: return "BadPortIndex"; 264 case OMX_ErrorPortUnpopulated: return "PortUnpopulated"; // unused 265 case OMX_ErrorComponentSuspended: return "ComponentSuspended"; // unused 266 case OMX_ErrorDynamicResourcesUnavailable: 267 return "DynamicResourcesUnavailable"; // unused 268 case OMX_ErrorMbErrorsInFrame: return "MbErrorsInFrame"; // unused 269 case OMX_ErrorFormatNotDetected: return "FormatNotDetected"; // unused 270 case OMX_ErrorContentPipeOpenFailed: return "ContentPipeOpenFailed"; // unused 271 case OMX_ErrorContentPipeCreationFailed: 272 return "ContentPipeCreationFailed"; // unused 273 case OMX_ErrorSeperateTablesUsed: return "SeperateTablesUsed"; // unused 274 case OMX_ErrorTunnelingUnsupported: return "TunnelingUnsupported"; // unused 275 default: return def; 276 } 277 } 278 279 inline static const char *asString(OMX_EVENTTYPE i, const char *def = "??") { 280 switch (i) { 281 case OMX_EventCmdComplete: return "CmdComplete"; 282 case OMX_EventError: return "Error"; 283 // case OMX_EventMark: return "Mark"; 284 case OMX_EventPortSettingsChanged: return "PortSettingsChanged"; 285 case OMX_EventBufferFlag: return "BufferFlag"; 286 // case OMX_EventResourcesAcquired: return "ResourcesAcquired"; 287 // case OMX_EventComponentResumed: return "ComponentResumed"; 288 // case OMX_EventDynamicResourcesAvailable: return "DynamicResourcesAvailable"; 289 // case OMX_EventPortFormatDetected: return "PortFormatDetected"; 290 case OMX_EventOutputRendered: return "OutputRendered"; 291 default: return def; 292 } 293 } 294 295 #endif // AS_STRING_FOR_OMX_CORE_H 296 297 #endif // OMX_Core_h 298 299 #ifdef OMX_Image_h 300 /* asString definitions if media/openmax/OMX_Image.h was included */ 301 302 #ifndef AS_STRING_FOR_OMX_IMAGE_H 303 #define AS_STRING_FOR_OMX_IMAGE_H 304 305 inline static const char *asString(OMX_IMAGE_CODINGTYPE i, const char *def = "??") { 306 switch (i) { 307 case OMX_IMAGE_CodingUnused: return "Unused"; 308 case OMX_IMAGE_CodingAutoDetect: return "AutoDetect"; // unused 309 case OMX_IMAGE_CodingJPEG: return "JPEG"; 310 case OMX_IMAGE_CodingJPEG2K: return "JPEG2K"; // unused 311 case OMX_IMAGE_CodingEXIF: return "EXIF"; // unused 312 case OMX_IMAGE_CodingTIFF: return "TIFF"; // unused 313 case OMX_IMAGE_CodingGIF: return "GIF"; // unused 314 case OMX_IMAGE_CodingPNG: return "PNG"; // unused 315 case OMX_IMAGE_CodingLZW: return "LZW"; // unused 316 case OMX_IMAGE_CodingBMP: return "BMP"; // unused 317 default: return def; 318 } 319 } 320 321 #endif // AS_STRING_FOR_OMX_IMAGE_H 322 323 #endif // OMX_Image_h 324 325 #ifdef OMX_Index_h 326 /* asString definitions if media/openmax/OMX_Index.h was included */ 327 328 #ifndef AS_STRING_FOR_OMX_INDEX_H 329 #define AS_STRING_FOR_OMX_INDEX_H 330 331 inline static const char *asString(OMX_INDEXTYPE i, const char *def = "??") { 332 switch (i) { 333 // case OMX_IndexParamPriorityMgmt: return "ParamPriorityMgmt"; 334 // case OMX_IndexParamAudioInit: return "ParamAudioInit"; 335 // case OMX_IndexParamImageInit: return "ParamImageInit"; 336 // case OMX_IndexParamVideoInit: return "ParamVideoInit"; 337 // case OMX_IndexParamOtherInit: return "ParamOtherInit"; 338 // case OMX_IndexParamNumAvailableStreams: return "ParamNumAvailableStreams"; 339 // case OMX_IndexParamActiveStream: return "ParamActiveStream"; 340 // case OMX_IndexParamSuspensionPolicy: return "ParamSuspensionPolicy"; 341 // case OMX_IndexParamComponentSuspended: return "ParamComponentSuspended"; 342 // case OMX_IndexConfigCapturing: return "ConfigCapturing"; 343 // case OMX_IndexConfigCaptureMode: return "ConfigCaptureMode"; 344 // case OMX_IndexAutoPauseAfterCapture: return "AutoPauseAfterCapture"; 345 // case OMX_IndexParamContentURI: return "ParamContentURI"; 346 // case OMX_IndexParamCustomContentPipe: return "ParamCustomContentPipe"; 347 // case OMX_IndexParamDisableResourceConcealment: 348 // return "ParamDisableResourceConcealment"; 349 // case OMX_IndexConfigMetadataItemCount: return "ConfigMetadataItemCount"; 350 // case OMX_IndexConfigContainerNodeCount: return "ConfigContainerNodeCount"; 351 // case OMX_IndexConfigMetadataItem: return "ConfigMetadataItem"; 352 // case OMX_IndexConfigCounterNodeID: return "ConfigCounterNodeID"; 353 // case OMX_IndexParamMetadataFilterType: return "ParamMetadataFilterType"; 354 // case OMX_IndexParamMetadataKeyFilter: return "ParamMetadataKeyFilter"; 355 // case OMX_IndexConfigPriorityMgmt: return "ConfigPriorityMgmt"; 356 case OMX_IndexParamStandardComponentRole: return "ParamStandardComponentRole"; 357 case OMX_IndexParamPortDefinition: return "ParamPortDefinition"; 358 // case OMX_IndexParamCompBufferSupplier: return "ParamCompBufferSupplier"; 359 case OMX_IndexParamAudioPortFormat: return "ParamAudioPortFormat"; 360 case OMX_IndexParamAudioPcm: return "ParamAudioPcm"; 361 case OMX_IndexParamAudioAac: return "ParamAudioAac"; 362 // case OMX_IndexParamAudioRa: return "ParamAudioRa"; 363 case OMX_IndexParamAudioMp3: return "ParamAudioMp3"; 364 // case OMX_IndexParamAudioAdpcm: return "ParamAudioAdpcm"; 365 // case OMX_IndexParamAudioG723: return "ParamAudioG723"; 366 // case OMX_IndexParamAudioG729: return "ParamAudioG729"; 367 case OMX_IndexParamAudioAmr: return "ParamAudioAmr"; 368 // case OMX_IndexParamAudioWma: return "ParamAudioWma"; 369 // case OMX_IndexParamAudioSbc: return "ParamAudioSbc"; 370 // case OMX_IndexParamAudioMidi: return "ParamAudioMidi"; 371 // case OMX_IndexParamAudioGsm_FR: return "ParamAudioGsm_FR"; 372 // case OMX_IndexParamAudioMidiLoadUserSound: return "ParamAudioMidiLoadUserSound"; 373 // case OMX_IndexParamAudioG726: return "ParamAudioG726"; 374 // case OMX_IndexParamAudioGsm_EFR: return "ParamAudioGsm_EFR"; 375 // case OMX_IndexParamAudioGsm_HR: return "ParamAudioGsm_HR"; 376 // case OMX_IndexParamAudioPdc_FR: return "ParamAudioPdc_FR"; 377 // case OMX_IndexParamAudioPdc_EFR: return "ParamAudioPdc_EFR"; 378 // case OMX_IndexParamAudioPdc_HR: return "ParamAudioPdc_HR"; 379 // case OMX_IndexParamAudioTdma_FR: return "ParamAudioTdma_FR"; 380 // case OMX_IndexParamAudioTdma_EFR: return "ParamAudioTdma_EFR"; 381 // case OMX_IndexParamAudioQcelp8: return "ParamAudioQcelp8"; 382 // case OMX_IndexParamAudioQcelp13: return "ParamAudioQcelp13"; 383 // case OMX_IndexParamAudioEvrc: return "ParamAudioEvrc"; 384 // case OMX_IndexParamAudioSmv: return "ParamAudioSmv"; 385 case OMX_IndexParamAudioVorbis: return "ParamAudioVorbis"; 386 case OMX_IndexParamAudioFlac: return "ParamAudioFlac"; 387 // case OMX_IndexConfigAudioMidiImmediateEvent: return "ConfigAudioMidiImmediateEvent"; 388 // case OMX_IndexConfigAudioMidiControl: return "ConfigAudioMidiControl"; 389 // case OMX_IndexConfigAudioMidiSoundBankProgram: 390 // return "ConfigAudioMidiSoundBankProgram"; 391 // case OMX_IndexConfigAudioMidiStatus: return "ConfigAudioMidiStatus"; 392 // case OMX_IndexConfigAudioMidiMetaEvent: return "ConfigAudioMidiMetaEvent"; 393 // case OMX_IndexConfigAudioMidiMetaEventData: return "ConfigAudioMidiMetaEventData"; 394 // case OMX_IndexConfigAudioVolume: return "ConfigAudioVolume"; 395 // case OMX_IndexConfigAudioBalance: return "ConfigAudioBalance"; 396 // case OMX_IndexConfigAudioChannelMute: return "ConfigAudioChannelMute"; 397 // case OMX_IndexConfigAudioMute: return "ConfigAudioMute"; 398 // case OMX_IndexConfigAudioLoudness: return "ConfigAudioLoudness"; 399 // case OMX_IndexConfigAudioEchoCancelation: return "ConfigAudioEchoCancelation"; 400 // case OMX_IndexConfigAudioNoiseReduction: return "ConfigAudioNoiseReduction"; 401 // case OMX_IndexConfigAudioBass: return "ConfigAudioBass"; 402 // case OMX_IndexConfigAudioTreble: return "ConfigAudioTreble"; 403 // case OMX_IndexConfigAudioStereoWidening: return "ConfigAudioStereoWidening"; 404 // case OMX_IndexConfigAudioChorus: return "ConfigAudioChorus"; 405 // case OMX_IndexConfigAudioEqualizer: return "ConfigAudioEqualizer"; 406 // case OMX_IndexConfigAudioReverberation: return "ConfigAudioReverberation"; 407 // case OMX_IndexConfigAudioChannelVolume: return "ConfigAudioChannelVolume"; 408 // case OMX_IndexParamImagePortFormat: return "ParamImagePortFormat"; 409 // case OMX_IndexParamFlashControl: return "ParamFlashControl"; 410 // case OMX_IndexConfigFocusControl: return "ConfigFocusControl"; 411 // case OMX_IndexParamQFactor: return "ParamQFactor"; 412 // case OMX_IndexParamQuantizationTable: return "ParamQuantizationTable"; 413 // case OMX_IndexParamHuffmanTable: return "ParamHuffmanTable"; 414 // case OMX_IndexConfigFlashControl: return "ConfigFlashControl"; 415 case OMX_IndexParamVideoPortFormat: return "ParamVideoPortFormat"; 416 // case OMX_IndexParamVideoQuantization: return "ParamVideoQuantization"; 417 // case OMX_IndexParamVideoFastUpdate: return "ParamVideoFastUpdate"; 418 case OMX_IndexParamVideoBitrate: return "ParamVideoBitrate"; 419 // case OMX_IndexParamVideoMotionVector: return "ParamVideoMotionVector"; 420 case OMX_IndexParamVideoIntraRefresh: return "ParamVideoIntraRefresh"; 421 case OMX_IndexParamVideoErrorCorrection: return "ParamVideoErrorCorrection"; 422 // case OMX_IndexParamVideoVBSMC: return "ParamVideoVBSMC"; 423 // case OMX_IndexParamVideoMpeg2: return "ParamVideoMpeg2"; 424 case OMX_IndexParamVideoMpeg4: return "ParamVideoMpeg4"; 425 // case OMX_IndexParamVideoWmv: return "ParamVideoWmv"; 426 // case OMX_IndexParamVideoRv: return "ParamVideoRv"; 427 case OMX_IndexParamVideoAvc: return "ParamVideoAvc"; 428 case OMX_IndexParamVideoH263: return "ParamVideoH263"; 429 case OMX_IndexParamVideoProfileLevelQuerySupported: 430 return "ParamVideoProfileLevelQuerySupported"; 431 case OMX_IndexParamVideoProfileLevelCurrent: return "ParamVideoProfileLevelCurrent"; 432 case OMX_IndexConfigVideoBitrate: return "ConfigVideoBitrate"; 433 // case OMX_IndexConfigVideoFramerate: return "ConfigVideoFramerate"; 434 case OMX_IndexConfigVideoIntraVOPRefresh: return "ConfigVideoIntraVOPRefresh"; 435 // case OMX_IndexConfigVideoIntraMBRefresh: return "ConfigVideoIntraMBRefresh"; 436 // case OMX_IndexConfigVideoMBErrorReporting: return "ConfigVideoMBErrorReporting"; 437 // case OMX_IndexParamVideoMacroblocksPerFrame: return "ParamVideoMacroblocksPerFrame"; 438 // case OMX_IndexConfigVideoMacroBlockErrorMap: return "ConfigVideoMacroBlockErrorMap"; 439 // case OMX_IndexParamVideoSliceFMO: return "ParamVideoSliceFMO"; 440 // case OMX_IndexConfigVideoAVCIntraPeriod: return "ConfigVideoAVCIntraPeriod"; 441 // case OMX_IndexConfigVideoNalSize: return "ConfigVideoNalSize"; 442 // case OMX_IndexParamCommonDeblocking: return "ParamCommonDeblocking"; 443 // case OMX_IndexParamCommonSensorMode: return "ParamCommonSensorMode"; 444 // case OMX_IndexParamCommonInterleave: return "ParamCommonInterleave"; 445 // case OMX_IndexConfigCommonColorFormatConversion: 446 // return "ConfigCommonColorFormatConversion"; 447 case OMX_IndexConfigCommonScale: return "ConfigCommonScale"; 448 // case OMX_IndexConfigCommonImageFilter: return "ConfigCommonImageFilter"; 449 // case OMX_IndexConfigCommonColorEnhancement: return "ConfigCommonColorEnhancement"; 450 // case OMX_IndexConfigCommonColorKey: return "ConfigCommonColorKey"; 451 // case OMX_IndexConfigCommonColorBlend: return "ConfigCommonColorBlend"; 452 // case OMX_IndexConfigCommonFrameStabilisation: return "ConfigCommonFrameStabilisation"; 453 // case OMX_IndexConfigCommonRotate: return "ConfigCommonRotate"; 454 // case OMX_IndexConfigCommonMirror: return "ConfigCommonMirror"; 455 // case OMX_IndexConfigCommonOutputPosition: return "ConfigCommonOutputPosition"; 456 case OMX_IndexConfigCommonInputCrop: return "ConfigCommonInputCrop"; 457 case OMX_IndexConfigCommonOutputCrop: return "ConfigCommonOutputCrop"; 458 // case OMX_IndexConfigCommonDigitalZoom: return "ConfigCommonDigitalZoom"; 459 // case OMX_IndexConfigCommonOpticalZoom: return "ConfigCommonOpticalZoom"; 460 // case OMX_IndexConfigCommonWhiteBalance: return "ConfigCommonWhiteBalance"; 461 // case OMX_IndexConfigCommonExposure: return "ConfigCommonExposure"; 462 // case OMX_IndexConfigCommonContrast: return "ConfigCommonContrast"; 463 // case OMX_IndexConfigCommonBrightness: return "ConfigCommonBrightness"; 464 // case OMX_IndexConfigCommonBacklight: return "ConfigCommonBacklight"; 465 // case OMX_IndexConfigCommonGamma: return "ConfigCommonGamma"; 466 // case OMX_IndexConfigCommonSaturation: return "ConfigCommonSaturation"; 467 // case OMX_IndexConfigCommonLightness: return "ConfigCommonLightness"; 468 // case OMX_IndexConfigCommonExclusionRect: return "ConfigCommonExclusionRect"; 469 // case OMX_IndexConfigCommonDithering: return "ConfigCommonDithering"; 470 // case OMX_IndexConfigCommonPlaneBlend: return "ConfigCommonPlaneBlend"; 471 // case OMX_IndexConfigCommonExposureValue: return "ConfigCommonExposureValue"; 472 // case OMX_IndexConfigCommonOutputSize: return "ConfigCommonOutputSize"; 473 // case OMX_IndexParamCommonExtraQuantData: return "ParamCommonExtraQuantData"; 474 // case OMX_IndexConfigCommonFocusRegion: return "ConfigCommonFocusRegion"; 475 // case OMX_IndexConfigCommonFocusStatus: return "ConfigCommonFocusStatus"; 476 // case OMX_IndexConfigCommonTransitionEffect: return "ConfigCommonTransitionEffect"; 477 // case OMX_IndexParamOtherPortFormat: return "ParamOtherPortFormat"; 478 // case OMX_IndexConfigOtherPower: return "ConfigOtherPower"; 479 // case OMX_IndexConfigOtherStats: return "ConfigOtherStats"; 480 // case OMX_IndexConfigTimeScale: return "ConfigTimeScale"; 481 // case OMX_IndexConfigTimeClockState: return "ConfigTimeClockState"; 482 // case OMX_IndexConfigTimeActiveRefClock: return "ConfigTimeActiveRefClock"; 483 // case OMX_IndexConfigTimeCurrentMediaTime: return "ConfigTimeCurrentMediaTime"; 484 // case OMX_IndexConfigTimeCurrentWallTime: return "ConfigTimeCurrentWallTime"; 485 // case OMX_IndexConfigTimeCurrentAudioReference: 486 // return "ConfigTimeCurrentAudioReference"; 487 // case OMX_IndexConfigTimeCurrentVideoReference: 488 // return "ConfigTimeCurrentVideoReference"; 489 // case OMX_IndexConfigTimeMediaTimeRequest: return "ConfigTimeMediaTimeRequest"; 490 // case OMX_IndexConfigTimeClientStartTime: return "ConfigTimeClientStartTime"; 491 // case OMX_IndexConfigTimePosition: return "ConfigTimePosition"; 492 // case OMX_IndexConfigTimeSeekMode: return "ConfigTimeSeekMode"; 493 default: return def; 494 } 495 } 496 497 #endif // AS_STRING_FOR_OMX_INDEX_H 498 499 #endif // OMX_Index_h 500 501 #ifdef OMX_IndexExt_h 502 /* asString definitions if media/openmax/OMX_IndexExt.h was included */ 503 504 #ifndef AS_STRING_FOR_OMX_INDEXEXT_H 505 #define AS_STRING_FOR_OMX_INDEXEXT_H 506 507 inline static const char *asString(OMX_INDEXEXTTYPE i, const char *def = "??") { 508 switch (i) { 509 // case OMX_IndexConfigCallbackRequest: return "ConfigCallbackRequest"; 510 // case OMX_IndexConfigCommitMode: return "ConfigCommitMode"; 511 // case OMX_IndexConfigCommit: return "ConfigCommit"; 512 case OMX_IndexParamAudioAndroidAc3: return "ParamAudioAndroidAc3"; 513 case OMX_IndexParamAudioAndroidOpus: return "ParamAudioAndroidOpus"; 514 case OMX_IndexParamAudioAndroidAacPresentation: return "ParamAudioAndroidAacPresentation"; 515 // case OMX_IndexParamNalStreamFormatSupported: return "ParamNalStreamFormatSupported"; 516 // case OMX_IndexParamNalStreamFormat: return "ParamNalStreamFormat"; 517 // case OMX_IndexParamNalStreamFormatSelect: return "ParamNalStreamFormatSelect"; 518 case OMX_IndexParamVideoVp8: return "ParamVideoVp8"; 519 // case OMX_IndexConfigVideoVp8ReferenceFrame: return "ConfigVideoVp8ReferenceFrame"; 520 // case OMX_IndexConfigVideoVp8ReferenceFrameType: return "ConfigVideoVp8ReferenceFrameType"; 521 case OMX_IndexParamVideoAndroidVp8Encoder: return "ParamVideoAndroidVp8Encoder"; 522 case OMX_IndexParamVideoHevc: return "ParamVideoHevc"; 523 // case OMX_IndexParamSliceSegments: return "ParamSliceSegments"; 524 case OMX_IndexConfigAutoFramerateConversion: return "ConfigAutoFramerateConversion"; 525 case OMX_IndexConfigPriority: return "ConfigPriority"; 526 case OMX_IndexConfigOperatingRate: return "ConfigOperatingRate"; 527 case OMX_IndexParamConsumerUsageBits: return "ParamConsumerUsageBits"; 528 default: return asString((OMX_INDEXTYPE)i, def); 529 } 530 } 531 532 #endif // AS_STRING_FOR_OMX_INDEXEXT_H 533 534 #endif // OMX_IndexExt_h 535 536 #ifdef OMX_IVCommon_h 537 /* asString definitions if media/openmax/OMX_IVCommon.h was included */ 538 539 #ifndef AS_STRING_FOR_OMX_IVCOMMON_H 540 #define AS_STRING_FOR_OMX_IVCOMMON_H 541 542 inline static const char *asString(OMX_COLOR_FORMATTYPE i, const char *def = "??") { 543 switch (i) { 544 case OMX_COLOR_FormatUnused: 545 return "COLOR_FormatUnused"; 546 case OMX_COLOR_FormatMonochrome: 547 return "COLOR_FormatMonochrome"; 548 case OMX_COLOR_Format8bitRGB332: 549 return "COLOR_Format8bitRGB332"; 550 case OMX_COLOR_Format12bitRGB444: 551 return "COLOR_Format12bitRGB444"; 552 case OMX_COLOR_Format16bitARGB4444: 553 return "COLOR_Format16bitARGB4444"; 554 case OMX_COLOR_Format16bitARGB1555: 555 return "COLOR_Format16bitARGB1555"; 556 case OMX_COLOR_Format16bitRGB565: 557 return "COLOR_Format16bitRGB565"; 558 case OMX_COLOR_Format16bitBGR565: 559 return "COLOR_Format16bitBGR565"; 560 case OMX_COLOR_Format18bitRGB666: 561 return "COLOR_Format18bitRGB666"; 562 case OMX_COLOR_Format18bitARGB1665: 563 return "COLOR_Format18bitARGB1665"; 564 case OMX_COLOR_Format19bitARGB1666: 565 return "COLOR_Format19bitARGB1666"; 566 case OMX_COLOR_Format24bitRGB888: 567 return "COLOR_Format24bitRGB888"; 568 case OMX_COLOR_Format24bitBGR888: 569 return "COLOR_Format24bitBGR888"; 570 case OMX_COLOR_Format24bitARGB1887: 571 return "COLOR_Format24bitARGB1887"; 572 case OMX_COLOR_Format25bitARGB1888: 573 return "COLOR_Format25bitARGB1888"; 574 case OMX_COLOR_Format32bitBGRA8888: 575 return "COLOR_Format32bitBGRA8888"; 576 case OMX_COLOR_Format32bitARGB8888: 577 return "COLOR_Format32bitARGB8888"; 578 case OMX_COLOR_FormatYUV411Planar: 579 return "COLOR_FormatYUV411Planar"; 580 case OMX_COLOR_FormatYUV411PackedPlanar: 581 return "COLOR_FormatYUV411PackedPlanar"; 582 case OMX_COLOR_FormatYUV420Planar: 583 return "COLOR_FormatYUV420Planar"; 584 case OMX_COLOR_FormatYUV420PackedPlanar: 585 return "COLOR_FormatYUV420PackedPlanar"; 586 case OMX_COLOR_FormatYUV420SemiPlanar: 587 return "COLOR_FormatYUV420SemiPlanar"; 588 case OMX_COLOR_FormatYUV422Planar: 589 return "COLOR_FormatYUV422Planar"; 590 case OMX_COLOR_FormatYUV422PackedPlanar: 591 return "COLOR_FormatYUV422PackedPlanar"; 592 case OMX_COLOR_FormatYUV422SemiPlanar: 593 return "COLOR_FormatYUV422SemiPlanar"; 594 case OMX_COLOR_FormatYCbYCr: 595 return "COLOR_FormatYCbYCr"; 596 case OMX_COLOR_FormatYCrYCb: 597 return "COLOR_FormatYCrYCb"; 598 case OMX_COLOR_FormatCbYCrY: 599 return "COLOR_FormatCbYCrY"; 600 case OMX_COLOR_FormatCrYCbY: 601 return "COLOR_FormatCrYCbY"; 602 case OMX_COLOR_FormatYUV444Interleaved: 603 return "COLOR_FormatYUV444Interleaved"; 604 case OMX_COLOR_FormatRawBayer8bit: 605 return "COLOR_FormatRawBayer8bit"; 606 case OMX_COLOR_FormatRawBayer10bit: 607 return "COLOR_FormatRawBayer10bit"; 608 case OMX_COLOR_FormatRawBayer8bitcompressed: 609 return "COLOR_FormatRawBayer8bitcompressed"; 610 case OMX_COLOR_FormatL2: 611 return "COLOR_FormatL2"; 612 case OMX_COLOR_FormatL4: 613 return "COLOR_FormatL4"; 614 case OMX_COLOR_FormatL8: 615 return "COLOR_FormatL8"; 616 case OMX_COLOR_FormatL16: 617 return "COLOR_FormatL16"; 618 case OMX_COLOR_FormatL24: 619 return "COLOR_FormatL24"; 620 case OMX_COLOR_FormatL32: 621 return "COLOR_FormatL32"; 622 case OMX_COLOR_FormatYUV420PackedSemiPlanar: 623 return "COLOR_FormatYUV420PackedSemiPlanar"; 624 case OMX_COLOR_FormatYUV422PackedSemiPlanar: 625 return "COLOR_FormatYUV422PackedSemiPlanar"; 626 case OMX_COLOR_Format18BitBGR666: 627 return "COLOR_Format18BitBGR666"; 628 case OMX_COLOR_Format24BitARGB6666: 629 return "COLOR_Format24BitARGB6666"; 630 case OMX_COLOR_Format24BitABGR6666: 631 return "COLOR_Format24BitABGR6666"; 632 case OMX_COLOR_FormatAndroidOpaque: 633 return "COLOR_FormatAndroidOpaque"; 634 case OMX_COLOR_FormatYUV420Flexible: 635 return "COLOR_FormatYUV420Flexible"; 636 case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar: 637 return "TI_COLOR_FormatYUV420PackedSemiPlanar"; 638 case OMX_QCOM_COLOR_FormatYVU420SemiPlanar: 639 return "QCOM_COLOR_FormatYVU420SemiPlanar"; 640 // case OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka: 641 // return "QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka"; 642 // case OMX_SEC_COLOR_FormatNV12Tiled: 643 // return "SEC_COLOR_FormatNV12Tiled"; 644 // case OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m: 645 // return "QCOM_COLOR_FormatYUV420PackedSemiPlanar32m"; 646 default: 647 return def; 648 } 649 } 650 651 #endif // AS_STRING_FOR_OMX_IVCOMMON_H 652 653 #endif // OMX_IVCommon_h 654 655 #ifdef OMX_Types_h 656 /* asString definitions if media/openmax/OMX_Types.h was included */ 657 658 #ifndef AS_STRING_FOR_OMX_TYPES_H 659 #define AS_STRING_FOR_OMX_TYPES_H 660 661 inline static const char *asString(OMX_BOOL i, const char *def = "??") { 662 switch (i) { 663 case OMX_FALSE: return "FALSE"; 664 case OMX_TRUE: return "TRUE"; 665 default: return def; 666 } 667 } 668 669 inline static const char *asString(OMX_DIRTYPE i, const char *def = "??") { 670 switch (i) { 671 case OMX_DirInput: return "Input"; 672 case OMX_DirOutput: return "Output"; 673 default: return def; 674 } 675 } 676 677 inline static const char *asString(OMX_ENDIANTYPE i, const char *def = "??") { 678 switch (i) { 679 case OMX_EndianBig: return "Big"; 680 // case OMX_EndianLittle: return "Little"; 681 default: return def; 682 } 683 } 684 685 inline static const char *asString(OMX_NUMERICALDATATYPE i, const char *def = "??") { 686 switch (i) { 687 case OMX_NumericalDataSigned: return "Signed"; 688 // case OMX_NumericalDataUnsigned: return "Unsigned"; 689 default: return def; 690 } 691 } 692 693 #endif // AS_STRING_FOR_OMX_TYPES_H 694 695 #endif // OMX_Types_h 696 697 #ifdef OMX_Video_h 698 /* asString definitions if media/openmax/OMX_Video.h was included */ 699 700 #ifndef AS_STRING_FOR_OMX_VIDEO_H 701 #define AS_STRING_FOR_OMX_VIDEO_H 702 703 inline static const char *asString(OMX_VIDEO_CODINGTYPE i, const char *def = "??") { 704 switch (i) { 705 case OMX_VIDEO_CodingUnused: return "Unused"; 706 case OMX_VIDEO_CodingAutoDetect: return "AutoDetect"; // unused 707 case OMX_VIDEO_CodingMPEG2: return "MPEG2"; 708 case OMX_VIDEO_CodingH263: return "H263"; 709 case OMX_VIDEO_CodingMPEG4: return "MPEG4"; 710 case OMX_VIDEO_CodingWMV: return "WMV"; // unused 711 case OMX_VIDEO_CodingRV: return "RV"; // unused 712 case OMX_VIDEO_CodingAVC: return "AVC"; 713 case OMX_VIDEO_CodingMJPEG: return "MJPEG"; // unused 714 case OMX_VIDEO_CodingVP8: return "VP8"; 715 case OMX_VIDEO_CodingVP9: return "VP9"; 716 case OMX_VIDEO_CodingHEVC: return "HEVC"; 717 default: return def; 718 } 719 } 720 721 inline static const char *asString(OMX_VIDEO_CONTROLRATETYPE i, const char *def = "??") { 722 switch (i) { 723 // case OMX_Video_ControlRateDisable: return "Disable"; 724 case OMX_Video_ControlRateVariable: return "Variable"; 725 case OMX_Video_ControlRateConstant: return "Constant"; 726 // case OMX_Video_ControlRateVariableSkipFrames: return "VariableSkipFrames"; 727 // case OMX_Video_ControlRateConstantSkipFrames: return "ConstantSkipFrames"; 728 default: return def; 729 } 730 } 731 732 inline static const char *asString(OMX_VIDEO_INTRAREFRESHTYPE i, const char *def = "??") { 733 switch (i) { 734 case OMX_VIDEO_IntraRefreshCyclic: return "Cyclic"; 735 case OMX_VIDEO_IntraRefreshAdaptive: return "Adaptive"; 736 case OMX_VIDEO_IntraRefreshBoth: return "Both"; 737 default: return def; 738 } 739 } 740 741 inline static const char *asString(OMX_VIDEO_H263PROFILETYPE i, const char *def = "??") { 742 switch (i) { 743 case OMX_VIDEO_H263ProfileBaseline: return "Baseline"; 744 case OMX_VIDEO_H263ProfileH320Coding: return "H320Coding"; 745 case OMX_VIDEO_H263ProfileBackwardCompatible: return "BackwardCompatible"; 746 case OMX_VIDEO_H263ProfileISWV2: return "ISWV2"; 747 case OMX_VIDEO_H263ProfileISWV3: return "ISWV3"; 748 case OMX_VIDEO_H263ProfileHighCompression: return "HighCompression"; 749 case OMX_VIDEO_H263ProfileInternet: return "Internet"; 750 case OMX_VIDEO_H263ProfileInterlace: return "Interlace"; 751 case OMX_VIDEO_H263ProfileHighLatency: return "HighLatency"; 752 default: return def; 753 } 754 } 755 756 inline static const char *asString(OMX_VIDEO_H263LEVELTYPE i, const char *def = "??") { 757 switch (i) { 758 case OMX_VIDEO_H263Level10: return "Level10"; 759 case OMX_VIDEO_H263Level20: return "Level20"; 760 case OMX_VIDEO_H263Level30: return "Level30"; 761 case OMX_VIDEO_H263Level40: return "Level40"; 762 case OMX_VIDEO_H263Level45: return "Level45"; 763 case OMX_VIDEO_H263Level50: return "Level50"; 764 case OMX_VIDEO_H263Level60: return "Level60"; 765 case OMX_VIDEO_H263Level70: return "Level70"; 766 default: return def; 767 } 768 } 769 770 inline static const char *asString(OMX_VIDEO_PICTURETYPE i, const char *def = "??") { 771 switch (i) { 772 case OMX_VIDEO_PictureTypeI: return "I"; 773 case OMX_VIDEO_PictureTypeP: return "P"; 774 case OMX_VIDEO_PictureTypeB: return "B"; 775 // case OMX_VIDEO_PictureTypeSI: return "SI"; 776 // case OMX_VIDEO_PictureTypeSP: return "SP"; 777 // case OMX_VIDEO_PictureTypeEI: return "EI"; 778 // case OMX_VIDEO_PictureTypeEP: return "EP"; 779 // case OMX_VIDEO_PictureTypeS: return "S"; 780 default: return def; 781 } 782 } 783 784 inline static const char *asString(OMX_VIDEO_MPEG4PROFILETYPE i, const char *def = "??") { 785 switch (i) { 786 case OMX_VIDEO_MPEG4ProfileSimple: return "Simple"; 787 case OMX_VIDEO_MPEG4ProfileSimpleScalable: return "SimpleScalable"; 788 case OMX_VIDEO_MPEG4ProfileCore: return "Core"; 789 case OMX_VIDEO_MPEG4ProfileMain: return "Main"; 790 case OMX_VIDEO_MPEG4ProfileNbit: return "Nbit"; 791 case OMX_VIDEO_MPEG4ProfileScalableTexture: return "ScalableTexture"; 792 case OMX_VIDEO_MPEG4ProfileSimpleFace: return "SimpleFace"; 793 case OMX_VIDEO_MPEG4ProfileSimpleFBA: return "SimpleFBA"; 794 case OMX_VIDEO_MPEG4ProfileBasicAnimated: return "BasicAnimated"; 795 case OMX_VIDEO_MPEG4ProfileHybrid: return "Hybrid"; 796 case OMX_VIDEO_MPEG4ProfileAdvancedRealTime: return "AdvancedRealTime"; 797 case OMX_VIDEO_MPEG4ProfileCoreScalable: return "CoreScalable"; 798 case OMX_VIDEO_MPEG4ProfileAdvancedCoding: return "AdvancedCoding"; 799 case OMX_VIDEO_MPEG4ProfileAdvancedCore: return "AdvancedCore"; 800 case OMX_VIDEO_MPEG4ProfileAdvancedScalable: return "AdvancedScalable"; 801 case OMX_VIDEO_MPEG4ProfileAdvancedSimple: return "AdvancedSimple"; 802 default: return def; 803 } 804 } 805 806 inline static const char *asString(OMX_VIDEO_MPEG4LEVELTYPE i, const char *def = "??") { 807 switch (i) { 808 case OMX_VIDEO_MPEG4Level0: return "Level0"; 809 case OMX_VIDEO_MPEG4Level0b: return "Level0b"; 810 case OMX_VIDEO_MPEG4Level1: return "Level1"; 811 case OMX_VIDEO_MPEG4Level2: return "Level2"; 812 case OMX_VIDEO_MPEG4Level3: return "Level3"; 813 case OMX_VIDEO_MPEG4Level4: return "Level4"; 814 case OMX_VIDEO_MPEG4Level4a: return "Level4a"; 815 case OMX_VIDEO_MPEG4Level5: return "Level5"; 816 default: return def; 817 } 818 } 819 820 inline static const char *asString(OMX_VIDEO_AVCPROFILETYPE i, const char *def = "??") { 821 switch (i) { 822 case OMX_VIDEO_AVCProfileBaseline: return "Baseline"; 823 case OMX_VIDEO_AVCProfileMain: return "Main"; 824 case OMX_VIDEO_AVCProfileExtended: return "Extended"; 825 case OMX_VIDEO_AVCProfileHigh: return "High"; 826 case OMX_VIDEO_AVCProfileHigh10: return "High10"; 827 case OMX_VIDEO_AVCProfileHigh422: return "High422"; 828 case OMX_VIDEO_AVCProfileHigh444: return "High444"; 829 default: return def; 830 } 831 } 832 833 inline static const char *asString(OMX_VIDEO_AVCLEVELTYPE i, const char *def = "??") { 834 switch (i) { 835 case OMX_VIDEO_AVCLevel1: return "Level1"; 836 case OMX_VIDEO_AVCLevel1b: return "Level1b"; 837 case OMX_VIDEO_AVCLevel11: return "Level11"; 838 case OMX_VIDEO_AVCLevel12: return "Level12"; 839 case OMX_VIDEO_AVCLevel13: return "Level13"; 840 case OMX_VIDEO_AVCLevel2: return "Level2"; 841 case OMX_VIDEO_AVCLevel21: return "Level21"; 842 case OMX_VIDEO_AVCLevel22: return "Level22"; 843 case OMX_VIDEO_AVCLevel3: return "Level3"; 844 case OMX_VIDEO_AVCLevel31: return "Level31"; 845 case OMX_VIDEO_AVCLevel32: return "Level32"; 846 case OMX_VIDEO_AVCLevel4: return "Level4"; 847 case OMX_VIDEO_AVCLevel41: return "Level41"; 848 case OMX_VIDEO_AVCLevel42: return "Level42"; 849 case OMX_VIDEO_AVCLevel5: return "Level5"; 850 case OMX_VIDEO_AVCLevel51: return "Level51"; 851 case OMX_VIDEO_AVCLevel52: return "Level52"; 852 default: return def; 853 } 854 } 855 856 inline static const char *asString(OMX_VIDEO_AVCLOOPFILTERTYPE i, const char *def = "??") { 857 switch (i) { 858 case OMX_VIDEO_AVCLoopFilterEnable: return "Enable"; 859 // case OMX_VIDEO_AVCLoopFilterDisable: return "Disable"; 860 // case OMX_VIDEO_AVCLoopFilterDisableSliceBoundary: return "DisableSliceBoundary"; 861 default: return def; 862 } 863 } 864 865 #endif // AS_STRING_FOR_OMX_VIDEO_H 866 867 #endif // OMX_Video_h 868 869 #ifdef OMX_VideoExt_h 870 /* asString definitions if media/openmax/OMX_VideoExt.h was included */ 871 872 #ifndef AS_STRING_FOR_OMX_VIDEOEXT_H 873 #define AS_STRING_FOR_OMX_VIDEOEXT_H 874 875 inline static const char *asString(OMX_VIDEO_VP8PROFILETYPE i, const char *def = "!!") { 876 switch (i) { 877 case OMX_VIDEO_VP8ProfileMain: return "Main"; 878 case OMX_VIDEO_VP8ProfileUnknown: return "Unknown"; // unused 879 default: return def; 880 } 881 } 882 883 inline static const char *asString(OMX_VIDEO_VP8LEVELTYPE i, const char *def = "!!") { 884 switch (i) { 885 case OMX_VIDEO_VP8Level_Version0: return "_Version0"; 886 case OMX_VIDEO_VP8Level_Version1: return "_Version1"; 887 case OMX_VIDEO_VP8Level_Version2: return "_Version2"; 888 case OMX_VIDEO_VP8Level_Version3: return "_Version3"; 889 case OMX_VIDEO_VP8LevelUnknown: return "Unknown"; // unused 890 default: return def; 891 } 892 } 893 894 inline static const char *asString( 895 OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE i, const char *def = "??") { 896 switch (i) { 897 case OMX_VIDEO_VPXTemporalLayerPatternNone: return "VPXTemporalLayerPatternNone"; 898 case OMX_VIDEO_VPXTemporalLayerPatternWebRTC: return "VPXTemporalLayerPatternWebRTC"; 899 default: return def; 900 } 901 } 902 903 inline static const char *asString(OMX_VIDEO_HEVCPROFILETYPE i, const char *def = "!!") { 904 switch (i) { 905 case OMX_VIDEO_HEVCProfileUnknown: return "Unknown"; // unused 906 case OMX_VIDEO_HEVCProfileMain: return "Main"; 907 case OMX_VIDEO_HEVCProfileMain10: return "Main10"; 908 default: return def; 909 } 910 } 911 912 inline static const char *asString(OMX_VIDEO_HEVCLEVELTYPE i, const char *def = "!!") { 913 switch (i) { 914 case OMX_VIDEO_HEVCLevelUnknown: return "LevelUnknown"; // unused 915 case OMX_VIDEO_HEVCMainTierLevel1: return "MainTierLevel1"; 916 case OMX_VIDEO_HEVCHighTierLevel1: return "HighTierLevel1"; 917 case OMX_VIDEO_HEVCMainTierLevel2: return "MainTierLevel2"; 918 case OMX_VIDEO_HEVCHighTierLevel2: return "HighTierLevel2"; 919 case OMX_VIDEO_HEVCMainTierLevel21: return "MainTierLevel21"; 920 case OMX_VIDEO_HEVCHighTierLevel21: return "HighTierLevel21"; 921 case OMX_VIDEO_HEVCMainTierLevel3: return "MainTierLevel3"; 922 case OMX_VIDEO_HEVCHighTierLevel3: return "HighTierLevel3"; 923 case OMX_VIDEO_HEVCMainTierLevel31: return "MainTierLevel31"; 924 case OMX_VIDEO_HEVCHighTierLevel31: return "HighTierLevel31"; 925 case OMX_VIDEO_HEVCMainTierLevel4: return "MainTierLevel4"; 926 case OMX_VIDEO_HEVCHighTierLevel4: return "HighTierLevel4"; 927 case OMX_VIDEO_HEVCMainTierLevel41: return "MainTierLevel41"; 928 case OMX_VIDEO_HEVCHighTierLevel41: return "HighTierLevel41"; 929 case OMX_VIDEO_HEVCMainTierLevel5: return "MainTierLevel5"; 930 case OMX_VIDEO_HEVCHighTierLevel5: return "HighTierLevel5"; 931 case OMX_VIDEO_HEVCMainTierLevel51: return "MainTierLevel51"; 932 case OMX_VIDEO_HEVCHighTierLevel51: return "HighTierLevel51"; 933 case OMX_VIDEO_HEVCMainTierLevel52: return "MainTierLevel52"; 934 case OMX_VIDEO_HEVCHighTierLevel52: return "HighTierLevel52"; 935 case OMX_VIDEO_HEVCMainTierLevel6: return "MainTierLevel6"; 936 case OMX_VIDEO_HEVCHighTierLevel6: return "HighTierLevel6"; 937 case OMX_VIDEO_HEVCMainTierLevel61: return "MainTierLevel61"; 938 case OMX_VIDEO_HEVCHighTierLevel61: return "HighTierLevel61"; 939 case OMX_VIDEO_HEVCMainTierLevel62: return "MainTierLevel62"; 940 case OMX_VIDEO_HEVCHighTierLevel62: return "HighTierLevel62"; 941 default: return def; 942 } 943 } 944 945 #endif // AS_STRING_FOR_OMX_VIDEOEXT_H 946 947 #endif // OMX_VideoExt_h 948