1 /* 2 * Copyright (C) 2009 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 #ifndef MEDIA_DEFS_H_ 18 19 #define MEDIA_DEFS_H_ 20 21 namespace android { 22 23 extern const char *MEDIA_MIMETYPE_IMAGE_JPEG; 24 extern const char *MEDIA_MIMETYPE_IMAGE_ANDROID_HEIC; 25 extern const char *MEDIA_MIMETYPE_IMAGE_AVIF; 26 27 extern const char *MEDIA_MIMETYPE_VIDEO_VP8; 28 extern const char *MEDIA_MIMETYPE_VIDEO_VP9; 29 extern const char *MEDIA_MIMETYPE_VIDEO_AV1; 30 extern const char *MEDIA_MIMETYPE_VIDEO_AVC; 31 extern const char *MEDIA_MIMETYPE_VIDEO_HEVC; 32 extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4; 33 extern const char *MEDIA_MIMETYPE_VIDEO_H263; 34 extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2; 35 extern const char *MEDIA_MIMETYPE_VIDEO_RAW; 36 extern const char *MEDIA_MIMETYPE_VIDEO_DOLBY_VISION; 37 extern const char *MEDIA_MIMETYPE_VIDEO_SCRAMBLED; 38 extern const char *MEDIA_MIMETYPE_VIDEO_DIVX; 39 extern const char *MEDIA_MIMETYPE_VIDEO_DIVX3; 40 extern const char *MEDIA_MIMETYPE_VIDEO_XVID; 41 extern const char *MEDIA_MIMETYPE_VIDEO_MJPEG; 42 43 extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB; 44 extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; 45 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III 46 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_I; 47 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_II; 48 extern const char *MEDIA_MIMETYPE_AUDIO_MIDI; 49 extern const char *MEDIA_MIMETYPE_AUDIO_AAC; 50 extern const char *MEDIA_MIMETYPE_AUDIO_QCELP; 51 extern const char *MEDIA_MIMETYPE_AUDIO_VORBIS; 52 extern const char *MEDIA_MIMETYPE_AUDIO_OPUS; 53 extern const char *MEDIA_MIMETYPE_AUDIO_G711_ALAW; 54 extern const char *MEDIA_MIMETYPE_AUDIO_G711_MLAW; 55 extern const char *MEDIA_MIMETYPE_AUDIO_RAW; 56 extern const char *MEDIA_MIMETYPE_AUDIO_FLAC; 57 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS; 58 extern const char *MEDIA_MIMETYPE_AUDIO_MSGSM; 59 extern const char *MEDIA_MIMETYPE_AUDIO_AC3; 60 extern const char *MEDIA_MIMETYPE_AUDIO_EAC3; 61 extern const char *MEDIA_MIMETYPE_AUDIO_EAC3_JOC; 62 extern const char *MEDIA_MIMETYPE_AUDIO_AC4; 63 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_MHA1; 64 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_MHM1; 65 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_BL_L3; 66 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_BL_L4; 67 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_LC_L3; 68 extern const char *MEDIA_MIMETYPE_AUDIO_MPEGH_LC_L4; 69 extern const char *MEDIA_MIMETYPE_AUDIO_SCRAMBLED; 70 extern const char *MEDIA_MIMETYPE_AUDIO_ALAC; 71 extern const char *MEDIA_MIMETYPE_AUDIO_WMA; 72 extern const char *MEDIA_MIMETYPE_AUDIO_MS_ADPCM; 73 extern const char *MEDIA_MIMETYPE_AUDIO_DVI_IMA_ADPCM; 74 extern const char *MEDIA_MIMETYPE_AUDIO_DTS; 75 extern const char *MEDIA_MIMETYPE_AUDIO_DTS_HD; 76 extern const char *MEDIA_MIMETYPE_AUDIO_DTS_HD_MA; 77 extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD; 78 extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P1; 79 extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P2; 80 extern const char *MEDIA_MIMETYPE_AUDIO_EVRC; 81 extern const char *MEDIA_MIMETYPE_AUDIO_EVRCB; 82 extern const char *MEDIA_MIMETYPE_AUDIO_EVRCWB; 83 extern const char *MEDIA_MIMETYPE_AUDIO_EVRCNW; 84 extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB_PLUS; 85 extern const char *MEDIA_MIMETYPE_AUDIO_APTX; 86 extern const char *MEDIA_MIMETYPE_AUDIO_DRA; 87 extern const char *MEDIA_MIMETYPE_AUDIO_DOLBY_MAT; 88 extern const char *MEDIA_MIMETYPE_AUDIO_DOLBY_MAT_1_0; 89 extern const char *MEDIA_MIMETYPE_AUDIO_DOLBY_MAT_2_0; 90 extern const char *MEDIA_MIMETYPE_AUDIO_DOLBY_MAT_2_1; 91 extern const char *MEDIA_MIMETYPE_AUDIO_DOLBY_TRUEHD; 92 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_MP4; 93 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_MAIN; 94 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LC; 95 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_SSR; 96 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LTP; 97 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_HE_V1; 98 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_SCALABLE; 99 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ERLC; 100 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LD; 101 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_HE_V2; 102 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ELD; 103 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_XHE; 104 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADIF; 105 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_MAIN; 106 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_LC; 107 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_SSR; 108 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_LTP; 109 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_HE_V1; 110 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_SCALABLE; 111 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_ERLC; 112 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_LD; 113 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_HE_V2; 114 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_ELD; 115 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS_XHE; 116 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LATM_LC; 117 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LATM_HE_V1; 118 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_LATM_HE_V2; 119 extern const char *MEDIA_MIMETYPE_AUDIO_IEC61937; 120 extern const char *MEDIA_MIMETYPE_AUDIO_IEC60958; 121 122 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4; 123 extern const char *MEDIA_MIMETYPE_CONTAINER_WAV; 124 extern const char *MEDIA_MIMETYPE_CONTAINER_OGG; 125 extern const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA; 126 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS; 127 extern const char *MEDIA_MIMETYPE_CONTAINER_AVI; 128 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2PS; 129 extern const char *MEDIA_MIMETYPE_CONTAINER_HEIF; 130 131 extern const char *MEDIA_MIMETYPE_TEXT_3GPP; 132 extern const char *MEDIA_MIMETYPE_TEXT_SUBRIP; 133 extern const char *MEDIA_MIMETYPE_TEXT_VTT; 134 extern const char *MEDIA_MIMETYPE_TEXT_CEA_608; 135 extern const char *MEDIA_MIMETYPE_TEXT_CEA_708; 136 extern const char *MEDIA_MIMETYPE_DATA_TIMED_ID3; 137 138 // These are values exported to JAVA API that need to be in sync with 139 // frameworks/base/media/java/android/media/AudioFormat.java. Unfortunately, 140 // they are not defined in frameworks/av, so defining them here. 141 enum AudioEncoding { 142 kAudioEncodingPcm16bit = 2, 143 kAudioEncodingPcm8bit = 3, 144 kAudioEncodingPcmFloat = 4, 145 kAudioEncodingPcm24bitPacked = 21, 146 kAudioEncodingPcm32bit = 22, 147 }; 148 149 } // namespace android 150 151 #endif // MEDIA_DEFS_H_ 152