1# Copyright (c) 2024 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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/multimedia/av_codec/config.gni") 18module_output_path = "av_codec/av_codec" 19MEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 20 21##############################fuzztest########################################## 22ohos_fuzztest("AudioMuxerFuzzTest") { 23 module_out_path = module_output_path 24 fuzz_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/audiomuxer_fuzzer" 25 include_dirs = [ 26 "$MEDIA_ROOT_DIR/test/fuzztest/audiomuxer_fuzzer", 27 "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer", 28 "$MEDIA_ROOT_DIR/interfaces/kits/c", 29 "$MEDIA_ROOT_DIR/services/services/factory", 30 "$MEDIA_ROOT_DIR/services/engine/plugin/common", 31 "$MEDIA_ROOT_DIR/services/engine/plugin/core", 32 "$MEDIA_ROOT_DIR/services/engine/plugin/interface", 33 "$MEDIA_ROOT_DIR/services/utils", 34 "$MEDIA_ROOT_DIR/services/engine/plugin/plugins/muxer/ffmpeg_muxer", 35 "$MEDIA_ROOT_DIR/frameworks/native/capi/common", 36 "$MEDIA_ROOT_DIR/services/dfx/include", 37 "$MEDIA_ROOT_DIR/services/engine/base/include", 38 "$MEDIA_ROOT_DIR/services/engine/codec/include/video", 39 "$MEDIA_ROOT_DIR/services/engine/common/include", 40 "$MEDIA_ROOT_DIR/services/engine/source/hst_releated", 41 "$MEDIA_ROOT_DIR/services/services/factory", 42 "$MEDIA_ROOT_DIR/services/utils/include", 43 "$MEDIA_ROOT_DIR/test/nativedemo/include", 44 ] 45 cflags = [ 46 "-g", 47 "-O0", 48 "-Wno-unused-variable", 49 "-fno-omit-frame-pointer", 50 ] 51 sources = [ 52 "audio_muxer_demo.cpp", 53 "audiomuxer_fuzzer.cpp", 54 ] 55 56 defines = [] 57 58 if (av_codec_enable_special_codec) { 59 defines += [ "AV_CODEC_AUDIO_SPECIAL_CAPACITY" ] 60 } 61 62 external_deps = [ 63 "c_utils:utils", 64 "hilog:libhilog", 65 "ipc:ipc_core", 66 "media_foundation:media_foundation", 67 "media_foundation:native_media_core", 68 "window_manager:libwm", 69 ] 70 deps = [ 71 "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client", 72 "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages", 73 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer", 74 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avsource", 75 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase", 76 "$MEDIA_ROOT_DIR/services/services:av_codec_service", 77 ] 78} 79 80############################################################################### 81group("fuzztest") { 82 testonly = true 83 deps = [] 84 deps += [ 85 # deps file 86 ":AudioMuxerFuzzTest", 87 ] 88} 89############################################################################### 90