diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 2ec0654fe2ada52f20fa7ddefd02e805985d3724..70f909bcfd628c101c411c890eb8744f9c687b30 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -222,6 +222,20 @@ Camera_ErrorCode OH_PhotoOutput_UnregisterCallback(Camera_PhotoOutput* photoOutp Camera_ErrorCode OH_PhotoOutput_RegisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback); +/** + * @brief Gets 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); + /** * @brief Unregister capture start event callback. * diff --git a/multimedia/camera_framework/preview_output.h b/multimedia/camera_framework/preview_output.h index e5921470788793c2fc1825c73e48f6424db46917..a6df0d7066b876cdeac9832acbfd1a8e5ec68a4a 100644 --- a/multimedia/camera_framework/preview_output.h +++ b/multimedia/camera_framework/preview_output.h @@ -204,6 +204,34 @@ Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile); Camera_ErrorCode OH_PreviewOutput_GetSupportedFrameRates(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size); +/** + * @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 set the preview rotation angle. + * @param previewRotation the {@link Camera_ImageRotation} of preview display 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); + /** * @brief Delete frame rate list. * diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index 3f993c82ee7056b0766ccba1be17126927e36758..db9aeb608f6b760134af4c724aa675d45f42eaa1 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -202,6 +202,20 @@ Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); Camera_ErrorCode OH_VideoOutput_GetSupportedFrameRates(Camera_VideoOutput* videoOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size); +/** + * @brief Gets the video 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); + /** * @brief Delete frame rate list. *