1# Copyright (C) 2022-2022 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 player_framework_support_player = true 16 player_framework_support_recorder = true 17 player_framework_support_transcoder = true 18 player_framework_support_player_js_api9 = true 19 player_framework_support_recorder_js_api9 = true 20 player_framework_support_metadata = true 21 player_framework_support_histreamer = true 22 player_framework_support_video = true 23 player_framework_support_jsapi = true 24 player_framework_support_capi = true 25 player_framework_support_test = true 26 player_framework_support_xcollie = true 27 player_framework_support_jsstack = true 28 player_framework_support_seccomp = false 29 player_framework_support_screen_capture = true 30 player_framework_support_screen_capture_stopbycall = false 31 player_framework_support_screen_capture_controller = false 32 player_framework_feature_pc_select_window = false 33 player_framework_support_jssoundpool = true 34 player_framework_support_mediasource = true 35 player_framework_support_auto_create_file = false 36 player_framework_check_video_is_hdr_vivid = false 37 player_framework_enable_start_stop_on_demand = false 38 if (defined(build_seccomp) && build_seccomp) { 39 player_framework_support_seccomp = true 40 } 41 if (defined(global_parts_info) && 42 defined(global_parts_info.telephony_core_service)) { 43 player_framework_support_screen_capture_stopbycall = true 44 } 45 if (defined(global_parts_info) && 46 defined(global_parts_info.multimedia_camera_framework) && 47 defined(global_parts_info.multimedia_media_library)) { 48 player_framework_support_auto_create_file = true 49 } 50 player_framework_support_monitor = true 51 use_memmgr_plugin = false 52 if (defined(global_parts_info) && 53 defined(global_parts_info.resourceschedule_memmgr_override)) { 54 use_memmgr_plugin = true 55 } 56 use_memmgr = false 57 if (defined(global_parts_info) && 58 defined(global_parts_info.resourceschedule_memmgr)) { 59 use_memmgr = true 60 } 61 player_framework_support_avsession_background = false 62 if (defined(global_parts_info) && 63 defined(global_parts_info.multimedia_av_session)) { 64 player_framework_support_avsession_background = true 65 } 66 player_framework_support_drm = false 67 if (defined(global_parts_info) && 68 defined(global_parts_info.multimedia_drm_framework)) { 69 player_framework_support_drm = true 70 } 71 player_framework_support_vibrator = false 72 if (defined(global_parts_info) && 73 defined(global_parts_info.sensors_miscdevice)) { 74 player_framework_support_vibrator = true 75 } 76 player_framework_support_power_manager = false 77 if (defined(global_parts_info) && 78 defined(global_parts_info.powermgr_power_manager)) { 79 player_framework_support_power_manager = true 80 } 81 player_framework_support_json = false 82 if (defined(global_parts_info) && 83 defined(global_parts_info.third_party_json)) { 84 player_framework_support_json = true 85 } 86 player_framework_support_efficiency_manager = false 87 if (defined(global_parts_info) && 88 defined(global_parts_info.resourceschedule_efficiency_manager)) { 89 player_framework_support_efficiency_manager = true 90 } 91} 92 93player_framework_defines = [] 94 95if (player_framework_support_player) { 96 player_framework_defines += [ "SUPPORT_PLAYER" ] 97} else { 98 player_framework_defines += [ "UNSUPPORT_PLAYER" ] 99} 100 101if (player_framework_support_player_js_api9) { 102 player_framework_defines += [ "SUPPORT_PLAYER_API9" ] 103} 104 105if (player_framework_support_avsession_background) { 106 player_framework_defines += [ "SUPPORT_AVSESSION" ] 107} 108 109if (player_framework_support_recorder_js_api9) { 110 player_framework_defines += [ "SUPPORT_RECORDER_API9" ] 111} 112 113if (player_framework_support_recorder) { 114 player_framework_defines += [ "SUPPORT_RECORDER" ] 115} else { 116 player_framework_defines += [ "UNSUPPORT_RECORDER" ] 117} 118 119if (player_framework_support_transcoder) { 120 player_framework_defines += [ "SUPPORT_TRANSCODER" ] 121} else { 122 player_framework_defines += [ "UNSUPPORT_TRANSCODER" ] 123} 124 125if (player_framework_support_metadata) { 126 player_framework_defines += [ "SUPPORT_METADATA" ] 127} else { 128 player_framework_defines += [ "UNSUPPORT_METADATA" ] 129} 130 131if (player_framework_support_video) { 132 player_framework_defines += [ "SUPPORT_VIDEO" ] 133} else { 134 player_framework_defines += [ "SUPPORT_AUDIO_ONLY" ] 135} 136 137if (player_framework_support_xcollie) { 138 player_framework_defines += [ "HICOLLIE_ENABLE" ] 139} 140 141if (player_framework_support_jsstack) { 142 player_framework_defines += [ "SUPPORT_JSSTACK" ] 143} 144 145if (use_memmgr_plugin || use_memmgr) { 146 player_framework_defines += [ "PLAYER_USE_MEMORY_MANAGE" ] 147} 148 149if (player_framework_support_monitor) { 150 player_framework_defines += [ "USE_MONITOR" ] 151} 152 153if (player_framework_support_screen_capture) { 154 player_framework_defines += [ "SUPPORT_SCREEN_CAPTURE" ] 155} else { 156 player_framework_defines += [ "UNSUPPORT_SCREEN_CAPTURE" ] 157} 158 159if (player_framework_support_screen_capture_controller) { 160 player_framework_defines += [ "SUPPORT_SCREEN_CAPTURE_WINDOW_NOTIFICATION" ] 161} 162 163if (player_framework_support_jssoundpool) { 164 player_framework_defines += [ "SUPPORT_SOUND_POOL" ] 165} else { 166 player_framework_defines += [ "UNSUPPORT_SOUND_POOL" ] 167} 168 169if (player_framework_support_drm) { 170 player_framework_defines += [ "SUPPORT_AVPLAYER_DRM" ] 171} else { 172 player_framework_defines += [ "UNSUPPORT_AVPLAYER_DRM" ] 173} 174 175if (player_framework_support_vibrator) { 176 player_framework_defines += [ "SUPPORT_VIBRATOR" ] 177} else { 178 player_framework_defines += [ "UNSUPPORT_VIBRATOR" ] 179} 180 181if (player_framework_support_power_manager) { 182 player_framework_defines += [ "SUPPORT_POWER_MANAGER" ] 183} 184 185if (player_framework_support_efficiency_manager) { 186 player_framework_defines += [ "USE_EFFICIENCY_MANAGER" ] 187} 188 189if (player_framework_support_mediasource) { 190 player_framework_defines += [ "SUPPORT_MEDIA_SOURCE" ] 191} 192 193if (player_framework_support_auto_create_file) { 194 player_framework_defines += [ "SUPPORT_RECORDER_CREATE_FILE" ] 195} 196 197if (player_framework_support_json) { 198 player_framework_defines += [ "SUPPORT_JSON" ] 199} 200 201if (player_framework_enable_start_stop_on_demand) { 202 player_framework_defines += [ "SUPPORT_START_STOP_ON_DEMAND" ] 203} 204 205if (player_framework_support_screen_capture_stopbycall) { 206 player_framework_defines += [ "SUPPORT_CALL" ] 207} 208 209# Config path 210MEDIA_PLAYER_ROOT_DIR = "//foundation/multimedia/player_framework" 211MEDIA_PLAYER_AVCODEC = "//foundation/multimedia/av_codec" 212MEDIA_PLAYER_HISTREAMER = "//foundation/multimedia/media_foundation" 213 214MEDIA_PLAYER_C_UTILS = "//commonlibrary/c_utils" 215MEDIA_PLAYER_GRAPHIC = "//foundation/graphic/graphic_2d" 216MEDIA_PLAYER_GRAPHIC_SURFACE = "//foundation/graphic/graphic_surface" 217MEDIA_DRM_ROOT_DIR = "//foundation/multimedia/drm_framework" 218 219# Fuzz test output path. 220MODULE_OUTPUT_PATH = "player_framework/player_framework" 221