1049e185fSopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd.
2049e185fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3049e185fSopenharmony_ci# you may not use this file except in compliance with the License.
4049e185fSopenharmony_ci# You may obtain a copy of the License at
5049e185fSopenharmony_ci#
6049e185fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7049e185fSopenharmony_ci#
8049e185fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9049e185fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10049e185fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11049e185fSopenharmony_ci# See the License for the specific language governing permissions and
12049e185fSopenharmony_ci# limitations under the License.
13049e185fSopenharmony_ci
14049e185fSopenharmony_ciimport("//build/test.gni")
15049e185fSopenharmony_ciimport("//foundation/multimedia/player_framework/config.gni")
16049e185fSopenharmony_ci
17049e185fSopenharmony_ciohos_unittest("avmetadatahelper_unit_test") {
18049e185fSopenharmony_ci  module_out_path = "player_framework/avmetadatahelper"
19049e185fSopenharmony_ci
20049e185fSopenharmony_ci  cflags = [
21049e185fSopenharmony_ci    "-O2",
22049e185fSopenharmony_ci    "-fPIC",
23049e185fSopenharmony_ci    "-Wall",
24049e185fSopenharmony_ci    "-fexceptions",
25049e185fSopenharmony_ci    "-fno-rtti",
26049e185fSopenharmony_ci    "-Wno-unused-but-set-variable",
27049e185fSopenharmony_ci    "-Wno-format",
28049e185fSopenharmony_ci    "-Dprivate=public",
29049e185fSopenharmony_ci    "-Dprotected=public",
30049e185fSopenharmony_ci  ]
31049e185fSopenharmony_ci
32049e185fSopenharmony_ci  include_dirs = [
33049e185fSopenharmony_ci    "sa_media/ipc",
34049e185fSopenharmony_ci    "sa_media/server",
35049e185fSopenharmony_ci    "common",
36049e185fSopenharmony_ci    "player/ipc",
37049e185fSopenharmony_ci    "player/player_mem_manage",
38049e185fSopenharmony_ci    "player/server",
39049e185fSopenharmony_ci    "player/subscriber",
40049e185fSopenharmony_ci    "media_data_source/ipc",
41049e185fSopenharmony_ci    "media_data_source/server",
42049e185fSopenharmony_ci    "monitor/client",
43049e185fSopenharmony_ci    "monitor/ipc",
44049e185fSopenharmony_ci    "monitor/server",
45049e185fSopenharmony_ci    "recorder/ipc",
46049e185fSopenharmony_ci    "recorder/server",
47049e185fSopenharmony_ci    "avmetadatahelper/ipc",
48049e185fSopenharmony_ci    "avmetadatahelper/server",
49049e185fSopenharmony_ci    "avcodec/ipc",
50049e185fSopenharmony_ci    "avcodec/server",
51049e185fSopenharmony_ci    "avcodeclist/ipc",
52049e185fSopenharmony_ci    "avcodeclist/server",
53049e185fSopenharmony_ci    "recorder_profiles/ipc",
54049e185fSopenharmony_ci    "recorder_profiles/server",
55049e185fSopenharmony_ci    "screen_capture/server",
56049e185fSopenharmony_ci    "screen_capture/ipc",
57049e185fSopenharmony_ci    "screen_capture_monitor/server",
58049e185fSopenharmony_ci    "screen_capture_monitor/ipc",
59049e185fSopenharmony_ci    "transcoder/server",
60049e185fSopenharmony_ci    "transcoder/ipc",
61049e185fSopenharmony_ci    "observer",
62049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/avmetadatahelper",
63049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/include",
64049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/factory",
65049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
66049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
67049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
68049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/common",
69049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/common/recorder_profiles",
70049e185fSopenharmony_ci    "./../../../../../../drivers/peripheral/display/interfaces/include",
71049e185fSopenharmony_ci    "./../../../../image_framework/interfaces/innerkits/include",
72049e185fSopenharmony_ci    "./../../../../../window/window_manager/interfaces/innerkits/wm",
73049e185fSopenharmony_ci    "./../../../../player_framework/frameworks/native/player",
74049e185fSopenharmony_ci    "./../../../../player_framework/test/unittest/common/include",
75049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server",
76049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper",
77049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils",
78049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/include",
79049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
80049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
81049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
82049e185fSopenharmony_ci  ]
83049e185fSopenharmony_ci
84049e185fSopenharmony_ci  if (player_framework_support_avsession_background) {
85049e185fSopenharmony_ci    include_dirs += [ "player/avsession_background" ]
86049e185fSopenharmony_ci  }
87049e185fSopenharmony_ci
88049e185fSopenharmony_ci  defines = []
89049e185fSopenharmony_ci  defines += player_framework_defines
90049e185fSopenharmony_ci
91049e185fSopenharmony_ci  if (target_cpu == "arm") {
92049e185fSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
93049e185fSopenharmony_ci  }
94049e185fSopenharmony_ci
95049e185fSopenharmony_ci  sources = [
96049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/avmetadatahelper/server/avmetadatahelper_server.cpp",
97049e185fSopenharmony_ci    "./../../../../player_framework/services/services/factory/engine_factory_repo.cpp",
98049e185fSopenharmony_ci    "av_thumbnail_generator_unit_test.cpp",
99049e185fSopenharmony_ci    "avmetadatahelper_server_unit_test.cpp",
100049e185fSopenharmony_ci  ]
101049e185fSopenharmony_ci
102049e185fSopenharmony_ci  deps = [
103049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client",
104049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx",
105049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx",
106049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
107049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
108049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper:media_engine_histreamer_avmetadatahelper",
109049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
110049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
111049e185fSopenharmony_ci    "./../../../../../graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
112049e185fSopenharmony_ci    "./../../../../../window/window_manager/wm:libwm",
113049e185fSopenharmony_ci    "./../../../../image_framework/interfaces/innerkits:image_native",
114049e185fSopenharmony_ci  ]
115049e185fSopenharmony_ci
116049e185fSopenharmony_ci  external_deps = [
117049e185fSopenharmony_ci    "ability_runtime:ability_connect_callback_stub",
118049e185fSopenharmony_ci    "access_token:libaccesstoken_sdk",
119049e185fSopenharmony_ci    "audio_framework:audio_client",
120049e185fSopenharmony_ci    "av_codec:av_codec_client",
121049e185fSopenharmony_ci    "av_codec:av_codec_media_engine_filters",
122049e185fSopenharmony_ci    "av_codec:av_codec_media_engine_modules",
123049e185fSopenharmony_ci    "c_utils:utils",
124049e185fSopenharmony_ci    "call_manager:tel_call_manager_api",
125049e185fSopenharmony_ci    "common_event_service:cesfwk_innerkits",
126049e185fSopenharmony_ci    "core_service:tel_core_service_api",
127049e185fSopenharmony_ci    "drivers_interface_camera:metadata",
128049e185fSopenharmony_ci    "drivers_interface_display:display_commontype_idl_headers",
129049e185fSopenharmony_ci    "graphic_2d:librender_service_base",
130049e185fSopenharmony_ci    "graphic_surface:surface",
131049e185fSopenharmony_ci    "graphic_surface:sync_fence",
132049e185fSopenharmony_ci    "hdf_core:libhdi",
133049e185fSopenharmony_ci    "hicollie:libhicollie",
134049e185fSopenharmony_ci    "hilog:libhilog",
135049e185fSopenharmony_ci    "hisysevent:libhisysevent",
136049e185fSopenharmony_ci    "hitrace:hitrace_meter",
137049e185fSopenharmony_ci    "hitrace:libhitracechain",
138049e185fSopenharmony_ci    "i18n:intl_util",
139049e185fSopenharmony_ci    "image_framework:image_native",
140049e185fSopenharmony_ci    "image_framework:image_native",
141049e185fSopenharmony_ci    "init:libbegetutil",
142049e185fSopenharmony_ci    "ipc:ipc_single",
143049e185fSopenharmony_ci    "libxml2:libxml2",
144049e185fSopenharmony_ci    "media_foundation:media_foundation",
145049e185fSopenharmony_ci    "memmgr:memmgrclient",
146049e185fSopenharmony_ci    "napi:ace_napi",
147049e185fSopenharmony_ci    "os_account:os_account_innerkits",
148049e185fSopenharmony_ci    "qos_manager:concurrent_task_client",
149049e185fSopenharmony_ci    "qos_manager:qos",
150049e185fSopenharmony_ci    "resource_schedule_service:ressched_client",
151049e185fSopenharmony_ci    "safwk:system_ability_fwk",
152049e185fSopenharmony_ci    "samgr:samgr_proxy",
153049e185fSopenharmony_ci    "state_registry:tel_state_registry_api",
154049e185fSopenharmony_ci  ]
155049e185fSopenharmony_ci
156049e185fSopenharmony_ci  if (player_framework_support_video) {
157049e185fSopenharmony_ci    external_deps += [ "graphic_surface:surface" ]
158049e185fSopenharmony_ci  }
159049e185fSopenharmony_ci
160049e185fSopenharmony_ci  if (player_framework_support_screen_capture) {
161049e185fSopenharmony_ci    external_deps += [
162049e185fSopenharmony_ci      "ability_base:base",
163049e185fSopenharmony_ci      "ability_base:want",
164049e185fSopenharmony_ci      "ability_base:zuri",
165049e185fSopenharmony_ci      "ability_runtime:ability_context_native",
166049e185fSopenharmony_ci      "ability_runtime:abilitykit_native",
167049e185fSopenharmony_ci      "ability_runtime:extension_manager",
168049e185fSopenharmony_ci      "ability_runtime:runtime",
169049e185fSopenharmony_ci      "access_token:libnativetoken_shared",
170049e185fSopenharmony_ci      "access_token:libprivacy_sdk",
171049e185fSopenharmony_ci      "access_token:libtokensetproc_shared",
172049e185fSopenharmony_ci      "audio_framework:audio_capturer",
173049e185fSopenharmony_ci      "audio_framework:audio_client",
174049e185fSopenharmony_ci      "distributed_notification_service:ans_innerkits",
175049e185fSopenharmony_ci      "graphic_surface:sync_fence",
176049e185fSopenharmony_ci      "relational_store:native_rdb",
177049e185fSopenharmony_ci      "window_manager:libdm",
178049e185fSopenharmony_ci    ]
179049e185fSopenharmony_ci  }
180049e185fSopenharmony_ci
181049e185fSopenharmony_ci  if (player_framework_support_auto_create_file) {
182049e185fSopenharmony_ci    external_deps += [
183049e185fSopenharmony_ci      "camera_framework:camera_framework",
184049e185fSopenharmony_ci      "data_share:datashare_common",
185049e185fSopenharmony_ci      "data_share:datashare_consumer",
186049e185fSopenharmony_ci      "media_library:media_library",
187049e185fSopenharmony_ci      "media_library:media_library_manager",
188049e185fSopenharmony_ci      "samgr:samgr_proxy",
189049e185fSopenharmony_ci    ]
190049e185fSopenharmony_ci  }
191049e185fSopenharmony_ci
192049e185fSopenharmony_ci  if (use_memmgr_plugin) {
193049e185fSopenharmony_ci    external_deps += [ "memmgr_override:memmgrclient" ]
194049e185fSopenharmony_ci  } else if (use_memmgr) {
195049e185fSopenharmony_ci    external_deps += [ "memmgr:memmgrclient" ]
196049e185fSopenharmony_ci  }
197049e185fSopenharmony_ci
198049e185fSopenharmony_ci  if (player_framework_support_drm) {
199049e185fSopenharmony_ci    external_deps += [ "drm_framework:drm_framework" ]
200049e185fSopenharmony_ci  }
201049e185fSopenharmony_ci
202049e185fSopenharmony_ci  if (player_framework_support_power_manager) {
203049e185fSopenharmony_ci    external_deps += [ "power_manager:powermgr_client" ]
204049e185fSopenharmony_ci  }
205049e185fSopenharmony_ci
206049e185fSopenharmony_ci  subsystem_name = "multimedia"
207049e185fSopenharmony_ci  part_name = "player_framework"
208049e185fSopenharmony_ci}
209