• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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
17module_output_path = "av_codec/AVCodec_Video/unittest"
18
19calc_max_amplitude_unittest_include_dirs =
20    [ "$av_codec_root_dir/interfaces/inner_api/native" ]
21
22calc_max_amplitude_unittest_cflags = [
23  "-O2",
24  "-fPIC",
25  "-Wall",
26  "-fexceptions",
27  "-fno-rtti",
28  "-Wno-unused-but-set-variable",
29  "-Wno-format",
30  "-Dprivate=public",
31  "-Dprotected=public",
32  "-DMEDIA_OHOS=1",
33]
34
35##################################################################################################################
36ohos_unittest("calc_max_amplitude_unittest") {
37  module_out_path = module_output_path
38
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    debug = false
43  }
44
45  include_dirs = calc_max_amplitude_unittest_include_dirs
46  include_dirs += [
47    "$av_codec_root_dir/interfaces",
48    "$av_codec_root_dir/interfaces/plugin",
49    "$av_codec_root_dir/services/media_engine/plugins/sink",
50    "$av_codec_root_dir/services/media_engine/modules",
51    "$av_codec_root_dir/services/media_engine/modules/sink",
52    "$av_codec_root_dir/test/unittest/calc_max_amplitude_unittest",
53  ]
54
55  cflags = calc_max_amplitude_unittest_cflags
56
57  cflags_cc = cflags
58
59  public_configs = []
60
61  sources = [
62    "$av_codec_root_dir/services/media_engine/modules/sink/calc_max_amplitude.cpp",
63    "./calc_max_amplitude_unittest.cpp",
64  ]
65
66  deps = [
67    "$av_codec_root_dir/services/dfx:av_codec_service_dfx",
68    "$av_codec_root_dir/services/media_engine/modules:av_codec_media_engine_modules",
69  ]
70
71  external_deps = [
72    "audio_framework:audio_client",
73    "audio_framework:audio_foundation",
74    "audio_framework:audio_renderer",
75    "c_utils:utils",
76    "ffmpeg:libohosffmpeg",
77    "googletest:gmock_main",
78    "graphic_surface:surface",
79    "hilog:libhilog",
80    "init:libbegetutil",
81    "ipc:ipc_single",
82    "media_foundation:media_foundation",
83    "safwk:system_ability_fwk",
84  ]
85
86}
87