1# Copyright (c) 2023 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/ohos.gni")
15import("../../../../../config.gni")
16
17config("capturer_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "../../../../../interfaces/inner_api/native/audiocommon/include",
22    "../../../../../services/audio_service/common/include",
23  ]
24
25  cflags = [
26    "-Wall",
27    "-Werror",
28    "-DHAVE_CONFIG_H",
29    "-D_GNU_SOURCE",
30    "-D__INCLUDED_FROM_PULSE_AUDIO",
31  ]
32}
33
34ohos_shared_library("module-inner-capturer-sink") {
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    cfi_vcall_icall_only = true
39    debug = false
40  }
41  sources = [ "module_inner_capturer_sink.c" ]
42
43  configs = [ ":capturer_config" ]
44
45  cflags = [ "-DPA_MODULE_NAME=libmodule_inner_capturer_sink_z_so" ]
46
47  ldflags = [
48    "-Wl",
49    "--no-undefined",
50  ]
51
52  deps = [
53    "../../../../../services/audio_service:audio_common",
54    "../../../audioutils:audio_utils",
55  ]
56
57  external_deps = [
58    "hilog:libhilog",
59    "pulseaudio:pulse",
60    "pulseaudio:pulsecommon",
61    "pulseaudio:pulsecore",
62  ]
63
64  public_external_deps = [ "bounds_checking_function:libsec_shared" ]
65
66  subsystem_name = "multimedia"
67  part_name = "audio_framework"
68}
69