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 0c790e07950d1b15245888cbfdedf32b45a7590f..48aa9a0d410a24e264c62d7adf781a29da55bbee 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -130,5 +130,9 @@ { "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureContentChangedCallback" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_SetCaptureArea" } ] \ 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 eb62b5feb11b59b8c0b447487f97418dd5349736..5bf1e8487f6e1160e1e74fcc7dd1130e05057679 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -526,6 +526,20 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForKeepCaptureDuringCall( */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureContentChangedCallback(struct OH_AVScreenCapture *capture, OH_AVScreenCapture_OnCaptureContentChanged callback, void *userData); + +/** + * @brief Set or update the captureArea + * @param {struct OH_AVScreenCapture*} capture capture Pointer to an OH_AVScreenCapture instance + * @param {uint64_t} displayId Indicates the screen index for setting area recording + * @param {OH_Rect*} area Pointer to an object describing the location and size of the region + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr or displayid not exist or area is + * invalid. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreenCapture *capture, + uint64_t displayId, OH_Rect* area); #ifdef __cplusplus } #endif