1# Copyright (C) 2023-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14declare_args() { 15 av_codec_support_capi = true 16 av_codec_support_codec = true 17 av_codec_client_support_codec = true 18 av_codec_support_codeclist = true 19 av_codec_support_hcodec = true 20 av_codec_support_demuxer = true 21 av_codec_support_source = true 22 av_codec_support_muxer = true 23 av_codec_support_test = true 24 av_codec_support_xcollie = true 25 av_codec_support_bitstream_dump = true 26 av_codec_support_drm = false 27 av_codec_enable_special_codec = false 28 av_codec_support_video_processing_engine = false 29 if (defined(global_parts_info) && 30 defined(global_parts_info.multimedia_video_processing_engine)) { 31 av_codec_support_video_processing_engine = true 32 } 33 av_codec_support_libcurl = true 34 av_codec_support_software_codec = true 35 av_codec_support_fcodec = true 36 av_codec_support_avc_encoder = true 37 av_codec_support_hevc_decoder = true 38 av_codec_enable_start_stop_on_demand = false 39 av_codec_hcodec_enable_qos_the_whole_time = false 40 av_codec_enable_codec_rm = false 41 av_codec_enable_codec_rv = false 42 av_codec_enable_codec_cook = false 43 av_codec_enable_codec_ac3 = false 44 av_codec_support_efficiency_manager = false 45 if (defined(global_parts_info) && 46 defined(global_parts_info.resourceschedule_efficiency_manager)) { 47 av_codec_support_efficiency_manager = true 48 } 49} 50av_codec_sanitize = { 51 boundary_sanitize = true 52 cfi = true 53 cfi_cross_dso = true 54 integer_overflow = true 55 ubsan = true 56 debug = false 57} 58av_codec_test_sanitize = { 59 debug = false 60} 61av_codec_root_dir = "//foundation/multimedia/av_codec" 62media_foundation_root_dir = "//foundation/multimedia/media_foundation" 63audio_framework_root_dir = "//foundation/multimedia/audio_framework" 64graphic_2d_root_dir = "//foundation/graphic/graphic_2d" 65graphic_suface_root_dir = "//foundation/graphic/graphic_surface" 66c_utils_root_dir = "//commonlibrary/c_utils" 67drm_framework_root_dir = "//foundation/multimedia/drm_framework" 68video_processing_engine_root_dir = 69 "//foundation/multimedia/video_processing_engine" 70 71av_codec_defines = [ 72 "HST_ANY_WITH_NO_RTTI", 73 "MEDIA_OHOS", 74] 75 76if (av_codec_support_capi) { 77 av_codec_defines += [ "SUPPORT_CAPI" ] 78} else { 79 av_codec_defines += [ "UNSUPPORT_CAPI" ] 80} 81 82if (av_codec_support_codec) { 83 av_codec_defines += [ "SUPPORT_CODEC" ] 84} else { 85 av_codec_defines += [ "UNSUPPORT_CODEC" ] 86} 87 88if (av_codec_support_codeclist) { 89 av_codec_defines += [ "SUPPORT_CODECLIST" ] 90} else { 91 av_codec_defines += [ "UNSUPPORT_CODECLIST" ] 92} 93 94if (av_codec_support_hcodec) { 95 av_codec_defines += [ "SUPPORT_HCODEC" ] 96} else { 97 av_codec_defines += [ "UNSUPPORT_HCODEC" ] 98} 99 100if (av_codec_support_demuxer) { 101 av_codec_defines += [ "SUPPORT_DEMUXER" ] 102} else { 103 av_codec_defines += [ "UNSUPPORT_DEMUXER" ] 104} 105 106if (av_codec_support_muxer) { 107 av_codec_defines += [ "SUPPORT_MUXER" ] 108} else { 109 av_codec_defines += [ "UNSUPPORT_MUXER" ] 110} 111 112if (av_codec_support_source) { 113 av_codec_defines += [ "SUPPORT_SOURCE" ] 114} else { 115 av_codec_defines += [ "UNSUPPORT_SOURCE" ] 116} 117 118if (av_codec_support_xcollie) { 119 av_codec_defines += [ "HICOLLIE_ENABLE" ] 120} 121 122if (av_codec_support_bitstream_dump) { 123 av_codec_defines += [ "BITSTREAM_DUMP_ENABLE" ] 124} 125 126if (defined(global_parts_info) && 127 defined(global_parts_info.multimedia_drm_framework)) { 128 av_codec_support_drm = true 129} 130 131if (av_codec_support_drm) { 132 av_codec_defines += [ "SUPPORT_DRM" ] 133} else { 134 av_codec_defines += [ "UNSUPPORT_DRM" ] 135} 136 137if (!av_codec_support_software_codec) { 138 av_codec_support_fcodec = false 139 av_codec_support_avc_encoder = false 140 av_codec_support_hevc_decoder = false 141} 142 143if (av_codec_support_efficiency_manager) { 144 av_codec_defines += [ "USE_EFFICIENCY_MANAGER" ] 145} 146 147if (av_codec_enable_codec_rm) { 148 av_codec_defines += [ "SUPPORT_CODEC_RM" ] 149} 150 151if (av_codec_enable_codec_rv) { 152 av_codec_defines += [ "SUPPORT_CODEC_RV" ] 153} 154 155if (av_codec_enable_codec_cook) { 156 av_codec_defines += [ "SUPPORT_CODEC_COOK" ] 157} 158 159if (av_codec_enable_codec_ac3) { 160 av_codec_defines += [ "SUPPORT_CODEC_AC3" ] 161} 162