diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 7c30f55695ca616555a392317e05098cb225d1ac..a91a3e2d270bb788fc1c065dd8cea94d2091a228 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 8328b615aecda7e8b5a94292c47e8d2f252bd8be..a43872433cb2975e7d573dc86303109374d60561 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 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. + * @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 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. + * {@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 35a76e9446af9f5121d2df5f7c33ebcf39a76e8e..0a689654df84056f5f37b07c5af220b0f4d772fb 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_VideoOutput_GetVideoRotation(Camera_VideoOutput* videoOutput, int deviceDegree, + Camera_ImageRotation* imageRotation); + #ifdef __cplusplus } #endif