• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
20AUDIO_ROOT_DIR = "//foundation/multimedia/audio_framework/"
21
22ohos_unittest("audio_decoder_module_test") {
23  module_out_path = module_output_path
24  sources = [
25    "Avbuffer/src/avcodec_audio_avbuffer_decoder_demo.cpp",
26    "Avbuffer/src/common_tool.cpp",
27    "Avbuffer/src/fuzz_test.cpp",
28    "Avbuffer/src/null_check_test.cpp",
29    "Avbuffer/src/param_check_test.cpp",
30    "Avbuffer/src/status_check_test.cpp",
31    "Common/src/AudioDecoderDemoCommon.cpp",
32    "InnerAPI/InnerInterfaceDependCheckTest.cpp",
33    "InnerAPI/InnerParamCheckTest.cpp",
34    "NativeAPI/NativeInterfaceDependCheckTest.cpp",
35    "NativeAPI/NativeNullCheckTest.cpp",
36    "NativeAPI/NativeParamCheckTest.cpp",
37  ]
38
39  include_dirs = [
40    "Avbuffer/include",
41    "Common/include",
42    "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer",
43    "$MEDIA_ROOT_DIR/interfaces/kits/c",
44    "$MEDIA_ROOT_DIR/interfaces/inner_api/native",
45    "$MEDIA_ROOT_DIR/services/services/factory",
46    "$MEDIA_ROOT_DIR/services/engine/plugin/common",
47    "$MEDIA_ROOT_DIR/services/engine/plugin/core",
48    "$MEDIA_ROOT_DIR/services/engine/plugin/interface",
49    "$THIRD_ROOT_DIR/ffmpeg",
50    "$MEDIA_ROOT_DIR/frameworks/native/capi/common",
51    "$MEDIA_ROOT_DIR/services/dfx/include",
52    "$MEDIA_ROOT_DIR/services/engine/base/include",
53    "$MEDIA_ROOT_DIR/services/engine/codec/include/video",
54    "$MEDIA_ROOT_DIR/services/engine/common/include",
55    "$MEDIA_ROOT_DIR/services/engine/source/hst_releated",
56    "$MEDIA_ROOT_DIR/services/services/factory",
57    "$MEDIA_ROOT_DIR/services/utils/include",
58    "$MEDIA_ROOT_DIR/test/nativedemo/include",
59    "$media_foundation_root_dir/interface/kits/c",
60    "$media_foundation_root_dir/interface/inner_api",
61    "$AUDIO_ROOT_DIR/frameworks/native/audiorenderer/include",
62    "$AUDIO_ROOT_DIR/frameworks/native/audiostream/include",
63    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiorenderer/include",
64    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiocommon/include",
65    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiomanager/include",
66    "$AUDIO_ROOT_DIR/services/audio_service/clinet/include",
67  ]
68
69  cflags = [
70    "-Wall",
71    "-fno-rtti",
72    "-fno-exceptions",
73    "-fno-common",
74    "-fstack-protector-strong",
75    "-Wshadow",
76    "-FPIC",
77    "-FS",
78    "-O2",
79    "-D_FORTIFY_SOURCE=2",
80    "-fvisibility=hidden",
81    "-Wformat=2",
82    "-Wdate-time",
83    "-Werror",
84    "-Wextra",
85    "-Wimplicit-fallthrough",
86    "-Wsign-compare",
87    "-Wunused-parameter",
88    "-Wno-deprecated-declarations",
89  ]
90
91  deps = [
92    "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client",
93    "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages",
94    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer",
95    "$MEDIA_ROOT_DIR/services/services:av_codec_service",
96    "$THIRD_ROOT_DIR/bounds_checking_function:libsec_static",
97    "$THIRD_ROOT_DIR/ffmpeg:libohosffmpeg",
98  ]
99
100  external_deps = [
101    "audio_framework:audio_renderer",
102    "c_utils:utils",
103    "hilog:libhilog",
104    "ipc:ipc_core",
105    "media_foundation:capi_packages",
106    "media_foundation:media_foundation",
107  ]
108
109  resource_config_file =
110      "$MEDIA_ROOT_DIR/test/moduletest/resources/ohos_test.xml"
111}
112