1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef MEDIA_AVCODEC_MIME_TYPE_H 17 #define MEDIA_AVCODEC_MIME_TYPE_H 18 #include <string_view> 19 20 namespace OHOS { 21 namespace MediaAVCodec { 22 /** 23 * @enum Media mime type 24 * 25 * @since 4.0 26 */ 27 class AVCodecMimeType { 28 public: 29 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_AAC = "audio/mp4a-latm"; 30 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_FLAC = "audio/flac"; 31 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_VORBIS = "audio/vorbis"; 32 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_AMRNB = "audio/3gpp"; 33 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_OPUS = "audio/opus"; 34 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_MPEG = "audio/mpeg"; 35 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_AMRWB = "audio/amr-wb"; 36 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_VIVID = "audio/av3a"; 37 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_G711MU = "audio/g711mu"; 38 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_APE = "audio/x-ape"; 39 static constexpr std::string_view MEDIA_MIMETYPE_AUDIO_LBVC = "audio/lbvc"; 40 41 static constexpr std::string_view MEDIA_MIMETYPE_VIDEO_AVC = "video/avc"; 42 static constexpr std::string_view MEDIA_MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es"; 43 static constexpr std::string_view MEDIA_MIMETYPE_VIDEO_HEVC = "video/hevc"; 44 45 static constexpr std::string_view MEDIA_MIMETYPE_IMAGE_JPG = "image/jpeg"; 46 static constexpr std::string_view MEDIA_MIMETYPE_IMAGE_PNG = "image/png"; 47 static constexpr std::string_view MEDIA_MIMETYPE_IMAGE_BMP = "image/bmp"; 48 49 static constexpr std::string_view MEDIA_MIMETYPE_VIDEO_VVC = "video/vvc"; 50 private: 51 AVCodecMimeType() = delete; 52 ~AVCodecMimeType() = delete; 53 }; 54 } // namespace MediaAVCodec 55 } // namespace OHOS 56 #endif // MEDIA_AVCODEC_MIME_TYPE_H