1# Copyright (c) 2020-2021 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/av_codec/config.gni") 16 17MEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 18THIRD_ROOT_DIR = "//third_party/" 19module_output_path = "av_codec/moduletest" 20 21ohos_unittest("muxer_native_module_test") { 22 module_out_path = module_output_path 23 sources = [ 24 "Common/src/AVMuxerDemo.cpp", 25 "InnerAPI/InnerAVMuxerInterfaceDependCheckTest.cpp", 26 "InnerAPI/InnerAVMuxerParamCheckTest.cpp", 27 "NativeAPI/NativeAVMuxerInterfaceDependCheckTest.cpp", 28 "NativeAPI/NativeAVMuxerNullCheckTest.cpp", 29 "NativeAPI/NativeAVMuxerParamCheckTest.cpp", 30 ] 31 include_dirs = [ 32 "Common/include", 33 "$MEDIA_ROOT_DIR/interfaces/kits/c", 34 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 35 "$MEDIA_ROOT_DIR/services/services/factory", 36 "$MEDIA_ROOT_DIR/services/engine/plugin/common", 37 "$MEDIA_ROOT_DIR/services/engine/plugin/core", 38 "$MEDIA_ROOT_DIR/services/engine/plugin/interface", 39 "$MEDIA_ROOT_DIR/services/utils", 40 "$MEDIA_ROOT_DIR/services/engine/plugin/plugins/muxer/ffmpeg_muxer", 41 "$THIRD_ROOT_DIR/ffmpeg", 42 ] 43 44 cflags = [ 45 "-Wall", 46 "-fno-rtti", 47 "-fno-exceptions", 48 "-fno-common", 49 "-fstack-protector-strong", 50 "-Wshadow", 51 "-FPIC", 52 "-FS", 53 "-O2", 54 "-D_FORTIFY_SOURCE=2", 55 "-fvisibility=hidden", 56 "-Wformat=2", 57 "-Wdate-time", 58 "-Werror", 59 "-Wextra", 60 "-Wimplicit-fallthrough", 61 "-Wsign-compare", 62 "-Wunused-parameter", 63 "-Wno-deprecated-declarations", 64 ] 65 66 cflags_cc = cflags 67 cflags_cc += [ "-std=c++17" ] 68 69 deps = [ 70 "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client", 71 "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages", 72 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer", 73 "$MEDIA_ROOT_DIR/services/engine/codec/video:av_codec_video_ffmpeg_codec", 74 "$MEDIA_ROOT_DIR/services/engine/plugin/plugins/muxer/ffmpeg_muxer:av_codec_plugin_FFmpegMuxer", 75 "$MEDIA_ROOT_DIR/services/services:av_codec_service", 76 "$MEDIA_ROOT_DIR/services/utils:av_codec_format", 77 ] 78 79 external_deps = [ 80 "c_utils:utils", 81 "hilog:libhilog", 82 "ipc:ipc_core", 83 ] 84 85 resource_config_file = 86 "$MEDIA_ROOT_DIR/test/moduletest/resources/ohos_test.xml" 87} 88