1# Copyright (c) 2022 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("//foundation/multimedia/av_codec/config.gni") 15import("//test/xts/tools/build/suite.gni") 16 17MEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 18module_output_path = "acts/ActsDemuxerTest" 19 20demuxer_moduletest_native_include_dirs = [ 21 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 22 "$MEDIA_ROOT_DIR/interfaces/kits/c", 23 "$MEDIA_ROOT_DIR/services/services/factory", 24 "$MEDIA_ROOT_DIR/services/utils", 25] 26 27demuxer_moduletest_cflags = [ 28 "-std=c++17", 29 "-fno-rtti", 30 "-fno-exceptions", 31 "-Wall", 32 "-fno-common", 33 "-fstack-protector-strong", 34 "-Wshadow", 35 "-FPIC", 36 "-FS", 37 "-O2", 38 "-D_FORTIFY_SOURCE=2", 39 "-fvisibility=hidden", 40 "-Wformat=2", 41 "-Wdate-time", 42 "-Werror", 43 "-Wextra", 44 "-Wimplicit-fallthrough", 45 "-Wsign-compare", 46 "-Wunused-parameter", 47] 48 49################################################################################################################## 50ohos_moduletest_suite("ActsDemuxerTest") { 51 sanitize = av_codec_test_sanitize 52 module_out_path = module_output_path 53 include_dirs = demuxer_moduletest_native_include_dirs 54 include_dirs += [ "./" ] 55 56 cflags = demuxer_moduletest_cflags 57 58 if (av_codec_support_codec) { 59 sources = [ 60 "./src/api_test.cpp", 61 "./src/func_test.cpp", 62 "./src/proc_test.cpp", 63 ] 64 } 65 66 external_deps = [ 67 "c_utils:utils", 68 "graphic_2d:librender_service_client", 69 "graphic_surface:surface", 70 "media_foundation:media_foundation", 71 "media_foundation:native_media_core", 72 "window_manager:libwm", 73 ] 74 75 public_deps = 76 [ "$av_codec_root_dir/test/unittest/common:av_codec_inner_unit_test" ] 77 78 if (target_cpu == "arm64") { 79 av_codec_path = "\"/system/lib64\"" 80 } else { 81 av_codec_path = "\"/system/lib\"" 82 } 83 defines = [ "AV_CODEC_PATH=${av_codec_path}" ] 84 85 deps = [ 86 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avdemuxer", 87 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avsource", 88 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase", 89 "$MEDIA_ROOT_DIR/services/services:av_codec_service", 90 ] 91 92 part_name = "av_codec" 93 subsystem_name = "multimedia" 94} 95