1/* 2 * Copyright (c) 2021-2021 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 HISTREAMER_FOUNDATION_CONSTANTS_H 17#define HISTREAMER_FOUNDATION_CONSTANTS_H 18 19#include <string> 20 21namespace OHOS { 22namespace Media { 23constexpr size_t DEFAULT_QUEUE_SIZE = 10; 24constexpr int DEFAULT_FRAME_SIZE = 2 * 1024; // 2kb 25constexpr size_t DEFAULT_POOL_SIZE = 10; 26constexpr uint32_t MAX_PORT_NUMBER = 1; // max in/out port in filter 27constexpr uint32_t MAX_ROUTE_NUMBER = 1; // max route in filter 28extern const char* const PORT_NAME_DEFAULT; 29 30// audio mime 31extern const char* const MEDIA_MIME_AUDIO_MPEG; 32extern const char* const MEDIA_MIME_AUDIO_FLAC; 33extern const char* const MEDIA_MIME_AUDIO_RAW; 34extern const char* const MEDIA_MIME_AUDIO_APE; 35extern const char* const MEDIA_MIME_AUDIO_WAV; 36extern const char* const MEDIA_MIME_AUDIO_AAC; 37extern const char* const MEDIA_MIME_AUDIO_AAC_ADTS; 38extern const char* const MEDIA_MIME_AUDIO_AAC_LATM; 39extern const char* const MEDIA_MIME_AUDIO_VORBIS; 40extern const char* const MEDIA_MIME_AUDIO_OPUS; 41extern const char* const MEDIA_MIME_AUDIO_AC3; 42extern const char* const MEDIA_MIME_AUDIO_EAC3; 43extern const char* const MEDIA_MIME_AUDIO_EAC3_JOC; 44extern const char* const MEDIA_MIME_AUDIO_AC4; 45extern const char* const MEDIA_MIME_AUDIO_WMA; 46extern const char* const MEDIA_MIME_AUDIO_AMR_NB; 47extern const char* const MEDIA_MIME_AUDIO_AMR_WB; 48extern const char* const MEDIA_MIME_AUDIO_AVS3DA; 49 50// video mime 51extern const char* const MEDIA_MIME_VIDEO_RAW; 52extern const char* const MEDIA_MIME_VIDEO_H264; 53extern const char* const MEDIA_MIME_VIDEO_H265; 54extern const char* const MEDIA_MIME_VIDEO_MPEG4; 55 56// container mime 57extern const char* const MEDIA_MIME_CONTAINER_MP4; 58 59bool IsAudioMime(const std::string& mime); 60bool IsVideoMime(const std::string& mime); 61bool IsRawAudio(const std::string& mime); 62} // namespace Media 63} // namespace OHOS 64#endif // HISTREAMER_FOUNDATION_CONSTANTS_H 65