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 = [] 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 cfi = true 78 cfi_cross_dso = true 79 debug = false 80 } 81 source_sources = [ "remote_session_source_impl.cpp" ] 82 83 syncers = [ 84 "remote_session_syncer_impl.cpp", 85 "remote_session_capability_set.cpp", 86 "json_utils.cpp", 87 ] 88 89 sources = source_sources + syncers 90 91 subsystem_name = "multimedia" 92 part_name = "av_session" 93} 94 95ohos_shared_library("remote_session_sink") { 96 install_enable = true 97 include_dirs = common_include_dirs 98 deps = common_deps 99 cflags = common_cflags 100 external_deps = common_external_deps 101 sanitize = { 102 cfi = true 103 cfi_cross_dso = true 104 debug = false 105 } 106 sink_sources = [ "remote_session_sink_impl.cpp" ] 107 108 syncers = [ 109 "remote_session_syncer_impl.cpp", 110 "remote_session_capability_set.cpp", 111 "json_utils.cpp", 112 ] 113 114 sources = sink_sources + syncers 115 116 subsystem_name = "multimedia" 117 part_name = "av_session" 118} 119