1# Copyright (c) 2022-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("//build/ohos_var.gni")
16import("../../../distributedaudio.gni")
17
18config("encode_transport_pub_config") {
19  include_dirs = [
20    "include",
21    "../interface",
22    "../../audioprocessor/interface",
23  ]
24}
25
26ohos_shared_library("distributed_audio_encode_transport") {
27  sanitize = {
28    boundary_sanitize = true
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32    integer_overflow = true
33    ubsan = true
34  }
35  stack_protector_ret = true
36
37  include_dirs = [
38    "include",
39    "${audio_processor_path}/directprocessor/include",
40    "${audio_processor_path}/interface",
41    "${audio_transport_path}/interface",
42    "${audio_transport_path}/senderengine/include",
43    "${common_path}/dfx_utils/include",
44    "${common_path}/include",
45    "${services_path}/common/audiodata/include",
46    "${services_path}/common/audioparam",
47  ]
48
49  public_configs = [ ":encode_transport_pub_config" ]
50
51  sources = [
52    "${audio_processor_path}/directprocessor/src/audio_direct_processor.cpp",
53    "${audio_transport_path}/senderengine/src/av_sender_engine_adapter.cpp",
54    "${audio_transport_path}/senderengine/src/av_sender_engine_transport.cpp",
55  ]
56
57  deps = [ "${services_path}/common:distributed_audio_utils" ]
58
59  external_deps = [
60    "cJSON:cjson",
61    "c_utils:utils",
62    "distributed_hardware_fwk:distributed_av_sender",
63    "dsoftbus:softbus_client",
64    "hilog:libhilog",
65    "hisysevent:libhisysevent",
66    "hitrace:hitrace_meter",
67    "player_framework:media_client",
68  ]
69
70  defines = [
71    "HI_LOG_ENABLE",
72    "LOG_DOMAIN=0xD004130",
73  ]
74
75  subsystem_name = "distributedhardware"
76
77  part_name = "distributed_audio"
78}
79