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_input/av_trans_bus_input_filter.cpp", 56 "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_output/daudio_output_filter.cpp", 57 "${distributed_av_transport_path}/av_trans_engine/filters/av_trans_output/dsoftbus_output_filter.cpp", 58 "${distributed_av_transport_path}/framework/filter/src/filter.cpp", 59 "${distributed_av_transport_path}/framework/filter/src/filter_factory.cpp", 60 "${distributed_av_transport_path}/framework/pipeline/src/pipeline.cpp", 61 ] 62 63 deps = [ "${dh_fwk_sdk_path}:libdhfwk_sdk" ] 64 65 defines = [ 66 "HI_LOG_ENABLE", 67 "DH_LOG_TAG=\"av_trans_fwk\"", 68 "LOG_DOMAIN=0xD004101", 69 ] 70 71 external_deps = [ 72 "av_codec:av_codec_client", 73 "av_codec:native_media_acodec", 74 "bounds_checking_function:libsec_shared", 75 "cJSON:cjson", 76 "c_utils:utils", 77 "dsoftbus:softbus_client", 78 "hilog:libhilog", 79 "hisysevent:libhisysevent", 80 "hitrace:hitrace_meter", 81 "ipc:ipc_core", 82 "media_foundation:media_foundation", 83 "media_foundation:native_media_core", 84 "safwk:system_ability_fwk", 85 "samgr:samgr_proxy", 86 ] 87 88 if (histreamer_compile_part) { 89 external_deps += [ "media_foundation:media_foundation" ] 90 } 91 92 cflags = [ 93 "-fexceptions", 94 "-fno-rtti", 95 "-fPIC", 96 "-O2", 97 "-Wall", 98 "-Wno-c++20-extensions", 99 "-fstack-protector-strong", 100 ] 101 cflags_cc = cflags 102 103 ldflags = [ 104 "-fpie", 105 "-Wl,-z,relro", 106 "-Wl,-z,now", 107 ] 108 109 part_name = "distributed_hardware_fwk" 110 subsystem_name = "distributedhardware" 111} 112