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("../../../../castplus_cast_engine_part.gni") 16import("../../../../config.gni") 17 18############################################################################### 19 20common_include_dirs = [ 21 "../", 22 "../remote", 23 "../../ipc/base", 24 "../../ipc/proxy", 25 "../../ipc/stub", 26 "../../../../interfaces/inner_api/native/session/include", 27 "//third_party/json/single_include", 28 "$commontype_dir/include", 29] 30 31common_deps = [ 32 "./../../../../frameworks/native/session:avsession_client", 33 "./../../../../utils:avsession_utils", 34 "./../../../session:avsession_server", 35 "//third_party/openssl:libcrypto_shared", 36] 37 38common_external_deps = [ 39 "ability_base:want", 40 "ability_runtime:wantagent_innerkits", 41 "audio_framework:audio_client", 42 "c_utils:utils", 43 "data_object:distributeddataobject_impl", 44 "graphic_surface:surface", 45 "hilog:libhilog", 46 "input:libmmi-client", 47 "ipc:ipc_single", 48 "safwk:system_ability_fwk", 49 "samgr:samgr_proxy", 50 "window_manager:libdm_lite", 51] 52 53common_cflags = [ "-fstack-protector-strong" ] 54 55if (castplus_cast_engine_enable) { 56 common_cflags += [ "-DCASTPLUS_CAST_ENGINE_ENABLE" ] 57 common_deps += [ "../../../session:avsession_cast_item" ] 58} 59 60if (multimedia_av_session_enable_trace_control) { 61 common_cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ] 62 common_external_deps += [ "hitrace:hitrace_meter" ] 63} 64 65if (multimedia_av_session_enable_sysevent_control) { 66 common_cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ] 67 common_external_deps += [ "hisysevent:libhisysevent" ] 68} 69 70ohos_shared_library("remote_session_source") { 71 install_enable = true 72 include_dirs = common_include_dirs 73 deps = common_deps 74 cflags = common_cflags 75 external_deps = common_external_deps 76 sanitize = { 77 boundary_sanitize = true 78 cfi = true 79 cfi_cross_dso = true 80 debug = false 81 integer_overflow = true 82 ubsan = true 83 } 84 source_sources = [ "remote_session_source_impl.cpp" ] 85 86 syncers = [ 87 "remote_session_syncer_impl.cpp", 88 "remote_session_capability_set.cpp", 89 "json_utils.cpp", 90 ] 91 92 sources = source_sources + syncers 93 94 subsystem_name = "multimedia" 95 part_name = "av_session" 96} 97 98ohos_shared_library("remote_session_sink") { 99 install_enable = true 100 include_dirs = common_include_dirs 101 deps = common_deps 102 cflags = common_cflags 103 external_deps = common_external_deps 104 sanitize = { 105 boundary_sanitize = true 106 cfi = true 107 cfi_cross_dso = true 108 debug = false 109 integer_overflow = true 110 ubsan = true 111 } 112 sink_sources = [ "remote_session_sink_impl.cpp" ] 113 114 syncers = [ 115 "remote_session_syncer_impl.cpp", 116 "remote_session_capability_set.cpp", 117 "json_utils.cpp", 118 ] 119 120 sources = sink_sources + syncers 121 122 subsystem_name = "multimedia" 123 part_name = "av_session" 124} 125