From c3858cef5dbd04dc80eb033a5e3afd31e9e26cf3 Mon Sep 17 00:00:00 2001 From: xzcbob Date: Mon, 16 Jun 2025 13:50:35 +0000 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E5=B1=8F=E6=A1=86=E6=9E=B6=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AE=BE=E7=BD=AEB=E5=B8=A7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xzcbob --- .../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 7229854286..19b2857164 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -150,5 +150,9 @@ { "first_introduced": "20", "name": "OH_AVScreenCapture_GetDisplayIdSelected" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_StrategyForBFramesEncoding" } ] \ No newline at end of file diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 091e3ccf86..c77276e015 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -492,6 +492,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ReleaseCaptureStrategy(OH_AVScree * @return Function result code. * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} capture or strategyvalue is nullptr. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_STATE} This interface should be called before Start is called. * @since 20 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureStrategy( @@ -599,6 +600,19 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_GetCaptureTypeSelected(OH_AVScree */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_GetDisplayIdSelected(OH_AVScreenCapture_UserSelectionInfo *selection, uint64_t* displayId); + +/** + * @brief Indicates whether to enable B-frame encoding, which is used to reduce the size of the recorded file. + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture_CaptureStrategy*} strategy Pointer to an OH_AVScreenCapture_CaptureStrategy instance + * @param {bool} value The default value is false, which means B frames encoding are disabled. + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} strategy is nullptr. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForBFramesEncoding( + OH_AVScreenCapture_CaptureStrategy *strategy, bool value); #ifdef __cplusplus } #endif -- Gitee