1f6603c60Sopenharmony_ci# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
2f6603c60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3f6603c60Sopenharmony_ci# you may not use this file except in compliance with the License.
4f6603c60Sopenharmony_ci# You may obtain a copy of the License at
5f6603c60Sopenharmony_ci#
6f6603c60Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7f6603c60Sopenharmony_ci#
8f6603c60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9f6603c60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10f6603c60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11f6603c60Sopenharmony_ci# See the License for the specific language governing permissions and
12f6603c60Sopenharmony_ci# limitations under the License.
13f6603c60Sopenharmony_ci
14f6603c60Sopenharmony_ciimport("//foundation/multimedia/av_codec/config.gni")
15f6603c60Sopenharmony_ciimport("//test/xts/tools/build/suite.gni")
16f6603c60Sopenharmony_ci
17f6603c60Sopenharmony_ciMEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/"
18f6603c60Sopenharmony_cimodule_output_path = "acts/ActsAvbufferDecoderTest"
19f6603c60Sopenharmony_ciAUDIO_ROOT_DIR = "//foundation/multimedia/audio_framework/"
20f6603c60Sopenharmony_ci
21f6603c60Sopenharmony_ciohos_moduletest_suite("ActsAvbufferDecoderTest") {
22f6603c60Sopenharmony_ci  sanitize = av_codec_test_sanitize
23f6603c60Sopenharmony_ci  module_out_path = module_output_path
24f6603c60Sopenharmony_ci  sources = [
25f6603c60Sopenharmony_ci    "./src/avcodec_audio_avbuffer_decoder_demo.cpp",
26f6603c60Sopenharmony_ci    "./src/common_tool.cpp",
27f6603c60Sopenharmony_ci    "./src/null_check_test.cpp",
28f6603c60Sopenharmony_ci    "./src/param_check_test.cpp",
29f6603c60Sopenharmony_ci    "./src/status_check_test.cpp",
30f6603c60Sopenharmony_ci  ]
31f6603c60Sopenharmony_ci
32f6603c60Sopenharmony_ci  include_dirs = [
33f6603c60Sopenharmony_ci    "./include",
34f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer",
35f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c",
36f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/inner_api/native",
37f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/services/factory",
38f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/plugin/common",
39f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/plugin/core",
40f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/plugin/interface",
41f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/frameworks/native/capi/common",
42f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/dfx/include",
43f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/base/include",
44f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/codec/include/video",
45f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/common/include",
46f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/engine/source/hst_releated",
47f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/services/factory",
48f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/utils/include",
49f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/test/nativedemo/include",
50f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/frameworks/native/audiorenderer/include",
51f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/frameworks/native/audiostream/include",
52f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiorenderer/include",
53f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiocommon/include",
54f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/interfaces/inner_api/native/audiomanager/include",
55f6603c60Sopenharmony_ci    "$AUDIO_ROOT_DIR/services/audio_service/clinet/include",
56f6603c60Sopenharmony_ci  ]
57f6603c60Sopenharmony_ci
58f6603c60Sopenharmony_ci  cflags = [
59f6603c60Sopenharmony_ci    "-Wall",
60f6603c60Sopenharmony_ci    "-fno-rtti",
61f6603c60Sopenharmony_ci    "-fno-exceptions",
62f6603c60Sopenharmony_ci    "-fno-common",
63f6603c60Sopenharmony_ci    "-fstack-protector-strong",
64f6603c60Sopenharmony_ci    "-Wshadow",
65f6603c60Sopenharmony_ci    "-FPIC",
66f6603c60Sopenharmony_ci    "-FS",
67f6603c60Sopenharmony_ci    "-O2",
68f6603c60Sopenharmony_ci    "-D_FORTIFY_SOURCE=2",
69f6603c60Sopenharmony_ci    "-fvisibility=hidden",
70f6603c60Sopenharmony_ci    "-Wformat=2",
71f6603c60Sopenharmony_ci    "-Wdate-time",
72f6603c60Sopenharmony_ci    "-Werror",
73f6603c60Sopenharmony_ci    "-Wextra",
74f6603c60Sopenharmony_ci    "-Wimplicit-fallthrough",
75f6603c60Sopenharmony_ci    "-Wsign-compare",
76f6603c60Sopenharmony_ci    "-Wunused-parameter",
77f6603c60Sopenharmony_ci    "-Wno-deprecated-declarations",
78f6603c60Sopenharmony_ci  ]
79f6603c60Sopenharmony_ci
80f6603c60Sopenharmony_ci  deps = [
81f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages",
82f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer",
83f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/services/services:av_codec_service",
84f6603c60Sopenharmony_ci  ]
85f6603c60Sopenharmony_ci
86f6603c60Sopenharmony_ci  external_deps = [
87f6603c60Sopenharmony_ci    "audio_framework:audio_renderer",
88f6603c60Sopenharmony_ci    "bounds_checking_function:libsec_static",
89f6603c60Sopenharmony_ci    "c_utils:utils",
90f6603c60Sopenharmony_ci    "ffmpeg:libohosffmpeg",
91f6603c60Sopenharmony_ci    "hilog:libhilog",
92f6603c60Sopenharmony_ci    "ipc:ipc_core",
93f6603c60Sopenharmony_ci    "media_foundation:media_foundation",
94f6603c60Sopenharmony_ci    "media_foundation:native_media_core",
95f6603c60Sopenharmony_ci  ]
96f6603c60Sopenharmony_ci
97f6603c60Sopenharmony_ci  if (av_codec_support_drm) {
98f6603c60Sopenharmony_ci    external_deps += [
99f6603c60Sopenharmony_ci      "drm_framework:drm_framework",
100f6603c60Sopenharmony_ci      "drm_framework:native_drm",
101f6603c60Sopenharmony_ci    ]
102f6603c60Sopenharmony_ci  }
103f6603c60Sopenharmony_ci  part_name = "av_codec"
104f6603c60Sopenharmony_ci  subsystem_name = "multimedia"
105f6603c60Sopenharmony_ci}
106