From added49a817ff99f56c887a5171f496fdfbb9c5e Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 17:40:37 +0800 Subject: [PATCH 1/4] gn format Signed-off-by: hobbycao --- camera_hdf/hdi_impl/test/BUILD.gn | 2 +- .../base/test/unittest/common/dcameraprotocol/BUILD.gn | 3 ++- .../test/unittest/common/distributedcamera/BUILD.gn | 3 ++- .../test/unittest/common/distributedcameramgr/BUILD.gn | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/camera_hdf/hdi_impl/test/BUILD.gn b/camera_hdf/hdi_impl/test/BUILD.gn index 5029a649..0a0bf5ee 100644 --- a/camera_hdf/hdi_impl/test/BUILD.gn +++ b/camera_hdf/hdi_impl/test/BUILD.gn @@ -94,4 +94,4 @@ ohos_executable("dcamera_hdi_sample") { cflags_cc = cflags part_name = "distributed_camera" subsystem_name = "distributedhardware" -} \ No newline at end of file +} diff --git a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn index f54649e9..e8be668c 100644 --- a/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn +++ b/services/cameraservice/base/test/unittest/common/dcameraprotocol/BUILD.gn @@ -14,6 +14,7 @@ import("//build/test.gni") import( "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") + module_out_path = "distributed_camera/dcamera_protocol_test" config("module_private_config") { @@ -71,4 +72,4 @@ ohos_unittest("DCameraProtocolTest") { group("dcamera_protocol_test") { testonly = true deps = [ ":DCameraProtocolTest" ] -} \ No newline at end of file +} diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index a341a7c7..2e69ad44 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -14,6 +14,7 @@ import("//build/test.gni") import( "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") + module_out_path = "distributed_camera/dcamera_sink_test" config("module_private_config") { @@ -55,4 +56,4 @@ ohos_unittest("DistributedCameraSinkServiceTest") { group("dcamera_sink_test") { testonly = true deps = [ ":DistributedCameraSinkServiceTest" ] -} \ No newline at end of file +} diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index 86591b52..f341b973 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -14,6 +14,7 @@ import("//build/test.gni") import( "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") + module_out_path = "distributed_camera/dcamera_source_mgr_test" config("module_private_config") { @@ -88,4 +89,4 @@ ohos_unittest("DCameraSourceMgrTest") { group("dcamera_mgr_test") { testonly = true deps = [ ":DCameraSourceMgrTest" ] -} \ No newline at end of file +} -- Gitee From 4712e88c6444b155e223edbf3d4c9acd37e9d725 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Mon, 14 Mar 2022 17:50:40 +0800 Subject: [PATCH 2/4] gn format Signed-off-by: hobbycao --- .../test/unittest/common/distributedcameramgr/BUILD.gn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index df32c80f..e3d10be3 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -14,6 +14,7 @@ import("//build/test.gni") import( "//foundation/distributedhardware/distributedcamera/distributedcamera.gni") + module_out_path = "distributed_camera/dcamera_sink_mgr_test" config("module_private_config") { @@ -83,4 +84,4 @@ ohos_unittest("DCameraSinkMgrTest") { group("dcamera_sink_mgr_test") { testonly = true deps = [ ":DCameraSinkMgrTest" ] -} \ No newline at end of file +} -- Gitee From 1add9919df6ef19b208645f9aeeba4924e3dbc5f Mon Sep 17 00:00:00 2001 From: wangchaole Date: Tue, 15 Mar 2022 21:37:39 +0800 Subject: [PATCH 3/4] warning clean Signed-off-by: wangchaole --- camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.h | 2 +- .../interfaces/hdi_ipc/server/provider/dcamera_provider_stub.h | 2 +- .../distributedcameramgr/interface/icamera_sink_output.h | 2 +- .../include/distributedcameramgr/dcamera_source_dev.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.h b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.h index 4939a8c3..bae5d68b 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.h +++ b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.h @@ -62,7 +62,7 @@ private: void* DCameraHostStubInstance(); -void DestroyDCameraHostStub(void* obj); +void DestroyDCameraHostStub(void* stubObj); int32_t DCHostServiceOnRemoteRequest(void* stub, int cmdId, struct HdfSBuf* data, struct HdfSBuf* reply); diff --git a/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.h b/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.h index e5170a16..33330adb 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.h +++ b/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.h @@ -53,7 +53,7 @@ private: void* DCameraProviderStubInstance(); -void DestroyDCameraProviderStub(void* obj); +void DestroyDCameraProviderStub(void* stubObj); int32_t DCProviderServiceOnRemoteRequest(void* stub, int cmdId, struct HdfSBuf* data, struct HdfSBuf* reply); diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/interface/icamera_sink_output.h b/services/cameraservice/sinkservice/include/distributedcameramgr/interface/icamera_sink_output.h index 2355b70b..fe118349 100644 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/interface/icamera_sink_output.h +++ b/services/cameraservice/sinkservice/include/distributedcameramgr/interface/icamera_sink_output.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include "dcamera_capture_info_cmd.h" #include "dcamera_channel_info_cmd.h" diff --git a/services/cameraservice/sourceservice/include/distributedcameramgr/dcamera_source_dev.h b/services/cameraservice/sourceservice/include/distributedcameramgr/dcamera_source_dev.h index 9e864ac1..dbb203ee 100644 --- a/services/cameraservice/sourceservice/include/distributedcameramgr/dcamera_source_dev.h +++ b/services/cameraservice/sourceservice/include/distributedcameramgr/dcamera_source_dev.h @@ -36,7 +36,7 @@ public: virtual ~DCameraSourceDev(); int32_t InitDCameraSourceDev(); - int32_t RegisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::string& reqId, + int32_t RegisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::string& reqId, const std::string& ver, const std::string attrs); int32_t UnRegisterDistributedHardware(const std::string devId, const std::string dhId, const std::string reqId); int32_t DCameraNotify(std::string& eventStr); -- Gitee From cbb2736b160a4dfef2e6b093d802cb20d9a021b8 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Wed, 16 Mar 2022 11:50:47 +0800 Subject: [PATCH 4/4] modify softbus pkg name Signed-off-by: hobbycao --- common/include/constants/distributed_camera_constants.h | 2 +- services/channel/include/dcamera_channel_sink_impl.h | 2 +- services/channel/include/dcamera_channel_source_impl.h | 2 +- services/channel/include/dcamera_softbus_adapter.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/include/constants/distributed_camera_constants.h b/common/include/constants/distributed_camera_constants.h index bc122510..d89ffa24 100644 --- a/common/include/constants/distributed_camera_constants.h +++ b/common/include/constants/distributed_camera_constants.h @@ -74,7 +74,7 @@ const uint32_t DCAMERA_PRODUCER_FPS_DEFAULT = 30; const uint32_t DCAMERA_MAX_RECV_DATA_LEN = 104857600; const uint32_t DISTRIBUTED_HARDWARE_CAMERA_SOURCE_SA_ID = 4803; const uint32_t DISTRIBUTED_HARDWARE_CAMERA_SINK_SA_ID = 4804; -const std::string DCAMERA_PKG_NAME = "DBinderBus_" + std::to_string(getpid()); +const std::string DCAMERA_PKG_NAME = "ohos.dhardware"; const std::string SNAP_SHOT_SESSION_FLAG = "dataSnapshot"; const std::string CONTINUE_SESSION_FLAG = "dataContinue"; diff --git a/services/channel/include/dcamera_channel_sink_impl.h b/services/channel/include/dcamera_channel_sink_impl.h index d276d119..7755a0e9 100644 --- a/services/channel/include/dcamera_channel_sink_impl.h +++ b/services/channel/include/dcamera_channel_sink_impl.h @@ -39,7 +39,7 @@ private: std::shared_ptr softbusSession_; std::string mySessionName_; DCameraSessionMode mode_; - const std::string SESSION_HEAD = "DBinder.ohos.dhardware.dcamera_"; + const std::string SESSION_HEAD = "ohos.dhardware.dcamera_"; }; } } diff --git a/services/channel/include/dcamera_channel_source_impl.h b/services/channel/include/dcamera_channel_source_impl.h index f12b5309..ee96ab20 100644 --- a/services/channel/include/dcamera_channel_source_impl.h +++ b/services/channel/include/dcamera_channel_source_impl.h @@ -39,7 +39,7 @@ private: std::vector> softbusSessions_; std::string mySessionName_; DCameraSessionMode mode_; - const std::string SESSION_HEAD = "DBinder.ohos.dhardware.dcamera_"; + const std::string SESSION_HEAD = "ohos.dhardware.dcamera_"; }; } } diff --git a/services/channel/include/dcamera_softbus_adapter.h b/services/channel/include/dcamera_softbus_adapter.h index 79c39604..123c8f5f 100644 --- a/services/channel/include/dcamera_softbus_adapter.h +++ b/services/channel/include/dcamera_softbus_adapter.h @@ -72,7 +72,7 @@ private: private: std::mutex optLock_; - const string PKG_NAME = "DBinderBus_" + std::to_string(getpid()); + const string PKG_NAME = "ohos.dhardware"; static const uint32_t DCAMERA_SESSION_NAME_MAX_LEN = 128; map sessListeners_; std::map sessionTotal_; -- Gitee