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