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("player_mem_manage_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/client", 32 "$MEDIA_PLAYER_ROOT_DIR/services/services/player/ipc", 33 "$MEDIA_PLAYER_ROOT_DIR/services/services/player/player_mem_manage", 34 "$MEDIA_PLAYER_ROOT_DIR/services/services/player/server/", 35 "$MEDIA_PLAYER_ROOT_DIR/services/services/player/subscriber", 36 ] 37 38 cflags = [ 39 "-Wall", 40 "-Werror", 41 "-Dprivate=public", 42 "-Dprotected=public", 43 ] 44 sanitize = { 45 cfi = true 46 cfi_cross_dso = true 47 } 48 49 external_deps = [ 50 "access_token:libaccesstoken_sdk", 51 "access_token:libnativetoken_shared", 52 "access_token:libprivacy_sdk", 53 "access_token:libtokensetproc_shared", 54 "audio_framework:audio_client", 55 "av_codec:av_codec_client", 56 "common_event_service:cesfwk_innerkits", 57 "c_utils:utils", 58 "common_event_service:cesfwk_innerkits", 59 "hdf_core:libhdi", 60 "hicollie:libhicollie", 61 "hilog:libhilog", 62 "hisysevent:libhisysevent", 63 "hitrace:hitrace_meter", 64 "hitrace:libhitracechain", 65 "init:libbegetutil", 66 "ipc:ipc_single", 67 "media_foundation:media_foundation", 68 "memmgr:memmgrclient", 69 "napi:ace_napi", 70 "os_account:os_account_innerkits", 71 "qos_manager:concurrent_task_client", 72 "qos_manager:qos", 73 "resource_schedule_service:ressched_client", 74 "safwk:system_ability_fwk", 75 ] 76 77 if (player_framework_support_drm) { 78 external_deps += [ "drm_framework:drm_framework" ] 79 } 80 81 sources = [ 82 "$MEDIA_PLAYER_ROOT_DIR/services/services/player/player_mem_manage/player_server_mem.cpp", 83 "player_mem_manage_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