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 26 extern const char *MEDIA_MIMETYPE_VIDEO_VP8; 27 extern const char *MEDIA_MIMETYPE_VIDEO_VP9; 28 extern const char *MEDIA_MIMETYPE_VIDEO_AV1; 29 extern const char *MEDIA_MIMETYPE_VIDEO_AVC; 30 extern const char *MEDIA_MIMETYPE_VIDEO_HEVC; 31 extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4; 32 extern const char *MEDIA_MIMETYPE_VIDEO_H263; 33 extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2; 34 extern const char *MEDIA_MIMETYPE_VIDEO_RAW; 35 extern const char *MEDIA_MIMETYPE_VIDEO_DOLBY_VISION; 36 extern const char *MEDIA_MIMETYPE_VIDEO_SCRAMBLED; 37 extern const char *MEDIA_MIMETYPE_VIDEO_DIVX; 38 extern const char *MEDIA_MIMETYPE_VIDEO_DIVX3; 39 extern const char *MEDIA_MIMETYPE_VIDEO_XVID; 40 extern const char *MEDIA_MIMETYPE_VIDEO_MJPEG; 41 42 extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB; 43 extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; 44 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III 45 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_I; 46 extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_II; 47 extern const char *MEDIA_MIMETYPE_AUDIO_MIDI; 48 extern const char *MEDIA_MIMETYPE_AUDIO_AAC; 49 extern const char *MEDIA_MIMETYPE_AUDIO_QCELP; 50 extern const char *MEDIA_MIMETYPE_AUDIO_VORBIS; 51 extern const char *MEDIA_MIMETYPE_AUDIO_OPUS; 52 extern const char *MEDIA_MIMETYPE_AUDIO_G711_ALAW; 53 extern const char *MEDIA_MIMETYPE_AUDIO_G711_MLAW; 54 extern const char *MEDIA_MIMETYPE_AUDIO_RAW; 55 extern const char *MEDIA_MIMETYPE_AUDIO_FLAC; 56 extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS; 57 extern const char *MEDIA_MIMETYPE_AUDIO_MSGSM; 58 extern const char *MEDIA_MIMETYPE_AUDIO_AC3; 59 extern const char *MEDIA_MIMETYPE_AUDIO_EAC3; 60 extern const char *MEDIA_MIMETYPE_AUDIO_EAC3_JOC; 61 extern const char *MEDIA_MIMETYPE_AUDIO_AC4; 62 extern const char *MEDIA_MIMETYPE_AUDIO_SCRAMBLED; 63 extern const char *MEDIA_MIMETYPE_AUDIO_ALAC; 64 extern const char *MEDIA_MIMETYPE_AUDIO_WMA; 65 extern const char *MEDIA_MIMETYPE_AUDIO_MS_ADPCM; 66 extern const char *MEDIA_MIMETYPE_AUDIO_DVI_IMA_ADPCM; 67 68 69 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4; 70 extern const char *MEDIA_MIMETYPE_CONTAINER_WAV; 71 extern const char *MEDIA_MIMETYPE_CONTAINER_OGG; 72 extern const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA; 73 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS; 74 extern const char *MEDIA_MIMETYPE_CONTAINER_AVI; 75 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2PS; 76 extern const char *MEDIA_MIMETYPE_CONTAINER_HEIF; 77 78 extern const char *MEDIA_MIMETYPE_TEXT_3GPP; 79 extern const char *MEDIA_MIMETYPE_TEXT_SUBRIP; 80 extern const char *MEDIA_MIMETYPE_TEXT_VTT; 81 extern const char *MEDIA_MIMETYPE_TEXT_CEA_608; 82 extern const char *MEDIA_MIMETYPE_TEXT_CEA_708; 83 extern const char *MEDIA_MIMETYPE_DATA_TIMED_ID3; 84 85 // These are values exported to JAVA API that need to be in sync with 86 // frameworks/base/media/java/android/media/AudioFormat.java. Unfortunately, 87 // they are not defined in frameworks/av, so defining them here. 88 enum AudioEncoding { 89 kAudioEncodingPcm16bit = 2, 90 kAudioEncodingPcm8bit = 3, 91 kAudioEncodingPcmFloat = 4, 92 }; 93 94 } // namespace android 95 96 #endif // MEDIA_DEFS_H_ 97