• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2022 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16import("//foundation/multimedia/audio_framework/config.gni")
17
18ohos_shared_library("audio_capturer_source") {
19  sanitize = {
20    cfi = true
21    debug = false
22    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
23  }
24  install_enable = true
25  sources = [ "primary/audio_capturer_source.cpp" ]
26  cflags = [ "-fPIC" ]
27  cflags += [ "-Wall" ]
28  cflags_cc = cflags
29
30  include_dirs = [
31    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
32    "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include",
33    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common",
34    "//drivers/peripheral/audio/interfaces/include",
35  ]
36
37  deps = [ "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils" ]
38  deps += [ multimedia_audio_framework_hdi_audio_client ]
39
40  external_deps = [
41    "hiviewdfx_hilog_native:libhilog",
42    "power_manager:powermgr_client",
43  ]
44
45  part_name = "multimedia_audio_framework"
46  subsystem_name = "multimedia"
47}
48
49ohos_shared_library("remote_audio_capturer_source") {
50  sanitize = {
51    cfi = true
52    debug = false
53    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
54  }
55  install_enable = true
56  sources = [ "remote/remote_audio_capturer_source.cpp" ]
57  cflags = [ "-fPIC" ]
58  cflags += [ "-Wall" ]
59  cflags_cc = cflags
60  if ("${product_name}" == "m40") {
61    cflags += [ "-DPRODUCT_M40" ]
62  }
63
64  include_dirs = [
65    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
66    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common",
67    "//drivers/peripheral/audio/interfaces/include",
68  ]
69
70  if ("${product_name}" == "m40") {
71    deps = [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ]
72  } else {
73    deps = [ multimedia_audio_framework_hdi_audio_client ]
74  }
75
76  external_deps = [
77    "hiviewdfx_hilog_native:libhilog",
78    "power_manager:powermgr_client",
79  ]
80
81  part_name = "multimedia_audio_framework"
82  subsystem_name = "multimedia"
83}
84
85ohos_shared_library("audio_capturer_file_source") {
86  sanitize = {
87    cfi = true
88    debug = false
89    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
90  }
91  install_enable = true
92
93  sources = [ "file/audio_capturer_file_source.cpp" ]
94
95  cflags = [ "-fPIC" ]
96  cflags += [ "-Wall" ]
97
98  cflags_cc = cflags
99
100  include_dirs = [
101    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
102    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common",
103    "//drivers/peripheral/audio/interfaces/include",
104  ]
105
106  external_deps = [
107    "hiviewdfx_hilog_native:libhilog",
108    "power_manager:powermgr_client",
109  ]
110
111  part_name = "multimedia_audio_framework"
112  subsystem_name = "multimedia"
113}
114
115ohos_shared_library("capturer_source_adapter") {
116  sanitize = {
117    cfi = true
118    debug = false
119    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
120  }
121  install_enable = true
122
123  sources = [
124    "common/capturer_source_adapter.c",
125    "common/i_audio_capturer_source.cpp",
126  ]
127
128  cflags = [ "-fPIC" ]
129  cflags += [ "-Wall" ]
130
131  cflags_cc = cflags
132
133  include_dirs = [
134    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common",
135    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary",
136    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/file",
137    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/remote",
138    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
139    "//drivers/peripheral/audio/interfaces/include",
140  ]
141
142  deps = [
143    ":audio_capturer_file_source",
144    ":audio_capturer_source",
145    ":remote_audio_capturer_source",
146  ]
147
148  external_deps = [
149    "hiviewdfx_hilog_native:libhilog",
150    "power_manager:powermgr_client",
151  ]
152
153  part_name = "multimedia_audio_framework"
154  subsystem_name = "multimedia"
155}
156