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("avmetadata_helper_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 "./mock", 34 "sa_media/ipc", 35 "sa_media/server", 36 "sa_media/server_manager", 37 "common", 38 "player/ipc", 39 "player/player_mem_manage", 40 "player/server", 41 "player/subscriber", 42 "media_data_source/ipc", 43 "media_data_source/server", 44 "monitor/client", 45 "monitor/ipc", 46 "monitor/server", 47 "recorder/ipc", 48 "recorder/server", 49 "avmetadatahelper/ipc", 50 "avmetadatahelper/server", 51 "avcodec/ipc", 52 "avcodec/server", 53 "avcodeclist/ipc", 54 "avcodeclist/server", 55 "recorder_profiles/ipc", 56 "recorder_profiles/server", 57 "screen_capture/server", 58 "screen_capture/ipc", 59 "screen_capture_monitor/server", 60 "screen_capture_monitor/ipc", 61 "transcoder/server", 62 "transcoder/ipc", 63 "observer", 64 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/avmetadatahelper", 65 "$MEDIA_PLAYER_ROOT_DIR/services/include", 66 "$MEDIA_PLAYER_ROOT_DIR/services/services/factory", 67 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 68 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 69 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 70 "$MEDIA_PLAYER_ROOT_DIR/services/services/common", 71 "$MEDIA_PLAYER_ROOT_DIR/services/engine/common/recorder_profiles", 72 "./../../../../player_framework/frameworks/native/player", 73 "./../../../../player_framework/test/unittest/common/include", 74 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server", 75 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper", 76 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils", 77 "$MEDIA_PLAYER_ROOT_DIR/services/include", 78 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 79 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 80 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 81 ] 82 83 if (player_framework_support_avsession_background) { 84 include_dirs += [ "player/avsession_background" ] 85 } 86 87 defines = [] 88 defines += player_framework_defines 89 90 if (target_cpu == "arm") { 91 cflags += [ "-DBINDER_IPC_32BIT" ] 92 } 93 94 sources = [ 95 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper/av_thumbnail_generator.cpp", 96 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper/avmetadata_collector.cpp", 97 "av_thumbnail_generator_unit_test.cpp", 98 "avmetadata_collector_unit_test.cpp", 99 ] 100 101 deps = [ 102 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 103 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 104 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 105 ] 106 107 external_deps = [ 108 "ability_runtime:ability_connect_callback_stub", 109 "access_token:libaccesstoken_sdk", 110 "audio_framework:audio_client", 111 "av_codec:av_codec_client", 112 "c_utils:utils", 113 "call_manager:tel_call_manager_api", 114 "common_event_service:cesfwk_innerkits", 115 "core_service:tel_core_service_api", 116 "drivers_interface_camera:metadata", 117 "drivers_interface_display:display_commontype_idl_headers", 118 "googletest:gmock_main", 119 "graphic_2d:librender_service_base", 120 "graphic_surface:surface", 121 "graphic_surface:sync_fence", 122 "hdf_core:libhdi", 123 "hicollie:libhicollie", 124 "hilog:libhilog", 125 "hisysevent:libhisysevent", 126 "hitrace:hitrace_meter", 127 "hitrace:libhitracechain", 128 "i18n:intl_util", 129 "image_framework:image_native", 130 "image_framework:image_native", 131 "init:libbegetutil", 132 "ipc:ipc_single", 133 "libxml2:libxml2", 134 "media_foundation:media_foundation", 135 "memmgr:memmgrclient", 136 "napi:ace_napi", 137 "os_account:os_account_innerkits", 138 "qos_manager:concurrent_task_client", 139 "qos_manager:qos", 140 "resource_schedule_service:ressched_client", 141 "safwk:system_ability_fwk", 142 "samgr:samgr_proxy", 143 "state_registry:tel_state_registry_api", 144 ] 145 146 subsystem_name = "multimedia" 147 part_name = "player_framework" 148} 149