mirror of
https://github.com/openharmony/device_board_osware.git
synced 2026-07-19 17:23:31 -04:00
!37 fix:change camera build entry
Merge pull request !37 from Liu Xingkai/camera_dev_0602
This commit is contained in:
+3
-7
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
|
||||
# Copyright (C) 2021–2023 Beijing OSWare Technology Co., Ltd
|
||||
# This file contains confidential and proprietary information of
|
||||
# OSWare Technology Co., Ltd
|
||||
#
|
||||
@@ -25,14 +25,10 @@ if (!defined(defines)) {
|
||||
}
|
||||
|
||||
product_config_path = "//vendor/${product_company}/${product_name}"
|
||||
board_camera_path = "//device/board/${product_company}/${device_name}/drivers/camera"
|
||||
board_camera_path =
|
||||
"//device/board/${product_company}/${device_name}/drivers/camera"
|
||||
is_support_v4l2 = true
|
||||
if (is_support_v4l2) {
|
||||
is_support_mpi = false
|
||||
defines += [ "SUPPORT_V4L2" ]
|
||||
chipset_build_deps = "$board_camera_path:chipset_build"
|
||||
camera_device_manager_deps =
|
||||
"$board_camera_path/src/device_manager:camera_device_manager"
|
||||
camera_pipeline_core_deps =
|
||||
"$board_camera_path/src/pipeline_core:camera_pipeline_core"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
|
||||
# Copyright (C) 2021–2023 Beijing OSWare Technology Co., Ltd
|
||||
# This file contains confidential and proprietary information of
|
||||
# OSWare Technology Co., Ltd
|
||||
#
|
||||
@@ -14,6 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
import("$hdf_framework_path/tools/hc-gen/hc_gen.gni")
|
||||
@@ -29,8 +30,8 @@ ohos_prebuilt_etc("camera_host_config.hcb") {
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "drivers_peripheral_camera"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
|
||||
hc_gen_c("generate_source") {
|
||||
@@ -90,8 +91,8 @@ ohos_prebuilt_etc("ipp_algo_config.hcb") {
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "drivers_peripheral_camera"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
|
||||
config("example_config") {
|
||||
@@ -110,8 +111,201 @@ group("chipset_build") {
|
||||
":config.c",
|
||||
":ipp_algo_config.hcb",
|
||||
":params.c",
|
||||
"$board_camera_path/src/driver_adapter:camera_v4l2_adapter",
|
||||
"$board_camera_path/src/driver_adapter/main_test:v4l2_main",
|
||||
"$board_camera_path/src/pipeline_core:camera_ipp_algo_example",
|
||||
"$board_camera_path/pipeline_core:camera_ipp_algo_example",
|
||||
]
|
||||
}
|
||||
|
||||
config("camhdi_impl_config") {
|
||||
visibility = [ ":*" ]
|
||||
cflags = [
|
||||
"-DGST_DISABLE_DEPRECATED",
|
||||
"-DHAVE_CONFIG_H",
|
||||
]
|
||||
|
||||
ldflags = [ "-Wl" ]
|
||||
|
||||
if (enable_camera_device_utest) {
|
||||
cflags += [
|
||||
"-fprofile-arcs",
|
||||
"-ftest-coverage",
|
||||
]
|
||||
|
||||
ldflags += [ "--coverage" ]
|
||||
}
|
||||
}
|
||||
|
||||
host_sources = [
|
||||
"$camera_path/../v4l2/src/camera_device/camera_device_vdi_impl.cpp",
|
||||
"$camera_path/../v4l2/src/camera_dump.cpp",
|
||||
"$camera_path/../v4l2/src/camera_host/camera_host_config.cpp",
|
||||
"$camera_path/../v4l2/src/camera_host/camera_host_vdi_impl.cpp",
|
||||
"$camera_path/../v4l2/src/camera_host/hcs_deal.cpp",
|
||||
"$camera_path/../v4l2/src/offline_stream_operator/offline_stream.cpp",
|
||||
"$camera_path/../v4l2/src/offline_stream_operator/offline_stream_operator_vdi_impl.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/capture_message.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/capture_request.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_base.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_operator_vdi_impl.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_post_view.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_preview.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_statistics.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_still_capture.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard/stream_tunnel.cpp",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_video.cpp",
|
||||
]
|
||||
|
||||
host_includes = [
|
||||
"$camera_path/../../interfaces/include",
|
||||
"$camera_path/include",
|
||||
"$camera_path/metadata_manager/include",
|
||||
"$camera_path/utils/watchdog",
|
||||
"$camera_path/../interfaces",
|
||||
"$camera_path/../v4l2/include",
|
||||
"$camera_path/../v4l2/include/camera_host",
|
||||
"$camera_path/../v4l2/include/camera_device",
|
||||
"$camera_path/../v4l2/include/stream_operator",
|
||||
"$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard",
|
||||
"$camera_path/../v4l2/include/offline_stream_operator",
|
||||
"$camera_path/device_manager/include/",
|
||||
"$camera_path/buffer_manager/src/buffer_adapter/standard",
|
||||
"$camera_path/utils/event",
|
||||
"$camera_path/../../display/interfaces/include",
|
||||
|
||||
#producer
|
||||
"$camera_path/pipeline_core/utils",
|
||||
"$camera_path/pipeline_core/include",
|
||||
"$camera_path/pipeline_core/host_stream/include",
|
||||
"$camera_path/pipeline_core/nodes/include",
|
||||
"$camera_path/pipeline_core/nodes/src/node_base",
|
||||
"$camera_path/pipeline_core/nodes/src/dummy_node",
|
||||
"$camera_path/pipeline_core/pipeline_impl/include",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/builder",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/parser",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy",
|
||||
"$camera_path/pipeline_core/ipp/include",
|
||||
]
|
||||
|
||||
ohos_shared_library("camera_host_vdi_impl_1.0") {
|
||||
sources = host_sources
|
||||
include_dirs = host_includes
|
||||
|
||||
deps = [
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"$board_camera_path/metadata_manager:camera_metadata_manager",
|
||||
"$board_camera_path/pipeline_core:camera_pipeline_core",
|
||||
"$camera_path/buffer_manager:camera_buffer_manager",
|
||||
"$camera_path/utils:camera_utils",
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (enable_camera_device_utest) {
|
||||
defines += [ "CAMERA_DEVICE_UTEST" ]
|
||||
}
|
||||
if (use_hitrace) {
|
||||
defines += [ "HITRACE_LOG_ENABLED" ]
|
||||
}
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_host",
|
||||
"hdf_core:libhdf_ipc_adapter",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hdf_core:libhdi",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
if (use_hitrace) {
|
||||
external_deps += [ "hitrace_native:libhitracechain" ]
|
||||
}
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
external_deps += [
|
||||
"drivers_interface_camera:libcamera_stub_1.0",
|
||||
"drivers_interface_camera:metadata",
|
||||
"hitrace_native:hitrace_meter",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
public_configs = [ ":camhdi_impl_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
|
||||
ohos_static_library("camera_host_vdi_impl_1.0_static") {
|
||||
sources = host_sources
|
||||
include_dirs = host_includes
|
||||
|
||||
deps = [
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"$board_camera_path/metadata_manager:camera_metadata_manager",
|
||||
"$board_camera_path/pipeline_core:camera_pipeline_core",
|
||||
"$camera_path/buffer_manager:camera_buffer_manager",
|
||||
"$camera_path/utils:camera_utils",
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (enable_camera_device_utest) {
|
||||
defines += [ "CAMERA_DEVICE_UTEST" ]
|
||||
}
|
||||
if (use_hitrace) {
|
||||
defines += [ "HITRACE_LOG_ENABLED" ]
|
||||
}
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_host",
|
||||
"hdf_core:libhdf_ipc_adapter",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hdf_core:libhdi",
|
||||
"hitrace_native:hitrace_meter",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
if (use_hitrace) {
|
||||
external_deps += [ "hitrace_native:libhitracechain" ]
|
||||
}
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
external_deps += [
|
||||
"drivers_interface_camera:libcamera_stub_1.0",
|
||||
"drivers_interface_camera:metadata",
|
||||
"hitrace_native:hitrace_meter",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
|
||||
public_configs = [ ":camhdi_impl_config" ]
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
|
||||
group("camera_board_test") {
|
||||
if (target_cpu == "x86_64") {
|
||||
deps = []
|
||||
} else {
|
||||
testonly = true
|
||||
deps = [
|
||||
#device manager test
|
||||
"device_manager/test/unittest:camera_board_device_manager_unittest",
|
||||
|
||||
#driver adapter v4l2 test
|
||||
"driver_adapter/test/main_test:v4l2_main",
|
||||
|
||||
#driver adapter v4l2 unittest
|
||||
"driver_adapter/test/unittest:v4l2_adapter_unittest",
|
||||
|
||||
# pipeline core test
|
||||
"pipeline_core/test/unittest:camera_pipeline_core_test_ut",
|
||||
|
||||
# demo test
|
||||
"demo:ohos_camera_demo",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
# 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("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
config("ohos_camera_demo_config") {
|
||||
visibility = [ ":*" ]
|
||||
cflags_cc = [
|
||||
"-Wno-error",
|
||||
"-std=c++17",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_executable("ohos_camera_demo") {
|
||||
install_enable = false
|
||||
sources = [
|
||||
"$camera_path/../../test/demo/demo_main.cpp",
|
||||
"$camera_path/../../test/demo/ohos_camera_demo.cpp",
|
||||
"$camera_path/../../test/demo/stream_customer.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"$board_camera_path/demo/include",
|
||||
"$camera_path/../../test/demo/include",
|
||||
"$camera_path/../../interfaces/include",
|
||||
"$camera_path/../../interfaces/hdi_ipc",
|
||||
"$camera_path/../../interfaces/hdi_ipc/utils/include",
|
||||
"$camera_path/../../test/common/callback/include",
|
||||
"$camera_path/include",
|
||||
"$camera_path/../v4l2",
|
||||
"$camera_path/../v4l2/include",
|
||||
"$camera_path/../v4l2/include/camera_host",
|
||||
"$camera_path/../v4l2/include/camera_device",
|
||||
"$camera_path/../v4l2/include/stream_operator",
|
||||
"$camera_path/../v4l2/include/offline_stream_operator",
|
||||
"$camera_path/device_manager/include/",
|
||||
"$camera_path/device_manager/include/mpi",
|
||||
"$camera_path/utils/event",
|
||||
|
||||
#producer
|
||||
"$camera_path/pipeline_core/utils",
|
||||
"$camera_path/pipeline_core/include",
|
||||
"$camera_path/pipeline_core/host_stream/include",
|
||||
"$camera_path/pipeline_core/nodes/include",
|
||||
"$camera_path/pipeline_core/nodes/src/node_base",
|
||||
"$camera_path/pipeline_core/nodes/src/dummy_node",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config",
|
||||
"$camera_path/pipeline_core/pipeline_impl/include",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/builder",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/parser",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy",
|
||||
"$camera_path/pipeline_core/ipp/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"$board_camera_path/pipeline_core:camera_pipeline_core",
|
||||
"$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static",
|
||||
"$camera_path/buffer_manager:camera_buffer_manager",
|
||||
]
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_host",
|
||||
"hdf_core:libhdf_ipc_adapter",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hdf_core:libhdi",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
|
||||
external_deps += [
|
||||
"drivers_interface_camera:libcamera_proxy_1.0",
|
||||
"drivers_interface_camera:metadata",
|
||||
"ipc:ipc_single",
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
|
||||
public_configs = [ ":ohos_camera_demo_config" ]
|
||||
install_enable = false
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
+8
-7
@@ -14,6 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
config("device_manager_config") {
|
||||
@@ -47,8 +48,8 @@ config("device_manager_config") {
|
||||
|
||||
ohos_shared_library("camera_device_manager") {
|
||||
sources = [
|
||||
"$board_camera_path/src/device_manager/mx6s_csi.cpp",
|
||||
"$board_camera_path/src/device_manager/sensor_controller.cpp",
|
||||
"$board_camera_path/device_manager/src/mx6s_csi.cpp",
|
||||
"$board_camera_path/device_manager/src/sensor_controller.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/enumerator_manager.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/flash_controller.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/flash_manager.cpp",
|
||||
@@ -68,14 +69,14 @@ ohos_shared_library("camera_device_manager") {
|
||||
"$camera_path/utils/event",
|
||||
"$camera_path/device_manager/include",
|
||||
"include",
|
||||
"$board_camera_path/include/device_manager",
|
||||
"$board_camera_path/include/driver_adapter",
|
||||
"$board_camera_path/device_manager/include",
|
||||
"$board_camera_path/driver_adapter/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/include/",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
|
||||
deps = [ "$board_camera_path/src/driver_adapter:camera_v4l2_adapter" ]
|
||||
deps = [ "$board_camera_path/driver_adapter:camera_v4l2_adapter" ]
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
@@ -93,6 +94,6 @@ ohos_shared_library("camera_device_manager") {
|
||||
|
||||
public_configs = [ ":device_manager_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "drivers_peripheral_camera"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
# Copyright (c) 2021 - 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("//build/test.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
module_output_path = "$root_out_dir/test/unittest/hdf"
|
||||
config("v4l2_device_config") {
|
||||
visibility = [ ":*" ]
|
||||
cflags_cc = [
|
||||
"-DGST_DISABLE_DEPRECATED",
|
||||
"-DHAVE_CONFIG_H",
|
||||
"-DCOLORSPACE=\"videoconvert\"",
|
||||
]
|
||||
}
|
||||
ohos_unittest("camera_board_device_manager_unittest") {
|
||||
testonly = true
|
||||
module_out_path = module_output_path
|
||||
sources = [ "$camera_path/device_manager/test/unittest/v4l2/utest_v4l2_device_manager.cpp" ]
|
||||
include_dirs = [
|
||||
"$camera_path/device_manager",
|
||||
"$camera_path/device_manager/include",
|
||||
"$camera_path/device_manager/include/v4l2",
|
||||
"$camera_path/device_manager/src",
|
||||
"$camera_path/device_manager/src/v4l2",
|
||||
"$camera_path/driver_adapter/include",
|
||||
"$camera_path/include",
|
||||
"$camera_path/device_manager/test/unittest/v4l2",
|
||||
"$camera_path/utils/event",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/include",
|
||||
"$board_camera_path/device_manager/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/include",
|
||||
]
|
||||
deps = [
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"//third_party/googletest:gmock_main",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
]
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
external_deps += [ "drivers_interface_camera:metadata" ]
|
||||
public_configs = [ ":v4l2_device_config" ]
|
||||
}
|
||||
+4
-3
@@ -14,6 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
@@ -68,7 +69,7 @@ ohos_shared_library("camera_v4l2_adapter") {
|
||||
|
||||
include_dirs = [
|
||||
"$camera_path/include",
|
||||
"$board_camera_path/include/driver_adapter",
|
||||
"$board_camera_path/driver_adapter/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/include",
|
||||
]
|
||||
|
||||
@@ -85,6 +86,6 @@ ohos_shared_library("camera_v4l2_adapter") {
|
||||
external_deps += [ "drivers_interface_camera:metadata" ]
|
||||
public_configs = [ ":v4l2_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "camera_device_driver"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
+11
-10
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
|
||||
# Copyright (C) 2021–2023 Beijing OSWare Technology Co., Ltd
|
||||
# This file contains confidential and proprietary information of
|
||||
# OSWare Technology Co., Ltd
|
||||
#
|
||||
@@ -14,6 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
@@ -49,20 +50,20 @@ config("v4l2_maintest") {
|
||||
ohos_executable("v4l2_main") {
|
||||
install_enable = true
|
||||
sources = [
|
||||
"$board_camera_path/src/driver_adapter/src/imx8mm_image_buffer.cpp",
|
||||
"$board_camera_path/src/driver_adapter/src/v4l2_buffer.cpp",
|
||||
"$board_camera_path/src/driver_adapter/src/v4l2_dev.cpp",
|
||||
"$board_camera_path/src/driver_adapter/src/v4l2_fileformat.cpp",
|
||||
"$board_camera_path/src/driver_adapter/src/v4l2_stream.cpp",
|
||||
"$board_camera_path/driver_adapter/src/imx8mm_image_buffer.cpp",
|
||||
"$board_camera_path/driver_adapter/src/v4l2_buffer.cpp",
|
||||
"$board_camera_path/driver_adapter/src/v4l2_dev.cpp",
|
||||
"$board_camera_path/driver_adapter/src/v4l2_fileformat.cpp",
|
||||
"$board_camera_path/driver_adapter/src/v4l2_stream.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_control.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_uvc.cpp",
|
||||
"./v4l2_main.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"$board_camera_path/src/driver_adapter/main_test",
|
||||
"$board_camera_path/driver_adapter/main_test",
|
||||
"$camera_path/include",
|
||||
"$board_camera_path/include/driver_adapter",
|
||||
"$board_camera_path/driver_adapter/include",
|
||||
]
|
||||
|
||||
deps = [ "$hdf_uhdf_path/utils:libhdf_utils" ]
|
||||
@@ -76,6 +77,6 @@ ohos_executable("v4l2_main") {
|
||||
install_enable = true
|
||||
public_configs = [ ":v4l2_maintest" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "camera_device_driver"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
+7
-8
@@ -1,7 +1,4 @@
|
||||
# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
|
||||
# This file contains confidential and proprietary information of
|
||||
# OSWare Technology Co., Ltd
|
||||
#
|
||||
# Copyright (c) 2021 - 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
|
||||
@@ -15,10 +12,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
module_output_path = "hdf/v4l2_adapter_test"
|
||||
module_output_path = "$root_out_dir/test/unittest/hdf"
|
||||
|
||||
config("v4l2_utest_config") {
|
||||
visibility = [ ":*" ]
|
||||
@@ -53,18 +51,18 @@ ohos_unittest("v4l2_adapter_unittest") {
|
||||
test_type = "unittest"
|
||||
testonly = true
|
||||
module_out_path = module_output_path
|
||||
sources = [ "unittest/utest_v4l2_dev.cpp" ]
|
||||
sources = [ "src/utest_v4l2_dev.cpp" ]
|
||||
|
||||
include_dirs = [
|
||||
"$camera_path/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter/include",
|
||||
"$board_camera_path/src/driver_adapter/test/unittest/include",
|
||||
"include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$camera_path/adapter/platform/v4l2/src/driver_adapter:camera_v4l2_adapter",
|
||||
"$board_camera_path/driver_adapter:camera_v4l2_adapter",
|
||||
"//third_party/googletest:gmock_main",
|
||||
"//third_party/googletest:gtest",
|
||||
"//third_party/googletest:gtest_main",
|
||||
@@ -75,6 +73,7 @@ ohos_unittest("v4l2_adapter_unittest") {
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
]
|
||||
} else {
|
||||
@@ -0,0 +1,77 @@
|
||||
# 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("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
if (!defined(ohos_lite)) {
|
||||
config("camera_metadata_manager_config") {
|
||||
visibility = [ ":*" ]
|
||||
cflags = [
|
||||
"-DGST_DISABLE_DEPRECATED",
|
||||
"-DHAVE_CONFIG_H",
|
||||
]
|
||||
|
||||
if (enable_camera_device_utest) {
|
||||
cflags += [
|
||||
"-fprofile-arcs",
|
||||
"-ftest-coverage",
|
||||
]
|
||||
|
||||
ldflags += [ "--coverage" ]
|
||||
}
|
||||
}
|
||||
|
||||
ohos_shared_library("camera_metadata_manager") {
|
||||
sources = [
|
||||
"$camera_path/metadata_manager/src/metadata_config.cpp",
|
||||
"$camera_path/metadata_manager/src/metadata_controller.cpp",
|
||||
]
|
||||
include_dirs = [
|
||||
"$camera_path/../../interfaces/include",
|
||||
"$camera_path/include",
|
||||
"$camera_path/device_manager/include",
|
||||
"$camera_path/metadata_manager/include",
|
||||
]
|
||||
|
||||
deps = [ "$board_camera_path/device_manager:camera_device_manager" ]
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_host",
|
||||
"hdf_core:libhdf_ipc_adapter",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hdf_core:libhdi",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
if (use_hitrace) {
|
||||
external_deps += [ "hitrace_native:libhitrace" ]
|
||||
}
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
external_deps += [
|
||||
"drivers_interface_camera:metadata",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
|
||||
public_configs = [ ":camera_metadata_manager_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
}
|
||||
+13
-11
@@ -15,6 +15,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
|
||||
@@ -49,8 +50,8 @@ config("pipe_config") {
|
||||
|
||||
ohos_shared_library("camera_pipeline_core") {
|
||||
sources = [
|
||||
"$board_camera_path/src/pipeline_core/nodes/soft_codec/imx_codec_node.cpp",
|
||||
"$board_camera_path/src/pipeline_core/nodes/v4l2_source_node/v4l2_source_node.cpp",
|
||||
"$board_camera_path/pipeline_core/src/nodes/soft_codec/imx_codec_node.cpp",
|
||||
"$board_camera_path/pipeline_core/src/nodes/v4l2_source_node/v4l2_source_node.cpp",
|
||||
"$camera_path/adapter/platform/v4l2/src/pipeline_core/nodes/uvc_node/uvc_node.cpp",
|
||||
"$camera_path/pipeline_core/host_stream/src/host_stream_impl.cpp",
|
||||
"$camera_path/pipeline_core/host_stream/src/host_stream_mgr_impl.cpp",
|
||||
@@ -111,13 +112,13 @@ ohos_shared_library("camera_pipeline_core") {
|
||||
"$camera_path/interfaces/hdi",
|
||||
"$camera_path/utils/event",
|
||||
"$camera_path/adapter/platform/v4l2/src/device_manager/include",
|
||||
"../device_manager/include",
|
||||
"$board_camera_path/device_manager/include",
|
||||
"$camera_path/adapter/platform/v4l2/src/pipeline_core/nodes/v4l2_source_node",
|
||||
"$camera_path/adapter/platform/v4l2/src/pipeline_core/nodes/uvc_node",
|
||||
"$board_camera_path/include/driver_adapter",
|
||||
"$board_camera_path/driver_adapter/include",
|
||||
"//foundation/communication/ipc/ipc/native/src/core/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
"src/node",
|
||||
"src/nodes/soft_codec",
|
||||
|
||||
# hcs parser
|
||||
"//system/core/include/cutils",
|
||||
@@ -126,8 +127,9 @@ ohos_shared_library("camera_pipeline_core") {
|
||||
deps = [
|
||||
"$board_camera_path:config.c",
|
||||
"$board_camera_path:params.c",
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"$board_camera_path/metadata_manager:camera_metadata_manager",
|
||||
"$camera_path/buffer_manager:camera_buffer_manager",
|
||||
"$camera_path/device_manager:camera_device_manager",
|
||||
"//drivers/interface/camera/v1_0:libcamera_stub_1.0",
|
||||
"//third_party/libjpeg-turbo:turbojpeg_static",
|
||||
]
|
||||
@@ -148,8 +150,8 @@ ohos_shared_library("camera_pipeline_core") {
|
||||
|
||||
public_configs = [ ":pipe_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "drivers_peripheral_camera"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
|
||||
config("example_config") {
|
||||
@@ -164,7 +166,7 @@ config("example_config") {
|
||||
|
||||
ohos_shared_library("camera_ipp_algo_example") {
|
||||
sources = [
|
||||
"$board_camera_path/src/pipeline_core/ipp_algo_example/ipp_algo_example.c",
|
||||
"$board_camera_path/pipeline_core/src/ipp_algo_example/ipp_algo_example.c",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
@@ -174,6 +176,6 @@ ohos_shared_library("camera_ipp_algo_example") {
|
||||
external_deps = [ "c_utils:utils" ]
|
||||
public_configs = [ ":example_config" ]
|
||||
install_images = [ chipset_base_dir ]
|
||||
subsystem_name = "hdf"
|
||||
part_name = "drivers_peripheral_camera"
|
||||
subsystem_name = "osware_products"
|
||||
part_name = "osware_products"
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
# 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("//build/test.gni")
|
||||
import("//device/board/${product_company}/${device_name}/device.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/camera.gni")
|
||||
ut_root_path = "$camera_path/../../test/ut"
|
||||
|
||||
module_output_path = "$root_out_dir/test/unittest/hdf"
|
||||
|
||||
config("camera_ut_test_config") {
|
||||
visibility = [ ":*" ]
|
||||
|
||||
cflags_cc = []
|
||||
|
||||
ldflags = [ "--coverage" ]
|
||||
}
|
||||
ohos_unittest("camera_pipeline_core_test_ut") {
|
||||
testonly = true
|
||||
module_out_path = module_output_path
|
||||
sources = [
|
||||
# pipeline core test
|
||||
"$ut_root_path/pipeline_core/pipeline_core_test.cpp",
|
||||
"$ut_root_path/pipeline_core/stream_pipeline_builder_test.cpp",
|
||||
"$ut_root_path/pipeline_core/stream_pipeline_dispatcher_test.cpp",
|
||||
"$ut_root_path/pipeline_core/stream_pipeline_strategy_test.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
# camera common includes
|
||||
"$camera_path/include",
|
||||
"$camera_path/../../interfaces/include",
|
||||
"$camera_path/../../interfaces/hdi_passthrough",
|
||||
"$camera_path/../../test/common/callback/include",
|
||||
"$camera_path/utils/event",
|
||||
|
||||
# device manager includes
|
||||
"$camera_path/device_manager/include",
|
||||
|
||||
# buffer manager includes
|
||||
"$camera_path/buffer_manager/include",
|
||||
"$camera_path/buffer_manager/src/buffer_adapter/lite",
|
||||
"//third_party/googletest/googletest/include",
|
||||
"$camera_path/../../base",
|
||||
"$camera_path/../../display/interfaces/include",
|
||||
|
||||
# pipeline core includes
|
||||
"$camera_path/pipeline_core",
|
||||
"$camera_path/pipeline_core/host_stream/include",
|
||||
"$camera_path/pipeline_core/utils",
|
||||
"$camera_path/pipeline_core/nodes/include",
|
||||
"$camera_path/pipeline_core/nodes/src/node_base",
|
||||
"$camera_path/pipeline_core/nodes/src/sink_node",
|
||||
"$camera_path/pipeline_core/nodes/src/sensor_node",
|
||||
"$camera_path/pipeline_core/nodes/src/merge_node",
|
||||
"$camera_path/pipeline_core/nodes/src/dummy_node",
|
||||
"$camera_path/pipeline_core/pipeline_impl/include",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src",
|
||||
"$camera_path/pipeline_core/include",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/builder",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/parser",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy",
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config",
|
||||
"$camera_path/pipeline_core/ipp/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$board_camera_path/device_manager:camera_device_manager",
|
||||
"$board_camera_path/pipeline_core:camera_pipeline_core",
|
||||
"$camera_path/buffer_manager:camera_buffer_manager",
|
||||
"//third_party/googletest:gmock_main",
|
||||
"//third_party/googletest:gtest",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"drivers_interface_camera:libcamera_proxy_1.0",
|
||||
"drivers_interface_camera:libcamera_stub_1.0",
|
||||
"graphic_chipsetsdk:surface",
|
||||
"hdf_core:libhdf_utils",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
} else {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
|
||||
external_deps += [
|
||||
"drivers_interface_camera:metadata",
|
||||
"ipc:ipc_single",
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
public_configs = [ ":camera_ut_test_config" ]
|
||||
}
|
||||
+6
-1
@@ -5,7 +5,12 @@
|
||||
"module_list": [
|
||||
"//device/board/osware/imx8mm:imx8mm_group",
|
||||
"//device/board/osware/imx8mm/drivers/bluetooth:libbt_vendor",
|
||||
"//device/board/osware/imx8mm/drivers/bluetooth:BCM43438A1.hcd"
|
||||
"//device/board/osware/imx8mm/drivers/bluetooth:BCM43438A1.hcd",
|
||||
"//device/board/osware/imx8mm/drivers/camera:chipset_build",
|
||||
"//device/board/osware/imx8mm/drivers/camera:camera_host_vdi_impl_1.0"
|
||||
],
|
||||
"test_list": [
|
||||
"//device/board/osware/imx8mm/drivers/camera:camera_board_test"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user