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") 15 16ohos_shared_library("camera_service") { 17 install_enable = true 18 sources = [ 19 "binder/client/src/hcamera_device_callback_proxy.cpp", 20 "binder/client/src/hcamera_listener_proxy.cpp", 21 "binder/client/src/hcamera_service_callback_proxy.cpp", 22 "binder/client/src/hcapture_session_callback_proxy.cpp", 23 "binder/client/src/hstream_capture_callback_proxy.cpp", 24 "binder/client/src/hstream_repeat_callback_proxy.cpp", 25 "binder/server/src/hcamera_device_stub.cpp", 26 "binder/server/src/hcamera_service_stub.cpp", 27 "binder/server/src/hcapture_session_stub.cpp", 28 "binder/server/src/hstream_capture_stub.cpp", 29 "binder/server/src/hstream_metadata_stub.cpp", 30 "binder/server/src/hstream_repeat_stub.cpp", 31 "src/camera_util.cpp", 32 "src/hcamera_device.cpp", 33 "src/hcamera_host_manager.cpp", 34 "src/hcamera_service.cpp", 35 "src/hcapture_session.cpp", 36 "src/hstream_capture.cpp", 37 "src/hstream_common.cpp", 38 "src/hstream_metadata.cpp", 39 "src/hstream_repeat.cpp", 40 ] 41 cflags = [ 42 "-fPIC", 43 "-Wall", 44 ] 45 46 include_dirs = [ 47 "//drivers/peripheral/camera/interfaces/metadata/include", 48 "//drivers/peripheral/display/interfaces/include", 49 "//foundation/graphic/graphic_2d/frameworks/surface/include", 50 "//foundation/multimedia/camera_framework/services/camera_service/include", 51 "//foundation/multimedia/camera_framework/services/camera_service/binder/base/include", 52 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/include", 53 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/include", 54 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include", 55 "//foundation/window/window_manager/interfaces/innerkits/dm", 56 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 57 ] 58 59 if (target_cpu == "arm") { 60 cflags += [ "-DBINDER_IPC_32BIT" ] 61 } 62 63 deps = [ 64 "//drivers/hdf_core/adapter/uhdf2/hdi:libhdi", 65 "//drivers/peripheral/camera/interfaces/metadata:metadata", 66 "//foundation/graphic/graphic_2d:libsurface", 67 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 68 "//foundation/window/window_manager/dm:libdm", 69 ] 70 71 external_deps = [ 72 "ability_base:want", 73 "access_token:libaccesstoken_sdk", 74 "access_token:libprivacy_sdk", 75 "bundle_framework:appexecfwk_base", 76 "bundle_framework:appexecfwk_core", 77 "hicollie_native:libhicollie", 78 "hisysevent_native:libhisysevent", 79 "hitrace_native:hitrace_meter", 80 "hiviewdfx_hilog_native:libhilog", 81 "ipc:ipc_core", 82 "ipc:ipc_single", 83 "safwk:system_ability_fwk", 84 "samgr:samgr_proxy", 85 ] 86 87 include_dirs += [ 88 "//drivers/peripheral/camera/interfaces/include", 89 "//drivers/peripheral/camera/interfaces/hdi_ipc", 90 "//drivers/peripheral/camera/interfaces/hdi_ipc/utils/include", 91 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/device/include", 92 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/operator/include", 93 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/host/include", 94 ] 95 96 deps += [ "//drivers/interface/camera/v1_0:libcamera_proxy_1.0" ] 97 98 if (use_musl) { 99 if (use_jemalloc && use_jemalloc_dfx_intf) { 100 cflags += [ "-DCONFIG_USE_JEMALLOC_DFX_INTF" ] 101 } 102 } 103 104 cflags_cc = cflags 105 106 part_name = "multimedia_camera_framework" 107 subsystem_name = "multimedia" 108} 109