• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  "hilog:libhilog",
45  "input:libmmi-client",
46  "ipc:ipc_single",
47  "safwk:system_ability_fwk",
48  "samgr:samgr_proxy",
49]
50
51common_cflags = []
52
53if (castplus_cast_engine_enable) {
54  common_cflags += [ "-DCASTPLUS_CAST_ENGINE_ENABLE" ]
55  common_deps += [ "../../../session:avsession_cast_item" ]
56}
57
58if (multimedia_av_session_enable_trace_control) {
59  common_cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ]
60  common_external_deps += [ "hitrace:hitrace_meter" ]
61}
62
63if (multimedia_av_session_enable_sysevent_control) {
64  common_cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ]
65  common_external_deps += [ "hisysevent:libhisysevent" ]
66}
67
68ohos_shared_library("remote_session_source") {
69  install_enable = true
70  include_dirs = common_include_dirs
71  deps = common_deps
72  cflags = common_cflags
73  external_deps = common_external_deps
74  sanitize = {
75    cfi = true
76    cfi_cross_dso = true
77    debug = false
78    blocklist = "../../../../cfi_blocklist.txt"
79  }
80  source_sources = [ "remote_session_source_impl.cpp" ]
81
82  syncers = [
83    "remote_session_syncer_impl.cpp",
84    "remote_session_capability_set.cpp",
85    "json_utils.cpp",
86  ]
87
88  sources = source_sources + syncers
89
90  subsystem_name = "multimedia"
91  part_name = "av_session"
92}
93
94ohos_shared_library("remote_session_sink") {
95  install_enable = true
96  include_dirs = common_include_dirs
97  deps = common_deps
98  cflags = common_cflags
99  external_deps = common_external_deps
100  sanitize = {
101    cfi = true
102    cfi_cross_dso = true
103    debug = false
104    blocklist = "../../../../cfi_blocklist.txt"
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