From 15950944127cdb77557264deed356b3416039f06 Mon Sep 17 00:00:00 2001 From: zhaoyuanchun Date: Mon, 12 Aug 2024 11:53:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=8B=E8=BD=ACndk=E6=8E=A5=E5=8F=A3d.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaoyuanchun --- multimedia/camera_framework/photo_output.h | 14 ++++++++++ multimedia/camera_framework/preview_output.h | 28 ++++++++++++++++++++ multimedia/camera_framework/video_output.h | 14 ++++++++++ 3 files changed, 56 insertions(+) diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 7c30f5569..a91a3e2d2 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -216,6 +216,20 @@ Camera_ErrorCode OH_PhotoOutput_GetActiveProfile(Camera_PhotoOutput* photoOutput */ Camera_ErrorCode OH_PhotoOutput_DeleteProfile(Camera_Profile* profile); +/** + * @brief Get the photo rotation angle. + * + * @param photoOutput the {@link Camera_PhotoOutput} instance which used to get the photo rotation angle. + * @param deviceDegree the current device rotation degree. + * @param imageRotation the {@link Camera_ImageRotation} result of photo rotation angle. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_PhotoOutput_GetPhotoRotation(Camera_PhotoOutput* photoOutput, int deviceDegree, + Camera_ImageRotation* imageRotation); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/preview_output.h b/multimedia/camera_framework/preview_output.h index 8328b615a..dcd62e76f 100644 --- a/multimedia/camera_framework/preview_output.h +++ b/multimedia/camera_framework/preview_output.h @@ -189,6 +189,34 @@ Camera_ErrorCode OH_PreviewOutput_GetActiveProfile(Camera_PreviewOutput* preview */ Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile); +/** + * @brief Gets the preview rotation angle. + * + * @param previewOutput the {@link Camera_PreviewOutput} instance which used to get the preview rotation angle. + * @param displayRotation the current display rotation angle. + * @param imageRotation the {@link Camera_ImageRotation} result of photo rotation angle. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_PreviewOutput_GetPreviewRotation(Camera_PreviewOutput* previewOutput, int displayRotation, + Camera_ImageRotation* imageRotation); + +/** + * @brief Sets the preview rotation angle. + * + * @param previewOutput the {@link Camera_PreviewOutput} instance which used to get the preview rotation angle. + * @param previewRotation the {@link Camera_ImageRotation} result of photo rotation angle. + * @param isDisplayLocked True means the display is locked. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_PreviewOutput_SetPreviewRotation(Camera_PreviewOutput* previewOutput, + Camera_ImageRotation* previewRotation, bool isDisplayLocked); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index 35a76e944..34734ce7c 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -187,6 +187,20 @@ Camera_ErrorCode OH_VideoOutput_GetActiveProfile(Camera_VideoOutput* videoOutput */ Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); +/** + * @brief Get the videeo rotation angle. + * + * @param videoOutput the {@link Camera_VideoOutput} instance which used to get the video rotation angle. + * @param deviceDegree the current device rotation degree. + * @param imageRotation the {@link Camera_ImageRotation} result of video rotation angle. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_PhotoOutput_GetVideoRotation(Camera_VideoOutput* videoOutput, int deviceDegree, + Camera_ImageRotation* imageRotation); + #ifdef __cplusplus } #endif -- Gitee From b026568b5532de52739246530100afdbd00557fd Mon Sep 17 00:00:00 2001 From: zhaoyuanchun Date: Mon, 12 Aug 2024 14:08:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaoyuanchun --- multimedia/camera_framework/preview_output.h | 6 +++--- multimedia/camera_framework/video_output.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/camera_framework/preview_output.h b/multimedia/camera_framework/preview_output.h index dcd62e76f..a5dfdb4c0 100644 --- a/multimedia/camera_framework/preview_output.h +++ b/multimedia/camera_framework/preview_output.h @@ -194,7 +194,7 @@ Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile); * * @param previewOutput the {@link Camera_PreviewOutput} instance which used to get the preview rotation angle. * @param displayRotation the current display rotation angle. - * @param imageRotation the {@link Camera_ImageRotation} result of photo rotation angle. + * @param imageRotation the {@link Camera_ImageRotation} result of preview rotation angle. * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. @@ -207,7 +207,7 @@ Camera_ErrorCode OH_PreviewOutput_GetPreviewRotation(Camera_PreviewOutput* previ * @brief Sets the preview rotation angle. * * @param previewOutput the {@link Camera_PreviewOutput} instance which used to get the preview rotation angle. - * @param previewRotation the {@link Camera_ImageRotation} result of photo rotation angle. + * @param previewRotation the {@link Camera_ImageRotation} result of preview rotation angle. * @param isDisplayLocked True means the display is locked. * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. @@ -215,7 +215,7 @@ Camera_ErrorCode OH_PreviewOutput_GetPreviewRotation(Camera_PreviewOutput* previ * @since 12 */ Camera_ErrorCode OH_PreviewOutput_SetPreviewRotation(Camera_PreviewOutput* previewOutput, - Camera_ImageRotation* previewRotation, bool isDisplayLocked); + Camera_ImageRotation* isDisplayLocked, bool isDisplayLocked); #ifdef __cplusplus } diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index 34734ce7c..0a689654d 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -198,7 +198,7 @@ Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. * @since 12 */ -Camera_ErrorCode OH_PhotoOutput_GetVideoRotation(Camera_VideoOutput* videoOutput, int deviceDegree, +Camera_ErrorCode OH_VideoOutput_GetVideoRotation(Camera_VideoOutput* videoOutput, int deviceDegree, Camera_ImageRotation* imageRotation); #ifdef __cplusplus -- Gitee From 55cbf1da60d34f0e6589572507e6cc75a89e996b Mon Sep 17 00:00:00 2001 From: zhaoyuanchun Date: Mon, 12 Aug 2024 19:13:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaoyuanchun --- multimedia/camera_framework/preview_output.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/camera_framework/preview_output.h b/multimedia/camera_framework/preview_output.h index a5dfdb4c0..a43872433 100644 --- a/multimedia/camera_framework/preview_output.h +++ b/multimedia/camera_framework/preview_output.h @@ -215,7 +215,7 @@ Camera_ErrorCode OH_PreviewOutput_GetPreviewRotation(Camera_PreviewOutput* previ * @since 12 */ Camera_ErrorCode OH_PreviewOutput_SetPreviewRotation(Camera_PreviewOutput* previewOutput, - Camera_ImageRotation* isDisplayLocked, bool isDisplayLocked); + Camera_ImageRotation previewRotation, bool isDisplayLocked); #ifdef __cplusplus } -- Gitee