• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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("capability_module_test") {
22  module_out_path = module_output_path
23  sources = [
24    "./src/InnerAPI/cap_test.cpp",
25    "./src/cap_test.cpp",
26  ]
27
28  include_dirs = [
29    "Avbuffer/include",
30    "Common/include",
31    "$MEDIA_ROOT_DIR/test/moduletest/vcodec/encoder/include",
32    "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer",
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    "$THIRD_ROOT_DIR/ffmpeg",
40    "$MEDIA_ROOT_DIR/frameworks/native/capi/common",
41    "$MEDIA_ROOT_DIR/services/dfx/include",
42    "$MEDIA_ROOT_DIR/services/engine/base/include",
43    "$MEDIA_ROOT_DIR/services/engine/codec/include/video",
44    "$MEDIA_ROOT_DIR/services/engine/common/include",
45    "$MEDIA_ROOT_DIR/services/engine/source/hst_releated",
46    "$MEDIA_ROOT_DIR/services/services/factory",
47    "$MEDIA_ROOT_DIR/services/utils/include",
48    "$MEDIA_ROOT_DIR/test/nativedemo/include",
49  ]
50
51  cflags = [
52    "-std=c++17",
53    "-fno-rtti",
54    "-fno-exceptions",
55    "-Wall",
56    "-fno-common",
57    "-fstack-protector-strong",
58    "-Wshadow",
59    "-FPIC",
60    "-FS",
61    "-O2",
62    "-D_FORTIFY_SOURCE=2",
63    "-fvisibility=hidden",
64    "-Wformat=2",
65    "-Wdate-time",
66    "-Werror",
67    "-Wextra",
68    "-Wimplicit-fallthrough",
69    "-Wsign-compare",
70    "-Wunused-parameter",
71  ]
72
73  deps = [
74    "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client",
75    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase",
76    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_venc",
77  ]
78
79  external_deps = [
80    "c_utils:utils",
81    "graphic_2d:libgraphic_utils",
82    "graphic_2d:librender_service_client",
83    "graphic_surface:surface",
84    "hilog:libhilog",
85    "ipc:ipc_single",
86    "media_foundation:media_foundation",
87    "media_foundation:native_media_core",
88    "openssl:libcrypto_shared",
89    "window_manager:libwm",
90  ]
91
92  resource_config_file =
93      "$MEDIA_ROOT_DIR/test/moduletest/resources/ohos_test.xml"
94}
95