From be1ae9e38cf88d0896b21d17bf4f73bf18886cc8 Mon Sep 17 00:00:00 2001 From: w30076694 Date: Mon, 25 Aug 2025 15:08:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E7=9B=B8=E6=9C=BANDK?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: w30076694 --- multimedia/camera_framework/camera.ndk.json | 12 +++++++ multimedia/camera_framework/camera_input.h | 35 +++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index ff95d61ee10..4c4d03826d2 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -23,6 +23,18 @@ "first_introduced": "11", "name": "OH_CameraInput_Release" }, + { + "first_introduced": "21", + "name": "OH_CameraInput_IsPhysicalCameraOrientationVariable" + }, + { + "first_introduced": "21", + "name": "OH_CameraInput_GetPhysicalCameraOrientation" + }, + { + "first_introduced": "21", + "name": "OH_CameraInput_UsePhysicalCameraOrientation" + }, { "first_introduced": "11", "name": "OH_CameraManager_RegisterCallback" diff --git a/multimedia/camera_framework/camera_input.h b/multimedia/camera_framework/camera_input.h index a91452d9d46..72a974c9a69 100644 --- a/multimedia/camera_framework/camera_input.h +++ b/multimedia/camera_framework/camera_input.h @@ -171,6 +171,41 @@ Camera_ErrorCode OH_CameraInput_Close(Camera_Input* cameraInput); */ Camera_ErrorCode OH_CameraInput_Release(Camera_Input* cameraInput); +/** + * @brief Query whether physical camera orientation is variable under different fold status. + * + * @param {CameraInput} cameraInput the {@link Camera_Input} instance. + * @param {bool} isVariable the result of whether physical camera orientation is variable. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_IsPhysicalCameraOrientationVariable(Camera_Input* cameraInput, bool* isVariable); + +/** + * @brief Get physical camera orientation under current fold status. + * + * @param cameraInput the {@link Camera_Input} instance. + * @param orientation the physical camera orientation of current fold status. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_GetPhysicalCameraOrientation(Camera_Input* cameraInput, uint32_t* orientation); + +/** + * @brief Choose whether to use the physical camera orientation. + * + * @param cameraInput the {@link Camera_Input} instance. + * @param isUsed the flag of whether to use physical camera orientation. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_UsePhysicalCameraOrientation(Camera_Input* cameraInput, bool isUsed); + #ifdef __cplusplus } #endif -- Gitee