From 93a0b8b464636026d7fc9b7e6ef70e75f8d4daf6 Mon Sep 17 00:00:00 2001 From: liyang Date: Mon, 16 Jun 2025 12:55:34 +0000 Subject: [PATCH] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=B1=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B7=9F=E9=9A=8F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liyang --- .../libnative_avscreen_capture.ndk.json | 4 ++++ .../player_framework/native_avscreen_capture.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 722985428..0606c395c 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -139,6 +139,10 @@ "first_introduced": "20", "name": "OH_AVScreenCapture_StrategyForPrivacyMaskMode" }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_StrategyForCanvasFollowRotation" + }, { "first_introduced": "20", "name": "OH_AVScreenCapture_SetSelectionCallback" diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 091e3ccf8..68681b0ce 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -557,6 +557,20 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForPrivacyMaskMode( OH_AVScreenCapture_CaptureStrategy *strategy, int32_t value); +/** + * @brief Set the canvas to rotate with the screen when capturing the screen + * @param {OH_AVScreenCapture_CaptureStrategy*} strategy Pointer to an OH_AVScreenCapture_CaptureStrategy instance + * @param {bool} value The default value is False, which means that the width and height of the VirtualDisplay + * remain the initial settings. If set to True, it means that the width and height of the VirtualDisplay rotates + * with the rotation of the screen.. + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} strategy value is nullptr. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForCanvasFollowRotation( + OH_AVScreenCapture_CaptureStrategy *strategy, bool value); + /** * @brief Register user selection notification callback function * @syscap SystemCapability.Multimedia.Media.AVScreenCapture -- Gitee