• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024-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/ohos.gni")
15import("../distributed_av_transport.gni")
16
17config("av_pipeline_fwk_external_config") {
18  include_dirs = [
19    "${common_path}/include",
20    "${dh_fwk_sdk_path}/include",
21    "${interface_path}",
22  ]
23}
24
25ohos_shared_library("distributed_av_pipeline_fwk") {
26  sanitize = {
27    cfi = true
28    cfi_cross_dso = true
29    cfi_no_nvcall = true
30    cfi_vcall_icall_only = true
31    debug = false
32    boundary_sanitize = true
33    integer_overflow = true
34    ubsan = true
35  }
36  branch_protector_ret = "pac_ret"
37  public_configs = [ ":av_pipeline_fwk_external_config" ]
38
39  include_dirs = [
40    "${dh_fwk_utils_path}/include",
41    "${distributed_av_transport_path}/framework",
42    "${distributed_av_transport_path}/framework/filter/include",
43    "${distributed_av_transport_path}/framework/pipeline/include",
44    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_coder",
45    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_input",
46    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_output",
47  ]
48
49  sources = [
50    "${common_path}/src/av_trans_log.cpp",
51    "${common_path}/src/softbus_channel_adapter.cpp",
52    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_coder/av_trans_audio_decoder_filter.cpp",
53    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_coder/av_trans_audio_encoder_filter.cpp",
54    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_input/av_trans_audio_input_filter.cpp",
55    "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_output/daudio_output_filter.cpp",
56    "${distributed_av_transport_path}/framework/filter/src/filter.cpp",
57    "${distributed_av_transport_path}/framework/filter/src/filter_factory.cpp",
58    "${distributed_av_transport_path}/framework/pipeline/src/pipeline.cpp",
59  ]
60
61  deps = [ "${dh_fwk_sdk_path}:libdhfwk_sdk" ]
62
63  defines = [
64    "HI_LOG_ENABLE",
65    "DH_LOG_TAG=\"av_trans_fwk\"",
66    "LOG_DOMAIN=0xD004101",
67  ]
68
69  external_deps = [
70    "av_codec:av_codec_client",
71    "av_codec:native_media_acodec",
72    "bounds_checking_function:libsec_shared",
73    "cJSON:cjson",
74    "c_utils:utils",
75    "dsoftbus:softbus_client",
76    "hilog:libhilog",
77    "ipc:ipc_core",
78    "media_foundation:media_foundation",
79    "media_foundation:native_media_core",
80  ]
81
82  if (histreamer_compile_part) {
83    external_deps += [ "media_foundation:media_foundation" ]
84  }
85
86  cflags = [
87    "-fexceptions",
88    "-fno-rtti",
89    "-fPIC",
90    "-O2",
91    "-Wall",
92    "-Wno-c++20-extensions",
93    "-fstack-protector-strong",
94  ]
95  cflags_cc = cflags
96
97  ldflags = [
98    "-fpie",
99    "-Wl,-z,relro",
100    "-Wl,-z,now",
101  ]
102
103  part_name = "distributed_hardware_fwk"
104  subsystem_name = "distributedhardware"
105}
106