1# Copyright (c) 2022 - 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("//drivers/peripheral/distributed_camera/distributedcamera.gni") 16 17config("dcamera_hdf_demo_config") { 18 visibility = [ ":*" ] 19} 20 21ohos_executable("dcamera_hdf_demo") { 22 install_enable = false 23 sources = [ 24 "./dcamera_hdf_demo.cpp", 25 "./demo_main.cpp", 26 "./stream_customer.cpp", 27 ] 28 29 include_dirs = [ 30 "$distributedcamera_hdf_path/hdi_service/include/dcamera_host", 31 "$distributedcamera_hdf_path/hdi_service/include/dcamera_device", 32 "$distributedcamera_hdf_path/hdi_service/include/dstream_operator", 33 "$distributedcamera_hdf_path/hdi_service/include/dstream_provider", 34 "$distributedcamera_hdf_path/hdi_service/include/utils", 35 ] 36 37 deps = [ "$distributedcamera_hdf_path/hdi_service:libdistributed_camera_hdf_service_1.1" ] 38 39 cflags = [ 40 "-fPIC", 41 "-Wall", 42 ] 43 44 if (!drivers_peripheral_distributed_camera_extension) { 45 cflags += [ "-DDCAMERA_DRIVER_YUV" ] 46 } 47 48 external_deps = [ 49 "cJSON:cjson", 50 "c_utils:utils", 51 "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", 52 "drivers_interface_camera:libcamera_proxy_1.0", 53 "drivers_interface_camera:metadata", 54 "drivers_interface_display:libdisplay_composer_proxy_1.0", 55 "graphic_surface:surface", 56 "hdf_core:libhdf_ipc_adapter", 57 "hdf_core:libhdf_utils", 58 "hdf_core:libhdi", 59 "hilog:libhilog", 60 "ipc:ipc_single", 61 "samgr:samgr_proxy", 62 ] 63 64 defines = [ 65 "HI_LOG_ENABLE", 66 "DH_LOG_TAG=\"DCameraHdfDemo\"", 67 "LOG_DOMAIN=0xD004150", 68 ] 69 70 cflags_cc = cflags 71 subsystem_name = "hdf" 72 part_name = "drivers_peripheral_distributed_camera" 73} 74