1# Copyright (C) 2024 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 14import("//build/test.gni") 15import("//foundation/multimedia/player_framework/config.gni") 16 17ohos_unittest("avmetadatahelper_unit_test") { 18 module_out_path = "player_framework/avmetadatahelper" 19 20 cflags = [ 21 "-O2", 22 "-fPIC", 23 "-Wall", 24 "-fexceptions", 25 "-fno-rtti", 26 "-Wno-unused-but-set-variable", 27 "-Wno-format", 28 "-Dprivate=public", 29 "-Dprotected=public", 30 ] 31 32 include_dirs = [ 33 "sa_media/ipc", 34 "sa_media/server", 35 "sa_media/server_manager", 36 "common", 37 "player/ipc", 38 "player/player_mem_manage", 39 "player/server", 40 "player/subscriber", 41 "media_data_source/ipc", 42 "media_data_source/server", 43 "monitor/client", 44 "monitor/ipc", 45 "monitor/server", 46 "recorder/ipc", 47 "recorder/server", 48 "avmetadatahelper/ipc", 49 "avmetadatahelper/server", 50 "avcodec/ipc", 51 "avcodec/server", 52 "avcodeclist/ipc", 53 "avcodeclist/server", 54 "recorder_profiles/ipc", 55 "recorder_profiles/server", 56 "screen_capture/server", 57 "screen_capture/ipc", 58 "screen_capture_monitor/server", 59 "screen_capture_monitor/ipc", 60 "transcoder/server", 61 "transcoder/ipc", 62 "observer", 63 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/avmetadatahelper", 64 "$MEDIA_PLAYER_ROOT_DIR/services/include", 65 "$MEDIA_PLAYER_ROOT_DIR/services/services/factory", 66 "$MEDIA_PLAYER_ROOT_DIR/services/services/monitor/ipc", 67 "$MEDIA_PLAYER_ROOT_DIR/services/services/sa_media/client", 68 "$MEDIA_PLAYER_ROOT_DIR/services/services/sa_media/ipc", 69 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/ipc", 70 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 71 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 72 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 73 "$MEDIA_PLAYER_ROOT_DIR/services/services/common", 74 "$MEDIA_PLAYER_ROOT_DIR/services/engine/common/recorder_profiles", 75 "./../../../../../../drivers/peripheral/display/interfaces/include", 76 "./../../../../image_framework/interfaces/innerkits/include", 77 "./../../../../../window/window_manager/interfaces/innerkits/wm", 78 "./../../../../player_framework/frameworks/native/player", 79 "./../../../../player_framework/test/unittest/common/include", 80 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server", 81 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper", 82 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils", 83 "$MEDIA_PLAYER_ROOT_DIR/services/include", 84 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 85 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 86 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 87 "$MEDIA_PLAYER_ROOT_DIR/services/services/media_data_source/ipc", 88 "$MEDIA_PLAYER_ROOT_DIR/services/services/monitor/client", 89 "$MEDIA_PLAYER_ROOT_DIR/services/services/monitor/ipc", 90 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/client", 91 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/ipc", 92 "$MEDIA_PLAYER_ROOT_DIR/services/services/common", 93 ] 94 95 if (player_framework_support_avsession_background) { 96 include_dirs += [ "player/avsession_background" ] 97 } 98 99 defines = [] 100 defines += player_framework_defines 101 102 if (player_framework_check_video_is_hdr_vivid) { 103 defines += [ "CHECKING_VIDEO_IS_HDR_VIVID" ] 104 } 105 106 if (target_cpu == "arm") { 107 cflags += [ "-DBINDER_IPC_32BIT" ] 108 } 109 110 sources = [ 111 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server/avmetadatahelper_server.cpp", 112 "./../../../../player_framework/services/services/factory/engine_factory_repo.cpp", 113 "av_thumbnail_generator_unit_test.cpp", 114 "avmetadata_mock.cpp", 115 "avmetadata_unit_test.cpp", 116 "avmetadatahelper_impl_unit_test.cpp", 117 "avmetadatahelper_server_unit_test.cpp", 118 ] 119 120 resource_config_file = 121 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml" 122 123 deps = [ 124 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client", 125 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 126 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 127 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 128 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 129 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper:media_engine_histreamer_avmetadatahelper", 130 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 131 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 132 "./../../../../../graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 133 "./../../../../../window/window_manager/wm:libwm", 134 "./../../../../image_framework/interfaces/innerkits:image_native", 135 ] 136 137 external_deps = [ 138 "ability_runtime:ability_connect_callback_stub", 139 "access_token:libaccesstoken_sdk", 140 "audio_framework:audio_client", 141 "av_codec:av_codec_client", 142 "av_codec:av_codec_media_engine_filters", 143 "av_codec:av_codec_media_engine_modules", 144 "c_utils:utils", 145 "call_manager:tel_call_manager_api", 146 "common_event_service:cesfwk_innerkits", 147 "core_service:tel_core_service_api", 148 "drivers_interface_camera:metadata", 149 "drivers_interface_display:display_commontype_idl_headers", 150 "graphic_2d:librender_service_base", 151 "graphic_surface:surface", 152 "graphic_surface:sync_fence", 153 "hdf_core:libhdi", 154 "hicollie:libhicollie", 155 "hilog:libhilog", 156 "hisysevent:libhisysevent", 157 "hitrace:hitrace_meter", 158 "hitrace:libhitracechain", 159 "i18n:intl_util", 160 "image_framework:image_native", 161 "image_framework:image_native", 162 "init:libbegetutil", 163 "ipc:ipc_single", 164 "libxml2:libxml2", 165 "media_foundation:media_foundation", 166 "memmgr:memmgrclient", 167 "napi:ace_napi", 168 "os_account:os_account_innerkits", 169 "qos_manager:concurrent_task_client", 170 "qos_manager:qos", 171 "resource_schedule_service:ressched_client", 172 "safwk:system_ability_fwk", 173 "samgr:samgr_proxy", 174 "state_registry:tel_state_registry_api", 175 ] 176 177 if (player_framework_support_video) { 178 external_deps += [ "graphic_surface:surface" ] 179 } 180 181 if (player_framework_support_screen_capture) { 182 external_deps += [ 183 "ability_base:base", 184 "ability_base:want", 185 "ability_base:zuri", 186 "ability_runtime:ability_context_native", 187 "ability_runtime:abilitykit_native", 188 "ability_runtime:extension_manager", 189 "ability_runtime:runtime", 190 "access_token:libnativetoken_shared", 191 "access_token:libprivacy_sdk", 192 "access_token:libtokensetproc_shared", 193 "audio_framework:audio_capturer", 194 "audio_framework:audio_client", 195 "distributed_notification_service:ans_innerkits", 196 "graphic_surface:sync_fence", 197 "relational_store:native_rdb", 198 "window_manager:libdm", 199 ] 200 } 201 202 if (player_framework_support_auto_create_file) { 203 external_deps += [ 204 "camera_framework:camera_framework", 205 "data_share:datashare_common", 206 "data_share:datashare_consumer", 207 "media_library:media_library", 208 "media_library:media_library_manager", 209 "samgr:samgr_proxy", 210 ] 211 } 212 213 if (use_memmgr_plugin) { 214 external_deps += [ "memmgr_override:memmgrclient" ] 215 } else if (use_memmgr) { 216 external_deps += [ "memmgr:memmgrclient" ] 217 } 218 219 if (player_framework_support_drm) { 220 external_deps += [ "drm_framework:drm_framework" ] 221 } 222 223 if (player_framework_support_power_manager) { 224 external_deps += [ "power_manager:powermgr_client" ] 225 } 226 227 subsystem_name = "multimedia" 228 part_name = "player_framework" 229} 230