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/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/audio_background_adapter", 39 "player/ipc", 40 "player/player_mem_manage", 41 "player/server", 42 "player/subscriber", 43 "media_data_source/ipc", 44 "media_data_source/server", 45 "monitor/client", 46 "monitor/ipc", 47 "monitor/server", 48 "recorder/ipc", 49 "recorder/server", 50 "avmetadatahelper/ipc", 51 "avmetadatahelper/server", 52 "avcodec/ipc", 53 "avcodec/server", 54 "avcodeclist/ipc", 55 "avcodeclist/server", 56 "recorder_profiles/ipc", 57 "recorder_profiles/server", 58 "screen_capture/server", 59 "screen_capture/ipc", 60 "screen_capture_monitor/server", 61 "screen_capture_monitor/ipc", 62 "transcoder/server", 63 "transcoder/ipc", 64 "observer", 65 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/avmetadatahelper", 66 "$MEDIA_PLAYER_ROOT_DIR/services/include", 67 "$MEDIA_PLAYER_ROOT_DIR/services/services/factory", 68 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 69 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 70 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 71 "$MEDIA_PLAYER_ROOT_DIR/services/services/common", 72 "$MEDIA_PLAYER_ROOT_DIR/services/engine/common/recorder_profiles", 73 "./../../../../player_framework/frameworks/native/player", 74 "./../../../../player_framework/test/unittest/common/include", 75 "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server", 76 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper", 77 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils", 78 "$MEDIA_PLAYER_ROOT_DIR/services/include", 79 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 80 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 81 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 82 ] 83 84 if (player_framework_support_avsession_background) { 85 include_dirs += [ "player/avsession_background" ] 86 } 87 88 defines = [] 89 defines += player_framework_defines 90 91 if (target_cpu == "arm") { 92 cflags += [ "-DBINDER_IPC_32BIT" ] 93 } 94 95 sources = [ 96 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper/av_thumbnail_generator.cpp", 97 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper/avmetadata_collector.cpp", 98 "av_thumbnail_generator_unit_test.cpp", 99 "avmetadata_collector_unit_test.cpp", 100 ] 101 102 deps = [ 103 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 104 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 105 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 106 ] 107 108 external_deps = [ 109 "ability_runtime:ability_connect_callback_stub", 110 "access_token:libaccesstoken_sdk", 111 "audio_framework:audio_client", 112 "av_codec:av_codec_client", 113 "c_utils:utils", 114 "call_manager:tel_call_manager_api", 115 "common_event_service:cesfwk_innerkits", 116 "core_service:tel_core_service_api", 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 ] 144 145 subsystem_name = "multimedia" 146 part_name = "player_framework" 147} 148