@@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec
...
@@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec
### Hands-On Tutorials
### Hands-On Tutorials
To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md).
To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) and [codelabs](https://gitee.com/openharmony/codelabs/tree/master).
@@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec
...
@@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec
## Hands-On Tutorials
## Hands-On Tutorials
To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md).
To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) and [codelabs](https://gitee.com/openharmony/codelabs/tree/master).
## API References
## API References
...
@@ -62,6 +62,8 @@ API references encompass all components and APIs available in OpenHarmony, helpi
...
@@ -62,6 +62,8 @@ API references encompass all components and APIs available in OpenHarmony, helpi
They are organized as follows:
They are organized as follows:
-[ArkTS API Reference](reference/apis/development-intro.md)
-[ArkTS API Reference](reference/apis/development-intro.md)
-[Component Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/ts-components-summary.md)
-[Component Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/ts-components-summary.md)
-[Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Full)](reference/arkui-js/js-components-common-attributes.md)
-[Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Full)](reference/arkui-js/js-components-common-attributes.md)
-[Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Lite)](reference/arkui-js-lite/js-framework-file.md)
-[Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Lite)](reference/arkui-js-lite/js-framework-file.md)
A device enters standby mode if it is unused for a long period of time or after the Power button is pressed. The standby mode prolongs the battery life without affecting the use of applications. The **deviceStandby** module provides APIs for you to check whether a device is in standby mode and request or cancel standby resource control for an application.
> **NOTE**
>
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses an asynchronous callback to return the result.
Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses a promise to return the result.
| [native_avscreen_capture.h](native__avscreen__capture_8h.md) | Declares the native APIs used to create an **OH_AVScreenCapture** instance.<br>**File to include**: <multimedia/player_framework/native_avscreen_capture.h><br>**Library**: libnative_avscreen_capture.so|
| [native_avscreen_capture_base.h](native__avscreen__capture__base_8h.md) | Declares the common structs, character constants, and enums used for running screen capture.<br>**File to include**: <multimedia/player_framework/native_avscreen_capture_base.h><br>**Library**: libnative_avscreen_capture.so|
| [native_avscreen_capture_errors.h](native__avscreen__capture__errors_8h.md) | Declares the error codes generated during screen capture.<br>**File to include**: <multimedia/player_framework/native_avscreen_capture_errors.h><br>**Library**: libnative_avscreen_capture.so|
| [OH_AudioEncInfo](_o_h___audio_enc_info.md) | Defines audio encoding information.<br>**NOTE**: This struct is reserved and will be provided in later versions.|
| [OH_VideoCaptureInfo](_o_h___video_capture_info.md) | Defines video capture information.|
| [OH_VideoEncInfo](_o_h___video_enc_info.md) | Defines video encoding information.<br>**NOTE**: This struct is reserved and will be provided in later versions.|
| [OH_VideoInfo](_o_h___video_info.md) | Defines video capture parameters.|
| [OH_RecorderInfo](_o_h___recorder_info.md) | Defines recording file information.<br>**NOTE**: This struct is reserved and will be provided in later versions.|
| [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) | Defines the screen capture configuration.|
| [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.|
| [OH_Rect](_o_h___rect.md) | Defines the width, height, and image information of the rectangle used for screen capture.|
| [OH_AudioBuffer](_o_h___audio_buffer.md) | Defines the configuration such as the size, type, and timestamp of audio data.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_NativeBuffer](#oh_nativebuffer) | Defines the native video stream class for screen capture.|
| [OH_AVScreenCapture](#oh_avscreencapture) | Defines a screen capture instance used to obtain original video and audio streams.|
| [OH_CaptureMode](#oh_capturemode) | Defines an enum that enumerates the screen capture modes.|
| [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) | Defines an enum that enumerates the audio source types during screen capture.|
| [OH_AudioCodecFormat](#oh_audiocodecformat) | Defines an enum that enumerates the audio encoding formats.|
| [OH_VideoCodecFormat](#oh_videocodecformat) | Defines an enum that enumerates the video encoding formats.|
| [OH_DataType](#oh_datatype) | Defines an enum that enumerates the data types of screen capture streams.|
| [OH_VideoSourceType](#oh_videosourcetype) | Defines an enum that enumerates the video source formats.|
| [OH_ContainerFormatType](#oh_containerformattype) | Defines an enum that enumerates the types of files generated during screen capture.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_AudioEncInfo](#oh_audioencinfo) | Defines audio encoding information.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_VideoCaptureInfo](#oh_videocaptureinfo) | Defines video capture information.|
| [OH_VideoEncInfo](#oh_videoencinfo) | Defines video encoding information.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_VideoInfo](#oh_videoinfo) | Defines video capture parameters.|
| [OH_AVScreenCaptureConfig](#oh_avscreencaptureconfig) | Defines the screen capture configuration.|
| (\*[OH_AVScreenCaptureOnError](#oh_avscreencaptureonerror)) ([OH_AVScreenCapture](#oh_avscreencapture)\*capture, int32_t errorCode) | Defines a pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance.|
| (\*[OH_AVScreenCaptureOnAudioBufferAvailable](#oh_avscreencaptureonaudiobufferavailable)) ([OH_AVScreenCapture](#oh_avscreencapture)\*capture, bool isReady, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Defines a pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance.|
| (\*[OH_AVScreenCaptureOnVideoBufferAvailable](#oh_avscreencaptureonvideobufferavailable)) ([OH_AVScreenCapture](#oh_avscreencapture)\*capture, bool isReady) | Defines a pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCaptureCallback](#oh_avscreencapturecallback) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.|
| [OH_Rect](#oh_rect) | Defines the width, height, and image information of the rectangle used for screen capture.|
| [OH_AudioBuffer](#oh_audiobuffer) | Defines the configuration such as the size, type, and timestamp of audio data.|
| [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) | Defines an enum that enumerates the error codes generated during screen recording.|
| [OH_DataType](#oh_datatype) { OH_ORIGINAL_STREAM = 0, OH_ENCODED_STREAM = 1, OH_CAPTURE_FILE = 2, OH_INVAILD = -1 } | Enumerates the data types of screen capture streams.|
| [OH_VideoSourceType](#oh_videosourcetype) { OH_VIDEO_SOURCE_SURFACE_YUV = 0, OH_VIDEO_SOURCE_SURFACE_ES, OH_VIDEO_SOURCE_SURFACE_RGBA, OH_VIDEO_SOURCE_BUTT } | Enumerates the video source formats.|
| [OH_ContainerFormatType](#oh_containerformattype) { CFT_MPEG_4A = 0, CFT_MPEG_4 = 1 } | Enumerates the types of files generated during screen capture.<br>**NOTE**: This enum is reserved and will be provided in later versions.|
| [OH_AVScreenCapture_Create](#oh_avscreencapture_create)(void) | Creates an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCapture_Init](#oh_avscreencapture_init)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) config) | Initializes parameters related to an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCapture_StartScreenCapture](#oh_avscreencapture_startscreencapture)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated.|
| [OH_AVScreenCapture_StopScreenCapture](#oh_avscreencapture_stopscreencapture)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone.|
| [OH_AVScreenCapture_StartScreenRecording](#oh_avscreencapture_startscreenrecording)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Starts screen recording and collects encoded streams.<br>**NOTE**: This function is reserved and will be provided in later versions.|
| [OH_AVScreenCapture_StopScreenRecording](#oh_avscreencapture_stopscreenrecording)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**.<br>**NOTE**: This function is reserved and will be provided in later versions.|
| [OH_AVScreenCapture_AcquireAudioBuffer](#oh_avscreencapture_acquireaudiobuffer)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AudioBuffer](_o_h___audio_buffer.md)\*\*audiobuffer, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.|
| [OH_AVScreenCapture_AcquireVideoBuffer](#oh_avscreencapture_acquirevideobuffer)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, int32_t \*fence, int64_t \*timestamp, struct [OH_Rect](_o_h___rect.md)\*region) | Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp.|
| [OH_AVScreenCapture_ReleaseAudioBuffer](#oh_avscreencapture_releaseaudiobuffer)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Releases an audio buffer.|
| [OH_AVScreenCapture_ReleaseVideoBuffer](#oh_avscreencapture_releasevideobuffer)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Releases a video buffer.|
| [OH_AVScreenCapture_SetCallback](#oh_avscreencapture_setcallback)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, struct [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) callback) | Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.|
| [OH_AVScreenCapture_Release](#oh_avscreencapture_release)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**.|
| [OH_AVScreenCapture_SetMicrophoneEnabled](#oh_avscreencapture_setmicrophoneenabled)(struct[OH_AVScreenCapture](#oh_avscreencapture) \*capture, bool isMicrophone) | Enables or disables the microphone.|
## Type Description
### OH_AudioBuffer
```
typedef struct OH_AudioBuffer OH_AudioBuffer
```
**Description**
Defines the configuration such as the size, type, and timestamp of audio data.
Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance. To ensure the normal running of **OH_AVScreenCapture**, you must register the instance of this struct with the **OH_AVScreenCapture** instance and process the information reported by the callback functions.
**Parameters**
| Name| Description|
| -------- | -------- |
| onError | Pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnError](#oh_avscreencaptureonerror).|
| onAudioBufferAvailable | Pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnAudioBufferAvailable](#oh_avscreencaptureonaudiobufferavailable).|
| onVideoBufferAvailable | Pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnVideoBufferAvailable](#oh_avscreencaptureonvideobufferavailable).|
| OH_CAPTURE_HOME_SCREEN | To capture the home screen.|
| OH_CAPTURE_SPECIFIED_SCREEN | To capture a specified screen.<br>**NOTE**: This value is reserved and will be provided in later versions.|
| OH_CAPTURE_SPECIFIED_WINDOW | To capture a specified window.<br>**NOTE**: This value is reserved and will be provided in later versions.|
| OH_CAPTURE_INVAILD | Invalid mode.|
### OH_ContainerFormatType
```
enum OH_ContainerFormatType
```
**Description**
Enumerates the types of files generated during screen capture.
> **NOTE**
>
> This enum is reserved and will be provided in later versions.
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
| Value| Description|
| -------- | -------- |
| CFT_MPEG_4A | Audio format M4A.|
| CFT_MPEG_4 | Video format MP4.|
### OH_DataType
```
enum OH_DataType
```
**Description**
Enumerates the data types of screen capture streams.
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
| Value| Description|
| -------- | -------- |
| OH_ORIGINAL_STREAM | Original stream format, such as YUV, RGBA, and PCM.|
| OH_ENCODED_STREAM | Encoded stream format, such as H.264 and AAC.<br>**NOTE**: This value is reserved and will be provided in later versions.|
| OH_CAPTURE_FILE | Format of the recording file. The value can be **mp4**.<br>**NOTE**: This value is reserved and will be provided in later versions.|
| OH_INVAILD | Invalid format.|
### OH_VideoCodecFormat
```
enum OH_VideoCodecFormat
```
**Description**
Enumerates the video encoding formats.
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
| Value| Description|
| -------- | -------- |
| OH_VIDEO_DEFAULT | Default video encoding format. The default value is **H.264**.|
Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| audiobuffer | Pointer to the struct for storing the audio buffer. This struct is used to obtain the information about the audio buffer and the timestamp of the buffer.|
| type | Type of the audio buffer, which is used to distinguish external streams recorded by the microphone from internal streams played by the system. For details, see [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype).|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp. After the buffer is no longer needed, call **OH_AVScreenCapture_ReleaseVideoBuffer** to release it.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| fence | Pointer to parameters for synchronization display.|
| timestamp | Pointer to the timestamp of the video frame.|
| region | Pointer to the coordinates related to video display.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns an **OH_NativeBuffer** object if the operation is successful. The application can call the APIs provided by the **OH_NativeBuffer** object to obtain information such as the video buffer and resolution.
Initializes **OH_AVScreenCapture** parameters, including audio microphone sampling parameters, audio capture parameters (optional), and video resolution parameters.
To call this function, you must configure the **ohos.permission.MICROPHONE** and **ohos.permission.CAPTURE_SCREEN** permissions. Otherwise, the initialization fails and screen capture cannot be performed properly.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| config | Parameters related to screen capture initialization.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
### OH_AVScreenCapture_ReleaseAudioBuffer()
```
OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ReleaseAudioBuffer (struct OH_AVScreenCapture * capture, OH_AudioCaptureSourceType type )
```
**Description**
Releases an audio buffer. After the audio buffer is no longer needed, call this function to release it.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| type | Type of the audio buffer, which is used to distinguish external streams recorded by the microphone from internal streams played by the system.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Releases a video buffer. After the video buffer is no longer needed, call this function to release it.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| callback | [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) struct, which stores related callback function pointers.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Enables or disables the microphone. When **isMicrophone** is set to **true**, the microphone is enabled, and the original PCM data of the microphone can be obtained by calling **OH_AVScreenCapture_StartScreenRecording** and **OH_AVScreenCapture_AcquireAudioBuffer**. When **isMicrophone** is set to **false**, the obtained audio data is silent data.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
| isMicrophone | Whether to enable the microphone.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated.
The application can obtain the original streams of screen capture by calling **OH_AVScreenCapture_AcquireAudioBuffer** and **OH_AVScreenCapture_ReleaseVideoBuffer**.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Starts screen recording and collects encoded streams.
> **NOTE**
>
> This function is reserved and will be provided in later versions.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**.
> **NOTE**
>
> This function is reserved and will be provided in later versions.
**Parameters**
| Name| Description|
| -------- | -------- |
| capture | Pointer to an **OH_AVScreenCapture** instance.|
**System capability**
SystemCapability.Multimedia.Media.AVScreenCapture
**Returns**
Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise.
The **OH_AVScreenCaptureCallback** struct defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance. To ensure the normal running of **OH_AVScreenCapture**, you must register the instance of this struct with the **OH_AVScreenCapture** instance and process the information reported by the callback functions.
| [videoInfo](#videoinfo) | [OH_VideoInfo](_o_h___video_info.md)<br>Defines video capture parameters.|
| [recorderInfo](#recorderinfo) | [OH_RecorderInfo](_o_h___recorder_info.md)<br>Defines recording file parameters. This member variable is mandatory when the data type is **OH_CAPTURE_FILE**.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
| [audioSampleRate](#audiosamplerate) | int32_t<br>Defines the audio sampling rate. For details about the supported rates, see **OH_AudioCapturer_GetSamplingRate**.|
| [audioChannels](#audiochannels) | int32_t<br>Defines the number of audio channels.|
| [audioSource](#audiosource) | [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype)<br>Defines the audio source.|
## Member Variable Description
### audioChannels
```
int32_t OH_AudioCaptureInfo::audioChannels
```
**Description**
Defines the number of audio channels.
### audioSampleRate
```
int32_t OH_AudioCaptureInfo::audioSampleRate
```
**Description**
Defines the audio sampling rate. For details about the supported rates, see **OH_AudioCapturer_GetSamplingRate**.
| [micCapInfo](#miccapinfo) | [OH_AudioCaptureInfo](_o_h___audio_capture_info.md)<br>Defines the audio parameters of the microphone.|
| [innerCapInfo](#innercapinfo) | [OH_AudioCaptureInfo](_o_h___audio_capture_info.md)<br>Defines the audio parameters for internal capture.|
| [audioEncInfo](#audioencinfo) | [OH_AudioEncInfo](_o_h___audio_enc_info.md)<br>Defines the audio encoding information. This member variable does not need to be set when **dataType** is set to **OH_ORIGINAL_STREAM**.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
## Member Variable Description
### audioEncInfo
```
OH_AudioEncInfo OH_AudioInfo::audioEncInfo
```
**Description**
Defines the audio encoding information. This member variable does not need to be set when **dataType** is set to **OH_ORIGINAL_STREAM**.
> **NOTE**
>
> This struct is reserved and will be provided in later versions.
### innerCapInfo
```
OH_AudioCaptureInfo OH_AudioInfo::innerCapInfo
```
**Description**
Defines the audio parameters for internal capture.
Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent.
Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent. For details, see [XComponent Development](../../napi/xcomponent-guidelines.md)
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declare the APIs used to access the native XComponent.<br>File to Include: <ace/xcomponent/native_interface_xcomponent.h> |
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declares the APIs for accessing **NativeXComponent**.<br>File to include: <ace/xcomponent/native_interface_xcomponent.h> |
| [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) | Declares the enums used to access **NativeXComponent** key events.<br>File to include: <ace/xcomponent/native_xcomponent_key_event.h> |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid)([OH_NativeXComponent](#oh_nativexcomponent)\*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid)([OH_NativeXComponent](#oh_nativexcomponent)\*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, uint64_t \*width, uint64_t \*height) | Obtains the size of the surface held by the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, uint64_t \*width, uint64_t \*height) | Obtains the size of the surface held by the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen. |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen.|
| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)\*touchEvent) | Obtains the touch event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)\*touchEvent) | Obtains the touch event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)\*toolType) | Obtains the ArkUI XComponent touch point tool type. |
| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)\*toolType) | Obtains the ArkUI XComponent touch point tool type. |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the x-axis. |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the y-axis. |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty)([OH_NativeXComponent](#oh_nativexcomponent)\*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the y-axis. |
| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)\*mouseEvent) | Obtains the mouse event scheduled by ArkUI XComponent. |
| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent)([OH_NativeXComponent](#oh_nativexcomponent)\*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)\*mouseEvent) | Obtains the mouse event scheduled by ArkUI XComponent. |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)\*callback) | Registers a callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)\*callback) | Registers a callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)\*callback) | Registers a mouse event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)\*callback) | Registers the mouse event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterFocusEventCallback](#oh_nativexcomponent_registerfocuseventcallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void \*window)) | Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterKeyEventCallback](#oh_nativexcomponent_registerkeyeventcallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void \*window)) | Registers the key event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterBlurEventCallback](#oh_nativexcomponent_registerblureventcallback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)\*component, void \*window)) | Registers the focus loss event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_GetKeyEvent](#oh_nativexcomponent_getkeyevent)([OH_NativeXComponent](#oh_nativexcomponent)\*component, [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*\*keyEvent) | Obtains the key event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetKeyEventAction](#oh_nativexcomponent_getkeyeventaction)([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*keyEvent, [OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction)\*action) | Obtains the action of the specified key event. |
| [OH_NativeXComponent_GetKeyEventCode](#oh_nativexcomponent_getkeyeventcode)([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*keyEvent, [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode)\*code) | Obtains the key code of the specified key event. |
| [OH_NativeXComponent_GetKeyEventSourceType](#oh_nativexcomponent_getkeyeventsourcetype)([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*keyEvent, [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype)\*sourceType) | Obtains the source type of the specified key event. |
| [OH_NativeXComponent_GetKeyEventDeviceId](#oh_nativexcomponent_getkeyeventdeviceid)([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*keyEvent, int64_t \*deviceId) | Obtains the device ID of the specified key event. |
| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp)([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)\*keyEvent, int64_t \*timeStamp) | Obtains the timestamp of the specified key event. |
| [OH_XCOMPONENT_ID_LEN_MAX](#oh_xcomponent_id_len_max) = 128 | Maximum length of an ArkUI XComponent ID. |
| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of the ArkUI XComponent ID. |
| [OH_MAX_TOUCH_POINTS_NUMBER](#oh_max_touch_points_number) = 10 | Maximum number of identifiable touch points in a touch event. |
| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | Maximum number of identifiable touch points in a touch event. |
| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the application window where the XComponent is located.|
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the application window where the XComponent is located.|
| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the current touch event. |
| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the touch event. |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the current touch event. |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the touch point. |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. |
| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the screen. |
| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the current touch event. |
| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the touch event. |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the current touch event. |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the touch event. |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints)[OH_MAX_TOUCH_POINTS_NUMBER] | Array of the current touch points. |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints)[OH_MAX_TOUCH_POINTS_NUMBER] | Array of the touch points. |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. |
| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::y](#y-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::y](#y-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)= 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp) = 0 | Timestamp of the current mouse event. |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)= 0 | Timestamp of the mouse event. |
| [OH_NativeXComponent_MouseEvent::action](#action) = [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Current mouse event action. |
| [OH_NativeXComponent_MouseEvent::action](#action)= [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Action of the mouse event. |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| component | Pointer to the **OH_NativeXComponent** instance. |
| id | Indicates the pointer to the character buffer used to hold the ID of the OH_NativeXComponent instance.<br>Note that the null terminator is attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID.<br>The recommended size of the character buffer is [OH_XCOMPONENT_ID_LEN_MAX + 1]. |
| id | Pointer to the character buffer for storing the ID of the **OH_NativeXComponent** instance. Note that null terminators will be attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID. The recommended size is [OH_XCOMPONENT_ID_LEN_MAX + 1].|
| size | Indicates the pointer to the length of the ID. |
| [displayId](#displayid) | uint64_t<br>Defines the ID of the physical screen to capture. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_SCREEN**.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
| [missionIDs](#missionids) | int32_t \*<br>Defines the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
| [missionIDsLen](#missionidslen) | int32_t<br>Defines the length of the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
| [videoFrameWidth](#videoframewidth) | int32_t<br>Defines the width of the captured video.|
| [videoFrameHeight](#videoframeheight) | int32_t<br>Defines the height of the captured video.|
| [videoSource](#videosource) | [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype)<br>Defines the video source type. Currently, only RGBA is supported.|
## Member Variable Description
### displayId
```
uint64_t OH_VideoCaptureInfo::displayId
```
**Description**
Defines the ID of the physical screen to capture. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_SCREEN**.
> **NOTE**
>
> This member variable is reserved and will be provided in later versions.
### missionIDs
```
int32_t* OH_VideoCaptureInfo::missionIDs
```
**Description**
Defines the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.
> **NOTE**
>
> This member variable is reserved and will be provided in later versions.
### missionIDsLen
```
int32_t OH_VideoCaptureInfo::missionIDsLen
```
**Description**
Defines the length of the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.
> **NOTE**
>
> This member variable is reserved and will be provided in later versions.
| [videoCapInfo](#videocapinfo) | [OH_VideoCaptureInfo](_o_h___video_capture_info.md)<br>Defines video capture information.|
| [videoEncInfo](#videoencinfo) | [OH_VideoEncInfo](_o_h___video_enc_info.md)<br>Defines video encoding parameters.<br>**NOTE**: This member variable is reserved and will be provided in later versions.|
## Member Variable Description
### videoCapInfo
```
OH_VideoCaptureInfo OH_VideoInfo::videoCapInfo
```
**Description**
Defines video capture information.
### videoEncInfo
```
OH_VideoEncInfo OH_VideoInfo::videoEncInfo
```
**Description**
Defines video encoding parameters.
> **NOTE**
>
> This member variable is reserved and will be provided in later versions.
The **native_avscreen_capture.h** file declares the native APIs used to create an **OH_AVScreenCapture** instance.
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Functions
| Name| Description|
| -------- | -------- |
| [OH_AVScreenCapture_Create](_a_v_screen_capture.md#oh_avscreencapture_create)(void) | Creates an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCapture_Init](_a_v_screen_capture.md#oh_avscreencapture_init)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) config) | Initializes parameters related to an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCapture_StartScreenCapture](_a_v_screen_capture.md#oh_avscreencapture_startscreencapture)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated.|
| [OH_AVScreenCapture_StopScreenCapture](_a_v_screen_capture.md#oh_avscreencapture_stopscreencapture)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone.|
| [OH_AVScreenCapture_StartScreenRecording](_a_v_screen_capture.md#oh_avscreencapture_startscreenrecording)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Starts screen recording and collects encoded streams.<br>**NOTE**: This function is reserved and will be provided in later versions.|
| [OH_AVScreenCapture_StopScreenRecording](_a_v_screen_capture.md#oh_avscreencapture_stopscreenrecording)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**.<br>**NOTE**: This function is reserved and will be provided in later versions.|
| [OH_AVScreenCapture_AcquireAudioBuffer](_a_v_screen_capture.md#oh_avscreencapture_acquireaudiobuffer)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AudioBuffer](_o_h___audio_buffer.md)\*\*audiobuffer, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.|
| [OH_AVScreenCapture_AcquireVideoBuffer](_a_v_screen_capture.md#oh_avscreencapture_acquirevideobuffer)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, int32_t \*fence, int64_t \*timestamp, struct [OH_Rect](_o_h___rect.md)\*region) | Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp.|
| [OH_AVScreenCapture_ReleaseAudioBuffer](_a_v_screen_capture.md#oh_avscreencapture_releaseaudiobuffer)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Releases an audio buffer.|
| [OH_AVScreenCapture_ReleaseVideoBuffer](_a_v_screen_capture.md#oh_avscreencapture_releasevideobuffer)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Releases a video buffer.|
| [OH_AVScreenCapture_SetCallback](_a_v_screen_capture.md#oh_avscreencapture_setcallback)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, struct [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) callback) | Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.|
| [OH_AVScreenCapture_Release](_a_v_screen_capture.md#oh_avscreencapture_release)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**.|
| [OH_AVScreenCapture_SetMicrophoneEnabled](_a_v_screen_capture.md#oh_avscreencapture_setmicrophoneenabled)(struct[OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, bool isMicrophone) | Enables or disables the microphone.|
| [OH_AudioEncInfo](_o_h___audio_enc_info.md) | Defines audio encoding information.<br>**NOTE**: This struct is reserved and will be provided in later versions.|
| [OH_VideoCaptureInfo](_o_h___video_capture_info.md) | Defines video capturing information.|
| [OH_VideoEncInfo](_o_h___video_enc_info.md) | Defines video encoding information.<br>**NOTE**: This struct is reserved and will be provided in later versions.|
| [OH_VideoInfo](_o_h___video_info.md) | Defines video capturing parameters.|
| [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) | Defines the screen capture configuration.|
| [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.|
| [OH_Rect](_o_h___rect.md) | Defines the width, height, and image information of the rectangle used for screen capture.|
| [OH_AudioBuffer](_o_h___audio_buffer.md) | Defines the configuration such as the size, type, and timestamp of audio data.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_NativeBuffer](_a_v_screen_capture.md#oh_nativebuffer) | Defines the native video stream class for screen capture.|
| [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) | Defines a screen capture instance used to obtain original video and audio streams.|
| [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode) | Defines an enum that enumerates the screen capture modes.|
| [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) | Defines an enum that enumerates the audio source types during screen capture.|
| [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat) | Defines an enum that enumerates the audio encoding formats.|
| [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat) | Defines an enum that enumerates the video encoding formats.|
| [OH_DataType](_a_v_screen_capture.md#oh_datatype) | Defines an enum that enumerates the data types of screen capture streams.|
| [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype) | Defines an enum that enumerates the video source formats.|
| [OH_ContainerFormatType](_a_v_screen_capture.md#oh_containerformattype) | Defines an enum that enumerates the types of files generated during screen capture.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_AudioEncInfo](_a_v_screen_capture.md#oh_audioencinfo) | Defines audio encoding information.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_VideoCaptureInfo](_a_v_screen_capture.md#oh_videocaptureinfo) | Defines video capturing information.|
| [OH_VideoEncInfo](_a_v_screen_capture.md#oh_videoencinfo) | Defines video encoding information.<br>**NOTE**: This type is reserved and will be provided in later versions.|
| [OH_VideoInfo](_a_v_screen_capture.md#oh_videoinfo) | Defines video capturing parameters.|
| [OH_AVScreenCaptureConfig](_a_v_screen_capture.md#oh_avscreencaptureconfig) | Defines the screen recording configuration.|
| (\*[OH_AVScreenCaptureOnError](_a_v_screen_capture.md#oh_avscreencaptureonerror)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture)\*capture, int32_t errorCode) | Defines a pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance.|
| (\*[OH_AVScreenCaptureOnAudioBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonaudiobufferavailable)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture)\*capture, bool isReady, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Defines a pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance.|
| (\*[OH_AVScreenCaptureOnVideoBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonvideobufferavailable)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture)\*capture, bool isReady) | Defines a pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance.|
| [OH_AVScreenCaptureCallback](_a_v_screen_capture.md#oh_avscreencapturecallback) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.|
| [OH_Rect](_a_v_screen_capture.md#oh_rect) | Defines the width, height, and image information of the rectangle used for screen capture.|
| [OH_AudioBuffer](_a_v_screen_capture.md#oh_audiobuffer) | Defines the configuration such as the size, type, and timestamp of audio data.|
| [OH_DataType](_a_v_screen_capture.md#oh_datatype) { [OH_ORIGINAL_STREAM](_a_v_screen_capture.md) = 0, [OH_ENCODED_STREAM](_a_v_screen_capture.md) = 1, [OH_CAPTURE_FILE](_a_v_screen_capture.md) = 2, OH_INVAILD = -1 } | Enumerates the data sources of screen capture streams.|
| [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype) { [OH_VIDEO_SOURCE_SURFACE_YUV](_a_v_screen_capture.md) = 0, [OH_VIDEO_SOURCE_SURFACE_ES](_a_v_screen_capture.md), [OH_VIDEO_SOURCE_SURFACE_RGBA](_a_v_screen_capture.md), [OH_VIDEO_SOURCE_BUTT](_a_v_screen_capture.md) } | Enumerates the video source formats.|
| [OH_ContainerFormatType](_a_v_screen_capture.md#oh_containerformattype) { [CFT_MPEG_4A](_a_v_screen_capture.md) = 0, [CFT_MPEG_4](_a_v_screen_capture.md) = 1 } | Enumerates the types of files generated during screen capture.<br>**NOTE**: This enum is reserved and will be provided in later versions.|
The **native_avscreen_capture_errors.h** file declares the error codes generated during screen capture.
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Types
| Name| Description|
| -------- | -------- |
| [OH_AVSCREEN_CAPTURE_ErrCode](_a_v_screen_capture.md#oh_avscreen_capture_errcode) | Defines an enum that enumerates the error codes generated during screen recording.|
| ArkUI | [Vibrator](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Vibrator) | This sample simulates the countdown scenario to show the use of the vibrator APIs.| ArkTS |
| ArkUI | [Vibrator](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceManagement/Vibrator) | This sample simulates the countdown scenario to show the use of the vibrator APIs.| ArkTS |
| DFX | [FaultLogger](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DFX/FaultLogger) | This sample illustrates how to obtain fault information of an application in ArkTS.| ArkTS |
| DFX | [FaultLogger](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DFX/FaultLogger) | This sample illustrates how to obtain fault information of an application in ArkTS.| ArkTS |
| ArkUI | [ComponentCollection](https://gitee.com/openharmony/applications_app_samples/tree/master/code/UI/ArkTsComponentClollection/ComponentCollection) | This sample illustrates all the components, animations, and global methods of ArkUI.| ArkTS |
| ArkUI | [ComponentCollection](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/UI/ArkTsComponentCollection/ComponentCollection) | This sample illustrates all the components, animations, and global methods of ArkUI.| ArkTS |
| ArkUI | [ArkTSClock](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Solutions/Tools/ArkTSClock) | This sample exemplifies how to implement a simple clock application using the ArkTS UI capability. | ArkTS |
| ArkUI | [ArkTSClock](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Solutions/Tools/ArkTSClock) | This sample exemplifies how to implement a simple clock application using the ArkTS UI capability. | ArkTS |
| Network management| [Http](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Http) | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| ArkTS |
| Network management| [Http](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Connectivity/Http) | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| ArkTS |
| Network management| [Socket](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Socket) | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| ArkTS |
| Network management| [Socket](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Connectivity/Socket) | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| ArkTS |
| Distributed data management| [DistributedRdb](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/DistributedAppDev/DistributedRdb) | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with ArkTS.| ArkTS |
| Distributed data management| [DistributedRdb](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/DistributedAppDev/DistributedRdb) | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with ArkTS.| ArkTS |
| Ability| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/WorkScheduler) | This sample simulates the update process starting from downloading and saving an update package to sending a notification and installing the update package. Being processed by the background task management, the download task continues after the application exits. It stops until the download is complete.| ArkTS |
| Ability| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/WorkScheduler) | This sample simulates the update process starting from downloading and saving an update package to sending a notification and installing the update package. Being processed by the background task management, the download task continues after the application exits. It stops until the download is complete.| ArkTS |
| Ability| [AbilityStartMode](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/AbilityStartMode) | This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| ArkTS |
| Ability| [AbilityStartMode](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/AbilityStartMode) | This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| ArkTS |
| Multimedia| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/FileManagement/MediaCollections) | This sample illustrates media management in ArkTS, including network stream playback, audio and video playback control, and volume adjustment.| ArkTS |
| Multimedia| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/FileManagement/MediaCollections) | This sample illustrates media management in ArkTS, including network stream playback, audio and video playback control, and volume adjustment.| ArkTS |
| Ability| [ArkTSDistributedCalc](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc) | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| ArkTS |
| Ability| [ArkTSDistributedCalc](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc) | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| ArkTS |
| Web | [Browser](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Web/Browser) | This sample uses the stage model and related APIs to show a simple browser.| ArkTS |
| Web | [Browser](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Web/Browser) | This sample uses the stage model and related APIs to show a simple browser.| ArkTS |
| Ability| [DeviceUsageStatistics](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceUsageStatistics/DeviceUsageStatistics) | This sample shows the device usage statistics.| ArkTS |
| Ability| [DeviceUsageStatistics](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceUsageStatistics/DeviceUsageStatistics) | This sample shows the device usage statistics.| ArkTS |
| ArkUI | [AdaptiveCapabilities](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AdaptiveCapabilities) | This sample shows multi-device adaptation in ArkTS, including resource qualifiers, atomic layouts, and responsive layouts.| ArkTS |
| ArkUI | [AdaptiveCapabilities](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/AdaptiveCapabilities) | This sample shows multi-device adaptation in ArkTS, including resource qualifiers, atomic layouts, and responsive layouts.| ArkTS |
| ArkUI | [Game2048](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Solutions/Game/Game2048) | This sample shows how to develop a 2048 game using the **\<Grid>** component.| ArkTS |
| ArkUI | [Game2048](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Solutions/Game/Game2048) | This sample shows how to develop a 2048 game using the **\<Grid>** component.| ArkTS |
| Typical Setting Page of One-Time Development for Multi-Device Deployment| [Settings](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Settings) | This sample shows a typical page for setting an application. The page has different display effects in the small window and large window, reflecting the capability of one-time development for multi-device deployment.| ArkTS |
| Typical Setting Page of One-Time Development for Multi-Device Deployment| [Settings](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/Settings) | This sample shows a typical page for setting an application. The page has different display effects in the small window and large window, reflecting the capability of one-time development for multi-device deployment.| ArkTS |
| Distributed data management| [Preference](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DataManagement/Preferences) | This sample shows the theme switching function of preferences.| ArkTS |
| Distributed data management| [Preference](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DataManagement/Preferences) | This sample shows the theme switching function of preferences.| ArkTS |
| Globalization| [International](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/Internationalnation/International) | This sample shows how to use APIs related to i18n, intl, and resourceManager in ArkTS to set the system language, region, time, and time zone. It also provides locale setting examples.| ArkTS |
| Globalization| [International](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/Internationalnation/International) | This sample shows how to use APIs related to i18n, intl, and resourceManager in ArkTS to set the system language, region, time, and time zone. It also provides locale setting examples.| ArkTS |
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
| ArkUI development framework| [HealthyDiet](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/HealthyDiet)| This sample app helps you keep food records and view food information. After you add food records, including the food type, weight, and meal time, the app can calculate nutrition data (calories, proteins, fats, and carbon water) for the meals and display the data in a bar chart.| ArkTS |
| ArkUI development framework| [HealthyDiet](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/HealthyDiet)| This sample app helps you keep food records and view food information. After you add food records, including the food type, weight, and meal time, the app can calculate nutrition data (calories, proteins, fats, and carbon water) for the meals and display the data in a bar chart.| ArkTS |
| ArkUI development framework| [MusicAlbum](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/MusicAlbum)| This sample shows the home page of a music album app. The adaptive layout and responsive layout are used to ensure that the app can be properly displayed on devices irrespective of screen sizes.| ArkTS |
| ArkUI development framework| [MusicAlbum](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/MusicAlbum)| This sample shows the home page of a music album app. The adaptive layout and responsive layout are used to ensure that the app can be properly displayed on devices irrespective of screen sizes.| ArkTS |
| Ability framework and file management subsystem| [CustomShare](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/CustomShare) | Using this sample app, you can share texts, links, and images with third-party applications and display them in these applications.| ArkTS |
| Ability framework and file management subsystem| [CustomShare](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/CustomShare) | Using this sample app, you can share texts, links, and images with third-party applications and display them in these applications.| ArkTS |
| Ability framework| [GalleryForm](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormExtAbility) | This sample demonstrates the display of **Gallery** images in a widget and periodic update of the widget.| ArkTS |
| Ability framework| [GalleryForm](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/Widget/FormExtAbility) | This sample demonstrates the display of **Gallery** images in a widget and periodic update of the widget.| ArkTS |
| ArkUI development framework| [AppMarket](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AppMarket) | This sample shows the home page of an application market, which contains the tab bar, banner, featured apps, and featured games.| ArkTS |
| ArkUI development framework| [AppMarket](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/AppMarket) | This sample shows the home page of an application market, which contains the tab bar, banner, featured apps, and featured games.| ArkTS |
| ArkUI development framework| [Weather](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Weather) | This sample demonstrates one-time development for multi-device deployment by showing how to develop a weather app and deploy it across different devices. The demo app includes the following: home page, **Manage City** page, **Add City** page, and **Update Time** page.| ArkTS |
| ArkUI development framework| [Weather](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/Weather) | This sample demonstrates one-time development for multi-device deployment by showing how to develop a weather app and deploy it across different devices. The demo app includes the following: home page, **Manage City** page, **Add City** page, and **Update Time** page.| ArkTS |
| Multimedia subsystem| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/FileManagement/MediaCollections) | This sample shows the capabilities of online streaming, audio and video playback control, and volume adjustment.| ArkTS |
| Multimedia subsystem| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/FileManagement/MediaCollections) | This sample shows the capabilities of online streaming, audio and video playback control, and volume adjustment.| ArkTS |
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
| Common event and notification subsystem| [Event Notification](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Notification/CustomEmitter)| This sample shows the in-process event notification. After a user selects an offering and submits an order, the selected offering is displayed in the order list.|
| Common event and notification subsystem| [Event Notification](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Notification/CustomEmitter)| This sample shows the in-process event notification. After a user selects an offering and submits an order, the selected offering is displayed in the order list.|
| Data management subsystem| [Cross-Application Data Sharing](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/DataManagement/CrossAppDataShare)| This sample implements cross-application data sharing. It provides contacts (data provider) and contacts assistant (data user). Contacts support functionalities such as adding, deleting, modifying, and querying contacts data. Contacts assistant supports contacts data synchronization and merging of duplicate data.|
| Data management subsystem| [Cross-Application Data Sharing](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/DataManagement/CrossAppDataShare)| This sample implements cross-application data sharing. It provides contacts (data provider) and contacts assistant (data user). Contacts support functionalities such as adding, deleting, modifying, and querying contacts data. Contacts assistant supports contacts data synchronization and merging of duplicate data.|
| Resource scheduler subsystem| [Agent-Powered Scheduled Reminder](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/ReminderAgentManager)| This sample uses agent-powered scheduled reminder to create three types of scheduled reminders: alarm clocks, calendar events, and countdown timers. Agent-powered scheduled reminder ensures that the timing and pop-up notification functions will be performed by the system service agent in the background when the application is frozen or exits.|
| Resource scheduler subsystem| [Agent-Powered Scheduled Reminder](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/ReminderAgentManager)| This sample uses agent-powered scheduled reminder to create three types of scheduled reminders: alarm clocks, calendar events, and countdown timers. Agent-powered scheduled reminder ensures that the timing and pop-up notification functions will be performed by the system service agent in the background when the application is frozen or exits.|
| File management subsystem| [Storage Space Statistics](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/DeviceManagement/StorageStatistic)| This sample uses the application package management, application space statistics, and volume management modules to implement the viewing of storage space information of the current device, all installed applications, and all available volumes.|
| File management subsystem| [Storage Space Statistics](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/DeviceManagement/StorageStatistic)| This sample uses the application package management, application space statistics, and volume management modules to implement the viewing of storage space information of the current device, all installed applications, and all available volumes.|
| Window manager| [Screenshot](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/Media/Screenshot)| This sample uses the screenshot, window, and display modules to take screenshots, switch the privacy window, and query the privacy window, in sequence.|
| Window manager| [Screenshot](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/Media/Screenshot)| This sample uses the screenshot, window, and display modules to take screenshots, switch the privacy window, and query the privacy window, in sequence.|
| Bundle management framework| [Multi-HAP](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Project/ApplicationHap/MultiHap)| This sample shows the development of multi-HAP. The sample app includes one entry HAP and two feature HAPs. The two feature HAPs provide audio and video playback components, respectively. The two components are also used in the entry component.|
| Bundle management framework| [Multi-HAP](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Project/ApplicationHap/MultiHap)| This sample shows the development of multi-HAP. The sample app includes one entry HAP and two feature HAPs. The two feature HAPs provide audio and video playback components, respectively. The two components are also used in the entry component.|
| Ability framework| [Ability Launch Mode](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/AbilityStartMode)| This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.|
| Ability framework| [Ability Launch Mode](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/AbilityStartMode)| This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.|
| Resource management| [Application Theme Switch](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Project/ResourceAllocation/ApplicationThemeSwitch)| This sample creates the **dark** and **light** folders at the same level as the **base** folder to configure resources related to the dark and light themes. The custom theme file is configured in the **ThemeConst** file to implement multi-theme switching by controlling variables.|
| Resource management| [Application Theme Switch](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Project/ResourceAllocation/ApplicationThemeSwitch)| This sample creates the **dark** and **light** folders at the same level as the **base** folder to configure resources related to the dark and light themes. The custom theme file is configured in the **ThemeConst** file to implement multi-theme switching by controlling variables.|
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
| Accessibility| [AccessibilityExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/ApplicationModels/AccessibilityExtAbility)| This sample demonstrates an application developed using the AccessibilityExtensionAbility component. It uses multiple APIs to implement quick interaction.| ArkTS |
| Accessibility| [AccessibilityExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/ApplicationModels/AccessibilityExtAbility)| This sample demonstrates an application developed using the AccessibilityExtensionAbility component. It uses multiple APIs to implement quick interaction.| ArkTS |
| Enterprise management| [Enterprise Device Management ExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/ApplicationModels/EnterpriseAdminExtensionAbility)| EnterpriseAdminExtensionAbility is a mandatory component for Mobile Device Management (MDM) applications. When developing MDM applications for enterprises, you need to inherit EnterpriseAdminExtensionAbility and implement MDM service logic in the EnterpriseAdminExtensionAbility instance. EnterpriseAdminExtensionAbility implements notifications of system management status changes and defines the callbacks that are triggered when a device administrator application is enabled or disabled or an application is installed or uninstalled.| ArkTS |
| Enterprise management| [Enterprise Device Management ExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/ApplicationModels/EnterpriseAdminExtensionAbility)| EnterpriseAdminExtensionAbility is a mandatory component for Mobile Device Management (MDM) applications. When developing MDM applications for enterprises, you need to inherit EnterpriseAdminExtensionAbility and implement MDM service logic in the EnterpriseAdminExtensionAbility instance. EnterpriseAdminExtensionAbility implements notifications of system management status changes and defines the callbacks that are triggered when a device administrator application is enabled or disabled or an application is installed or uninstalled.| ArkTS |
| Mission management| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/WorkScheduler)| This sample uses the APIs **\@ohos.WorkSchedulerExtensionAbility**, **\@ohos.net.http**, **\@ohos.notification**, **\@ohos.bundle**, and **\@ohos.fileio** to implement the functionalities of setting background tasks, downloading, saving, and installing update packages, and sending notifications.| ArkTS |
| Mission management| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/WorkScheduler)| This sample uses the APIs **\@ohos.WorkSchedulerExtensionAbility**, **\@ohos.net.http**, **\@ohos.notification**, **\@ohos.bundle**, and **\@ohos.fileio** to implement the functionalities of setting background tasks, downloading, saving, and installing update packages, and sending notifications.| ArkTS |
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).