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