1# Copyright (C) 2021 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/adapter/uhdf2/uhdf.gni") 16import( 17 "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") 18 19ohos_shared_library("distributed_camera_hdf") { 20 include_dirs = [ 21 "include/dcamera_device", 22 "include/dcamera_host", 23 "include/dcamera_provider", 24 "include/dstream_operator", 25 "include/utils", 26 "../interfaces/include", 27 "../interfaces/hdi_ipc", 28 "../interfaces/hdi_ipc/server/device", 29 "../interfaces/hdi_ipc/server/host", 30 "../interfaces/hdi_ipc/server/operator", 31 "../interfaces/hdi_ipc/server/provider", 32 "//utils/native/base/include", 33 "//utils/system/safwk/native/include", 34 "${common_path}/include/utils", 35 "${common_path}/include/constants", 36 "${fwk_common_path}/log/include", 37 "${fwk_common_path}/utils/include/", 38 "${fwk_utils_path}/include", 39 "${fwk_utils_path}/include/log", 40 "${display_hdf_path}/interfaces/include", 41 "${hdf_framework_path}/include/utils", 42 "${hdf_framework_path}/include/core", 43 "${hdf_framework_path}/include/osal", 44 "${hdf_uhdf_path}/include/hdi", 45 "${hdf_uhdf_path}/osal/include", 46 "${hdf_uhdf_path}/ipc/include", 47 "${hdf_uhdf_path}/include/host", 48 "//third_party/jsoncpp/include", 49 50 #producer 51 "//foundation/graphic/standard/frameworks/surface/include", 52 "//foundation/graphic/standard/interfaces/kits/surface", 53 "//foundation/graphic/standard/utils/buffer_handle/export", 54 "//foundation/communication/ipc/ipc/native/src/core/include", 55 "//drivers/peripheral/camera/interfaces/metadata/include", 56 ] 57 58 sources = [ 59 "../interfaces/hdi_ipc/server/device/dcamera_device_callback_proxy.cpp", 60 "../interfaces/hdi_ipc/server/device/dcamera_device_stub.cpp", 61 "../interfaces/hdi_ipc/server/host/dcamera_host_callback_proxy.cpp", 62 "../interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp", 63 "../interfaces/hdi_ipc/server/operator/doffline_stream_operator_stub.cpp", 64 "../interfaces/hdi_ipc/server/operator/dstream_operator_callback_proxy.cpp", 65 "../interfaces/hdi_ipc/server/operator/dstream_operator_stub.cpp", 66 "../interfaces/hdi_ipc/server/provider/dcamera_provider_callback_proxy.cpp", 67 "../interfaces/hdi_ipc/server/provider/dcamera_provider_stub.cpp", 68 "src/dcamera_device/dcamera_device.cpp", 69 "src/dcamera_device/dmetadata_processor.cpp", 70 "src/dcamera_host/dcamera_host.cpp", 71 "src/dcamera_provider/dcamera_provider.cpp", 72 "src/dstream_operator/dbuffer_manager.cpp", 73 "src/dstream_operator/dcamera_steam.cpp", 74 "src/dstream_operator/dimage_buffer.cpp", 75 "src/dstream_operator/doffline_stream_operator.cpp", 76 "src/dstream_operator/dstream_operator.cpp", 77 "src/utils/dcamera.cpp", 78 ] 79 80 cflags = [ 81 "-fPIC", 82 "-Wall", 83 ] 84 85 if (device_name == "baltimore") { 86 cflags += [ "-DBALTIMORE_CAMERA" ] 87 include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] 88 } else { 89 include_dirs += [ 90 "${camera_hdf_path}/camera/interfaces/include", 91 "${camera_hdf_path}/camera/interfaces/hdi_ipc", 92 ] 93 } 94 95 deps = [ 96 "${common_path}:distributed_camera_utils", 97 "${fwk_utils_path}:distributedhardwareutils", 98 "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", 99 "//drivers/peripheral/camera/interfaces/metadata:metadata", 100 "//drivers/peripheral/display/hal:hdi_display_gralloc", 101 "//foundation/graphic/standard/frameworks/surface:surface", 102 "//third_party/jsoncpp:jsoncpp", 103 "//utils/native/base:utils", 104 ] 105 106 defines = [ 107 "HI_LOG_ENABLE", 108 "DH_LOG_TAG=\"distributedcamerahdf\"", 109 "LOG_DOMAIN=0xD004100", 110 ] 111 112 external_deps = [ 113 "hiviewdfx_hilog_native:libhilog", 114 "ipc:ipc_single", 115 ] 116 117 cflags_cc = cflags 118 subsystem_name = "distributedhardware" 119 120 part_name = "distributed_camera" 121} 122