From 0d8ec82f5db5d4d9226c7bebb620c38ee419430f Mon Sep 17 00:00:00 2001 From: hobbycao Date: Sat, 12 Mar 2022 21:06:38 +0800 Subject: [PATCH 1/5] hdi ipc adapter Signed-off-by: hobbycao --- camera_hdf/hdi_impl/BUILD.gn | 3 +-- camera_hdf/hdi_impl/test/BUILD.gn | 3 +-- camera_hdf/interfaces/hdi_ipc/client/BUILD.gn | 3 +-- camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn | 3 +-- camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/camera_hdf/hdi_impl/BUILD.gn b/camera_hdf/hdi_impl/BUILD.gn index fbb5c864..61ff2a63 100644 --- a/camera_hdf/hdi_impl/BUILD.gn +++ b/camera_hdf/hdi_impl/BUILD.gn @@ -51,7 +51,6 @@ ohos_shared_library("distributed_camera_hdf") { "//foundation/graphic/standard/interfaces/kits/surface", "//foundation/graphic/standard/utils/buffer_handle/export", "//foundation/communication/ipc/ipc/native/src/core/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] @@ -99,7 +98,6 @@ ohos_shared_library("distributed_camera_hdf") { "${common_path}:distributed_camera_utils", "${fwk_utils_path}:distributedhardwareutils", "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/graphic/standard/frameworks/surface:surface", "//drivers/peripheral/display/hal:hdi_display_gralloc", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", @@ -114,6 +112,7 @@ ohos_shared_library("distributed_camera_hdf") { external_deps = [ "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_single", ] cflags_cc = cflags diff --git a/camera_hdf/hdi_impl/test/BUILD.gn b/camera_hdf/hdi_impl/test/BUILD.gn index e00a47e7..dab22d52 100644 --- a/camera_hdf/hdi_impl/test/BUILD.gn +++ b/camera_hdf/hdi_impl/test/BUILD.gn @@ -51,7 +51,6 @@ ohos_executable("dcamera_hdi_sample") { "//foundation/graphic/standard/interfaces/kits/surface", "//foundation/graphic/standard/utils/include", "//foundation/communication/ipc/ipc/native/src/core/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", "${innerkits_path}/native_cpp/camera_source/include", @@ -81,7 +80,6 @@ ohos_executable("dcamera_hdi_sample") { "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client:distributed_camera_hdf_client", "${hdf_uhdf_path}/hdi:libhdi", "${fwk_utils_path}:distributedhardwareutils", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/graphic/standard/frameworks/surface:surface", "//drivers/peripheral/display/hal:hdi_display_gralloc", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", @@ -91,6 +89,7 @@ ohos_executable("dcamera_hdi_sample") { external_deps = [ "hiviewdfx_hilog_native:libhilog", "samgr_standard:samgr_proxy", + "ipc:ipc_single", ] cflags_cc = cflags diff --git a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn index 571dd1e6..e7a10873 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn @@ -35,7 +35,6 @@ ohos_shared_library("distributed_camera_hdf_client") { "//foundation/graphic/standard/interfaces/kits/surface", "//foundation/graphic/standard/utils/include", "//foundation/communication/ipc/ipc/native/src/core/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] @@ -76,7 +75,6 @@ ohos_shared_library("distributed_camera_hdf_client") { "//utils/native/base:utils", "${hdf_uhdf_path}/hdi:libhdi", "${fwk_utils_path}:distributedhardwareutils", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/graphic/standard/frameworks/surface:surface", "//drivers/peripheral/display/hal:hdi_display_gralloc", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", @@ -90,6 +88,7 @@ ohos_shared_library("distributed_camera_hdf_client") { external_deps = [ "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_single", ] cflags_cc = cflags diff --git a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn index 1db284c8..ec2f4b1d 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn @@ -41,7 +41,6 @@ ohos_shared_library("distributed_camera_host_config") { "//foundation/graphic/standard/interfaces/kits/surface", "//foundation/graphic/standard/utils/include", "//foundation/communication/ipc/ipc/native/src/core/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] @@ -70,7 +69,6 @@ ohos_shared_library("distributed_camera_host_config") { "//utils/native/base:utils", "${distributedcamera_hdf_path}/hdi_impl:distributed_camera_hdf", "//foundation/graphic/standard/frameworks/surface:surface", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", ] defines = [ @@ -81,6 +79,7 @@ ohos_shared_library("distributed_camera_host_config") { external_deps = [ "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_single", ] install_images = [ chipset_base_dir ] diff --git a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn index d514dc70..278012ed 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn @@ -36,7 +36,6 @@ ohos_shared_library("distributed_camera_provider_config") { "//foundation/graphic/standard/interfaces/kits/surface", "//foundation/graphic/standard/utils/include", "//foundation/communication/ipc/ipc/native/src/core/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] @@ -65,7 +64,6 @@ ohos_shared_library("distributed_camera_provider_config") { "//utils/native/base:utils", "${distributedcamera_hdf_path}/hdi_impl:distributed_camera_hdf", "//foundation/graphic/standard/frameworks/surface:surface", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", ] defines = [ @@ -76,6 +74,7 @@ ohos_shared_library("distributed_camera_provider_config") { external_deps = [ "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_single", ] install_images = [ chipset_base_dir ] cflags_cc = cflags -- Gitee From 1d3b4a3d16137ec9ffa3d62232542ac6109f0553 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 11:54:01 +0800 Subject: [PATCH 2/5] readme content update Signed-off-by: hobbycao --- README_zh.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README_zh.md b/README_zh.md index 39f17d5b..b867add8 100644 --- a/README_zh.md +++ b/README_zh.md @@ -54,7 +54,10 @@ ### **接口说明** 分布式相机组件实现分布式硬件管理框架提供的接口,分布式硬件管理框架统一调用接口实现虚拟硬件驱动注册等功能。 -### **业务流程说明** +### **场景说明** +被控端设备上线之后,主控端可以使能该设备相机并像使用本地相机一样使用被控端相机,直到被控端设备下线。 + +### **流程说明** #### **1. 设备开机启动** 系统拉起分布式相机的SA服务,Source侧被初始化,相关模块被初始化。 -- Gitee From ab357e57a6b80df612a81ffbe98f62c556e90c74 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 14:28:57 +0800 Subject: [PATCH 3/5] unit test Signed-off-by: hobbycao --- bundle.json | 3 --- .../base/test/unittest/common/dcameraprotocol/BUILD.gn | 2 +- .../test/unittest/common/distributedcamera/BUILD.gn | 2 +- .../test/unittest/common/distributedcameramgr/BUILD.gn | 2 +- .../test/unittest/common/distributedcameramgr/BUILD.gn | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bundle.json b/bundle.json index dfcb1b63..302bb55f 100644 --- a/bundle.json +++ b/bundle.json @@ -85,9 +85,6 @@ } ], "test":[ - "//foundation/distributedhardware/distributedcamera/services/cameraservice/cameraoperator/client/test/unittest:camera_client_test", - "//foundation/distributedhardware/distributedcamera/services/cameraservice/cameraoperator/handler/test/unittest:camera_handler_test", - "//foundation/distributedhardware/distributedcamera/services/cameraservice/sinkservice/test/unittest:sink_service_test", "//foundation/distributedhardware/distributedcamera/services/cameraservice/sourceservice/test/unittest:source_service_test", "//foundation/distributedhardware/distributedcamera/services/cameraservice/base/test/unittest:services_base_test" ] diff --git a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn index f6e7b2ea..0960120b 100644 --- a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn +++ b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") -module_out_path = "distributedcamera/dcamera_protocol_test" +module_out_path = "distributed_camera/dcamera_protocol_test" config("module_private_config") { visibility = [ ":*" ] diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index 07221ccd..6f114254 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") -module_out_path = "distributedcamera/dcamera_sink_test" +module_out_path = "distributed_camera/dcamera_sink_test" config("module_private_config") { visibility = [ ":*" ] diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index 5308312d..bc81123e 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") -module_out_path = "distributedcamera/dcamera_sink_mgr_test" +module_out_path = "distributed_camera/dcamera_sink_mgr_test" config("module_private_config") { visibility = [ ":*" ] diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index 5401e17c..36dcdef6 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") -module_out_path = "distributedcamera/dcamera_source_mgr_test" +module_out_path = "distributed_camera/dcamera_source_mgr_test" config("module_private_config") { visibility = [ ":*" ] -- Gitee From dc53a0330c8f17e57439a9b206ba7ee8e0a796e6 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 15:11:27 +0800 Subject: [PATCH 4/5] gn format Signed-off-by: hobbycao --- camera_hdf/hdi_impl/BUILD.gn | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/camera_hdf/hdi_impl/BUILD.gn b/camera_hdf/hdi_impl/BUILD.gn index 61ff2a63..0be31806 100644 --- a/camera_hdf/hdi_impl/BUILD.gn +++ b/camera_hdf/hdi_impl/BUILD.gn @@ -13,7 +13,8 @@ import("//build/ohos.gni") import("//drivers/adapter/uhdf2/uhdf.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") ohos_shared_library("distributed_camera_hdf") { include_dirs = [ @@ -68,12 +69,12 @@ ohos_shared_library("distributed_camera_hdf") { "src/dcamera_device/dmetadata_processor.cpp", "src/dcamera_host/dcamera_host.cpp", "src/dcamera_provider/dcamera_provider.cpp", - "src/dstream_operator/doffline_stream_operator.cpp", - "src/dstream_operator/dstream_operator.cpp", "src/dstream_operator/dbuffer_manager.cpp", - "src/dstream_operator/dimage_buffer.cpp", "src/dstream_operator/dcamera_steam.cpp", - "src/utils/dcamera.cpp" + "src/dstream_operator/dimage_buffer.cpp", + "src/dstream_operator/doffline_stream_operator.cpp", + "src/dstream_operator/dstream_operator.cpp", + "src/utils/dcamera.cpp", ] cflags = [ @@ -83,9 +84,7 @@ ohos_shared_library("distributed_camera_hdf") { if (device_name == "baltimore") { cflags += [ "-DBALTIMORE_CAMERA" ] - include_dirs += [ - "${camera_hdf_path_baltimore}/camera/interfaces/include", - ] + include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] } else { include_dirs += [ "${camera_hdf_path}/camera/interfaces/include", @@ -94,14 +93,14 @@ ohos_shared_library("distributed_camera_hdf") { } deps = [ - "//utils/native/base:utils", "${common_path}:distributed_camera_utils", "${fwk_utils_path}:distributedhardwareutils", "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", - "//foundation/graphic/standard/frameworks/surface:surface", "//drivers/peripheral/display/hal:hdi_display_gralloc", + "//foundation/graphic/standard/frameworks/surface:surface", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", "//third_party/jsoncpp:jsoncpp", + "//utils/native/base:utils", ] defines = [ -- Gitee From a2b72686368c7ef4406319f6fb51b6046edc65fe Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 15:55:04 +0800 Subject: [PATCH 5/5] gn format Signed-off-by: hobbycao --- camera_hdf/hdi_impl/test/BUILD.gn | 21 ++++++------ camera_hdf/interfaces/hdi_ipc/client/BUILD.gn | 21 ++++++------ .../interfaces/hdi_ipc/config/host/BUILD.gn | 13 +++----- .../hdi_ipc/config/provider/BUILD.gn | 13 +++----- .../unittest/common/dcameraprotocol/BUILD.gn | 13 ++++---- .../common/distributedcamera/BUILD.gn | 33 +++++++++---------- .../common/distributedcameramgr/BUILD.gn | 14 ++++---- .../common/distributedcameramgr/BUILD.gn | 18 +++++----- 8 files changed, 66 insertions(+), 80 deletions(-) diff --git a/camera_hdf/hdi_impl/test/BUILD.gn b/camera_hdf/hdi_impl/test/BUILD.gn index dab22d52..5029a649 100644 --- a/camera_hdf/hdi_impl/test/BUILD.gn +++ b/camera_hdf/hdi_impl/test/BUILD.gn @@ -13,13 +13,14 @@ import("//build/ohos.gni") import("//drivers/adapter/uhdf2/uhdf.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") ohos_executable("dcamera_hdi_sample") { install_enable = false - sources = [ + sources = [ + "common.cpp", "dcamera_hdi_sample.cpp", - "common.cpp" ] include_dirs = [ @@ -65,9 +66,7 @@ ohos_executable("dcamera_hdi_sample") { if (device_name == "baltimore") { cflags += [ "-DBALTIMORE_CAMERA" ] - include_dirs += [ - "${camera_hdf_path_baltimore}/camera/interfaces/include", - ] + include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] } else { include_dirs += [ "${camera_hdf_path}/camera/interfaces/include", @@ -76,20 +75,20 @@ ohos_executable("dcamera_hdi_sample") { } deps = [ - "${fwk_utils_path}:distributedhardwareutils", "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client:distributed_camera_hdf_client", - "${hdf_uhdf_path}/hdi:libhdi", "${fwk_utils_path}:distributedhardwareutils", - "//foundation/graphic/standard/frameworks/surface:surface", + "${fwk_utils_path}:distributedhardwareutils", + "${hdf_uhdf_path}/hdi:libhdi", + "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//drivers/peripheral/display/hal:hdi_display_gralloc", + "//foundation/graphic/standard/frameworks/surface:surface", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", - "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] external_deps = [ "hiviewdfx_hilog_native:libhilog", - "samgr_standard:samgr_proxy", "ipc:ipc_single", + "samgr_standard:samgr_proxy", ] cflags_cc = cflags diff --git a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn index e7a10873..71944d5d 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn @@ -13,7 +13,8 @@ import("//build/ohos.gni") import("//drivers/adapter/uhdf2/uhdf.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") ohos_shared_library("distributed_camera_hdf_client") { include_dirs = [ @@ -45,9 +46,7 @@ ohos_shared_library("distributed_camera_hdf_client") { if (device_name == "baltimore") { cflags += [ "-DBALTIMORE_CAMERA" ] - include_dirs += [ - "${camera_hdf_path_baltimore}/camera/interfaces/include", - ] + include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] } else { include_dirs += [ "${camera_hdf_path}/camera/interfaces/include", @@ -56,28 +55,28 @@ ohos_shared_library("distributed_camera_hdf_client") { } sources = [ - "device/dcamera_device_callback_stub.cpp", "device/dcamera_device_callback.cpp", + "device/dcamera_device_callback_stub.cpp", "device/dcamera_device_proxy.cpp", - "host/dcamera_host_callback_stub.cpp", "host/dcamera_host_callback.cpp", + "host/dcamera_host_callback_stub.cpp", "host/dcamera_host_proxy.cpp", "operator/doffline_stream_operator_proxy.cpp", - "operator/dstream_operator_callback_stub.cpp", "operator/dstream_operator_callback.cpp", + "operator/dstream_operator_callback_stub.cpp", "operator/dstream_operator_proxy.cpp", - "provider/dcamera_provider_callback_stub.cpp", "provider/dcamera_provider_callback.cpp", + "provider/dcamera_provider_callback_stub.cpp", "provider/dcamera_provider_proxy.cpp", ] deps = [ - "//utils/native/base:utils", - "${hdf_uhdf_path}/hdi:libhdi", "${fwk_utils_path}:distributedhardwareutils", - "//foundation/graphic/standard/frameworks/surface:surface", + "${hdf_uhdf_path}/hdi:libhdi", "//drivers/peripheral/display/hal:hdi_display_gralloc", + "//foundation/graphic/standard/frameworks/surface:surface", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", + "//utils/native/base:utils", ] defines = [ diff --git a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn index ec2f4b1d..d3ec5b0d 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn @@ -13,7 +13,8 @@ import("//build/ohos.gni") import("//drivers/adapter/uhdf2/uhdf.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") ohos_shared_library("distributed_camera_host_config") { include_dirs = [ @@ -51,9 +52,7 @@ ohos_shared_library("distributed_camera_host_config") { if (device_name == "baltimore") { cflags += [ "-DBALTIMORE_CAMERA" ] - include_dirs += [ - "${camera_hdf_path_baltimore}/camera/interfaces/include", - ] + include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] } else { include_dirs += [ "${camera_hdf_path}/camera/interfaces/include", @@ -61,14 +60,12 @@ ohos_shared_library("distributed_camera_host_config") { ] } - sources = [ - "dcamera_host_config.cpp" - ] + sources = [ "dcamera_host_config.cpp" ] deps = [ - "//utils/native/base:utils", "${distributedcamera_hdf_path}/hdi_impl:distributed_camera_hdf", "//foundation/graphic/standard/frameworks/surface:surface", + "//utils/native/base:utils", ] defines = [ diff --git a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn index 278012ed..053ddc2b 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn @@ -13,7 +13,8 @@ import("//build/ohos.gni") import("//drivers/adapter/uhdf2/uhdf.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") ohos_shared_library("distributed_camera_provider_config") { include_dirs = [ @@ -46,9 +47,7 @@ ohos_shared_library("distributed_camera_provider_config") { if (device_name == "baltimore") { cflags += [ "-DBALTIMORE_CAMERA" ] - include_dirs += [ - "${camera_hdf_path_baltimore}/camera/interfaces/include", - ] + include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ] } else { include_dirs += [ "${camera_hdf_path}/camera/interfaces/include", @@ -56,14 +55,12 @@ ohos_shared_library("distributed_camera_provider_config") { ] } - sources = [ - "dcamera_provider_config.cpp" - ] + sources = [ "dcamera_provider_config.cpp" ] deps = [ - "//utils/native/base:utils", "${distributedcamera_hdf_path}/hdi_impl:distributed_camera_hdf", "//foundation/graphic/standard/frameworks/surface:surface", + "//utils/native/base:utils", ] defines = [ diff --git a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn index 0960120b..f54649e9 100644 --- a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn +++ b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn @@ -12,7 +12,8 @@ # limitations under the License. import("//build/test.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") module_out_path = "distributed_camera/dcamera_protocol_test" config("module_private_config") { @@ -41,19 +42,17 @@ config("module_private_config") { ohos_unittest("DCameraProtocolTest") { module_out_path = module_out_path - sources = [ - "dcamera_protocol_test.cpp" - ] + sources = [ "dcamera_protocol_test.cpp" ] configs = [ ":module_private_config" ] deps = [ + "${common_path}:distributed_camera_utils", + "${fwk_utils_path}:distributedhardwareutils", + "${services_path}/cameraservice/sourceservice:distributed_camera_source", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", - "${fwk_utils_path}:distributedhardwareutils", - "${common_path}:distributed_camera_utils", "//utils/native/base:utils", - "${services_path}/cameraservice/sourceservice:distributed_camera_source" ] external_deps = [ diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index 6f114254..a341a7c7 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -12,30 +12,29 @@ # limitations under the License. import("//build/test.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") module_out_path = "distributed_camera/dcamera_sink_test" config("module_private_config") { visibility = [ ":*" ] include_dirs = [ - "${services_path}/cameraservice/sinkservice/include/distributedcamera", - "${services_path}/cameraservice/sinkservice/include/distributedcameramgr", - "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface", - "${services_path}/cameraservice/base/include", - "${common_path}/include/constants", - "${common_path}/include/utils", - "${distributedcamera_hdf_path}/interfaces/include", - "${innerkits_path}/native_cpp/camera_sink/include", - "//drivers/peripheral/base", - ] + "${services_path}/cameraservice/sinkservice/include/distributedcamera", + "${services_path}/cameraservice/sinkservice/include/distributedcameramgr", + "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface", + "${services_path}/cameraservice/base/include", + "${common_path}/include/constants", + "${common_path}/include/utils", + "${distributedcamera_hdf_path}/interfaces/include", + "${innerkits_path}/native_cpp/camera_sink/include", + "//drivers/peripheral/base", + ] } ohos_unittest("DistributedCameraSinkServiceTest") { module_out_path = module_out_path - sources = [ - "distributed_camera_sink_service_test.cpp" - ] + sources = [ "distributed_camera_sink_service_test.cpp" ] configs = [ ":module_private_config" ] @@ -45,13 +44,11 @@ ohos_unittest("DistributedCameraSinkServiceTest") { "//utils/native/base:utils", ] - defines = [ - "HI_LOG_ENABLE", - ] + defines = [ "HI_LOG_ENABLE" ] external_deps = [ + "eventhandler:libeventhandler", "ipc:ipc_core", "safwk:system_ability_fwk", - "eventhandler:libeventhandler", ] } diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index bc81123e..df32c80f 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -12,7 +12,8 @@ # limitations under the License. import("//build/test.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") module_out_path = "distributed_camera/dcamera_sink_mgr_test" config("module_private_config") { @@ -49,28 +50,27 @@ ohos_unittest("DCameraSinkMgrTest") { module_out_path = module_out_path sources = [ - "dcamera_sink_dev_test.cpp", "dcamera_sink_access_control_test.cpp", "dcamera_sink_controller_test.cpp", - "dcamera_sink_output_test.cpp", "dcamera_sink_data_process_test.cpp", + "dcamera_sink_dev_test.cpp", + "dcamera_sink_output_test.cpp", ] configs = [ ":module_private_config" ] deps = [ + "${common_path}:distributed_camera_utils", + "${fwk_utils_path}:distributedhardwareutils", "${services_path}/cameraservice/sinkservice:distributed_camera_sink", "${services_path}/channel:distributed_camera_channel", - "${common_path}:distributed_camera_utils", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", - - "${fwk_utils_path}:distributedhardwareutils", ] external_deps = [ - "ipc:ipc_core", "eventhandler:libeventhandler", + "ipc:ipc_core", ] defines = [ diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index 36dcdef6..86591b52 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -12,7 +12,8 @@ # limitations under the License. import("//build/test.gni") -import("//foundation/distributedhardware/distributedcamera/distributedcamera.gni") +import( + "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") module_out_path = "distributed_camera/dcamera_source_mgr_test" config("module_private_config") { @@ -56,28 +57,25 @@ config("module_private_config") { ohos_unittest("DCameraSourceMgrTest") { module_out_path = module_out_path - sources = [ - "dcamera_source_state_machine_test.cpp", - ] + sources = [ "dcamera_source_state_machine_test.cpp" ] configs = [ ":module_private_config" ] deps = [ + "${common_path}:distributed_camera_utils", + "${fwk_utils_path}:distributedhardwareutils", "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", - "${common_path}:distributed_camera_utils", + "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", - "${fwk_utils_path}:distributedhardwareutils", - "//third_party/googletest:gtest_main", ] external_deps = [ - "ipc:ipc_core", - "eventhandler:libeventhandler", - "dsoftbus_standard:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", ] defines = [ -- Gitee