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/config/features.gni") 15import("//build/test.gni") 16import("//foundation/multimedia/player_framework/config.gni") 17 18module_output_path = "$MODULE_OUTPUT_PATH/media_player" 19MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" 20 21ohos_fuzztest("LowPowerVideoSinkFuzzTest") { 22 module_out_path = module_output_path 23 fuzz_config_file = 24 "$MEDIA_ROOT_DIR/test/fuzztest/lowpoweravsink_fuzztest/lowpowervideosink_fuzzer" 25 26 defines = [ "IMAGE_COLORSPACE_FLAG" ] 27 defines += player_framework_defines 28 29 include_dirs = [ 30 "./include", 31 "$MEDIA_ROOT_DIR/services/include", 32 "$MEDIA_ROOT_DIR/services/services/common", 33 "$MEDIA_ROOT_DIR/services/services/media_data_source/ipc", 34 "$MEDIA_ROOT_DIR/services/services/lpp_audio_streamer/ipc", 35 "$MEDIA_ROOT_DIR/services/services/lpp_video_streamer/ipc", 36 "$MEDIA_ROOT_DIR/services/services/sa_media/ipc", 37 "$MEDIA_ROOT_DIR/services/services/sa_media/server", 38 "$MEDIA_ROOT_DIR/services/services/sa_media/server_manager", 39 "$MEDIA_ROOT_DIR/test/fuzztest/lowpoweravsink_fuzztest", 40 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 41 "$MEDIA_ROOT_DIR/test/fuzztest/common", 42 "$MEDIA_ROOT_DIR/interfaces/inner_api", 43 ] 44 cflags = [ 45 "-std=c++17", 46 "-fno-rtti", 47 "-fno-exceptions", 48 "-Wall", 49 "-fno-common", 50 "-fstack-protector-strong", 51 "-Wshadow", 52 "-FPIC", 53 "-FS", 54 "-O2", 55 "-D_FORTIFY_SOURCE=2", 56 "-fvisibility=hidden", 57 "-Wformat=2", 58 "-Wfloat-equal", 59 "-Wdate-time", 60 "-Werror", 61 "-Wextra", 62 "-Wimplicit-fallthrough", 63 "-Wsign-compare", 64 "-Wunused-parameter", 65 "-DBINDER_IPC_32BIT", 66 ] 67 if (player_framework_support_player) { 68 sources = [ 69 "$MEDIA_ROOT_DIR/services/services/common/avsharedmemory_ipc.cpp", 70 "$MEDIA_ROOT_DIR/services/services/media_data_source/ipc/media_data_source_stub.cpp", 71 "$MEDIA_ROOT_DIR/test/fuzztest/common/stub_common.cpp", 72 "lowpowervideosink_fuzzer.cpp", 73 ] 74 } 75 deps = [ 76 "$MEDIA_ROOT_DIR/interfaces/inner_api/native:media_client", 77 "$MEDIA_ROOT_DIR/services/services:media_service", 78 "$MEDIA_ROOT_DIR/services/utils:media_service_utils", 79 ] 80 external_deps = [ 81 "av_codec:av_codec_client", 82 "c_utils:utils", 83 "graphic_surface:surface", 84 "hilog:libhilog", 85 "ipc:ipc_single", 86 "player_framework:media_client", 87 "safwk:system_ability_fwk", 88 "samgr:samgr_proxy", 89 ] 90} 91