未验证 提交 cc6f243a 编写于 作者: O openharmony_ci 提交者: Gitee

!22185 翻译完成:21596+21748+21628 Native API新增

Merge pull request !22185 from wusongqing/TR21596
......@@ -24,11 +24,13 @@
- [AVDemuxer](_a_v_demuxer.md)
- [AVSource](_a_v_source.md)
- [OHAudio](_o_h_audio.md)
- [AVScreenCapture](_a_v_screen_capture.md)
- [HuksKeyApi](_huks_key_api.md)
- [HuksParamSetApi](_huks_param_set_api.md)
- [HuksTypeApi](_huks_type_api.md)
- [Init](init.md)
- [Memory](memory.md)
- [UsbDdk](_usb_ddk.md)
- [Hitrace](_hitrace.md)
- [Vulkan](_vulkan.md)
- Header Files
......@@ -43,7 +45,12 @@
- [drawing_text_typography.h](drawing__text__typography_8h.md)
- [drawing_types.h](drawing__types_8h.md)
- [external_window.h](external__window_8h.md)
- [image_mdk.h](image__mdk_8h.md)
- [image_mdk_common.h](image__mdk__common_8h.md)
- [image_pixel_map_mdk.h](image__pixel__map__mdk_8h.md)
- [image_pixel_map_napi.h](image__pixel__map__napi_8h.md)
- [image_receiver_mdk.h](image__receiver__mdk_8h.md)
- [image_source_mdk.h](image__source__mdk_8h.md)
- [log.h](log_8h.md)
- [native_buffer.h](native__buffer_8h.md)
- [native_image.h](native__image_8h.md)
......@@ -79,6 +86,9 @@
- [native_audiorenderer.h](native__audiorenderer_8h.md)
- [native_audiostream_base.h](native__audiostream__base_8h.md)
- [native_audiostreambuilder.h](native__audiostreambuilder_8h.md)
- [native_avscreen_capture.h](native__avscreen__capture_8h.md)
- [native_avscreen_capture_base.h](native__avscreen__capture__base_8h.md)
- [native_avscreen_capture_errors.h](native__avscreen__capture__errors_8h.md)
- [native_huks_api.h](native__huks__api_8h.md)
- [native_huks_param.h](native__huks__param_8h.md)
- [native_huks_type.h](native__huks__type_8h.md)
......@@ -90,6 +100,8 @@
- [relational_store.h](relational__store_8h.md)
- [syscap_ndk.h](syscap__ndk_8h.md)
- [purgeable_memory.h](purgeable__memory_8h.md)
- [usb_ddk_api.h](usb__ddk__api_8h.md)
- [usb_ddk_types.h](usb__ddk__types_8h.md)
- [trace.h](trace_8h.md)
- [vulkan_ohos.h](vulkan__ohos_8h.md)
- Structs
......@@ -102,8 +114,23 @@
- [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md)
- [OHExtDataHandle](_o_h_ext_data_handle.md)
- [OHHDRMetaData](_o_h_h_d_r_meta_data.md)
- [OHOS::Media::OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md)
- [OHOS::Media::OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md)
- [OHOS::Media::OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md)
- [OhosImageDecodingOps](_ohos_image_decoding_ops.md)
- [OhosImageReceiverInfo](_ohos_image_receiver_info.md)
- [OhosImageRegion](_ohos_image_region.md)
- [OhosImageSize](_ohos_image_size.md)
- [OhosImageSource](_ohos_image_source.md)
- [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md)
- [OhosImageSourceInfo](_ohos_image_source_info.md)
- [OhosImageSourceOps](_ohos_image_source_ops.md)
- [OhosImageSourceProperty](_ohos_image_source_property.md)
- [OhosImageSourceSupportedFormat](_ohos_image_source_supported_format.md)
- [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md)
- [OhosImageSourceUpdateData](_ohos_image_source_update_data.md)
- [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md)
- [OhosPixelMapInfo](_ohos_pixel_map_info.md)
- [OhosPixelMapInfos](_ohos_pixel_map_infos.md)
- [RawFileDescriptor](_raw_file_descriptor.md)
- [Region](_region.md)
- [Rect](_rect.md)
......@@ -119,6 +146,17 @@
- [OH_AVRange](_o_h___a_v_range.md)
- [OH_AudioCapturer_Callbacks_Struct](_o_h___audio_capturer___callbacks___struct.md)
- [OH_AudioRenderer_Callbacks_Struct](_o_h___audio_renderer___callbacks___struct.md)
- [OH_AudioBuffer](_o_h___audio_buffer.md)
- [OH_AudioCaptureInfo](_o_h___audio_capture_info.md)
- [OH_AudioEncInfo](_o_h___audio_enc_info.md)
- [OH_AudioInfo](_o_h___audio_info.md)
- [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md)
- [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md)
- [OH_RecorderInfo](_o_h___recorder_info.md)
- [OH_Rect](_o_h___rect.md)
- [OH_VideoCaptureInfo](_o_h___video_capture_info.md)
- [OH_VideoEncInfo](_o_h___video_enc_info.md)
- [OH_VideoInfo](_o_h___video_info.md)
- [OH_Huks_Blob](_o_h___huks___blob.md)
- [OH_Huks_CertChain](_o_h___huks___cert_chain.md)
- [OH_Huks_KeyInfo](_o_h___huks___key_info.md)
......@@ -137,6 +175,17 @@
- [OH_Rdb_Store](_o_h___rdb___store.md)
- [OH_VBucket](_o_h___v_bucket.md)
- [OH_VObject](_o_h___v_object.md)
- [UsbConfigDescriptor](_usb_config_descriptor.md)
- [UsbControlRequestSetup](_usb_control_request_setup.md)
- [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md)
- [UsbDdkEndpointDescriptor](_usb_ddk_endpoint_descriptor.md)
- [UsbDdkInterface](_usb_ddk_interface.md)
- [UsbDdkInterfaceDescriptor](_usb_ddk_interface_descriptor.md)
- [UsbDeviceDescriptor](_usb_device_descriptor.md)
- [UsbDeviceMemMap](_usb_device_mem_map.md)
- [UsbEndpointDescriptor](_usb_endpoint_descriptor.md)
- [UsbInterfaceDescriptor](_usb_interface_descriptor.md)
- [UsbRequestPipe](_usb_request_pipe.md)
- [VkExternalFormatOHOS](_vk_external_format_o_h_o_s.md)
- [VkImportNativeBufferInfoOHOS](_vk_import_native_buffer_info_o_h_o_s.md)
- [VkMemoryGetNativeBufferInfoOHOS](_vk_memory_get_native_buffer_info_o_h_o_s.md)
......
# OH_AVScreenCaptureCallback
## Overview
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.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| **onError** | [OH_AVScreenCaptureOnError](_a_v_screen_capture.md#oh_avscreencaptureonerror) |
| **onAudioBufferAvailable** | [OH_AVScreenCaptureOnAudioBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonaudiobufferavailable) |
| **onVideoBufferAvailable** | [OH_AVScreenCaptureOnVideoBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonvideobufferavailable) |
# OH_AVScreenCaptureConfig
## Overview
The **OH_AVScreenCaptureConfig** struct defines the screen capture configuration.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [captureMode](#capturemode) | [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode)<br>Defines the screen capture mode.|
| [dataType](#datatype) | [OH_DataType](_a_v_screen_capture.md#oh_datatype)<br>Defines the data type of the screen capture stream.|
| [audioInfo](#audioinfo) | [OH_AudioInfo](_o_h___audio_info.md)<br>Defines audio capture parameters.|
| [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.|
## Member Variable Description
### audioInfo
```
OH_AudioInfo OH_AVScreenCaptureConfig::audioInfo
```
**Description**
Defines audio capture parameters.
### captureMode
```
OH_CaptureMode OH_AVScreenCaptureConfig::captureMode
```
**Description**
Defines the screen capture mode.
### dataType
```
OH_DataType OH_AVScreenCaptureConfig::dataType
```
**Description**
Defines the data type of the screen capture stream.
### recorderInfo
```
OH_RecorderInfo OH_AVScreenCaptureConfig::recorderInfo
```
**Description**
Defines recording file parameters. This member variable is mandatory when the data type is **OH_CAPTURE_FILE**.
> **NOTE**
>
> This member variable is reserved and will be provided in later versions.
### videoInfo
```
OH_VideoInfo OH_AVScreenCaptureConfig::videoInfo
```
**Description**
Defines video capture parameters.
# OH_AudioBuffer
## Overview
The **OH_AudioBuffer** struct defines the configuration such as the size, type, and timestamp of audio data.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [buf](#buf) | Defines the pointer to an audio buffer.|
| [size](#size) | Defines the size of the audio buffer.|
| [timestamp](#timestamp) | Defines the timestamp of the audio buffer.|
| [type](#type) | Defines the type of the audio capture source.|
## Member Variable Description
### buf
```
uint8_t* OH_AudioBuffer::buf
```
**Description**
Defines the pointer to an audio buffer.
### size
```
int32_t OH_AudioBuffer::size
```
**Description**
Defines the size of the audio buffer.
### timestamp
```
int64_t OH_AudioBuffer::timestamp
```
**Description**
Defines the timestamp of the audio buffer.
### type
```
OH_AudioCaptureSourceType OH_AudioBuffer::type
```
**Description**
Defines the type of the audio capture source.
# OH_AudioCaptureInfo
## Overview
The **OH_AudioCaptureInfo** struct defines audio capture information.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [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**.
### audioSource
```
OH_AudioCaptureSourceType OH_AudioCaptureInfo::audioSource
```
**Description**
Defines the audio source.
# OH_AudioEncInfo
## Overview
The **OH_AudioEncInfo** struct defines audio encoding information.
> **NOTE**
>
> This struct is reserved and will be provided in later versions.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [audioBitrate](#audiobitrate) | int32_t<br>Defines the audio bit rate.|
| [audioCodecformat](#audiocodecformat) | [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat)<br>Defines the audio codec format.|
## Member Variable Description
### audioBitrate
```
int32_t OH_AudioEncInfo::audioBitrate
```
**Description**
Defines the audio bit rate.
### audioCodecformat
```
OH_AudioCodecFormat OH_AudioEncInfo::audioCodecformat
```
**Description**
Defines the audio codec format.
# OH_AudioInfo
## Overview
The **OH_AudioInfo** struct defines audio capture parameters.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [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.
### micCapInfo
```
OH_AudioCaptureInfo OH_AudioInfo::micCapInfo
```
**Description**
Defines the audio parameters of the microphone.
# OH_RecorderInfo
## Overview
The **OH_RecorderInfo** struct defines recording file information.
> **NOTE**
>
> This struct is reserved and will be provided in later versions.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [url](#url) | Defines the URL of the recording file.|
| [urlLen](#urllen) | Defines the URL length.|
| [fileFormat](#fileformat) | Defines the format of the recording file.|
## Member Variable Description
### fileFormat
```
OH_ContainerFormatType OH_RecorderInfo::fileFormat
```
**Description**
Defines the format of the recording file.
### url
```
char* OH_RecorderInfo::url
```
**Description**
Defines the URL of the recording file.
### urlLen
```
uint32_t OH_RecorderInfo::urlLen
```
**Description**
Defines the URL length.
# OH_Rect
## Overview
The **OH_Rect** struct defines the width, height, and image information of the rectangle used for screen capture.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [x](#x) | int32_t<br>Defines the X coordinate of the screen capture rectangle.|
| [y](#y) | int32_t<br>Defines the Y coordinate of the screen capture rectangle.|
| [width](#width) | int32_t<br>Defines the width of the screen capture rectangle.|
| [height](#height) | int32_t<br>Defines the height of the screen capture rectangle.|
## Member Variable Description
### height
```
int32_t OH_Rect::height
```
**Description**
Defines the height of the screen capture rectangle.
### width
```
int32_t OH_Rect::width
```
**Description**
Defines the width of the screen capture rectangle.
### x
```
int32_t OH_Rect::x
```
**Description**
Defines the X coordinate of the screen capture rectangle.
### y
```
int32_t OH_Rect::y
```
**Description**
Defines the Y coordinate of the screen capture rectangle.
# OH_VideoCaptureInfo
## Overview
The **OH_VideoCaptureInfo** struct defines video capture information.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [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.
### videoFrameHeight
```
int32_t OH_VideoCaptureInfo::videoFrameHeight
```
**Description**
Defines the height of the captured video.
### videoFrameWidth
```
int32_t OH_VideoCaptureInfo::videoFrameWidth
```
**Description**
Defines the width of the captured video.
### videoSource
```
OH_VideoSourceType OH_VideoCaptureInfo::videoSource
```
**Description**
Defines the video source type. Currently, only RGBA is supported.
# OH_VideoEncInfo
## Overview
The **OH_VideoEncInfo** struct defines video encoding parameters.
> **NOTE**
>
> This struct is reserved and will be provided in later versions.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [videoCodec](#videocodec) | [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat)<br>Defines the video encoding format.|
| [videoBitrate](#videobitrate) | int32_t<br>Defines the video bit rate.|
| [videoFrameRate](#videoframerate) | int32_t<br>Defines the video frame rate.|
## Member Variable Description
### videoBitrate
```
int32_t OH_VideoEncInfo::videoBitrate
```
**Description**
Defines the video bit rate.
### videoCodec
```
OH_VideoCodecFormat OH_VideoEncInfo::videoCodec
```
**Description**
Defines the video encoding format.
### videoFrameRate
```
int32_t OH_VideoEncInfo::videoFrameRate
```
**Description**
Defines the video frame rate.
# OH_VideoInfo
## Overview
The **OH_VideoInfo** struct defines video capture parameters.
**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [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.
......@@ -53,7 +53,7 @@ The **OHAudio** module provides native APIs of the audio module.
| [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat) { AUDIOSTREAM_SAMPLE_U8 = 0, AUDIOSTREAM_SAMPLE_S16LE = 1, AUDIOSTREAM_SAMPLE_S24LE = 2, AUDIOSTREAM_SAMPLE_S32LE = 3 } | Enumerates the sampling formats of audio streams.|
| [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype) { **AUDIOSTREAM_ENCODING_TYPE_RAW** = 0 } | Enumerates the encoding types of audio streams.|
| [OH_AudioStream_Usage](#oh_audiostream_usage) { **AUDIOSTREAM_USAGE_UNKNOWN** = 0, **AUDIOSTREAM_USAGE_MUSIC** = 1, **AUDIOSTREAM_USAGE_COMMUNICATION** = 2, **AUDIOSTREAM_USAGE_GAME** = 11 } | Enumerates the usage scenarios of audio output streams.|
| [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode) { AUDIOSTREAM_LATENCY_MODE_NORMAL } | Enumerates the latency modes of audio streams.|
| [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode) { AUDIOSTREAM_LATENCY_MODE_NORMAL = 0, AUDIOSTREAM_LATENCY_MODE_FAST = 1} | Enumerates the latency modes of audio streams.|
| [OH_AudioStream_State](#oh_audiostream_state) {<br>AUDIOSTREAM_STATE_INVALID = -1, AUDIOSTREAM_STATE_PREPARED = 1, AUDIOSTREAM_STATE_RUNNING = 2, AUDIOSTREAM_STATE_STOPPED = 3,<br>AUDIOSTREAM_STATE_RELEASED = 4, AUDIOSTREAM_STATE_PAUSED = 5<br>} | Enumerates the audio stream states.|
| [OH_AudioStream_SourceType](#oh_audiostream_sourcetype) { **AUDIOSTREAM_SOURCE_TYPE_INVALID** = -1, **AUDIOSTREAM_SOURCE_TYPE_MIC**, **AUDIOSTREAM_SOURCE_TYPE_VOICE_RECOGNITION** = 1, **AUDIOSTREAM_SOURCE_TYPE_VOICE_COMMUNICATION** = 7 } | Enumerates the usage scenarios of audio input streams.|
......@@ -255,6 +255,7 @@ Enumerates the latency modes of audio streams.
| Value| Description|
| -------- | -------- |
| AUDIOSTREAM_LATENCY_MODE_NORMAL | Normal latency mode.|
| AUDIOSTREAM_LATENCY_MODE_FAST | Low latency mode.|
### OH_AudioStream_Result
......
# OHOS::Media::OhosImageComponent
## Overview
The **OHOS::Media::OhosImageComponent** struct defines the information about an image component.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [byteBuffer](#bytebuffer) | Buffer that stores the pixel data.|
| [size](#size) | Size of the pixel data in the memory.|
| [componentType](#componenttype) | Type of the pixel data.|
| [rowStride](#rowstride) | Row stride of the pixel data.|
| [pixelStride](#pixelstride) | Pixel stride of the pixel data.|
## Member Variable Description
### byteBuffer
```
uint8_t* OHOS::Media::OhosImageComponent::byteBuffer
```
**Description**
Buffer that stores the pixel data.
### componentType
```
int32_t OHOS::Media::OhosImageComponent::componentType
```
**Description**
Type of the pixel data.
### pixelStride
```
int32_t OHOS::Media::OhosImageComponent::pixelStride
```
**Description**
Pixel stride of the pixel data.
### rowStride
```
int32_t OHOS::Media::OhosImageComponent::rowStride
```
**Description**
Row stride of the pixel data.
### size
```
size_t OHOS::Media::OhosImageComponent::size
```
**Description**
Size of the pixel data in the memory.
# OHOS::Media::OhosImageRect
## Overview
The **OHOS::Media::OhosImageRect** struct defines the information about an image rectangle.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [x](#x) | X coordinate of the rectangle.|
| [y](#y) | Y coordinate of the rectangle.|
| [width](#width) | Width of the rectangle, in pixels.|
| [height](#height) | Height of the rectangle, in pixels.|
## Member Variable Description
### height
```
int32_t OHOS::Media::OhosImageRect::height
```
**Description**
Height of the rectangle, in pixels.
### width
```
int32_t OHOS::Media::OhosImageRect::width
```
**Description**
Width of the rectangle, in pixels.
### x
```
int32_t OHOS::Media::OhosImageRect::x
```
**Description**
X coordinate of the rectangle.
### y
```
int32_t OHOS::Media::OhosImageRect::y
```
**Description**
Y coordinate of the rectangle.
# OHOS::Media::OhosPixelMapInfo
## Overview
The **OHOS::Media::OhosPixelMapInfo** struct defines the information about a pixel map.
**Since**
8
**Deprecated from**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [width](#width) | Image width, in pixels.|
| [height](#height) | Image height, in pixels.|
| [rowSize](#rowsize) | Number of bytes per row.|
| [pixelFormat](#pixelformat) | Pixel format.|
## Member Variable Description
### height
```
uint32_t OHOS::Media::OhosPixelMapInfo::height
```
**Description**
Image height, in pixels.
### pixelFormat
```
int32_t OHOS::Media::OhosPixelMapInfo::pixelFormat
```
**Description**
Pixel format.
### rowSize
```
uint32_t OHOS::Media::OhosPixelMapInfo::rowSize
```
**Description**
Number of bytes per row.
### width
```
uint32_t OHOS::Media::OhosPixelMapInfo::width
```
**Description**
Image width, in pixels.
# OhosImageDecodingOps
## Overview
The **OhosImageDecodingOps** struct defines the options for decoding an image source. It is used in [OH_ImageSource_CreatePixelMap](image.md#oh_imagesource_createpixelmap) and [OH_ImageSource_CreatePixelMapList](image.md#oh_imagesource_createpixelmaplist).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [editable](image.md#editable) | Defines whether the output pixel map is editable.|
| [pixelFormat](image.md#pixelformat-23) | Defines the pixel format of the output pixel map.|
| [fitDensity](image.md#fitdensity) | Defines the pixel density of the output pixel map.|
| [index](image.md#index) | Defines the index of the output pixel map.|
| [sampleSize](image.md#samplesize) | Defines the size of the sample.|
| [rotate](image.md#rotate) | Defines the decoding rotation option.|
| [size](image.md#size-27) | Defines the pixel width and height of the output pixel map.|
| [region](image.md#region) | Defines the region of the output pixel map.|
# OhosImageReceiverInfo
## Overview
The **OhosImageReceiverInfo** struct defines the information about an image receiver.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| width | Default width of the image received by the consumer, in pixels.|
| height | Default height of the image received by the consumer, in pixels.|
| format | Image format **OHOS_IMAGE_FORMAT_JPEG** created by using the receiver.|
| capicity | Maximum number of images that can be cached.|
# OhosImageRegion
## Overview
The **OhosImageRegion** struct defines the region of an image source to decode. It is used in [OhosImageDecodingOps](_ohos_image_decoding_ops.md), [OH_ImageSource_CreatePixelMap](image.md#oh_imagesource_createpixelmap), and [OH_ImageSource_CreatePixelMapList](image.md#oh_imagesource_createpixelmaplist).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [x](image.md#x) | Defines the X coordinate of the start point, in pixels.|
| [y](image.md#y) | Defines the Y coordinate of the start point, in pixels.|
| [width](image.md#width) | Defines the width of the region, in pixels.|
| [height](image.md#height) | Defines the height of the region, in pixels.|
# OhosImageSize
## Overview
The **OhosImageSize** struct defines the image size.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [width](#width) | Defines the image width, in pixels.|
| [height](#height) | Defines the image height, in pixels.|
## Member Variable Description
### height
```
int32_t OhosImageSize::height
```
**Description**
Defines the image height, in pixels.
### width
```
int32_t OhosImageSize::width
```
**Description**
Defines the image width, in pixels.
# OhosImageSource
## Overview
The **OhosImageSource** struct defines the input resource of an image source. Only one type of resource is accepted at a time. The image source is obtained by calling [OH_ImageSource_Create](image.md#oh_imagesource_create).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [uri](image.md#uri) = nullptr | Defines a pointer to the image source URI. Only a file URI or Base64 URI is accepted.|
| [uriSize](image.md#urisize) = 0 | Defines the length of the image source URI.|
| [fd](image.md#fd) = -1 | Defines the descriptor of the image source.|
| [buffer](image.md#buffer-12) = nullptr | Defines a pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted.|
| [bufferSize](image.md#buffersize-12) = 0 | Defines the size of the image source buffer.|
# OhosImageSourceDelayTimeList
## Overview
The **OhosImageSourceDelayTimeList** struct defines the delay time list of an image source. The delay time list is obtained by calling [OH_ImageSource_GetDelayTime](image.md#oh_imagesource_getdelaytime).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [delayTimeList](image.md#delaytimelist) | Defines a pointer to the head of the image source delay time list.|
| [size](image.md#size-47) = 0 | Defines the size of the image source delay time list.|
# OhosImageSourceInfo
## Overview
The **OhosImageSourceInfo** struct defines the image source information, which is obtained by calling [OH_ImageSource_GetImageInfo](image.md#oh_imagesource_getimageinfo).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [pixelFormat](image.md#pixelformat-33) | Defines the pixel format of the image source. It is set in [OH_ImageSource_Create()](image.md#oh_imagesource_create).|
| [colorSpace](image.md#colorspace) | Defines the color space of the image source.|
| [alphaType](image.md#alphatype) | Defines the alpha type of the image source.|
| [density](image.md#density-22) | Defines the image density of the image source. It is set in [OH_ImageSource_Create()](image.md#oh_imagesource_create).|
| [size](image.md#size-37) | Defines the pixel width and height of the image source.|
# OhosImageSourceOps
## Overview
The **OhosImageSourceOps** struct defines the image source options. It is used in [OH_ImageSource_Create](image.md#oh_imagesource_create) and [OH_ImageSource_CreateIncremental](image.md#oh_imagesource_createincremental).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [density](image.md#density-12) | Defines the pixel density of the image source.|
| [pixelFormat](image.md#pixelformat-13) | Defines the pixel format of the image source. It is usually used to describe the YUV buffer.|
| [size](image.md#size-17) | Defines the pixel width and height of the image source.|
# OhosImageSourceProperty
## Overview
The **OhosImageSourceProperty** struct defines the property string (in key-value format) of an image source. It is used in [OH_ImageSource_GetImageProperty](image.md#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](image.md#oh_imagesource_modifyimageproperty).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [value](image.md#value) = nullptr | Defines a pointer to the head of the property string.|
| [size](image.md#size-77) = 0 | Defines the size of the property string.|
# OhosImageSourceSupportedFormat
## Overview
The **OhosImageSourceSupportedFormat** struct defines the format string supported by an image source. It is used in [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) and [OH_ImageSource_GetSupportedFormats](image.md#oh_imagesource_getsupportedformats).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [format](image.md#format) = nullptr | Defines a pointer to the head of the format string.|
| [size](image.md#size-57) = 0 | Defines the size of the format string.|
# OhosImageSourceSupportedFormatList
## Overview
The OhosImageSourceSupportedFormatList struct defines the format string list supported by an image source. It is obtained by calling [OH_ImageSource_GetSupportedFormats](image.md#oh_imagesource_getsupportedformats).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [supportedFormatList](image.md#supportedformatlist) = nullptr | Defines a double pointer to the head of the format string list.|
| [size](image.md#size-67) = 0 | Defines the size of the format string list.|
# OhosImageSourceUpdateData
## Overview
The **OhosImageSourceUpdateData** struct defines the update data option of the image source. It is obtained by calling [OH_ImageSource_UpdateData](image.md#oh_imagesource_updatedata).
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [buffer](image.md#buffer-22) = nullptr | Defines a pointer to the buffer for storing the update data.|
| [bufferSize](image.md#buffersize-22) = 0 | Defines the size of the buffer.|
| [offset](image.md#offset) = 0 | Defines the offset of the update data in the buffer.|
| [updateLength](image.md#updatelength) = 0 | Defines the length of the update data in the buffer.|
| [isCompleted](image.md#iscompleted) = 0 | Defines whether the image source data update is completed.|
......@@ -3,7 +3,7 @@
## Overview
Defines the options used for creating a pixel map.
The **OhosPixelMapCreateOps** struct defines the options used for creating a pixel map.
**Since**
......@@ -19,14 +19,14 @@ Defines the options used for creating a pixel map.
### Member Variables
| Name| Description|
| Name| Description|
| -------- | -------- |
| [width](#width) | Image width, in pixels.|
| [height](#height) | Image height, in pixels.|
| [pixelFormat](#pixelformat) | Image format.|
| [editable](#editable) | Editing type of the image.|
| [alphaType](#alphatype) | Alpha type of the image.|
| [scaleMode](#scalemode) | Scale mode of the image.|
| [width](#width) | Image width, in pixels.|
| [height](#height) | Image height, in pixels.|
| [pixelFormat](#pixelformat) | Image format.|
| [editable](#editable) | Editing type of the image.|
| [alphaType](#alphatype) | Alpha type of the image.|
| [scaleMode](#scalemode) | Scale mode of the image.|
## Member Variable Description
......@@ -34,10 +34,10 @@ Defines the options used for creating a pixel map.
### alphaType
```
uint32_t OhosPixelMapCreateOps::alphaType
```
**Description**
Alpha type of the image.
......@@ -45,10 +45,10 @@ Alpha type of the image.
### editable
```
uint32_t OhosPixelMapCreateOps::editable
```
**Description**
Editing type of the image.
......@@ -56,10 +56,10 @@ Editing type of the image.
### height
```
uint32_t OhosPixelMapCreateOps::height
```
**Description**
Image height, in pixels.
......@@ -67,10 +67,10 @@ Image height, in pixels.
### pixelFormat
```
int32_t OhosPixelMapCreateOps::pixelFormat
```
**Description**
Image format.
......@@ -78,10 +78,10 @@ Image format.
### scaleMode
```
uint32_t OhosPixelMapCreateOps::scaleMode
```
**Description**
Scale mode of the image.
......@@ -89,10 +89,10 @@ Scale mode of the image.
### width
```
uint32_t OhosPixelMapCreateOps::width
```
**Description**
Image width, in pixels.
\ No newline at end of file
Image width, in pixels.
# OhosPixelMapInfos
## Overview
The **OhosPixelMapInfos** struct defines the information about a pixel map.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [width](#width) | Image width, in pixels.|
| [height](#height) | Image height, in pixels.|
| [rowSize](#rowsize) | Number of bytes per row.|
| [pixelFormat](#pixelformat) | Pixel format.|
## Member Variable Description
### height
```
uint32_t OhosPixelMapInfos::height
```
**Description**
Image height, in pixels.
### pixelFormat
```
int32_t OhosPixelMapInfos::pixelFormat
```
**Description**
Pixel format.
### rowSize
```
uint32_t OhosPixelMapInfos::rowSize
```
**Description**
Number of bytes per row.
### width
```
uint32_t OhosPixelMapInfos::width
```
**Description**
Image width, in pixels.
# image_mdk.h
## Overview
The **image_mdk.h** file declares the functions that access the image rectangle, size, format, and component data.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OHOS::Media::OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) | Defines the information about an image rectangle.|
| [OHOS::Media::OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) | Defines the information about an image component.|
### Types
| Name| Description|
| -------- | -------- |
| [OHOS::Media::ImageNative](image.md#imagenative) | Defines an image object at the native layer.|
### Enums
| Name| Description|
| -------- | -------- |
| { [OHOS::Media::OHOS_IMAGE_FORMAT_YCBCR_422_SP](image.md) = 1000,<br>[OHOS::Media::OHOS_IMAGE_FORMAT_JPEG](image.md) = 2000, } | Enumerates the image formats.|
| { [OHOS::Media::OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y](image.md) = 1,<br>[OHOS::Media::OHOS_IMAGE_COMPONENT_FORMAT_YUV_U](image.md) = 2,<br>[OHOS::Media::OHOS_IMAGE_COMPONENT_FORMAT_YUV_V](image.md) = 3,<br>[OHOS::Media::OHOS_IMAGE_COMPONENT_FORMAT_JPEG](image.md) = 4, } | Enumerates the image components.|
### Functions
| Name| Description|
| -------- | -------- |
| [OHOS::Media::OH_Image_InitImageNative](image.md#oh_image_initimagenative) (napi_env env, napi_value source) | Parses an **ImageNative** object from an **Image** object at the JavaScript native layer.|
| [OHOS::Media::OH_Image_ClipRect](image.md#oh_image_cliprect) (const [ImageNative](image.md#imagenative) \*native, struct [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) \*rect) | Obtains [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) of an **ImageNative** object.|
| [OHOS::Media::OH_Image_Size](image.md#oh_image_size) (const [ImageNative](image.md#imagenative) \*native, struct [OhosImageSize](_ohos_image_size.md) \*size) | Obtains [OhosImageSize](_ohos_image_size.md) of an **ImageNative** object.|
| [OHOS::Media::OH_Image_Format](image.md#oh_image_format) (const [ImageNative](image.md#imagenative) \*native, int32_t \*format) | Obtains the image format of an **ImageNative** object.|
| [OHOS::Media::OH_Image_GetComponent](image.md#oh_image_getcomponent) (const [ImageNative](image.md#imagenative) \*native, int32_t componentType, struct [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) \*componentNative) | Obtains [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) of an **ImageNative** object.|
| [OHOS::Media::OH_Image_Release](image.md#oh_image_release) ([ImageNative](image.md#imagenative) \*native) | Releases an **ImageNative** object.|
# image_mdk_common.h
## Overview
The image_mdk_common.h file declares the common enums and structs used by the image interface.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OhosImageSize](_ohos_image_size.md) | Defines the image size.|
### Macros
| Name| Description|
| -------- | -------- |
| **IMAGE_RESULT_BASE** 62980096 | Defines the basic value returned by the interface. |
### Enums
| Name| Description|
| -------- | -------- |
| [IRNdkErrCode](image.md#irndkerrcode) {<br>IMAGE_RESULT_SUCCESS = 0,<br>IMAGE_RESULT_BAD_PARAMETER = -1,<br>IMAGE_RESULT_IMAGE_RESULT_BASE = IMAGE_RESULT_BASE,<br>IMAGE_RESULT_ERR_IPC = IMAGE_RESULT_BASE + 1,<br>IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST = IMAGE_RESULT_BASE + 2,<br>IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL = IMAGE_RESULT_BASE + 3,<br>IMAGE_RESULT_DECODE_ABNORMAL = IMAGE_RESULT_BASE + 4,<br>IMAGE_RESULT_DATA_ABNORMAL = IMAGE_RESULT_BASE + 5,<br>IMAGE_RESULT_MALLOC_ABNORMAL = IMAGE_RESULT_BASE + 6,<br>IMAGE_RESULT_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 7,<br>IMAGE_RESULT_INIT_ABNORMAL = IMAGE_RESULT_BASE + 8,<br>IMAGE_RESULT_GET_DATA_ABNORMAL = IMAGE_RESULT_BASE + 9,<br>IMAGE_RESULT_TOO_LARGE = IMAGE_RESULT_BASE + 10,<br>IMAGE_RESULT_TRANSFORM = IMAGE_RESULT_BASE + 11,<br>IMAGE_RESULT_COLOR_CONVERT = IMAGE_RESULT_BASE + 12,<br>IMAGE_RESULT_CROP = IMAGE_RESULT_BASE + 13,<br>IMAGE_RESULT_SOURCE_DATA = IMAGE_RESULT_BASE + 14,<br>IMAGE_RESULT_SOURCE_DATA_INCOMPLETE = IMAGE_RESULT_BASE + 15,<br>IMAGE_RESULT_MISMATCHED_FORMAT = IMAGE_RESULT_BASE + 16,<br>IMAGE_RESULT_UNKNOWN_FORMAT = IMAGE_RESULT_BASE + 17,<br>IMAGE_RESULT_SOURCE_UNRESOLVED = IMAGE_RESULT_BASE + 18,<br>IMAGE_RESULT_INVALID_PARAMETER = IMAGE_RESULT_BASE + 19,<br>IMAGE_RESULT_DECODE_FAILED = IMAGE_RESULT_BASE + 20,<br>IMAGE_RESULT_PLUGIN_REGISTER_FAILED = IMAGE_RESULT_BASE + 21,<br>IMAGE_RESULT_PLUGIN_CREATE_FAILED = IMAGE_RESULT_BASE + 22,<br>IMAGE_RESULT_ENCODE_FAILED = IMAGE_RESULT_BASE + 23,<br>IMAGE_RESULT_ADD_PIXEL_MAP_FAILED = IMAGE_RESULT_BASE + 24,<br>IMAGE_RESULT_HW_DECODE_UNSUPPORT = IMAGE_RESULT_BASE + 25,<br>IMAGE_RESULT_DECODE_HEAD_ABNORMAL = IMAGE_RESULT_BASE + 26,<br>IMAGE_RESULT_DECODE_EXIF_UNSUPPORT = IMAGE_RESULT_BASE + 27,<br>IMAGE_RESULT_PROPERTY_NOT_EXIST = IMAGE_RESULT_BASE + 28,<br>IMAGE_RESULT_MEDIA_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 30,<br>IMAGE_RESULT_MEDIA_TOO_LARGE = IMAGE_RESULT_BASE + 31,<br>IMAGE_RESULT_MEDIA_MALLOC_FAILED = IMAGE_RESULT_BASE + 32,<br>IMAGE_RESULT_MEDIA_END_OF_STREAM = IMAGE_RESULT_BASE + 33,<br>IMAGE_RESULT_MEDIA_IO_ABNORMAL = IMAGE_RESULT_BASE + 34,<br>IMAGE_RESULT_MEDIA_MALFORMED = IMAGE_RESULT_BASE + 35,<br>IMAGE_RESULT_MEDIA_BUFFER_TOO_SMALL = IMAGE_RESULT_BASE + 36,<br>IMAGE_RESULT_MEDIA_OUT_OF_RANGE = IMAGE_RESULT_BASE + 37,<br>IMAGE_RESULT_MEDIA_STATUS_ABNORMAL = IMAGE_RESULT_BASE + 38,<br>IMAGE_RESULT_MEDIA_VALUE_INVALID = IMAGE_RESULT_BASE + 39,<br>IMAGE_RESULT_MEDIA_NULL_POINTER = IMAGE_RESULT_BASE + 40,<br>IMAGE_RESULT_MEDIA_INVALID_OPERATION = IMAGE_RESULT_BASE + 41,<br>IMAGE_RESULT_MEDIA_ERR_PLAYER_NOT_INIT = IMAGE_RESULT_BASE + 42,<br>IMAGE_RESULT_MEDIA_EARLY_PREPARE = IMAGE_RESULT_BASE + 43,<br>IMAGE_RESULT_MEDIA_SEEK_ERR = IMAGE_RESULT_BASE + 44,<br>IMAGE_RESULT_MEDIA_PERMISSION_DENIED = IMAGE_RESULT_BASE + 45,<br>IMAGE_RESULT_MEDIA_DEAD_OBJECT = IMAGE_RESULT_BASE + 46,<br>IMAGE_RESULT_MEDIA_TIMED_OUT = IMAGE_RESULT_BASE + 47,<br>IMAGE_RESULT_MEDIA_TRACK_NOT_ALL_SUPPORTED = IMAGE_RESULT_BASE + 48,<br>IMAGE_RESULT_MEDIA_ADAPTER_INIT_FAILED = IMAGE_RESULT_BASE + 49,<br>IMAGE_RESULT_MEDIA_WRITE_PARCEL_FAIL = IMAGE_RESULT_BASE + 50,<br>IMAGE_RESULT_MEDIA_READ_PARCEL_FAIL = IMAGE_RESULT_BASE + 51,<br>IMAGE_RESULT_MEDIA_NO_AVAIL_BUFFER = IMAGE_RESULT_BASE + 52,<br>IMAGE_RESULT_MEDIA_INVALID_PARAM = IMAGE_RESULT_BASE + 53, IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 54,<br>IMAGE_RESULT_MEDIA_CREATE_CODEC_ADAPTER_FAILED = IMAGE_RESULT_BASE + 55,<br>IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 56,<br>IMAGE_RESULT_MEDIA_ZCODEC_CREATE_FAILED = IMAGE_RESULT_BASE + 57,<br>IMAGE_RESULT_MEDIA_ZCODEC_NOT_EXIST = IMAGE_RESULT_BASE + 58,<br>IMAGE_RESULT_MEDIA_JNI_CLASS_NOT_EXIST = IMAGE_RESULT_BASE + 59,<br>IMAGE_RESULT_MEDIA_JNI_METHOD_NOT_EXIST = IMAGE_RESULT_BASE + 60,<br>IMAGE_RESULT_MEDIA_JNI_NEW_OBJ_FAILED = IMAGE_RESULT_BASE + 61,<br>IMAGE_RESULT_MEDIA_JNI_COMMON_ERROR = IMAGE_RESULT_BASE + 62,<br>IMAGE_RESULT_MEDIA_DISTRIBUTE_NOT_SUPPORT = IMAGE_RESULT_BASE + 63,<br>IMAGE_RESULT_MEDIA_SOURCE_NOT_SET = IMAGE_RESULT_BASE + 64,<br>IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 65,<br>IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 66,<br>IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT = IMAGE_RESULT_BASE + 67,<br>IMAGE_RESULT_MEDIA_RTSP_CAPTURE_NOT_INIT = IMAGE_RESULT_BASE + 68,<br>IMAGE_RESULT_MEDIA_RTSP_SOURCE_URL_INVALID = IMAGE_RESULT_BASE + 69,<br>IMAGE_RESULT_MEDIA_RTSP_VIDEO_TRACK_NOT_FOUND = IMAGE_RESULT_BASE + 70,<br>IMAGE_RESULT_MEDIA_RTSP_CAMERA_NUM_REACH_MAX = IMAGE_RESULT_BASE + 71,<br>IMAGE_RESULT_MEDIA_SET_VOLUME = IMAGE_RESULT_BASE + 72,<br>IMAGE_RESULT_MEDIA_NUMBER_OVERFLOW = IMAGE_RESULT_BASE + 73,<br>IMAGE_RESULT_MEDIA_DIS_PLAYER_UNSUPPORTED = IMAGE_RESULT_BASE + 74,<br>IMAGE_RESULT_MEDIA_DENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 75,<br>IMAGE_RESULT_MEDIA_ENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 76,<br>IMAGE_RESULT_MEDIA_READ_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 150,<br>IMAGE_RESULT_MEDIA_WRITE_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 151,<br>IMAGE_RESULT_MEDIA_PIXELMAP_NOT_ALLOW_MODIFY = IMAGE_RESULT_BASE + 152,<br>IMAGE_RESULT_MEDIA_CONFIG_FAILED = IMAGE_RESULT_BASE + 153,<br>IMAGE_RESULT_JNI_ENV_ABNORMAL = IMAGE_RESULT_BASE + 154,<br>IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED = IMAGE_RESULT_BASE + 155,<br>IMAGE_RESULT_CREATE_SURFACE_FAILED = IMAGE_RESULT_BASE + 156,<br>IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED = IMAGE_RESULT_BASE + 157,<br>IMAGE_RESULT_GET_SURFACE_FAILED = IMAGE_RESULT_BASE + 158,<br>IMAGE_RESULT_SURFACE_ACQUIRE_BUFFER_FAILED = IMAGE_RESULT_BASE + 159,<br>IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED = IMAGE_RESULT_BASE + 160,<br>IMAGE_RESULT_REGISTER_LISTENER_FAILED = IMAGE_RESULT_BASE + 161,<br>IMAGE_RESULT_REGISTER_BUFFER_FAILED = IMAGE_RESULT_BASE + 162,<br>IMAGE_RESULT_FREAD_FAILED = IMAGE_RESULT_BASE + 163,<br>IMAGE_RESULT_PEEK_FAILED = IMAGE_RESULT_BASE + 164,<br>IMAGE_RESULT_SEEK_FAILED = IMAGE_RESULT_BASE + 165,<br>IMAGE_RESULT_STREAM_SIZE_ERROR = IMAGE_RESULT_BASE + 166,<br>IMAGE_RESULT_FILE_FD_ERROR = IMAGE_RESULT_BASE + 167,<br>IMAGE_RESULT_FILE_DAMAGED = IMAGE_RESULT_BASE + 168,<br>IMAGE_RESULT_CREATE_DECODER_FAILED = IMAGE_RESULT_BASE + 169,<br>IMAGE_RESULT_CREATE_ENCODER_FAILED = IMAGE_RESULT_BASE + 170,<br>IMAGE_RESULT_CHECK_FORMAT_ERROR = IMAGE_RESULT_BASE + 171,<br>IMAGE_RESULT_THIRDPART_SKIA_ERROR = IMAGE_RESULT_BASE + 172,<br>IMAGE_RESULT_HW_DECODE_FAILED = IMAGE_RESULT_BASE + 173,<br>IMAGE_RESULT_ALLOCATER_TYPE_ERROR = IMAGE_RESULT_BASE + 174,<br>IMAGE_RESULT_ALPHA_TYPE_ERROR = IMAGE_RESULT_BASE + 175,<br>IMAGE_RESULT_INDEX_INVALID = IMAGE_RESULT_BASE + 176,<br>IMAGE_RESULT_MEDIA_UNKNOWN = IMAGE_RESULT_BASE + 200<br>} | Enumerates the return values that may be used by the interface.|
# image_pixel_map_mdk.h
## Overview
The **image_pixel_map_mdk.h** file declares the APIs that can lock, access, and unlock a pixel map. Need link **libpixelmapndk.z.so**
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OhosPixelMapInfos](_ohos_pixel_map_infos.md) | Defines the pixel map information.|
| [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) | Defines the options for creating a pixel map.|
### Types
| Name| Description|
| -------- | -------- |
| [NativePixelMap](image.md#nativepixelmap) | Defines the data type name of the pixel map at the native layer.|
| [OhosPixelMapInfos](image.md#ohospixelmapinfos) | Defines the pixel map information.|
### Enums
| Name| Description|
| -------- | -------- |
| { [OHOS_PIXEL_MAP_ALPHA_TYPE_UNKNOWN](image.md) = 0,<br>[OHOS_PIXEL_MAP_ALPHA_TYPE_OPAQUE](image.md) = 1,<br>[OHOS_PIXEL_MAP_ALPHA_TYPE_PREMUL](image.md) = 2,<br>[OHOS_PIXEL_MAP_ALPHA_TYPE_UNPREMUL](image.md) = 3 } | Enumerates the pixel map alpha types.|
| { [OHOS_PIXEL_MAP_READ_ONLY](image.md) = 0,<br>[OHOS_PIXEL_MAP_EDITABLE](image.md) = 1 } | Enumerates the pixel map editing types.|
### Functions
| Name| Description|
| -------- | -------- |
| [OH_PixelMap_CreatePixelMap](image.md#oh_pixelmap_createpixelmap) (napi_env env, [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) info, void \*buf, size_t len, napi_value \*res) | Creates a **PixelMap** object.|
| [OH_PixelMap_CreateAlphaPixelMap](image.md#oh_pixelmap_createalphapixelmap) (napi_env env, napi_value source, napi_value \*alpha) | Creates a **PixelMap** object that contains only alpha channel information.|
| [OH_PixelMap_InitNativePixelMap](image.md#oh_pixelmap_initnativepixelmap) (napi_env env, napi_value source) | Initializes a **PixelMap** object.|
| [OH_PixelMap_GetBytesNumberPerRow](image.md#oh_pixelmap_getbytesnumberperrow) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t \*num) | Obtains the number of bytes per row of a **NativePixelMap** object.|
| [OH_PixelMap_GetIsEditable](image.md#oh_pixelmap_getiseditable) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t \*editable) | Checks whether a **NativePixelMap** object is editable.|
| [OH_PixelMap_IsSupportAlpha](image.md#oh_pixelmap_issupportalpha) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t \*alpha) | Checks whether a **NativePixelMap** object supports alpha channels.|
| [OH_PixelMap_SetAlphaAble](image.md#oh_pixelmap_setalphaable) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t alpha) | Sets an alpha channel for a **NativePixelMap** object.|
| [OH_PixelMap_GetDensity](image.md#oh_pixelmap_getdensity) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t \*density) | Obtains the pixel density of a **NativePixelMap** object.|
| [OH_PixelMap_SetDensity](image.md#oh_pixelmap_setdensity) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t density) | Sets the pixel density for a **NativePixelMap** object.|
| [OH_PixelMap_SetOpacity](image.md#oh_pixelmap_setopacity) (const [NativePixelMap](image.md#nativepixelmap) \*native, float opacity) | Sets the opacity for a **NativePixelMap** object.|
| [OH_PixelMap_Scale](image.md#oh_pixelmap_scale) (const [NativePixelMap](image.md#nativepixelmap) \*native, float x, float y) | Scales a **NativePixelMap** object.|
| [OH_PixelMap_Translate](image.md#oh_pixelmap_translate) (const [NativePixelMap](image.md#nativepixelmap) \*native, float x, float y) | Translates a **NativePixelMap** object.|
| [OH_PixelMap_Rotate](image.md#oh_pixelmap_rotate) (const [NativePixelMap](image.md#nativepixelmap) \*native, float angle) | Rotates a **NativePixelMap** object.|
| [OH_PixelMap_Flip](image.md#oh_pixelmap_flip) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t x, int32_t y) | Flips a **NativePixelMap** object.|
| [OH_PixelMap_Crop](image.md#oh_pixelmap_crop) (const [NativePixelMap](image.md#nativepixelmap) \*native, int32_t x, int32_t y, int32_t width, int32_t height) | Crops a **NativePixelMap** object.|
| [OH_PixelMap_GetImageInfo](image.md#oh_pixelmap_getimageinfo) (const [NativePixelMap](image.md#nativepixelmap) \*native, [OhosPixelMapInfos](_ohos_pixel_map_infos.md) \*info) | Obtains the image information of a **NativePixelMap** object.|
| [OH_PixelMap_AccessPixels](image.md#oh_pixelmap_accesspixels) (const [NativePixelMap](image.md#nativepixelmap) \*native, void \*\*addr) | Obtains the memory address of a **NativePixelMap** object and locks the memory.|
| [OH_PixelMap_UnAccessPixels](image.md#oh_pixelmap_unaccesspixels) (const [NativePixelMap](image.md#nativepixelmap) \*native) | Unlocks the memory of a **NativePixelMap** object. This function is used with [OH_PixelMap_AccessPixels](image.md#oh_pixelmap_accesspixels) in pairs.|
......@@ -3,12 +3,13 @@
## Overview
Declares the APIs that can lock, access, and unlock pixel map data.
The **image_pixel_map_napi.h** file declares the APIs that can lock, access, and unlock a pixel map.
**Since**
**Since:**
8
**Related Modules:**
**Related Modules**
[Image](image.md)
......@@ -18,107 +19,24 @@ Declares the APIs that can lock, access, and unlock pixel map data.
### Structs
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OhosPixelMapInfo](_ohos_pixel_map_info.md) | Defines the pixel map information. |
| [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) |Defines the options used for creating a pixel map. |
### Types
| [OHOS::Media::OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) | Defines the pixel map information.|
| Name | Description |
| -------- | -------- |
| [NativePixelMap](image.md#nativepixelmap) | Defines the data type name of the native pixel map. |
### Enums
| Name | Description |
| Name| Description|
| -------- | -------- |
| { OHOS_IMAGE_RESULT_SUCCESS = 0, OHOS_IMAGE_RESULT_BAD_PARAMETER = -1 } | Enumerates the error codes returned by a function. |
| { OHOS_PIXEL_MAP_FORMAT_NONE = 0, OHOS_PIXEL_MAP_FORMAT_RGBA_8888 = 3, OHOS_PIXEL_MAP_FORMAT_RGB_565 = 2 } | Enumerates the pixel formats. |
| { OHOS_PIXEL_MAP_ALPHA_TYPE_UNKNOWN = 0, OHOS_PIXEL_MAP_ALPHA_TYPE_OPAQUE = 1, OHOS_PIXEL_MAP_ALPHA_TYPE_PREMUL = 2, OHOS_PIXEL_MAP_ALPHA_TYPE_UNPREMUL = 3 } | Enumerates the pixel map alpha types. |
| { OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE = 0, OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP = 1 } | Enumerates the pixel map scale modes. |
| { OHOS_PIXEL_MAP_READ_ONLY = 0, OHOS_PIXEL_MAP_EDITABLE = 1 } | Enumerates the pixel map editing types. |
| { [OHOS::Media::OHOS_IMAGE_RESULT_SUCCESS](image.md) = 0,<br>[OHOS::Media::OHOS_IMAGE_RESULT_BAD_PARAMETER](image.md) = -1 } | Enumerates the error codes returned by the functions.|
| { [OHOS::Media::OHOS_PIXEL_MAP_FORMAT_NONE](image.md) = 0,<br>[OHOS::Media::OHOS_PIXEL_MAP_FORMAT_RGBA_8888](image.md) = 3,<br>[OHOS::Media::OHOS_PIXEL_MAP_FORMAT_RGB_565](image.md) = 2 } | Enumerates the pixel map formats.|
| { [OHOS::Media::OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE](image.md) = 0,<br>[OHOS::Media::OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP](image.md) = 1 } | Enumerates the pixel map scale modes.|
### Functions
| Name | Description |
| -------- | -------- |
| [OH_GetImageInfo](image.md#oh_getimageinfo) (napi_env env, napi_value value, [OhosPixelMapInfo](_ohos_pixel_map_info.md) \*info) | Obtains the **PixelMap** information and stores the information to the [OhosPixelMapInfo](_ohos_pixel_map_info.md) structure. |
| [OH_AccessPixels](image.md#oh_accesspixels) (napi_env env, napi_value value, void \*\*addrPtr) | Obtains the memory address of the **PixelMap** object data and locks the memory. |
| [OH_UnAccessPixels](image.md#oh_unaccesspixels) (napi_env env, napi_value value) | Unlocks the memory of the **PixelMap** object data. This function is used with [OH_AccessPixels](image.md#oh_accesspixels) in pairs. |
### Variables
| Name | Description |
| Name| Description|
| -------- | -------- |
| [width](#width) | Image width, in pixels. |
| [height](#height) | Image height, in pixels. |
| [pixelFormat](#pixelformat) | Image format. |
| [editable](#editable) | Editing type of the image. |
| [alphaType](#alphatype) | Alpha type of the image. |
| [scaleMode](#scalemode) | Scale mode of the image. |
## Variable Description
### alphaType
```
uint32_t alphaType
```
**Description:**
Alpha type of the image.
### editable
```
uint32_t editable
```
**Description:**
Editing type of the image.
### height
```
uint32_t height
```
**Description:**
Image height, in pixels.
### pixelFormat
```
int32_t pixelFormat
```
**Description:**
Image format.
### scaleMode
```
uint32_t scaleMode
```
**Description:**
Scale mode of the image.
### width
```
uint32_t width
```
**Description:**
Image width, in pixels.
| [OHOS::Media::OH_GetImageInfo](image.md#oh_getimageinfo) (napi_env env, napi_value value, [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) \*info) | Obtains the information about a **PixelMap** object and stores the information to the [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) struct.|
| [OHOS::Media::OH_AccessPixels](image.md#oh_accesspixels) (napi_env env, napi_value value, void \*\*addrPtr) | Obtains the memory address of a **PixelMap** object and locks the memory.|
| [OHOS::Media::OH_UnAccessPixels](image.md#oh_unaccesspixels) (napi_env env, napi_value value) | Unlocks the memory of a **PixelMap** object. This function is used with **OH_AccessPixels** in pairs.|
# image_receiver_mdk.h
## Overview
The **image_receiver_mdk.h** file declares the APIs for obtaining image data from the native layer.
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OhosImageReceiverInfo](_ohos_image_receiver_info.md) | Defines the information about an image receiver.|
### Types
| Name| Description|
| -------- | -------- |
| [ImageReceiverNative](image.md#imagereceivernative) | Defines the data type name of the image receiver at the native layer.|
| (\*[OH_Image_Receiver_On_Callback](image.md#oh_image_receiver_on_callback)) () | Defines the callbacks for the image interface at the native layer.|
### Functions
| Name| Description|
| -------- | -------- |
| [OH_Image_Receiver_CreateImageReceiver](image.md#oh_image_receiver_createimagereceiver) (napi_env env, struct [OhosImageReceiverInfo](_ohos_image_receiver_info.md) info, napi_value \*res) | Creates an **ImageReceiver** object at the application layer.|
| [OH_Image_Receiver_InitImageReceiverNative](image.md#oh_image_receiver_initimagereceivernative) (napi_env env, napi_value source) | Initializes an [ImageReceiverNative](image.md#imagereceivernative) object through an **ImageReceiver** object.|
| [OH_Image_Receiver_GetReceivingSurfaceId](image.md#oh_image_receiver_getreceivingsurfaceid) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, char \*id, size_t len) | Obtains the receiver ID through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_ReadLatestImage](image.md#oh_image_receiver_readlatestimage) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, napi_value \*image) | Obtains the latest image through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_ReadNextImage](image.md#oh_image_receiver_readnextimage) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, napi_value \*image) | Obtains the next image through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_On](image.md#oh_image_receiver_on) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, [OH_Image_Receiver_On_Callback](image.md#oh_image_receiver_on_callback) callback) | Registers an [OH_Image_Receiver_On_Callback](image.md#oh_image_receiver_on_callback) callback. This callback is triggered whenever a new image is received.|
| [OH_Image_Receiver_GetSize](image.md#oh_image_receiver_getsize) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, struct [OhosImageSize](_ohos_image_size.md) \*size) | Obtains the size of the image receiver through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_GetCapacity](image.md#oh_image_receiver_getcapacity) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, int32_t \*capacity) | Obtains the capacity of the image receiver through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_GetFormat](image.md#oh_image_receiver_getformat) (const [ImageReceiverNative](image.md#imagereceivernative) \*native, int32_t \*format) | Obtains the format of the image receiver through an [ImageReceiverNative](image.md#imagereceivernative) object.|
| [OH_Image_Receiver_Release](image.md#oh_image_receiver_release) ([ImageReceiverNative](image.md#imagereceivernative) \*native) | Releases an [ImageReceiverNative](image.md#imagereceivernative) object.|
# image_source_mdk.h
## Overview
The **image_source_mdk.h** file declares the APIs for decoding an image source into a pixel map.
\@Syscap SystemCapability.Multimedia.Image
**Since**
10
**Related Modules**
[Image](image.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OhosImageRegion](_ohos_image_region.md) | Defines the region of an image source to decode.|
| [OhosImageSourceOps](_ohos_image_source_ops.md) | Defines the image source options.|
| [OhosImageDecodingOps](_ohos_image_decoding_ops.md) | Defines the options for decoding an image source.|
| [OhosImageSourceInfo](_ohos_image_source_info.md) | Defines the information about an image source.|
| [OhosImageSource](_ohos_image_source.md) | Defines the input resource of an image source. Only one type of resource is accepted at a time.|
| [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md) | Defines the delay time list of an image source.|
| [OhosImageSourceSupportedFormat](_ohos_image_source_supported_format.md) | Defines the format string supported by an image source.|
| [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) | Defines the format string list supported by an image source.|
| [OhosImageSourceProperty](_ohos_image_source_property.md) | Defines the property string (in key-value format) of an image source.|
| [OhosImageSourceUpdateData](_ohos_image_source_update_data.md) | Defines the update data of an image source.|
### Types
| Name| Description|
| -------- | -------- |
| [ImageSourceNative](image.md#imagesourcenative) | Defines an image source object at the native layer.|
### Functions
| Name| Description|
| -------- | -------- |
| [OH_ImageSource_Create](image.md#oh_imagesource_create) (napi_env env, struct [OhosImageSource](_ohos_image_source.md) \*src, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs.|
| [OH_ImageSource_CreateIncremental](image.md#oh_imagesource_createincremental) (napi_env env, struct [OhosImageSource](_ohos_image_source.md) \*source, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs. The image source data will be updated through **OH_ImageSource_UpdateData**.|
| [OH_ImageSource_GetSupportedFormats](image.md#oh_imagesource_getsupportedformats) (struct [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) \*res) | Obtains all supported decoding formats.|
| \*[OH_ImageSource_InitNative](image.md#oh_imagesource_initnative) (napi_env env, napi_value source) | Converts an **ImageSource** object at the JavaScript native layer to an [ImageSourceNative](image.md#imagesourcenative) object.|
| [OH_ImageSource_CreatePixelMap](image.md#oh_imagesource_createpixelmap) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageDecodingOps](_ohos_image_decoding_ops.md) \*ops, napi_value \*res) | Decodes an **ImageSourceNative** object to obtain a **PixelMap** object at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct.|
| [OH_ImageSource_CreatePixelMapList](image.md#oh_imagesource_createpixelmaplist) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageDecodingOps](_ohos_image_decoding_ops.md) \*ops, napi_value \*res) | Decodes an **ImageSourceNative** object to obtain all **PixelMap** objects at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct.|
| [OH_ImageSource_GetDelayTime](image.md#oh_imagesource_getdelaytime) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md) \*res) | Obtains the delay time list from an **ImageSourceNative** object (such as GIF image source).|
| [OH_ImageSource_GetFrameCount](image.md#oh_imagesource_getframecount) (const [ImageSourceNative](image.md#imagesourcenative) \*native, uint32_t \*res) | Obtains the number of frames from an **ImageSourceNative** object.|
| [OH_ImageSource_GetImageInfo](image.md#oh_imagesource_getimageinfo) (const [ImageSourceNative](image.md#imagesourcenative) \*native, int32_t index, struct [OhosImageSourceInfo](_ohos_image_source_info.md) \*info) | Obtains image source information from an **ImageSourceNative** object by index.|
| [OH_ImageSource_GetImageProperty](image.md#oh_imagesource_getimageproperty) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*key, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*value) | Obtains the value of an image property from an **ImageSourceNative** object.|
| [OH_ImageSource_ModifyImageProperty](image.md#oh_imagesource_modifyimageproperty) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*key, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*value) | Modifies the value of an image property of an **ImageSourceNative** object.|
| [OH_ImageSource_UpdateData](image.md#oh_imagesource_updatedata) (const [ImageSourceNative](image.md#imagesourcenative) \*native, struct [OhosImageSourceUpdateData](_ohos_image_source_update_data.md) \*data) | Updates the data of an **ImageSourceNative** object.|
| [OH_ImageSource_Release](image.md#oh_imagesource_release) ([ImageSourceNative](image.md#imagesourcenative) \*native) | Releases an **ImageSourceNative** object.|
### Variables
| Name| Description|
| -------- | -------- |
| \*[OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE](image.md#ohos_image_property_bits_per_sample) = "BitsPerSample" | Defines a pointer to bits per sample, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_ORIENTATION](image.md#ohos_image_property_orientation) = "Orientation" | Defines a pointer to the orientation, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_IMAGE_LENGTH](image.md#ohos_image_property_image_length) = "ImageLength" | Defines a pointer to the image length, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_IMAGE_WIDTH](image.md#ohos_image_property_image_width) = "ImageWidth" | Defines a pointer to the image width, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_GPS_LATITUDE](image.md#ohos_image_property_gps_latitude) = "GPSLatitude" | Defines a pointer to the GPS latitude, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_GPS_LONGITUDE](image.md#ohos_image_property_gps_longitude) = "GPSLongitude" | Defines a pointer to the GPS longitude, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF](image.md#ohos_image_property_gps_latitude_ref) = "GPSLatitudeRef" | Defines a pointer to the GPS latitude reference information, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF](image.md#ohos_image_property_gps_longitude_ref) = "GPSLongitudeRef" | Defines a pointer to the GPS longitude reference information, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL](image.md#ohos_image_property_date_time_original) = "DateTimeOriginal" | Defines a pointer to the created date and time, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_EXPOSURE_TIME](image.md#ohos_image_property_exposure_time) = "ExposureTime" | Defines a pointer to the exposure time, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_SCENE_TYPE](image.md#ohos_image_property_scene_type) = "SceneType" | Defines a pointer to the scene type, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS](image.md#ohos_image_property_iso_speed_ratings) = "ISOSpeedRatings" | Defines a pointer to the ISO speed ratings, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_F_NUMBER](image.md#ohos_image_property_f_number) = "FNumber" | Defines a pointer to the f-number of the image, one of the image properties.|
| \*[OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL](image.md#ohos_image_property_compressed_bits_per_pixel) = "CompressedBitsPerPixel" | Defines a pointer to the compressed bits per pixel, one of the image properties.|
......@@ -47,6 +47,6 @@ The **native_audiostream_base.h** file declares the basic data structure of **OH
| [OH_AudioStream_SampleFormat](_o_h_audio.md#oh_audiostream_sampleformat) { [AUDIOSTREAM_SAMPLE_U8](_o_h_audio.md) = 0, [AUDIOSTREAM_SAMPLE_S16LE](_o_h_audio.md) = 1, [AUDIOSTREAM_SAMPLE_S24LE](_o_h_audio.md) = 2, [AUDIOSTREAM_SAMPLE_S32LE](_o_h_audio.md) = 3 } | Enumerates the sampling formats of audio streams.|
| [OH_AudioStream_EncodingType](_o_h_audio.md#oh_audiostream_encodingtype) { **AUDIOSTREAM_ENCODING_TYPE_RAW** = 0 } | Enumerates the encoding types of audio streams.|
| [OH_AudioStream_Usage](_o_h_audio.md#oh_audiostream_usage) { **AUDIOSTREAM_USAGE_UNKNOWN** = 0, **AUDIOSTREAM_USAGE_MUSIC** = 1, **AUDIOSTREAM_USAGE_COMMUNICATION** = 2, **AUDIOSTREAM_USAGE_GAME** = 11 } | Enumerates the usage scenarios of audio output streams.|
| [OH_AudioStream_LatencyMode](_o_h_audio.md#oh_audiostream_latencymode) { [AUDIOSTREAM_LATENCY_MODE_NORMAL](_o_h_audio.md) } | Enumerates the latency modes of audio streams.|
| [OH_AudioStream_LatencyMode](_o_h_audio.md#oh_audiostream_latencymode) { [AUDIOSTREAM_LATENCY_MODE_NORMAL](_o_h_audio.md) = 0, [AUDIOSTREAM_LATENCY_MODE_FAST](_o_h_audio.md) = 1 } | Enumerates the latency modes of audio streams.|
| [OH_AudioStream_State](_o_h_audio.md#oh_audiostream_state) {<br>[AUDIOSTREAM_STATE_INVALID](_o_h_audio.md) = -1, [AUDIOSTREAM_STATE_PREPARED](_o_h_audio.md) = 1, [AUDIOSTREAM_STATE_RUNNING](_o_h_audio.md) = 2, [AUDIOSTREAM_STATE_STOPPED](_o_h_audio.md) = 3,<br>[AUDIOSTREAM_STATE_RELEASED](_o_h_audio.md) = 4, [AUDIOSTREAM_STATE_PAUSED](_o_h_audio.md) = 5<br>} | Enumerates the audio stream states.|
| [OH_AudioStream_SourceType](_o_h_audio.md#oh_audiostream_sourcetype) { **AUDIOSTREAM_SOURCE_TYPE_INVALID** = -1, **AUDIOSTREAM_SOURCE_TYPE_MIC**, **AUDIOSTREAM_SOURCE_TYPE_VOICE_RECOGNITION** = 1, **AUDIOSTREAM_SOURCE_TYPE_VOICE_COMMUNICATION** = 7 } | Enumerates the usage scenarios of audio input streams.|
# native_avscreen_capture.h
## Overview
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.|
# native_avscreen_capture_base.h
## Overview
The **native_avscreen_capture_base.h** file declares the common structs, character constants, and enums used for running screen capture.
**Since**
10
**Related Modules**
[AVScreenCapture](_a_v_screen_capture.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_AudioCaptureInfo](_o_h___audio_capture_info.md) | Defines audio capturing information.|
| [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_AudioInfo](_o_h___audio_info.md) | Defines audio capturing parameters.|
| [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_RecorderInfo](_o_h___recorder_info.md) | Defines recording file information.|
| [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_AudioCaptureInfo](_a_v_screen_capture.md#oh_audiocaptureinfo) | Defines audio capturing information.|
| [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_AudioInfo](_a_v_screen_capture.md#oh_audioinfo) | Defines audio capturing parameters.|
| [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_RecorderInfo](_a_v_screen_capture.md#oh_recorderinfo) | Defines recording file information.|
| [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.|
### Enums
| Name| Description|
| -------- | -------- |
| [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode) { [OH_CAPTURE_HOME_SCREEN](_a_v_screen_capture.md) = 0, [OH_CAPTURE_SPECIFIED_SCREEN](_a_v_screen_capture.md) = 1, [OH_CAPTURE_SPECIFIED_WINDOW](_a_v_screen_capture.md) = 2, [OH_CAPTURE_INVAILD](_a_v_screen_capture.md) = -1 } | Enumerates the screen capture modes.|
| [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) {<br>[OH_SOURCE_INVALID](_a_v_screen_capture.md) = -1, [OH_SOURCE_DEFAULT](_a_v_screen_capture.md) = 0, [OH_MIC](_a_v_screen_capture.md) = 1, [OH_ALL_PLAYBACK](_a_v_screen_capture.md) = 2,<br>[OH_APP_PLAYBACK](_a_v_screen_capture.md) = 3<br>} | Enumerates the audio source types during screen capture.|
| [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat) { [OH_AUDIO_DEFAULT](_a_v_screen_capture.md) = 0, [OH_AAC_LC](_a_v_screen_capture.md) = 3, [OH_AUDIO_CODEC_FORMAT_BUTT](_a_v_screen_capture.md) } | Enumerates the audio encoding formats.|
| [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat) {<br>[OH_VIDEO_DEFAULT](_a_v_screen_capture.md) = 0, [OH_H264](_a_v_screen_capture.md) = 2, [OH_H265](_a_v_screen_capture.md) = 4, [OH_MPEG4](_a_v_screen_capture.md) = 6,<br>[OH_VP8](_a_v_screen_capture.md) = 8, [OH_VP9](_a_v_screen_capture.md) = 10, [OH_VIDEO_CODEC_FORMAT_BUTT](_a_v_screen_capture.md)<br>} | Enumerates the video encoding formats.|
| [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.|
# native_avscreen_capture_errors.h
## Overview
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.|
### Enums
| Name| Description|
| -------- | -------- |
| [OH_AVSCREEN_CAPTURE_ErrCode](_a_v_screen_capture.md#oh_avscreen_capture_errcode) {<br>[AV_SCREEN_CAPTURE_ERR_BASE](_a_v_screen_capture.md) = 0, [AV_SCREEN_CAPTURE_ERR_OK](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE, [AV_SCREEN_CAPTURE_ERR_NO_MEMORY](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 1, [AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 2,<br>[AV_SCREEN_CAPTURE_ERR_INVALID_VAL](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 3, [AV_SCREEN_CAPTURE_ERR_IO](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 4, [AV_SCREEN_CAPTURE_ERR_TIMEOUT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 5, [AV_SCREEN_CAPTURE_ERR_UNKNOWN](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 6,<br>[AV_SCREEN_CAPTURE_ERR_SERVICE_DIED](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 7, [AV_SCREEN_CAPTURE_ERR_INVALID_STATE](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 8, [AV_SCREEN_CAPTURE_ERR_UNSUPPORT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 9, [AV_SCREEN_CAPTURE_ERR_EXTEND_START](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 100<br>} | Enumerates the error codes generated during screen recording.|
......@@ -399,6 +399,7 @@
- [Asynchronous Concurrency Overview](arkts-utils/async-concurrency-overview.md)
- [Single I/O Task Development](arkts-utils/single-io-development.md)
- Using Multithread Concurrency for Development
- [Multithread Concurrency Overview](arkts-utils/multi-thread-concurrency-overview.md)
- [Comparison Between TaskPool and Worker](arkts-utils/taskpool-vs-worker.md)
- [CPU Intensive Task Development](arkts-utils/cpu-intensive-task-development.md)
- [I/O Intensive Task Development](arkts-utils/io-intensive-task-development.md)
......@@ -507,6 +508,7 @@
- Best Practices
- [Camera Photographing Sample](media/camera-shooting-case.md)
- [Camera Recording Sample](media/camera-recording-case.md)
- [Using Performance Improvement Features (for System Applications Only)](media/camera-performance-improvement.md)
- Image
- [Image Overview](media/image-overview.md)
- [Image Decoding](media/image-decoding.md)
......@@ -542,9 +544,9 @@
- [hapsigner Guide](security/hapsigntool-guidelines.md)
- [HarmonyAppProvision Configuration File](security/app-provision-structure.md)
- AI
- [AI Development](./ai/ai-overview.md)
- [Using MindSpore Lite JavaScript APIs to Develop AI Applications](./ai/mindspore-guidelines-based-js.md)
- [Using MindSpore Lite Native APIs to Develop AI Applications](./ai/mindspore-guidelines-based-native.md)
- [AI Development](ai/ai-overview.md)
- [Using MindSpore Lite JavaScript APIs to Develop AI Applications](ai/mindspore-guidelines-based-js.md)
- [Using MindSpore Lite Native APIs to Develop AI Applications](ai/mindspore-guidelines-based-native.md)
- Connectivity
- Network Management
- [Network Management Overview](connectivity/net-mgmt-overview.md)
......@@ -622,12 +624,12 @@
- [Setting the Security Level of a Distributed File](file-management/set-security-label.md)
- [Accessing Files Across Devices](file-management/file-access-across-devices.md)
- Background Task Management
- [Background Task Overview](task-management/background-task-overview.md)
- [Transient Task](task-management/transient-task.md)
- [Continuous Task](task-management/continuous-task.md)
- [Deferred Task](task-management/work-scheduler.md)
- [Agent-powered Reminder](task-management/agent-powered-reminder.md)
- [Requesting Efficiency Resources (for Privileged System Applications Only)](task-management/efficiency-resource-request.md)
- [Background Task Overview](task-management/background-task-overview.md)
- [Transient Task](task-management/transient-task.md)
- [Continuous Task](task-management/continuous-task.md)
- [Deferred Task](task-management/work-scheduler.md)
- [Agent-powered Reminder](task-management/agent-powered-reminder.md)
- [Requesting Efficiency Resources (for Privileged System Applications Only)](task-management/efficiency-resource-request.md)
- Device Management
- USB Service
- [USB Service Overview](device/usb-overview.md)
......@@ -678,6 +680,7 @@
- Native APIs
- [Using Native APIs in Application Projects](napi/napi-guidelines.md)
- Graphics
- [XComponent Development](napi/xcomponent-guidelines.md)
- [Drawing Development](napi/drawing-guidelines.md)
- [NativeBuffer Development](napi/native-buffer-guidelines.md)
- [NativeImage Development](napi/native-image-guidelines.md)
......@@ -692,6 +695,8 @@
- [Connecting the Neural Network Runtime to an AI Inference Framework](napi/neural-network-runtime-guidelines.md)
- Memory Management
- [Purgeable Memory Development](napi/purgeable-memory-guidelines.md)
- Device Management
- [USB DDK Development](napi/usb-ddk-guidelines.md)
- Tools
- [DevEco Studio (OpenHarmony) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md)
- Debugging Tools
......@@ -905,17 +910,18 @@
- UI Page
- [@ohos.animator (Animator)](reference/apis/js-apis-animator.md)
- [@ohos.arkui.componentSnapshot (Component Snapshot)](reference/apis/js-apis-arkui-componentSnapshot.md)
- [@ohos.arkui.dragController (DragController)](reference/apis/js-apis-arkui-dragController.md)
- [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](reference/apis/js-apis-arkui-drawableDescriptor.md)
- [@ohos.arkui.inspector (Layout Callback)](reference/apis/js-apis-arkui-inspector.md)
- [@ohos.arkui.UIContext (UIContext)](reference/apis/js-apis-arkui-UIContext.md)
- [@ohos.curves (Interpolation Calculation)](reference/apis/js-apis-curve.md)
- [@ohos.font (Custom Font Registration)](reference/apis/js-apis-font.md)
- [@ohos.matrix4 (Matrix Transformation)](reference/apis/js-apis-matrix4.md)
- [@ohos.measure (Text Measurement)](reference/apis/js-apis-measure.md)
- [@ohos.mediaquery (Media Query)](reference/apis/js-apis-mediaquery.md)
- [@ohos.pluginComponent (PluginComponentManager)](reference/apis/js-apis-plugincomponent.md)
- [@ohos.promptAction (Prompt)](reference/apis/js-apis-promptAction.md)
- [@ohos.router (Page Routing)](reference/apis/js-apis-router.md)
- [@ohos.measure (Text Measurement)](reference/apis/js-apis-measure.md)
- [@ohos.uiAppearance (UI Appearance)](reference/apis/js-apis-uiappearance.md)
- Graphics
- [@ohos.animation.windowAnimationManager (Window Animation Management)](reference/apis/js-apis-windowAnimationManager.md)
......@@ -983,8 +989,8 @@
- [@ohos.file.fileuri (File URI)](reference/apis/js-apis-file-fileuri.md)
- [@ohos.file.fs (File Management)](reference/apis/js-apis-file-fs.md)
- [@ohos.file.hash (File Hash Processing)](reference/apis/js-apis-file-hash.md)
- [@ohos.file.picker (File Picker)](reference/apis/js-apis-file-picker.md)
- [@ohos.file.photoAccessHelper (Album Management)](reference/apis/js-apis-photoAccessHelper.md)
- [@ohos.file.picker (File Picker)](reference/apis/js-apis-file-picker.md)
- [@ohos.file.securityLabel (Data Label)](reference/apis/js-apis-file-securityLabel.md)
- [@ohos.file.statvfs (File System Space Statistics)](reference/apis/js-apis-file-statvfs.md)
- [@ohos.file.storageStatistics (Application Storage Statistics)](reference/apis/js-apis-file-storage-statistics.md)
......@@ -1013,8 +1019,18 @@
- [@ohos.net.webSocket (WebSocket Connection)](reference/apis/js-apis-webSocket.md)
- [@ohos.request (Upload and Download)](reference/apis/js-apis-request.md)
- Connectivity
- [@ohos.bluetooth.a2dp (Bluetooth A2DP Module) (Recommended)](reference/apis/js-apis-bluetooth-a2dp.md)
- [@ohos.bluetooth.access (Bluetooth Access Module) (Recommended)](reference/apis/js-apis-bluetooth-access.md)
- [@ohos.bluetooth.baseProfile (Bluetooth baseProfile Module) (Recommended)](reference/apis/js-apis-bluetooth-baseProfile.md)
- [@ohos.bluetooth.ble (Bluetooth BLE Module) (Recommended)](reference/apis/js-apis-bluetooth-ble.md)
- [@ohos.bluetooth.connection (Bluetooth connection Module) (Recommended)](reference/apis/js-apis-bluetooth-connection.md)
- [@ohos.bluetooth.constant (Bluetooth constant Module) (Recommended)](reference/apis/js-apis-bluetooth-constant.md)
- [@ohos.bluetooth.hfp (Bluetooth hfp Module) (Recommended)](reference/apis/js-apis-bluetooth-hfp.md)
- [@ohos.bluetooth.hid (Bluetooth hid Module) (Recommended)](reference/apis/js-apis-bluetooth-hid.md)
- [@ohos.bluetooth.pan (Bluetooth pan Module) (Recommended)](reference/apis/js-apis-bluetooth-pan.md)
- [@ohos.bluetooth.socket (Bluetooth socket Module) (Recommended)](reference/apis/js-apis-bluetooth-socket.md)
- [@ohos.bluetooth (Bluetooth) (To Be Deprecated Soon)](reference/apis/js-apis-bluetooth.md)
- [@ohos.bluetoothManager (Bluetooth) (Recommended)](reference/apis/js-apis-bluetoothManager.md)
- [@ohos.bluetoothManager (Bluetooth) (To Be Deprecated Soon)](reference/apis/js-apis-bluetoothManager.md)
- [@ohos.connectedTag (Active Tags)](reference/apis/js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](reference/apis/js-apis-cardEmulation.md)
- [@ohos.nfc.controller (Standard NFC)](reference/apis/js-apis-nfcController.md)
......@@ -1089,7 +1105,6 @@
- [@ohos.multimodalInput.touchEvent (Touch Event)](reference/apis/js-apis-touchevent.md)
- [@ohos.multimodalInput.shortKey (Shortcut Key)](reference/apis/js-apis-shortKey.md)
- [@ohos.power (System Power Management)](reference/apis/js-apis-power.md)
- [@ohos.resourceschedule.deviceStandby (Device Standby)](reference/apis/js-apis-resourceschedule-deviceStandby.md)
- [@ohos.runningLock (Runninglock)](reference/apis/js-apis-runninglock.md)
- [@ohos.sensor (Sensor)](reference/apis/js-apis-sensor.md)
- [@ohos.settings (Data Item Settings)](reference/apis/js-apis-settings.md)
......@@ -1380,6 +1395,7 @@
- [Component Transition](reference/arkui-ts/ts-transition-animation-component.md)
- [Transition of Shared Elements](reference/arkui-ts/ts-transition-animation-shared-elements.md)
- [Implicit Shared Element Transition](reference/arkui-ts/ts-transition-animation-geometrytransition.md)
- [Motion Path Animation](reference/arkui-ts/ts-motion-path-animation.md)
- Global UI Methods
- Pop-up Window
- [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
......@@ -1629,6 +1645,7 @@
- [Network Connection Management Error Codes](reference/errorcodes/errorcode-net-connection.md)
- [Ethernet Connection Error Codes](reference/errorcodes/errorcode-net-ethernet.md)
- [Network Sharing Error Codes](reference/errorcodes/errorcode-net-sharing.md)
- [Policy Management Error Codes](reference/errorcodes/errorcode-net-policy.md)
- [mDNS Error Codes](reference/errorcodes/errorcode-net-mdns.md)
- [Traffic Management Error Codes](reference/errorcodes/errorcode-net-statistics.md)
- Connectivity
......@@ -1698,11 +1715,13 @@
- [AVDemuxer](reference/native-apis/_a_v_demuxer.md)
- [AVSource](reference/native-apis/_a_v_source.md)
- [OHAudio](reference/native-apis/_o_h_audio.md)
- [AVScreenCapture](reference/native-apis/_a_v_screen_capture.md)
- [HuksKeyApi](reference/native-apis/_huks_key_api.md)
- [HuksParamSetApi](reference/native-apis/_huks_param_set_api.md)
- [HuksTypeApi](reference/native-apis/_huks_type_api.md)
- [Init](reference/native-apis/init.md)
- [Memory](reference/native-apis/memory.md)
- [UsbDdk](reference/native-apis/_usb_ddk.md)
- [Hitrace](reference/native-apis/_hitrace.md)
- [Vulkan](reference/native-apis/_vulkan.md)
- Header Files
......@@ -1717,11 +1736,17 @@
- [drawing_text_typography.h](reference/native-apis/drawing__text__typography_8h.md)
- [drawing_types.h](reference/native-apis/drawing__types_8h.md)
- [external_window.h](reference/native-apis/external__window_8h.md)
- [image_mdk.h](reference/native-apis/image__mdk_8h.md)
- [image_mdk_common.h](reference/native-apis/image__mdk__common_8h.md)
- [image_pixel_map_mdk.h](reference/native-apis/image__pixel__map__mdk_8h.md)
- [image_pixel_map_napi.h](reference/native-apis/image__pixel__map__napi_8h.md)
- [image_receiver_mdk.h](reference/native-apis/image__receiver__mdk_8h.md)
- [image_source_mdk.h](reference/native-apis/image__source__mdk_8h.md)
- [log.h](reference/native-apis/log_8h.md)
- [native_buffer.h](reference/native-apis/native__buffer_8h.md)
- [native_image.h](reference/native-apis/native__image_8h.md)
- [native_interface_xcomponent.h](reference/native-apis/native__interface__xcomponent_8h.md)
- [native_xcomponent_key_event.h](reference/native-apis/native__xcomponent__key__event_8h.md)
- [native_vsync.h](reference/native-apis/native__vsync_8h.md)
- [raw_dir.h](reference/native-apis/raw__dir_8h.md)
- [raw_file_manager.h](reference/native-apis/raw__file__manager_8h.md)
......@@ -1752,6 +1777,9 @@
- [native_audiorenderer.h](reference/native-apis/native__audiorenderer_8h.md)
- [native_audiostream_base.h](reference/native-apis/native__audiostream__base_8h.md)
- [native_audiostreambuilder.h](reference/native-apis/native__audiostreambuilder_8h.md)
- [native_avscreen_capture.h](reference/native-apis/native__avscreen__capture_8h.md)
- [native_avscreen_capture_base.h](reference/native-apis/native__avscreen__capture__base_8h.md)
- [native_avscreen_capture_errors.h](reference/native-apis/native__avscreen__capture__errors_8h.md)
- [native_huks_api.h](reference/native-apis/native__huks__api_8h.md)
- [native_huks_param.h](reference/native-apis/native__huks__param_8h.md)
- [native_huks_type.h](reference/native-apis/native__huks__type_8h.md)
......@@ -1763,6 +1791,8 @@
- [relational_store.h](reference/native-apis/relational__store_8h.md)
- [syscap_ndk.h](reference/native-apis/syscap__ndk_8h.md)
- [purgeable_memory.h](reference/native-apis/purgeable__memory_8h.md)
- [usb_ddk_api.h](reference/native-apis/usb__ddk__api_8h.md)
- [usb_ddk_types.h](reference/native-apis/usb__ddk__types_8h.md)
- [trace.h](reference/native-apis/trace_8h.md)
- [vulkan_ohos.h](reference/native-apis/vulkan__ohos_8h.md)
- Structs
......@@ -1775,8 +1805,23 @@
- [OH_NativeXComponent_TouchPoint](reference/native-apis/_o_h___native_x_component___touch_point.md)
- [OHExtDataHandle](reference/native-apis/_o_h_ext_data_handle.md)
- [OHHDRMetaData](reference/native-apis/_o_h_h_d_r_meta_data.md)
- [OHOS::Media::OhosImageComponent](reference/native-apis/_o_h_o_s_1_1_media_1_1_ohos_image_component.md)
- [OHOS::Media::OhosImageRect](reference/native-apis/_o_h_o_s_1_1_media_1_1_ohos_image_rect.md)
- [OHOS::Media::OhosPixelMapInfo](reference/native-apis/_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md)
- [OhosImageDecodingOps](reference/native-apis/_ohos_image_decoding_ops.md)
- [OhosImageReceiverInfo](reference/native-apis/_ohos_image_receiver_info.md)
- [OhosImageRegion](reference/native-apis/_ohos_image_region.md)
- [OhosImageSize](reference/native-apis/_ohos_image_size.md)
- [OhosImageSource](reference/native-apis/_ohos_image_source.md)
- [OhosImageSourceDelayTimeList](reference/native-apis/_ohos_image_source_delay_time_list.md)
- [OhosImageSourceInfo](reference/native-apis/_ohos_image_source_info.md)
- [OhosImageSourceOps](reference/native-apis/_ohos_image_source_ops.md)
- [OhosImageSourceProperty](reference/native-apis/_ohos_image_source_property.md)
- [OhosImageSourceSupportedFormat](reference/native-apis/_ohos_image_source_supported_format.md)
- [OhosImageSourceSupportedFormatList](reference/native-apis/_ohos_image_source_supported_format_list.md)
- [OhosImageSourceUpdateData](reference/native-apis/_ohos_image_source_update_data.md)
- [OhosPixelMapCreateOps](reference/native-apis/_ohos_pixel_map_create_ops.md)
- [OhosPixelMapInfo](reference/native-apis/_ohos_pixel_map_info.md)
- [OhosPixelMapInfos](reference/native-apis/_ohos_pixel_map_infos.md)
- [RawFileDescriptor](reference/native-apis/_raw_file_descriptor.md)
- [Region](reference/native-apis/_region.md)
- [Rect](reference/native-apis/_rect.md)
......@@ -1792,6 +1837,17 @@
- [OH_AVRange](reference/native-apis/_o_h___a_v_range.md)
- [OH_AudioCapturer_Callbacks_Struct](reference/native-apis/_o_h___audio_capturer___callbacks___struct.md)
- [OH_AudioRenderer_Callbacks_Struct](reference/native-apis/_o_h___audio_renderer___callbacks___struct.md)
- [OH_AudioBuffer](reference/native-apis/_o_h___audio_buffer.md)
- [OH_AudioCaptureInfo](reference/native-apis/_o_h___audio_capture_info.md)
- [OH_AudioEncInfo](reference/native-apis/_o_h___audio_enc_info.md)
- [OH_AudioInfo](reference/native-apis/_o_h___audio_info.md)
- [OH_AVScreenCaptureCallback](reference/native-apis/_o_h___a_v_screen_capture_callback.md)
- [OH_AVScreenCaptureConfig](reference/native-apis/_o_h___a_v_screen_capture_config.md)
- [OH_RecorderInfo](reference/native-apis/_o_h___recorder_info.md)
- [OH_Rect](reference/native-apis/_o_h___rect.md)
- [OH_VideoCaptureInfo](reference/native-apis/_o_h___video_capture_info.md)
- [OH_VideoEncInfo](reference/native-apis/_o_h___video_enc_info.md)
- [OH_VideoInfo](reference/native-apis/_o_h___video_info.md)
- [OH_Huks_Blob](reference/native-apis/_o_h___huks___blob.md)
- [OH_Huks_CertChain](reference/native-apis/_o_h___huks___cert_chain.md)
- [OH_Huks_KeyInfo](reference/native-apis/_o_h___huks___key_info.md)
......@@ -1810,6 +1866,17 @@
- [OH_Rdb_Store](reference/native-apis/_o_h___rdb___store.md)
- [OH_VBucket](reference/native-apis/_o_h___v_bucket.md)
- [OH_VObject](reference/native-apis/_o_h___v_object.md)
- [UsbConfigDescriptor](reference/native-apis/_usb_config_descriptor.md)
- [UsbControlRequestSetup](reference/native-apis/_usb_control_request_setup.md)
- [UsbDdkConfigDescriptor](reference/native-apis/_usb_ddk_config_descriptor.md)
- [UsbDdkEndpointDescriptor](reference/native-apis/_usb_ddk_endpoint_descriptor.md)
- [UsbDdkInterface](reference/native-apis/_usb_ddk_interface.md)
- [UsbDdkInterfaceDescriptor](reference/native-apis/_usb_ddk_interface_descriptor.md)
- [UsbDeviceDescriptor](reference/native-apis/_usb_device_descriptor.md)
- [UsbDeviceMemMap](reference/native-apis/_usb_device_mem_map.md)
- [UsbEndpointDescriptor](reference/native-apis/_usb_endpoint_descriptor.md)
- [UsbInterfaceDescriptor](reference/native-apis/_usb_interface_descriptor.md)
- [UsbRequestPipe](reference/native-apis/_usb_request_pipe.md)
- [VkExternalFormatOHOS](reference/native-apis/_vk_external_format_o_h_o_s.md)
- [VkImportNativeBufferInfoOHOS](reference/native-apis/_vk_import_native_buffer_info_o_h_o_s.md)
- [VkMemoryGetNativeBufferInfoOHOS](reference/native-apis/_vk_memory_get_native_buffer_info_o_h_o_s.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册