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/native_avtranscoder" 18 19ohos_unittest("native_avtranscoder_unit_test") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "./include", 23 "./mock", 24 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 25 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 26 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 27 "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c", 28 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common", 29 ] 30 31 sanitize = { 32 cfi = true 33 cfi_cross_dso = true 34 debug = false 35 } 36 37 cflags = [ 38 "-Wall", 39 "-Werror", 40 ] 41 42 sources = [ 43 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/common/media_errors.cpp", 44 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/avtranscoder/native_avtranscoder.cpp", 45 "src/avtranscoder_unit_test.cpp", 46 "mock/avtranscoder_mock.cpp", 47 ] 48 49 deps = [] 50 51 external_deps = [ 52 "audio_framework:audio_capturer", 53 "av_codec:av_codec_client", 54 "c_utils:utils", 55 "graphic_surface:surface", 56 "hilog:libhilog", 57 "hisysevent:libhisysevent", 58 "media_foundation:media_foundation", 59 "samgr:samgr_proxy", 60 "window_manager:libdm", 61 "hitrace:libhitracechain", 62 ] 63 64 resource_config_file = 65 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml" 66 67} 68