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 48aa9a0d410a24e264c62d7adf781a29da55bbee..d113e6ba51d77855357756f7a1ebcfa2f02db353 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -134,5 +134,9 @@ { "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureArea" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_StrategyForPrivacyMaskMode" } ] \ 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 5bf1e8487f6e1160e1e74fcc7dd1130e05057679..a5abf9c911b77670af2af06e493ecdae8a0003d3 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -540,6 +540,22 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureContentChangedCallback( */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreenCapture *capture, uint64_t displayId, OH_Rect* area); + +/** + * @brief Set the fill mode for screen capture when a privacy window exists + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture_CaptureStrategy*} strategy Pointer to an OH_AVScreenCapture_CaptureStrategy instance + * @param {int32_t} value + * If set to 0, it means that when there is a privacy window interface, the output screen image is completely black. + * If set to 1, it means that when there is a privacy window interface, only the privacy window area of the output screen becomes black, + * and other values returns an error. + * @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 or value is invalid. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForPrivacyMaskMode( + OH_AVScreenCapture_CaptureStrategy *strategy, int32_t value); #ifdef __cplusplus } #endif