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 = "$MODULE_OUTPUT_PATH/avmetadata" 18 19ohos_unittest("avmetadatahelper_impl_unittest") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "./", 23 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 24 "//foundation/multimedia/player_framework/services/include", 25 "//foundation/multimedia/player_framework/services/services/monitor/ipc", 26 "//foundation/multimedia/player_framework/services/utils/include", 27 "//foundation/multimedia/player_framework/frameworks/native/avmetadatahelper", 28 "//foundation/multimedia/player_framework/frameworks/native/player", 29 "//foundation/multimedia/player_framework/test/unittest/common/include", 30 ] 31 32 cflags = [ 33 "-Wall", 34 "-Werror", 35 "-Wno-deprecated-declarations", 36 "-Dprivate=public", 37 "-Dprotected=public", 38 ] 39 cflags_cc = cflags 40 41 if (player_framework_support_metadata) { 42 sources = [ 43 "//foundation/multimedia/player_framework/frameworks/native/avmetadatahelper/avmetadatahelper_impl.cpp", 44 "avmetadatahelper_impl_unittest.cpp", 45 ] 46 } 47 48 deps = [ 49 "//foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", 50 "//foundation/multimedia/player_framework/services/utils:media_service_utils", 51 ] 52 53 external_deps = [ 54 "audio_framework:audio_client", 55 "av_codec:av_codec_client", 56 "c_utils:utils", 57 "drivers_interface_display:display_commontype_idl_headers", 58 "googletest:gmock", 59 "graphic_2d:librender_service_client", 60 "graphic_surface:surface", 61 "graphic_surface:sync_fence", 62 "hilog:libhilog", 63 "hisysevent:libhisysevent", 64 "image_framework:image_native", 65 "init:libbegetutil", 66 "media_foundation:media_foundation", 67 "qos_manager:qos", 68 "window_manager:libwm", 69 ] 70 71 if (player_framework_support_drm) { 72 external_deps += [ "drm_framework:drm_framework" ] 73 } 74 75 defines = [] 76 if (player_framework_check_video_is_hdr_vivid) { 77 defines += [ "CHECKING_VIDEO_IS_HDR_VIVID" ] 78 } 79 80 subsystem_name = "multimedia" 81 part_name = "player_framework" 82} 83