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 include_dirs = [ 31 "${av_transport_path}/common/include", 32 "${graphicsurface_path}/surface/include", 33 "${camerastandard_path}/interfaces/inner_api/native/camera/include", 34 "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", 35 "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", 36 "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", 37 "${camerastandard_path}/services/camera_service/binder/base/include", 38 "${camerastandard_path}/services/camera_service/binder/client/include", 39 "${camerastandard_path}/services/camera_service/binder/server/include", 40 "${camerastandard_path}/services/camera_service/include", 41 "${fwk_common_path}/utils/include", 42 "${fwk_utils_path}/include/eventbus", 43 "//third_party/cJSON", 44 "//third_party/jsoncpp/include", 45 ] 46 47 include_dirs += [ 48 "include/distributedcamera", 49 "include/distributedcameramgr", 50 "include/distributedcameramgr/callback", 51 "include/distributedcameramgr/eventbus", 52 "include/distributedcameramgr/interface", 53 "include/distributedcameramgr/listener", 54 "${common_path}/include/constants", 55 "${common_path}/include/utils", 56 "${innerkits_path}/native_cpp/camera_sink/include", 57 "${innerkits_path}/native_cpp/camera_sink/include/callback", 58 "${innerkits_path}/native_cpp/camera_source/include", 59 "${innerkits_path}/native_cpp/camera_source/include/callback", 60 "${services_path}/cameraservice/base/include", 61 "${services_path}/cameraservice/cameraoperator/client/include", 62 "${services_path}/cameraservice/cameraoperator/client/include/callback", 63 "${services_path}/cameraservice/cameraoperator/client/include/listener", 64 "${services_path}/cameraservice/cameraoperator/handler/include", 65 "${services_path}/channel/include", 66 "${services_path}/data_process/include/eventbus", 67 "${services_path}/data_process/include/interfaces", 68 "${services_path}/data_process/include/pipeline", 69 "${services_path}/data_process/include/utils", 70 "${feeding_smoother_path}/base", 71 "${feeding_smoother_path}/derived", 72 "${feeding_smoother_path}/utils", 73 "${fwk_common_path}/utils/include", 74 "${fwk_innerkits_path}/include", 75 ] 76 77 sources = [ 78 "${innerkits_path}/native_cpp/camera_source/src/distributed_camera_source_proxy.cpp", 79 "${services_path}/cameraservice/base/src/dcamera_capture_info_cmd.cpp", 80 "${services_path}/cameraservice/base/src/dcamera_channel_info_cmd.cpp", 81 "${services_path}/cameraservice/base/src/dcamera_event_cmd.cpp", 82 "${services_path}/cameraservice/base/src/dcamera_info_cmd.cpp", 83 "${services_path}/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp", 84 "${services_path}/cameraservice/base/src/dcamera_open_info_cmd.cpp", 85 "src/distributedcamera/dcamera_sink_callback_proxy.cpp", 86 "src/distributedcamera/dcamera_sink_hidumper.cpp", 87 "src/distributedcamera/distributed_camera_sink_service.cpp", 88 "src/distributedcamera/distributed_camera_sink_stub.cpp", 89 "src/distributedcameramgr/callback/dcamera_sink_controller_state_callback.cpp", 90 "src/distributedcameramgr/callback/dcamera_sink_output_result_callback.cpp", 91 "src/distributedcameramgr/dcamera_sink_access_control.cpp", 92 "src/distributedcameramgr/dcamera_sink_controller.cpp", 93 "src/distributedcameramgr/dcamera_sink_data_process.cpp", 94 "src/distributedcameramgr/dcamera_sink_dev.cpp", 95 "src/distributedcameramgr/dcamera_sink_output.cpp", 96 "src/distributedcameramgr/dcamera_sink_service_ipc.cpp", 97 "src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp", 98 "src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp", 99 "src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp", 100 "src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp", 101 "src/distributedcameramgr/listener/dcamera_sink_controller_channel_listener.cpp", 102 "src/distributedcameramgr/listener/dcamera_sink_data_process_listener.cpp", 103 "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp", 104 ] 105 106 deps = [ 107 "${common_path}:distributed_camera_utils", 108 "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", 109 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 110 "${services_path}/channel:distributed_camera_channel", 111 "${services_path}/data_process:distributed_camera_data_process", 112 "//third_party/cJSON:cjson", 113 "//third_party/jsoncpp:jsoncpp", 114 ] 115 116 defines = [ 117 "HI_LOG_ENABLE", 118 "DH_LOG_TAG=\"dcamerasinksvr\"", 119 "LOG_DOMAIN=0xD004150", 120 ] 121 122 if (build_variant == "root") { 123 defines += [ "DUMP_DCAMERA_FILE" ] 124 } 125 126 external_deps = [ 127 "access_token:libaccesstoken_sdk", 128 "access_token:libtokenid_sdk", 129 "c_utils:utils", 130 "camera_framework:camera_framework", 131 "device_manager:devicemanagersdk", 132 "device_security_level:dslm_sdk", 133 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", 134 "drivers_peripheral_display:hdi_gralloc_client", 135 "eventhandler:libeventhandler", 136 "graphic_surface:surface", 137 "ipc:ipc_core", 138 "safwk:system_ability_fwk", 139 "samgr:samgr_proxy", 140 ] 141 142 subsystem_name = "distributedhardware" 143 144 part_name = "distributed_camera" 145} 146