From 5a0cd9528c60ac485a31b209604855df67212e0a Mon Sep 17 00:00:00 2001 From: Tome Date: Wed, 6 Aug 2025 11:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=93=9D=E9=BB=84=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tome --- .../include/callback/dcamera_photo_callback.h | 1 + .../callback/dcamera_preview_callback.h | 3 ++- .../src/callback/dcamera_photo_callback.cpp | 5 +++++ .../src/callback/dcamera_preview_callback.cpp | 10 ++++++++++ .../client/test/sample/dcamera_client_demo.h | 19 +++++++++++++++++-- .../dcamera_client_demo.h | 15 +++++++++++++++ 6 files changed, 50 insertions(+), 3 deletions(-) diff --git a/services/cameraservice/cameraoperator/client/include/callback/dcamera_photo_callback.h b/services/cameraservice/cameraoperator/client/include/callback/dcamera_photo_callback.h index b125428d..f1a1f2d9 100644 --- a/services/cameraservice/cameraoperator/client/include/callback/dcamera_photo_callback.h +++ b/services/cameraservice/cameraoperator/client/include/callback/dcamera_photo_callback.h @@ -34,6 +34,7 @@ public: void OnCaptureError(const int32_t captureId, const int32_t errorCode) const override; void OnEstimatedCaptureDuration(const int32_t duration) const override; void OnOfflineDeliveryFinished(const int32_t captureId) const override; + void OnConstellationDrawingState(const int32_t drawingState) const override; private: std::shared_ptr callback_; diff --git a/services/cameraservice/cameraoperator/client/include/callback/dcamera_preview_callback.h b/services/cameraservice/cameraoperator/client/include/callback/dcamera_preview_callback.h index 12ec1d3f..4fbf9589 100644 --- a/services/cameraservice/cameraoperator/client/include/callback/dcamera_preview_callback.h +++ b/services/cameraservice/cameraoperator/client/include/callback/dcamera_preview_callback.h @@ -31,7 +31,8 @@ public: void OnFrameEnded(const int32_t frameCount) const override; void OnError(const int32_t errorCode) const override; void OnSketchStatusDataChanged(const CameraStandard::SketchStatusData& statusData) const override; - + void OnFramePaused() const override; + void OnFrameResumed() const override; private: std::shared_ptr callback_; }; diff --git a/services/cameraservice/cameraoperator/client/src/callback/dcamera_photo_callback.cpp b/services/cameraservice/cameraoperator/client/src/callback/dcamera_photo_callback.cpp index a82685c1..028d8de0 100644 --- a/services/cameraservice/cameraoperator/client/src/callback/dcamera_photo_callback.cpp +++ b/services/cameraservice/cameraoperator/client/src/callback/dcamera_photo_callback.cpp @@ -64,6 +64,11 @@ void DCameraPhotoCallback::OnOfflineDeliveryFinished(const int32_t captureId) co DHLOGI("enter, captureId: %{public}d", captureId); } +void DCameraPhotoCallback::OnConstellationDrawingState(const int32_t drawingState) const +{ + DHLOGI("enter, drawingState: %{public}d", drawingState); +} + void DCameraPhotoCallback::OnCaptureError(const int32_t captureId, const int32_t errorCode) const { DHLOGE("enter, captureId: %{public}d, errorCode: %{public}d", captureId, errorCode); diff --git a/services/cameraservice/cameraoperator/client/src/callback/dcamera_preview_callback.cpp b/services/cameraservice/cameraoperator/client/src/callback/dcamera_preview_callback.cpp index c2deccf8..04e7a7b1 100644 --- a/services/cameraservice/cameraoperator/client/src/callback/dcamera_preview_callback.cpp +++ b/services/cameraservice/cameraoperator/client/src/callback/dcamera_preview_callback.cpp @@ -53,5 +53,15 @@ void DCameraPreviewCallback::OnSketchStatusDataChanged(const CameraStandard::Ske { DHLOGI("enter"); } + +void DcameraPreviewCallback::OnFramePaused() const +{ + DHLOGI("enter"); +} + +void DcameraPreviewCallback::OnFrameResumed() const +{ + DHLOGI("enter"); +} } // namespace DistributedHardware } // namespace OHOS diff --git a/services/cameraservice/cameraoperator/client/test/sample/dcamera_client_demo.h b/services/cameraservice/cameraoperator/client/test/sample/dcamera_client_demo.h index 05465c6b..254d2c72 100644 --- a/services/cameraservice/cameraoperator/client/test/sample/dcamera_client_demo.h +++ b/services/cameraservice/cameraoperator/client/test/sample/dcamera_client_demo.h @@ -234,15 +234,20 @@ public: DHLOGI("DemoDCameraPhotoCallback::OnEstimatedCaptureDuration duration: %{public}d", duration); } + void OnOfflineDeliveryFinished(const int32_t captureId) const + { + DHLOGI("DemoDCameraPhotoCallback::OnOfflineDeliveryFinished duration: %{public}d", captureId); + } + void OnCaptureError(const int32_t captureId, const int32_t errorCode) const { DHLOGI("DemoDCameraPhotoCallback::OnCaptureError captureID: %{public}d errorCode: %{public}d", captureId, errorCode); } - void OnOfflineDeliveryFinished(const int32_t captureId) const + void OnConstellationDrawingState(const int32_t drawingState) const { - DHLOGI("DemoDCameraPhotoCallback::OnOfflineDeliveryFinished duration: %{public}d", captureId); + DHLOGI("DemoDcameraPhotoCallback::OnConstellationDrawingState drawingState: %{public}d", drawingState); } }; @@ -267,6 +272,16 @@ public: { DHLOGI("DemoDCameraPreviewCallback::OnSketchStatusDataChanged."); } + + void OnFramePaused() const + { + DHLOGI("DemoDCameraPreviewCallback::OnFramePaused"); + } + + void OnFrameResumed() const + { + DHLOGI("DemoDCameraPreviewCallback::OnFrameResumed"); + } }; class DemoDCameraVideoCallback : public CameraStandard::VideoStateCallback { diff --git a/test/distributedcameraclienttest/dcamera_client_demo.h b/test/distributedcameraclienttest/dcamera_client_demo.h index 5d86b102..ec359dfd 100644 --- a/test/distributedcameraclienttest/dcamera_client_demo.h +++ b/test/distributedcameraclienttest/dcamera_client_demo.h @@ -244,6 +244,11 @@ public: DHLOGI("DemoDCameraPhotoCallback::OnCaptureError captureID: %{public}d errorCode: %{public}d", captureId, errorCode); } + + void OnConstellationDrawingState(const int32_t drawingState) const + { + DHLOGI("DemoDcameraPhotoCallback::OnConstellationDrawingState drawingState: %{public}d", drawingState); + } }; class DemoDCameraPreviewCallback : public CameraStandard::PreviewStateCallback { @@ -267,6 +272,16 @@ public: { DHLOGI("DemoDCameraPreviewCallback::OnSketchStatusDataChanged."); } + + void OnFramePaused() const + { + DHLOGI("DemoDCameraPreviewCallback::OnFramePaused"); + } + + void OnFrameResumed() const + { + DHLOGI("DemoDCameraPreviewCallback::OnFrameResumed"); + } }; class DemoDCameraVideoCallback : public CameraStandard::VideoStateCallback { -- Gitee