• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 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("//build/ohos_var.gni")
16import(
17    "//foundation/distributedhardware/distributed_camera/distributedcamera.gni")
18
19ohos_shared_library("distributed_camera_sink") {
20  branch_protector_ret = "pac_ret"
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25    boundary_sanitize = true
26    integer_overflow = true
27    ubsan = true
28  }
29  stack_protector_ret = true
30
31  include_dirs = [
32    "include/distributedcamera",
33    "include/distributedcameramgr",
34    "include/distributedcameramgr/callback",
35    "include/distributedcameramgr/eventbus",
36    "include/distributedcameramgr/interface",
37    "include/distributedcameramgr/listener",
38    "${common_path}/include/constants",
39    "${common_path}/include/utils",
40    "${innerkits_path}/native_cpp/camera_sink/include",
41    "${innerkits_path}/native_cpp/camera_sink/include/callback",
42    "${innerkits_path}/native_cpp/camera_source/include",
43    "${innerkits_path}/native_cpp/camera_source/include/callback",
44    "${services_path}/cameraservice/base/include",
45    "${services_path}/cameraservice/cameraoperator/client/include",
46    "${services_path}/cameraservice/cameraoperator/client/include/callback",
47    "${services_path}/cameraservice/cameraoperator/client/include/listener",
48    "${services_path}/cameraservice/cameraoperator/handler/include",
49    "${services_path}/channel/include",
50    "${services_path}/channel/include/allconnect",
51    "${services_path}/data_process/include/eventbus",
52    "${services_path}/data_process/include/interfaces",
53    "${services_path}/data_process/include/pipeline",
54    "${services_path}/data_process/include/utils",
55    "${feeding_smoother_path}/base",
56    "${feeding_smoother_path}/derived",
57    "${feeding_smoother_path}/utils",
58  ]
59
60  sources = [
61    "${innerkits_path}/native_cpp/camera_source/src/distributed_camera_source_proxy.cpp",
62    "${services_path}/cameraservice/base/src/dcamera_capture_info_cmd.cpp",
63    "${services_path}/cameraservice/base/src/dcamera_channel_info_cmd.cpp",
64    "${services_path}/cameraservice/base/src/dcamera_event_cmd.cpp",
65    "${services_path}/cameraservice/base/src/dcamera_info_cmd.cpp",
66    "${services_path}/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp",
67    "${services_path}/cameraservice/base/src/dcamera_open_info_cmd.cpp",
68    "src/distributedcamera/dcamera_sink_callback_proxy.cpp",
69    "src/distributedcamera/dcamera_sink_hidumper.cpp",
70    "src/distributedcamera/distributed_camera_sink_service.cpp",
71    "src/distributedcamera/distributed_camera_sink_stub.cpp",
72    "src/distributedcameramgr/callback/dcamera_sink_controller_state_callback.cpp",
73    "src/distributedcameramgr/callback/dcamera_sink_output_result_callback.cpp",
74    "src/distributedcameramgr/dcamera_sink_access_control.cpp",
75    "src/distributedcameramgr/dcamera_sink_controller.cpp",
76    "src/distributedcameramgr/dcamera_sink_data_process.cpp",
77    "src/distributedcameramgr/dcamera_sink_dev.cpp",
78    "src/distributedcameramgr/dcamera_sink_output.cpp",
79    "src/distributedcameramgr/dcamera_sink_service_ipc.cpp",
80    "src/distributedcameramgr/listener/dcamera_sink_controller_channel_listener.cpp",
81    "src/distributedcameramgr/listener/dcamera_sink_data_process_listener.cpp",
82    "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp",
83  ]
84
85  ldflags = [
86    "-fpie",
87    "-Wl,-z,relro",
88    "-Wl,-z,now",
89  ]
90
91  deps = [
92    "${common_path}:distributed_camera_utils",
93    "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client",
94    "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler",
95    "${services_path}/channel:distributed_camera_channel",
96    "${services_path}/data_process:distributed_camera_data_process",
97  ]
98
99  defines = [
100    "HI_LOG_ENABLE",
101    "DH_LOG_TAG=\"dcamerasinksvr\"",
102    "LOG_DOMAIN=0xD004150",
103  ]
104
105  if (build_variant == "root") {
106    defines += [ "DUMP_DCAMERA_FILE" ]
107  }
108
109  external_deps = [
110    "access_token:libaccesstoken_sdk",
111    "access_token:libtokenid_sdk",
112    "cJSON:cjson",
113    "c_utils:utils",
114    "camera_framework:camera_framework",
115    "device_manager:devicemanagersdk",
116    "distributed_hardware_fwk:distributed_av_receiver",
117    "distributed_hardware_fwk:distributedhardwareutils",
118    "drivers_interface_camera:metadata",
119    "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1",
120    "drivers_peripheral_display:hdi_gralloc_client",
121    "dsoftbus:softbus_client",
122    "eventhandler:libeventhandler",
123    "ffrt:libffrt",
124    "graphic_surface:surface",
125    "hdf_core:libhdf_utils",
126    "hilog:libhilog",
127    "ipc:ipc_core",
128    "safwk:system_ability_fwk",
129    "samgr:samgr_proxy",
130  ]
131
132  if (device_security_level_camera) {
133    external_deps += [ "device_security_level:dslm_sdk" ]
134    defines += [ "DEVICE_SECURITY_LEVEL_ENABLE" ]
135  }
136
137  subsystem_name = "distributedhardware"
138
139  part_name = "distributed_camera"
140}
141