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}/data_process/include/eventbus", 51 "${services_path}/data_process/include/interfaces", 52 "${services_path}/data_process/include/pipeline", 53 "${services_path}/data_process/include/utils", 54 "${feeding_smoother_path}/base", 55 "${feeding_smoother_path}/derived", 56 "${feeding_smoother_path}/utils", 57 ] 58 59 sources = [ 60 "${innerkits_path}/native_cpp/camera_source/src/distributed_camera_source_proxy.cpp", 61 "${services_path}/cameraservice/base/src/dcamera_capture_info_cmd.cpp", 62 "${services_path}/cameraservice/base/src/dcamera_channel_info_cmd.cpp", 63 "${services_path}/cameraservice/base/src/dcamera_event_cmd.cpp", 64 "${services_path}/cameraservice/base/src/dcamera_info_cmd.cpp", 65 "${services_path}/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp", 66 "${services_path}/cameraservice/base/src/dcamera_open_info_cmd.cpp", 67 "src/distributedcamera/dcamera_sink_callback_proxy.cpp", 68 "src/distributedcamera/dcamera_sink_hidumper.cpp", 69 "src/distributedcamera/distributed_camera_sink_service.cpp", 70 "src/distributedcamera/distributed_camera_sink_stub.cpp", 71 "src/distributedcameramgr/callback/dcamera_sink_controller_state_callback.cpp", 72 "src/distributedcameramgr/callback/dcamera_sink_output_result_callback.cpp", 73 "src/distributedcameramgr/dcamera_sink_access_control.cpp", 74 "src/distributedcameramgr/dcamera_sink_controller.cpp", 75 "src/distributedcameramgr/dcamera_sink_data_process.cpp", 76 "src/distributedcameramgr/dcamera_sink_dev.cpp", 77 "src/distributedcameramgr/dcamera_sink_output.cpp", 78 "src/distributedcameramgr/dcamera_sink_service_ipc.cpp", 79 "src/distributedcameramgr/listener/dcamera_sink_controller_channel_listener.cpp", 80 "src/distributedcameramgr/listener/dcamera_sink_data_process_listener.cpp", 81 "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp", 82 ] 83 84 deps = [ 85 "${common_path}:distributed_camera_utils", 86 "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", 87 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 88 "${services_path}/channel:distributed_camera_channel", 89 "${services_path}/data_process:distributed_camera_data_process", 90 ] 91 92 defines = [ 93 "HI_LOG_ENABLE", 94 "DH_LOG_TAG=\"dcamerasinksvr\"", 95 "LOG_DOMAIN=0xD004150", 96 ] 97 98 if (build_variant == "root") { 99 defines += [ "DUMP_DCAMERA_FILE" ] 100 } 101 102 external_deps = [ 103 "access_token:libaccesstoken_sdk", 104 "access_token:libtokenid_sdk", 105 "cJSON:cjson", 106 "c_utils:utils", 107 "camera_framework:camera_framework", 108 "device_manager:devicemanagersdk", 109 "device_security_level:dslm_sdk", 110 "distributed_hardware_fwk:distributed_av_receiver", 111 "distributed_hardware_fwk:distributedhardwareutils", 112 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", 113 "drivers_peripheral_display:hdi_gralloc_client", 114 "eventhandler:libeventhandler", 115 "graphic_surface:surface", 116 "hilog:libhilog", 117 "ipc:ipc_core", 118 "safwk:system_ability_fwk", 119 "samgr:samgr_proxy", 120 ] 121 122 subsystem_name = "distributedhardware" 123 124 part_name = "distributed_camera" 125} 126