• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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
17module_output_path = "player_framework/player_framework/player"
18
19ohos_unittest("audio_background_adapter_unit_test") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "./",
23    "$MEDIA_PLAYER_ROOT_DIR/frameworks/js/avplayer",
24    "$MEDIA_PLAYER_ROOT_DIR/frameworks/js/common",
25    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
26    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player",
27    "$MEDIA_PLAYER_ROOT_DIR/services/include",
28    "$MEDIA_PLAYER_ROOT_DIR/services/services/common",
29    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
30    "$MEDIA_PLAYER_ROOT_DIR/services/services/media_data_source/ipc",
31    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/audio_background_adapter",
32    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/client",
33    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/ipc",
34    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/player_mem_manage",
35    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/server/",
36    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/subscriber",
37  ]
38
39  cflags = [
40    "-Wall",
41    "-Werror",
42    "-Dprivate=public",
43    "-Dprotected=public",
44  ]
45  sanitize = {
46    cfi = true
47    cfi_cross_dso = true
48  }
49
50  external_deps = [
51    "access_token:libaccesstoken_sdk",
52    "access_token:libnativetoken_shared",
53    "access_token:libprivacy_sdk",
54    "access_token:libtokensetproc_shared",
55    "audio_framework:audio_client",
56    "av_codec:av_codec_client",
57    "common_event_service:cesfwk_innerkits",
58    "c_utils:utils",
59    "common_event_service:cesfwk_innerkits",
60    "hdf_core:libhdi",
61    "hicollie:libhicollie",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65    "hitrace:libhitracechain",
66    "init:libbegetutil",
67    "ipc:ipc_single",
68    "media_foundation:media_foundation",
69    "memmgr:memmgrclient",
70    "napi:ace_napi",
71    "os_account:os_account_innerkits",
72    "qos_manager:concurrent_task_client",
73    "qos_manager:qos",
74    "resource_schedule_service:ressched_client",
75    "safwk:system_ability_fwk",
76  ]
77
78  if (player_framework_support_drm) {
79    external_deps += [ "drm_framework:drm_framework" ]
80  }
81
82  sources = [
83    "audio_background_adapter_unit_test.cpp",
84  ]
85
86  deps = [
87    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client",
88    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player:media_engine_histreamer_player",
89    "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service",
90    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
91  ]
92
93  resource_config_file =
94      "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml"
95}
96