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 17module_output_path = "player_framework/transcoder" 18 19ohos_unittest("transcoder_server_unit_test") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 23 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/transcoder", 24 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 25 "$MEDIA_PLAYER_ROOT_DIR/services/services/transcoder/server", 26 "$MEDIA_PLAYER_ROOT_DIR/services/include", 27 "$MEDIA_PLAYER_ROOT_DIR/services/services/factory", 28 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 29 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 30 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 31 "$MEDIA_PLAYER_ROOT_DIR/services/services/common", 32 ] 33 34 cflags = [ 35 "-Wall", 36 "-Werror", 37 "-Wno-deprecated-declarations", 38 ] 39 40 if (player_framework_support_transcoder) { 41 sources = [ "transcoder_server_unit_test.cpp" ] 42 } 43 44 if (target_cpu == "arm64") { 45 av_codec_path = "\"/system/lib64\"" 46 } else { 47 av_codec_path = "\"/system/lib\"" 48 } 49 defines = [ "AV_CODEC_PATH=${av_codec_path}" ] 50 51 deps = [ 52 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client", 53 "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service", 54 ] 55 56 external_deps = [ 57 "ability_runtime:ability_connect_callback_stub", 58 "access_token:libaccesstoken_sdk", 59 "access_token:libtokenid_sdk", 60 "av_codec:av_codec_client", 61 "c_utils:utils", 62 "hdf_core:libhdi", 63 "hicollie:libhicollie", 64 "hilog:libhilog", 65 "hisysevent:libhisysevent", 66 "hitrace:hitrace_meter", 67 "hitrace:libhitracechain", 68 "i18n:intl_util", 69 "init:libbegetutil", 70 "ipc:ipc_single", 71 "media_foundation:media_foundation", 72 "memmgr:memmgrclient", 73 "napi:ace_napi", 74 "os_account:os_account_innerkits", 75 "qos_manager:qos", 76 "resource_schedule_service:ressched_client", 77 "safwk:system_ability_fwk", 78 "samgr:samgr_proxy", 79 ] 80 81 resource_config_file = 82 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml" 83} 84