11c1b0f19Sopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd. 21c1b0f19Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 31c1b0f19Sopenharmony_ci# you may not use this file except in compliance with the License. 41c1b0f19Sopenharmony_ci# You may obtain a copy of the License at 51c1b0f19Sopenharmony_ci# 61c1b0f19Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 71c1b0f19Sopenharmony_ci# 81c1b0f19Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 91c1b0f19Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 101c1b0f19Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111c1b0f19Sopenharmony_ci# See the License for the specific language governing permissions and 121c1b0f19Sopenharmony_ci# limitations under the License. 131c1b0f19Sopenharmony_ci 141c1b0f19Sopenharmony_ciimport("//build/ohos.gni") 151c1b0f19Sopenharmony_ciimport("//build/ohos_var.gni") 161c1b0f19Sopenharmony_ciimport( 171c1b0f19Sopenharmony_ci "//foundation/distributedhardware/distributed_camera/distributedcamera.gni") 181c1b0f19Sopenharmony_ci 191c1b0f19Sopenharmony_ciohos_shared_library("distributed_camera_source") { 201c1b0f19Sopenharmony_ci sanitize = { 211c1b0f19Sopenharmony_ci cfi = true 221c1b0f19Sopenharmony_ci cfi_cross_dso = true 231c1b0f19Sopenharmony_ci debug = false 241c1b0f19Sopenharmony_ci boundary_sanitize = true 251c1b0f19Sopenharmony_ci integer_overflow = true 261c1b0f19Sopenharmony_ci ubsan = true 271c1b0f19Sopenharmony_ci } 281c1b0f19Sopenharmony_ci stack_protector_ret = true 291c1b0f19Sopenharmony_ci 301c1b0f19Sopenharmony_ci include_dirs = [ 311c1b0f19Sopenharmony_ci "include/distributedcamera", 321c1b0f19Sopenharmony_ci "include/distributedcameramgr", 331c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcamerainterface", 341c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcamerastate", 351c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameracontrol", 361c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameradata", 371c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameradata/feedingsmoother", 381c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameradata/feedingsmoother/base", 391c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameradata/feedingsmoother/derived", 401c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcameradata/feedingsmoother/utils", 411c1b0f19Sopenharmony_ci "include/distributedcameramgr/dcamerahdf", 421c1b0f19Sopenharmony_ci "${common_path}/include/constants", 431c1b0f19Sopenharmony_ci "${common_path}/include/utils", 441c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_source/include", 451c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_sink/include", 461c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_sink/include/callback", 471c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_source/include/callback", 481c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/include", 491c1b0f19Sopenharmony_ci "${services_path}/channel/include", 501c1b0f19Sopenharmony_ci "${services_path}/cameraservice/cameraoperator/handler/include", 511c1b0f19Sopenharmony_ci "${services_path}/data_process/include/eventbus", 521c1b0f19Sopenharmony_ci "${services_path}/data_process/include/interfaces", 531c1b0f19Sopenharmony_ci "${services_path}/data_process/include/pipeline", 541c1b0f19Sopenharmony_ci "${services_path}/data_process/include/utils", 551c1b0f19Sopenharmony_ci ] 561c1b0f19Sopenharmony_ci 571c1b0f19Sopenharmony_ci sources = [ 581c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp", 591c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_capture_info_cmd.cpp", 601c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_channel_info_cmd.cpp", 611c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_event_cmd.cpp", 621c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_info_cmd.cpp", 631c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp", 641c1b0f19Sopenharmony_ci "${services_path}/cameraservice/base/src/dcamera_open_info_cmd.cpp", 651c1b0f19Sopenharmony_ci "src/distributedcamera/dcamera_service_state_listener.cpp", 661c1b0f19Sopenharmony_ci "src/distributedcamera/dcamera_source_callback_proxy.cpp", 671c1b0f19Sopenharmony_ci "src/distributedcamera/dcamera_source_hidumper.cpp", 681c1b0f19Sopenharmony_ci "src/distributedcamera/distributed_camera_source_service.cpp", 691c1b0f19Sopenharmony_ci "src/distributedcamera/distributed_camera_source_stub.cpp", 701c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamera_source_dev.cpp", 711c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamera_source_event.cpp", 721c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamera_source_service_ipc.cpp", 731c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameracontrol/dcamera_source_controller.cpp", 741c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameracontrol/dcamera_source_controller_channel_listener.cpp", 751c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_source_data_process.cpp", 761c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_source_input.cpp", 771c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_source_input_channel_listener.cpp", 781c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_stream_data_process.cpp", 791c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_stream_data_process_pipeline_listener.cpp", 801c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/dcamera_stream_data_process_producer.cpp", 811c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/feedingsmoother/base/ifeeding_smoother.cpp", 821c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/feedingsmoother/base/time_statistician.cpp", 831c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/feedingsmoother/derived/dcamera_feeding_smoother.cpp", 841c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/feedingsmoother/derived/dcamera_time_statistician.cpp", 851c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcameradata/feedingsmoother/feeding_smoother_listener.cpp", 861c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerahdf/dcamera_hdf_operate.cpp", 871c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerahdf/dcamera_provider_callback_impl.cpp", 881c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_capture_state.cpp", 891c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_config_stream_state.cpp", 901c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_init_state.cpp", 911c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_opened_state.cpp", 921c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_regist_state.cpp", 931c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_state_factory.cpp", 941c1b0f19Sopenharmony_ci "src/distributedcameramgr/dcamerastate/dcamera_source_state_machine.cpp", 951c1b0f19Sopenharmony_ci ] 961c1b0f19Sopenharmony_ci 971c1b0f19Sopenharmony_ci deps = [ 981c1b0f19Sopenharmony_ci "${common_path}:distributed_camera_utils", 991c1b0f19Sopenharmony_ci "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", 1001c1b0f19Sopenharmony_ci "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 1011c1b0f19Sopenharmony_ci "${services_path}/channel:distributed_camera_channel", 1021c1b0f19Sopenharmony_ci "${services_path}/data_process:distributed_camera_data_process", 1031c1b0f19Sopenharmony_ci ] 1041c1b0f19Sopenharmony_ci 1051c1b0f19Sopenharmony_ci defines = [ 1061c1b0f19Sopenharmony_ci "HI_LOG_ENABLE", 1071c1b0f19Sopenharmony_ci "DH_LOG_TAG=\"dcamerasourcesvr\"", 1081c1b0f19Sopenharmony_ci "LOG_DOMAIN=0xD004150", 1091c1b0f19Sopenharmony_ci ] 1101c1b0f19Sopenharmony_ci 1111c1b0f19Sopenharmony_ci if (build_variant == "root") { 1121c1b0f19Sopenharmony_ci defines += [ "DUMP_DCAMERA_FILE" ] 1131c1b0f19Sopenharmony_ci } 1141c1b0f19Sopenharmony_ci 1151c1b0f19Sopenharmony_ci if (!distributed_camera_common) { 1161c1b0f19Sopenharmony_ci cflags = [ "-DDCAMERA_MMAP_RESERVE" ] 1171c1b0f19Sopenharmony_ci } 1181c1b0f19Sopenharmony_ci 1191c1b0f19Sopenharmony_ci external_deps = [ 1201c1b0f19Sopenharmony_ci "access_token:libaccesstoken_sdk", 1211c1b0f19Sopenharmony_ci "access_token:libtokenid_sdk", 1221c1b0f19Sopenharmony_ci "av_codec:av_codec_client", 1231c1b0f19Sopenharmony_ci "cJSON:cjson", 1241c1b0f19Sopenharmony_ci "c_utils:utils", 1251c1b0f19Sopenharmony_ci "camera_framework:camera_framework", 1261c1b0f19Sopenharmony_ci "distributed_hardware_fwk:distributed_av_receiver", 1271c1b0f19Sopenharmony_ci "distributed_hardware_fwk:distributedhardwareutils", 1281c1b0f19Sopenharmony_ci "distributed_hardware_fwk:libdhfwk_sdk", 1291c1b0f19Sopenharmony_ci "drivers_interface_camera:metadata", 1301c1b0f19Sopenharmony_ci "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", 1311c1b0f19Sopenharmony_ci "dsoftbus:softbus_client", 1321c1b0f19Sopenharmony_ci "eventhandler:libeventhandler", 1331c1b0f19Sopenharmony_ci "ffrt:libffrt", 1341c1b0f19Sopenharmony_ci "graphic_surface:surface", 1351c1b0f19Sopenharmony_ci "hdf_core:libhdf_ipc_adapter", 1361c1b0f19Sopenharmony_ci "hdf_core:libhdi", 1371c1b0f19Sopenharmony_ci "hdf_core:libpub_utils", 1381c1b0f19Sopenharmony_ci "hicollie:libhicollie", 1391c1b0f19Sopenharmony_ci "hilog:libhilog", 1401c1b0f19Sopenharmony_ci "hitrace:hitrace_meter", 1411c1b0f19Sopenharmony_ci "ipc:ipc_core", 1421c1b0f19Sopenharmony_ci "media_foundation:media_foundation", 1431c1b0f19Sopenharmony_ci "safwk:system_ability_fwk", 1441c1b0f19Sopenharmony_ci "samgr:samgr_proxy", 1451c1b0f19Sopenharmony_ci ] 1461c1b0f19Sopenharmony_ci 1471c1b0f19Sopenharmony_ci subsystem_name = "distributedhardware" 1481c1b0f19Sopenharmony_ci 1491c1b0f19Sopenharmony_ci part_name = "distributed_camera" 1501c1b0f19Sopenharmony_ci} 151