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 16config("camera_config") { 17 include_dirs = [ 18 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include", 19 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/test", 20 "//foundation/multimedia/camera_framework/services/camera_service/include", 21 "//foundation/multimedia/camera_framework/services/camera_service/binder/base/include", 22 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/include", 23 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/include", 24 "//foundation/graphic/graphic_2d/frameworks/surface/include", 25 "//drivers/peripheral/camera/interfaces/metadata/include", 26 "//utils/system/safwk/native/include", 27 "//drivers/peripheral/display/interfaces/include", 28 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 29 "//base/security/access_token/interfaces/innerkits/token_setproc/include", 30 ] 31 32 include_dirs += [ 33 "//drivers/peripheral/camera/interfaces/include", 34 "//drivers/peripheral/camera/interfaces/hdi_ipc", 35 "//drivers/peripheral/camera/interfaces/hdi_ipc/server", 36 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/device", 37 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/operator", 38 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/host", 39 ] 40} 41 42ohos_executable("camera_video") { 43 install_enable = false 44 sources = [ 45 "camera_video.cpp", 46 "test_common.cpp", 47 ] 48 cflags = [ 49 "-fPIC", 50 "-g", 51 ] 52 cflags += [ "-Wall" ] 53 cflags_cc = cflags 54 55 configs = [ ":camera_config" ] 56 57 deps = [ 58 "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", 59 "//drivers/peripheral/camera/interfaces/metadata:metadata", 60 "//foundation/graphic/graphic_2d:libsurface", 61 "//foundation/multimedia/camera_framework/frameworks/native/camera:camera_framework", 62 ] 63 64 external_deps = [ 65 "access_token:libaccesstoken_sdk", 66 "access_token:libnativetoken", 67 "access_token:libtoken_setproc", 68 "c_utils:utils", 69 "hisysevent_native:libhisysevent", 70 "hitrace_native:hitrace_meter", 71 "hiviewdfx_hilog_native:libhilog", 72 "ipc:ipc_core", 73 "ipc:ipc_single", 74 "multimedia_player_framework:media_client", 75 ] 76 part_name = "multimedia_camera_framework" 77 subsystem_name = "multimedia" 78} 79 80ohos_executable("camera_capture") { 81 install_enable = false 82 sources = [ 83 "camera_capture.cpp", 84 "test_common.cpp", 85 ] 86 cflags = [ 87 "-fPIC", 88 "-g", 89 ] 90 cflags += [ "-Wall" ] 91 cflags_cc = cflags 92 93 configs = [ ":camera_config" ] 94 95 deps = [ 96 "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", 97 "//drivers/peripheral/camera/interfaces/metadata:metadata", 98 "//foundation/graphic/graphic_2d:libsurface", 99 "//foundation/multimedia/camera_framework/frameworks/native/camera:camera_framework", 100 ] 101 102 external_deps = [ 103 "access_token:libaccesstoken_sdk", 104 "access_token:libnativetoken", 105 "access_token:libtoken_setproc", 106 "c_utils:utils", 107 "hisysevent_native:libhisysevent", 108 "hitrace_native:hitrace_meter", 109 "hiviewdfx_hilog_native:libhilog", 110 "ipc:ipc_core", 111 ] 112 part_name = "multimedia_camera_framework" 113 subsystem_name = "multimedia" 114} 115 116ohos_executable("camera_capture_video") { 117 install_enable = false 118 sources = [ 119 "camera_capture_video.cpp", 120 "test_common.cpp", 121 ] 122 cflags = [ 123 "-fPIC", 124 "-g", 125 ] 126 cflags += [ "-Wall" ] 127 cflags_cc = cflags 128 129 configs = [ ":camera_config" ] 130 131 deps = [ 132 "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", 133 "//drivers/peripheral/camera/interfaces/metadata:metadata", 134 "//foundation/graphic/graphic_2d:libsurface", 135 "//foundation/multimedia/camera_framework/frameworks/native/camera:camera_framework", 136 ] 137 138 external_deps = [ 139 "access_token:libaccesstoken_sdk", 140 "access_token:libnativetoken", 141 "access_token:libtoken_setproc", 142 "c_utils:utils", 143 "hisysevent_native:libhisysevent", 144 "hitrace_native:hitrace_meter", 145 "hiviewdfx_hilog_native:libhilog", 146 "ipc:ipc_core", 147 ] 148 part_name = "multimedia_camera_framework" 149 subsystem_name = "multimedia" 150} 151