# Copyright (c) 2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/multimedia/player_framework/config.gni") module_output_path = "player_framework/player_framework/native_avtranscoder" ohos_unittest("native_avtranscoder_unit_test") { module_out_path = module_output_path include_dirs = [ "./include", "./mock", "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c", "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common", ] sanitize = { cfi = true cfi_cross_dso = true debug = false } cflags = [ "-Wall", "-Werror", ] sources = [ "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/common/media_errors.cpp", "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/avtranscoder/native_avtranscoder.cpp", "src/avtranscoder_unit_test.cpp", "mock/avtranscoder_mock.cpp", ] deps = [] external_deps = [ "audio_framework:audio_capturer", "av_codec:av_codec_client", "c_utils:utils", "graphic_surface:surface", "hilog:libhilog", "hisysevent:libhisysevent", "media_foundation:media_foundation", "samgr:samgr_proxy", "window_manager:libdm", "hitrace:libhitracechain", ] resource_config_file = "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml" }