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