• 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
19config("screen_capture_impl_unittest_config") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-O2",
24    "-fPIC",
25    "-Wall",
26    "-fexceptions",
27    "-fno-rtti",
28    "-Wno-unused-but-set-variable",
29    "-Wno-format",
30    "-Dprivate=public",
31    "-Dprotected=public",
32  ]
33  cflags_cc = cflags
34  include_dirs = [
35    "./",
36    "./mock",
37    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/screen_capture",
38    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/player",
39    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
40    "$MEDIA_PLAYER_ROOT_DIR/services/include",
41    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
42    "$MEDIA_PLAYER_ROOT_DIR/services/services/monitor/ipc",
43    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/client",
44    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/ipc",
45    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/server",
46    "$MEDIA_PLAYER_ROOT_DIR/services/services/sa_media/client",
47    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
48  ]
49  defines = []
50
51  defines += player_framework_defines
52}
53
54ohos_unittest("screen_capture_impl_unittest") {
55  module_out_path = module_output_path
56  stack_protector_ret = true
57
58  sources = [
59    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/screen_capture/screen_capture_impl.cpp",
60    "./mock/media_local.cpp",
61    "./screen_capture_impl_unittest.cpp",
62  ]
63
64  configs = [
65    ":screen_capture_impl_unittest_config",
66  ]
67
68  sanitize = {
69    integer_overflow = true
70    ubsan = true
71    boundary_sanitize = true
72    cfi = true
73    cfi_cross_dso = true
74    debug = false
75  }
76
77  external_deps = [
78    "access_token:libaccesstoken_sdk",
79    "access_token:libprivacy_sdk",
80    "audio_framework:audio_client",
81    "audio_framework:audio_renderer",
82    "av_codec:av_codec_client",
83    "c_utils:utils",
84    "googletest:gmock",
85    "graphic_surface:surface",
86    "graphic_surface:sync_fence",
87    "hiappevent:hiappevent_innerapi",
88    "hicollie:libhicollie",
89    "hilog:libhilog",
90    "hisysevent:libhisysevent",
91    "hitrace:hitrace_meter",
92    "hitrace:libhitracechain",
93    "image_framework:image_native",
94    "init:libbegetutil",
95    "ipc:ipc_single",
96    "libxml2:libxml2",
97    "media_foundation:media_foundation",
98    "os_account:os_account_innerkits",
99    "qos_manager:qos",
100    "safwk:system_ability_fwk",
101    "samgr:samgr_proxy",
102  ]
103
104  if (player_framework_support_drm) {
105    external_deps += [ "drm_framework:drm_framework" ]
106  }
107
108  deps = [
109    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
110    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
111  ]
112
113}