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_avmetadata" 18 19ohos_unittest("native_avimagegenerator_unit_test") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "../../../common", 23 "./include", 24 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 25 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 26 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/player", 27 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 28 "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c", 29 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/avmetadatahelper", 30 "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common", 31 ] 32 33 sanitize = { 34 cfi = true 35 cfi_cross_dso = true 36 debug = false 37 } 38 39 cflags = [ 40 "-Wall", 41 "-Werror", 42 ] 43 44 if (player_framework_support_metadata) { 45 sources = [ "src/avimagegenerator_unit_test.cpp" ] 46 } 47 public_deps = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c:avimage_generator" ] 48 49 external_deps = [ 50 "audio_framework:audio_capturer", 51 "audio_framework:audio_client", 52 "av_codec:av_codec_client", 53 "c_utils:utils", 54 "graphic_surface:surface", 55 "graphic_surface:sync_fence", 56 "hilog:libhilog", 57 "hisysevent:libhisysevent", 58 "image_framework:ohimage", 59 "image_framework:pixelmap", 60 "image_framework:pixelmap", 61 "init:libbegetutil", 62 "ipc:ipc_core", 63 "media_foundation:media_foundation", 64 "media_foundation:native_media_core", 65 "qos_manager:qos", 66 "samgr:samgr_proxy", 67 "window_manager:libdm", 68 ] 69 70 resource_config_file = 71 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml" 72} 73