From e12a80bd20c83c19bb5c9c1596b2c86bc7df147a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Thu, 10 Jul 2025 10:10:03 +0000 Subject: [PATCH 1/3] add unsupport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../native_avscreen_capture.h | 59 ++++++++----------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index ab6e5a95b..da8a16f7b 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -74,16 +74,14 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_Init(struct OH_AVScreenCapture *c /** * @brief Start the av screen capture - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param type Information describing the data type of the capture + * @@param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance * @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. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support certain configurations. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, set privacy authority enabled * failed or start ScreenCapture failed. * @since 10 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StartScreenCapture(struct OH_AVScreenCapture *capture); @@ -102,15 +100,13 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StopScreenCapture(struct OH_AVScr /** * @brief Start av screen record use to start save screen record file. - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @return Function result code. + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support certain configurations. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, set privacy authority enabled * failed or start ScreenRecording failed. * @since 10 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StartScreenRecording(struct OH_AVScreenCapture *capture); @@ -288,33 +284,31 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetErrorCallback(struct OH_AVScre OH_AVScreenCapture_OnError callback, void *userData); /** - * @brief Start the av screen capture, video data provided by OHNativeWindow - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param window Pointer to an OHNativeWindow instance + * @brief Start the av screen capture, video data provided by OHNativeWindow. + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance. + * @param {OHNativeWindow*} window Pointer to an OHNativeWindow instance. * @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 input window is nullptr or * input windowSurface is nullptr. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support certain configurations. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, set privacy authority enabled * failed or start ScreenCaptureWithSurface failed. * @since 12 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StartScreenCaptureWithSurface(struct OH_AVScreenCapture *capture, OHNativeWindow *window); /** * @brief Set canvas rotation when capturing screen - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param canvasRotation whether to rotate the canvas + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {bool} canvasRotation whether to rotate the canvas * @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. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, set CanvasRotation failed. * @since 12 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCanvasRotation(struct OH_AVScreenCapture *capture, bool canvasRotation); @@ -386,45 +380,43 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ContentFilter_AddWindowContent( /** * @brief Resize the Resolution of the Screen - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param width Video frame width of avscreeencapture - * @param height Video frame height of avscreeencapture + * @@param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {int32_t} width Video frame width of avscreeencapture + * @param {int32_t} height Video frame height of avscreeencapture * @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. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted. * @since 12 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ResizeCanvas(struct OH_AVScreenCapture *capture, int32_t width, int32_t height); /** * @brief skip some windows' privacy mode of current app during the screen recording - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param windowIDs Pointer of windowID list - * @param windowCount length of windowID list + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {int32_t*} windowIDs Pointer of windowID list + * @param {int32_t} windowCount length of windowID list * @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 input windowIDs are not belong current * app. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted. * @since 12 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScreenCapture *capture, int32_t *windowIDs, int32_t windowCount); /** * @brief set up the max number of video frame per second - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param frameRate max frame rate of video + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {int32_t} frameRate max frame rate of video * @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 frameRate is not support. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted. * @since 14 * @version 1.0 @@ -434,15 +426,14 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AV /** * @brief determines whether the cursor is visible in the session - * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @param capture Pointer to an OH_AVScreenCapture instance - * @param showCursor The switch of the cursor + * @param {struct OH_AVScreenCapture* } capture Pointer to an OH_AVScreenCapture instance + * @param {bool} showCursor The switch of the cursor * @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. + * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, show cursor failed. * @since 15 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapture *capture, bool showCursor); -- Gitee From 776b1a47dbdc884a03a58c8e1e7a88733f37e5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Thu, 10 Jul 2025 10:17:14 +0000 Subject: [PATCH 2/3] delete version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index da8a16f7b..639461350 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -419,7 +419,6 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScree * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support current interface. add since api20. * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted. * @since 14 - * @version 1.0 */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AVScreenCapture *capture, int32_t frameRate); -- Gitee From 342ea14f5aba03460583518b5e31e494c64178f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Thu, 10 Jul 2025 12:04:30 +0000 Subject: [PATCH 3/3] fix codecheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 639461350..7d52b610b 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -74,7 +74,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_Init(struct OH_AVScreenCapture *c /** * @brief Start the av screen capture - * @@param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance * @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. @@ -101,6 +101,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StopScreenCapture(struct OH_AVScr /** * @brief Start av screen record use to start save screen record file. * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @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. * {@link AV_SCREEN_CAPTURE_ERR_UNSUPPORT} device doesn't support certain configurations. add since api20. @@ -380,7 +381,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ContentFilter_AddWindowContent( /** * @brief Resize the Resolution of the Screen - * @@param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance + * @param {struct OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance * @param {int32_t} width Video frame width of avscreeencapture * @param {int32_t} height Video frame height of avscreeencapture * @return Function result code. -- Gitee