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", 51 "window_manager:libwm", 52] 53 54common_cflags = [] 55 56if (castplus_cast_engine_enable) { 57 common_cflags += [ "-DCASTPLUS_CAST_ENGINE_ENABLE" ] 58 common_deps += [ "../../../session:avsession_cast_item" ] 59} 60 61if (multimedia_av_session_enable_trace_control) { 62 common_cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ] 63 common_external_deps += [ "hitrace:hitrace_meter" ] 64} 65 66if (multimedia_av_session_enable_sysevent_control) { 67 common_cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ] 68 common_external_deps += [ "hisysevent:libhisysevent" ] 69} 70 71ohos_shared_library("remote_session_source") { 72 install_enable = true 73 include_dirs = common_include_dirs 74 deps = common_deps 75 cflags = common_cflags 76 external_deps = common_external_deps 77 sanitize = { 78 cfi = true 79 cfi_cross_dso = true 80 debug = false 81 } 82 source_sources = [ "remote_session_source_impl.cpp" ] 83 84 syncers = [ 85 "remote_session_syncer_impl.cpp", 86 "remote_session_capability_set.cpp", 87 "json_utils.cpp", 88 ] 89 90 sources = source_sources + syncers 91 92 subsystem_name = "multimedia" 93 part_name = "av_session" 94} 95 96ohos_shared_library("remote_session_sink") { 97 install_enable = true 98 include_dirs = common_include_dirs 99 deps = common_deps 100 cflags = common_cflags 101 external_deps = common_external_deps 102 sanitize = { 103 cfi = true 104 cfi_cross_dso = true 105 debug = false 106 } 107 sink_sources = [ "remote_session_sink_impl.cpp" ] 108 109 syncers = [ 110 "remote_session_syncer_impl.cpp", 111 "remote_session_capability_set.cpp", 112 "json_utils.cpp", 113 ] 114 115 sources = sink_sources + syncers 116 117 subsystem_name = "multimedia" 118 part_name = "av_session" 119} 120