# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("../camera_usb.gni") import("//build/ohos.gni") config("buffer_manager_config") { visibility = [ ":*" ] cflags = [ "-DGST_DISABLE_DEPRECATED", "-DHAVE_CONFIG_H", ] ldflags = [ "-Wl" ] if (enable_camera_device_utest) { cflags += [ "-fprofile-arcs", "-ftest-coverage", ] ldflags += [ "--coverage" ] } } ohos_shared_library("usb_camera_buffer_manager") { sources = [ "$camera_path_vdi/buffer_manager/src/buffer_allocator.cpp", "$camera_path_vdi/buffer_manager/src/buffer_allocator_factory.cpp", "$camera_path_vdi/buffer_manager/src/buffer_allocator_utils.cpp", "$camera_path_vdi/buffer_manager/src/buffer_loop_tracking.cpp", "$camera_path_vdi/buffer_manager/src/buffer_manager.cpp", "$camera_path_vdi/buffer_manager/src/buffer_pool.cpp", "$camera_path_vdi/buffer_manager/src/buffer_tracking.cpp", "$camera_path_vdi/buffer_manager/src/heap_buffer_allocator/heap_buffer_allocator.cpp", "$camera_path_vdi/buffer_manager/src/image_buffer.cpp", "./src/buffer_adapter/standard/buffer_adapter.cpp", ] include_dirs = [ "$camera_path_vdi/buffer_manager/include", "$camera_path_vdi/buffer_manager/src/buffer_adapter/standard", "$camera_path_vdi/include", "$camera_path_vdi/../../interfaces/include", "$camera_path_vdi/utils/event", ] libs = [] defines = [] deps = [ "$camera_path_vdi/utils:peripheral_camera_utils" ] if (enable_camera_device_utest) { defines += [ "CAMERA_DEVICE_UTEST" ] } external_deps = [ "c_utils:utils", "drivers_interface_camera:metadata", "graphic_surface:surface", "hdf_core:libhdf_utils", "hilog:libhilog", ] public_configs = [ ":buffer_manager_config" ] install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_camera" }