1# Copyright (c) 2021-2022 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 include_dirs = [ 21 "//commonlibrary/c_utils/base/include", 22 "//utils/system/safwk/native/include", 23 "//drivers/peripheral/camera/interfaces/metadata/include", 24 "${graphicstandard_path}/frameworks/surface/include", 25 "${camerastandard_path}/interfaces/inner_api/native/camera/include", 26 "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", 27 "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", 28 "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", 29 "${camerastandard_path}/services/camera_service/binder/base/include", 30 "${camerastandard_path}/services/camera_service/binder/client/include", 31 "${camerastandard_path}/services/camera_service/binder/server/include", 32 "${camerastandard_path}/services/camera_service/include", 33 "${fwk_common_path}/utils/include", 34 "${fwk_utils_path}/include/eventbus", 35 "//third_party/jsoncpp/include", 36 ] 37 38 include_dirs += [ 39 "include/distributedcamera", 40 "include/distributedcameramgr", 41 "include/distributedcameramgr/callback", 42 "include/distributedcameramgr/eventbus", 43 "include/distributedcameramgr/interface", 44 "include/distributedcameramgr/listener", 45 "${common_path}/include/constants", 46 "${common_path}/include/utils", 47 "${innerkits_path}/native_cpp/camera_sink/include", 48 "${innerkits_path}/native_cpp/camera_source/include", 49 "${innerkits_path}/native_cpp/camera_source/include/callback", 50 "${services_path}/cameraservice/base/include", 51 "${services_path}/cameraservice/cameraoperator/client/include", 52 "${services_path}/cameraservice/cameraoperator/client/include/callback", 53 "${services_path}/cameraservice/cameraoperator/client/include/listener", 54 "${services_path}/cameraservice/cameraoperator/handler/include", 55 "${services_path}/channel/include", 56 "${services_path}/data_process/include/eventbus", 57 "${services_path}/data_process/include/interfaces", 58 "${services_path}/data_process/include/pipeline", 59 "${services_path}/data_process/include/utils", 60 ] 61 62 sources = [ 63 "${innerkits_path}/native_cpp/camera_source/src/distributed_camera_source_proxy.cpp", 64 "${services_path}/cameraservice/base/src/dcamera_capture_info_cmd.cpp", 65 "${services_path}/cameraservice/base/src/dcamera_channel_info_cmd.cpp", 66 "${services_path}/cameraservice/base/src/dcamera_event_cmd.cpp", 67 "${services_path}/cameraservice/base/src/dcamera_info_cmd.cpp", 68 "${services_path}/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp", 69 "${services_path}/cameraservice/base/src/dcamera_open_info_cmd.cpp", 70 "src/distributedcamera/dcamera_sink_hidumper.cpp", 71 "src/distributedcamera/distributed_camera_sink_service.cpp", 72 "src/distributedcamera/distributed_camera_sink_stub.cpp", 73 "src/distributedcameramgr/callback/dcamera_sink_controller_state_callback.cpp", 74 "src/distributedcameramgr/callback/dcamera_sink_output_result_callback.cpp", 75 "src/distributedcameramgr/dcamera_sink_access_control.cpp", 76 "src/distributedcameramgr/dcamera_sink_controller.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/eventbus/dcamera_frame_trigger_event.cpp", 81 "src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp", 82 "src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp", 83 "src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp", 84 "src/distributedcameramgr/listener/dcamera_sink_controller_channel_listener.cpp", 85 "src/distributedcameramgr/listener/dcamera_sink_data_process_listener.cpp", 86 "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp", 87 ] 88 89 if (!distributed_camera_common) { 90 sources += [ "src/distributedcameramgr/dcamera_sink_data_process.cpp" ] 91 } else { 92 sources += 93 [ "src/distributedcameramgr/dcamera_sink_data_process_common.cpp" ] 94 } 95 96 deps = [ 97 "${camerastandard_path}/frameworks/native/camera:camera_framework", 98 "${common_path}:distributed_camera_utils", 99 "${graphicstandard_path}:libsurface", 100 "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", 101 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 102 "${services_path}/channel:distributed_camera_channel", 103 "${services_path}/data_process:distributed_camera_data_process", 104 "//third_party/jsoncpp:jsoncpp", 105 ] 106 107 defines = [ 108 "HI_LOG_ENABLE", 109 "DH_LOG_TAG=\"dcamerasinksvr\"", 110 "LOG_DOMAIN=0xD004100", 111 ] 112 113 external_deps = [ 114 "c_utils:utils", 115 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", 116 "eventhandler:libeventhandler", 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