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 7229854286eaca809f9ecab1d45265599474ec73..0606c395c4a5c7c80591d11d85e315603cb7f051 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 091e3ccf863bf3553911868f96f192da7a690338..7379d8d9a9c769602992697fc48f8e28bbb83dfd 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