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

!21429 翻译完成:20706+20533+20633+20623+20541 fix avcodec native apidoc

Merge pull request !21429 from wusongqing/TR20706
......@@ -17,21 +17,21 @@ The AVDemuxer module provides functions for audio and video decapsulation.
### File
| Name| Description|
| Name| Description|
| -------- | -------- |
| [native_avdemuxer.h](native__avdemuxer_8h.md) | Declares the native APIs used for audio and video decapsulation.<br>File to include: \<multimedia/native_avdemuxer.h> |
| [native_avdemuxer.h](native__avdemuxer_8h.md) | Declares the native APIs used for audio and video decapsulation.<br>**File to include**: <multimedia/player_framework/native_avdemuxer.h><br>**Library**: libnative_media_avdemuxer.so|
### Functions
| Name| Description|
| Name| Description|
| -------- | -------- |
| \*[OH_AVDemuxer_CreateWithSource](#oh_avdemuxer_createwithsource) (OH_AVSource \*source) | Creates an **OH_AVDemuxer** instance based on an **OH_AVSource** instance.|
| [OH_AVDemuxer_Destroy](#oh_avdemuxer_destroy) (OH_AVDemuxer \*demuxer) | Destroys an **OH_AVDemuxer** instance and clears internal resources.|
| [OH_AVDemuxer_SelectTrackByID](#oh_avdemuxer_selecttrackbyid) (OH_AVDemuxer \*demuxer, uint32_t trackIndex) | Selects a track, from which the demuxer reads data.|
| [OH_AVDemuxer_UnselectTrackByID](#oh_avdemuxer_unselecttrackbyid) (OH_AVDemuxer \*demuxer, uint32_t trackIndex) | Deselects a track. The demuxer no longer reads data from a track after it is deselected.|
| [OH_AVDemuxer_ReadSample](#oh_avdemuxer_readsample) (OH_AVDemuxer \*demuxer, uint32_t trackIndex, OH_AVMemory \*sample, OH_AVCodecBufferAttr \*info) | Obtains the compressed frame and related information at the current position from the selected track.|
| [OH_AVDemuxer_SeekToTime](#oh_avdemuxer_seektotime) (OH_AVDemuxer \*demuxer, int64_t millisecond, OH_AVSeekMode mode) | Seeks to the specified time for all the selected tracks based on a seek mode.|
| \*[OH_AVDemuxer_CreateWithSource](#oh_avdemuxer_createwithsource) (OH_AVSource \*source) | Creates an **OH_AVDemuxer** instance based on an **OH_AVSource** instance.|
| [OH_AVDemuxer_Destroy](#oh_avdemuxer_destroy) (OH_AVDemuxer \*demuxer) | Destroys an **OH_AVDemuxer** instance and clears internal resources.|
| [OH_AVDemuxer_SelectTrackByID](#oh_avdemuxer_selecttrackbyid) (OH_AVDemuxer \*demuxer, uint32_t trackIndex) | Selects a track, from which the demuxer reads data.|
| [OH_AVDemuxer_UnselectTrackByID](#oh_avdemuxer_unselecttrackbyid) (OH_AVDemuxer \*demuxer, uint32_t trackIndex) | Deselects a track. The demuxer no longer reads data from a track after it is deselected.|
| [OH_AVDemuxer_ReadSample](#oh_avdemuxer_readsample) (OH_AVDemuxer \*demuxer, uint32_t trackIndex, OH_AVMemory \*sample, OH_AVCodecBufferAttr \*info) | Obtains the compressed frame and related information at the current position from the selected track.|
| [OH_AVDemuxer_SeekToTime](#oh_avdemuxer_seektotime) (OH_AVDemuxer \*demuxer, int64_t millisecond, OH_AVSeekMode mode) | Seeks to the specified time for all the selected tracks based on a seek mode.|
## Function Description
......@@ -39,9 +39,9 @@ The AVDemuxer module provides functions for audio and video decapsulation.
### OH_AVDemuxer_CreateWithSource()
```
OH_AVDemuxer* OH_AVDemuxer_CreateWithSource (OH_AVSource * source)
OH_AVDemuxer* OH_AVDemuxer_CreateWithSource (OH_AVSource *source)
```
**Description**
......@@ -52,9 +52,9 @@ Creates an **OH_AVDemuxer** instance based on an **OH_AVSource** instance. You c
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| source | Pointer to an **OH_AVSource** instance.|
| source | Pointer to an **OH_AVSource** instance.|
**Returns**
......@@ -67,9 +67,9 @@ Returns the pointer to an **OH_AVDemuxer** instance.
### OH_AVDemuxer_Destroy()
```
OH_AVErrCode OH_AVDemuxer_Destroy (OH_AVDemuxer * demuxer)
OH_AVErrCode OH_AVDemuxer_Destroy (OH_AVDemuxer *demuxer)
```
**Description**
......@@ -82,9 +82,9 @@ The destroyed instance cannot be used until it is re-created. You are advised to
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
**Returns**
......@@ -97,9 +97,9 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
### OH_AVDemuxer_ReadSample()
```
OH_AVErrCode OH_AVDemuxer_ReadSample (OH_AVDemuxer * demuxer, uint32_t trackIndex, OH_AVMemory * sample, OH_AVCodecBufferAttr * info )
OH_AVErrCode OH_AVDemuxer_ReadSample (OH_AVDemuxer *demuxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr *info)
```
**Description**
......@@ -112,12 +112,12 @@ You must select a track before reading data. After this API is called, the demux
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track from which the compressed frame is to be read.|
| sample | Pointer to the **OH_AVMemory** instance for storing the compressed frame data.|
| info | Pointer to the **OH_AVCodecBufferAttr** instance for storing the compressed frame information.|
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track from which the compressed frame is to be read.|
| sample | Pointer to the **OH_AVMemory** instance for storing the compressed frame data.|
| info | Pointer to the **OH_AVCodecBufferAttr** instance for storing the compressed frame information.|
**Returns**
......@@ -130,9 +130,9 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
### OH_AVDemuxer_SeekToTime()
```
OH_AVErrCode OH_AVDemuxer_SeekToTime (OH_AVDemuxer * demuxer, int64_t millisecond, OH_AVSeekMode mode )
OH_AVErrCode OH_AVDemuxer_SeekToTime (OH_AVDemuxer *demuxer, int64_t millisecond, OH_AVSeekMode mode)
```
**Description**
......@@ -143,11 +143,11 @@ Seeks to the specified time for all the selected tracks based on a seek mode.
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| millisecond | Time to seek to, in milliseconds. The timestamp is relative to the start position of the file.|
| mode | Seek mode. For details, see **OH_AVSeekMode**.|
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| millisecond | Time to seek to, in milliseconds. The timestamp is relative to the start position of the file.|
| mode | Seek mode. For details, see **OH_AVSeekMode**.|
**Returns**
......@@ -160,9 +160,9 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
### OH_AVDemuxer_SelectTrackByID()
```
OH_AVErrCode OH_AVDemuxer_SelectTrackByID (OH_AVDemuxer * demuxer, uint32_t trackIndex )
OH_AVErrCode OH_AVDemuxer_SelectTrackByID (OH_AVDemuxer *demuxer, uint32_t trackIndex)
```
**Description**
......@@ -177,10 +177,10 @@ When **OH_AVDemuxer_ReadSample** is called, only the data in the selected track
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track.|
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track.|
**Returns**
......@@ -193,9 +193,9 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
### OH_AVDemuxer_UnselectTrackByID()
```
OH_AVErrCode OH_AVDemuxer_UnselectTrackByID (OH_AVDemuxer * demuxer, uint32_t trackIndex )
OH_AVErrCode OH_AVDemuxer_UnselectTrackByID (OH_AVDemuxer *demuxer, uint32_t trackIndex)
```
**Description**
......@@ -210,10 +210,10 @@ If the same track is deselected multiple times, **AV_ERR_OK** is returned and th
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track.|
| demuxer | Pointer to an **OH_AVDemuxer** instance.|
| trackIndex | Index of the track.|
**Returns**
......
......@@ -19,7 +19,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
| Name| Description|
| -------- | -------- |
| [native_avmuxer.h](native__avmuxer_8h.md) | Declares native APIs used for audio and video encapsulation.<br>File to include: &lt;multimedia/native_avmuxer.h&gt;|
| [native_avmuxer.h](native__avmuxer_8h.md) | Declares native APIs used for audio and video encapsulation.<br>**File to include**: <multimedia/player_framework/native_avmuxer.h><br>**Library**: libnative_media_avmuxer.so|
### Functions
......@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
```
OH_AVErrCode OH_AVMuxer_AddTrack (OH_AVMuxer * muxer, int32_t * trackIndex, OH_AVFormat * trackFormat )
OH_AVErrCode OH_AVMuxer_AddTrack (OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFormat *trackFormat)
```
**Description**
......@@ -74,7 +74,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVMuxer* OH_AVMuxer_Create (int32_t fd, OH_AVOutputFormat format )
OH_AVMuxer* OH_AVMuxer_Create (int32_t fd, OH_AVOutputFormat format)
```
**Description**
......@@ -103,7 +103,7 @@ Returns the pointer to the **OH_AVMuxer** instance created. You must call **OH_A
```
OH_AVErrCode OH_AVMuxer_Destroy (OH_AVMuxer * muxer)
OH_AVErrCode OH_AVMuxer_Destroy (OH_AVMuxer *muxer)
```
**Description**
......@@ -131,7 +131,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_AVMuxer_SetRotation (OH_AVMuxer * muxer, int32_t rotation )
OH_AVErrCode OH_AVMuxer_SetRotation (OH_AVMuxer *muxer, int32_t rotation)
```
**Description**
......@@ -162,7 +162,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_AVMuxer_Start (OH_AVMuxer * muxer)
OH_AVErrCode OH_AVMuxer_Start (OH_AVMuxer *muxer)
```
**Description**
......@@ -192,7 +192,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_AVMuxer_Stop (OH_AVMuxer * muxer)
OH_AVErrCode OH_AVMuxer_Stop (OH_AVMuxer *muxer)
```
**Description**
......@@ -222,7 +222,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_AVMuxer_WriteSample (OH_AVMuxer * muxer, uint32_t trackIndex, OH_AVMemory * sample, OH_AVCodecBufferAttr info )
OH_AVErrCode OH_AVMuxer_WriteSample (OH_AVMuxer *muxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr info)
```
**Description**
......
......@@ -17,20 +17,20 @@ The AVSource module provides functions for constructing audio and video resource
### File
| Name| Description|
| Name| Description|
| -------- | -------- |
| [native_avsource.h](native__avsource_8h.md) | Declares the native APIs used to construct audio and video resource objects.<br>File to include: \<multimedia/native_avsource.h>|
| [native_avsource.h](native__avsource_8h.md) | Declares the native APIs used to construct audio and video resource objects.<br>**File to include**: <multimedia/player_framework/native_avsource.h><br>**Library**: libnative_media_avsource.so|
### Functions
| Name| Description|
| Name| Description|
| -------- | -------- |
| \*[OH_AVSource_CreateWithURI](#oh_avsource_createwithuri) (char \*uri) | Creates an **OH_AVSource** instance based on a URI.|
| \*[OH_AVSource_CreateWithFD](#oh_avsource_createwithfd) (int32_t fd, int64_t offset, int64_t size) | Creates an **OH_AVSource** instance based on a file descriptor (FD).|
| [OH_AVSource_Destroy](#oh_avsource_destroy) (OH_AVSource \*source) | Destroys an **OH_AVSource** instance and clears internal resources. An instance can be destroyed only once.|
| \*[OH_AVSource_GetSourceFormat](#oh_avsource_getsourceformat) (OH_AVSource \*source) | Obtains the basic information about a media resource.|
| \*[OH_AVSource_GetTrackFormat](#oh_avsource_gettrackformat) (OH_AVSource \*source, uint32_t trackIndex) | Obtains the basic information about a track.|
| \*[OH_AVSource_CreateWithURI](#oh_avsource_createwithuri) (char \*uri) | Creates an **OH_AVSource** instance based on a URI.|
| \*[OH_AVSource_CreateWithFD](#oh_avsource_createwithfd) (int32_t fd, int64_t offset, int64_t size) | Creates an **OH_AVSource** instance based on a file descriptor (FD).|
| [OH_AVSource_Destroy](#oh_avsource_destroy) (OH_AVSource \*source) | Destroys an **OH_AVSource** instance and clears internal resources. An instance can be destroyed only once.|
| \*[OH_AVSource_GetSourceFormat](#oh_avsource_getsourceformat) (OH_AVSource \*source) | Obtains the basic information about a media resource.|
| \*[OH_AVSource_GetTrackFormat](#oh_avsource_gettrackformat) (OH_AVSource \*source, uint32_t trackIndex) | Obtains the basic information about a track.|
## Function Description
......@@ -38,9 +38,9 @@ The AVSource module provides functions for constructing audio and video resource
### OH_AVSource_CreateWithFD()
```
OH_AVSource* OH_AVSource_CreateWithFD (int32_t fd, int64_t offset, int64_t size )
OH_AVSource* OH_AVSource_CreateWithFD (int32_t fd, int64_t offset, int64_t size)
```
**Description**
......@@ -55,11 +55,11 @@ If **offset** is not the start position of the file or **size** is not the file
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| fd | FD of a media resource file.|
| offset | Position from which data is to read.|
| size | File size, in bytes.|
| fd | FD of a media resource file.|
| offset | Position from which data is to read.|
| size | File size, in bytes.|
**Returns**
......@@ -72,9 +72,9 @@ Returns the pointer to an **OH_AVSource** instance.
### OH_AVSource_CreateWithURI()
```
OH_AVSource* OH_AVSource_CreateWithURI (char * uri)
OH_AVSource* OH_AVSource_CreateWithURI (char *uri)
```
**Description**
......@@ -85,9 +85,9 @@ Create an **OH_AVSource** instance object based on a URI. You can release the in
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| uri | URI of the media resource.|
| uri | URI of the media resource.|
**Returns**
......@@ -100,9 +100,9 @@ Returns the pointer to an **OH_AVSource** instance.
### OH_AVSource_Destroy()
```
OH_AVErrCode OH_AVSource_Destroy (OH_AVSource * source)
OH_AVErrCode OH_AVSource_Destroy (OH_AVSource *source)
```
**Description**
......@@ -117,9 +117,9 @@ The destroyed instance cannot be used until it is re-created. You are advised to
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| source | Pointer to an **OH_AVSource** instance.|
| source | Pointer to an **OH_AVSource** instance.|
**Returns**
......@@ -132,9 +132,9 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
### OH_AVSource_GetSourceFormat()
```
OH_AVFormat* OH_AVSource_GetSourceFormat (OH_AVSource * source)
OH_AVFormat* OH_AVSource_GetSourceFormat (OH_AVSource *source)
```
**Description**
......@@ -145,9 +145,9 @@ Obtains the basic information about a media resource.
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| source | Pointer to an **OH_AVSource** instance.|
| source | Pointer to an **OH_AVSource** instance.|
**Returns**
......@@ -160,9 +160,9 @@ Returns the basic information obtained.
### OH_AVSource_GetTrackFormat()
```
OH_AVFormat* OH_AVSource_GetTrackFormat (OH_AVSource * source, uint32_t trackIndex )
OH_AVFormat* OH_AVSource_GetTrackFormat (OH_AVSource *source, uint32_t trackIndex)
```
**Description**
......@@ -173,10 +173,10 @@ Obtains the basic information about a track.
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| source | Pointer to an **OH_AVSource** instance.|
| trackIndex | Index of the track whose information is to be obtained.|
| source | Pointer to an **OH_AVSource** instance.|
| trackIndex | Index of the track whose information is to be obtained.|
**Returns**
......
# AudioEncoder
## Overview
The **AudioEncoder** module provides the functions for audio encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether your device supports this module.
......@@ -11,44 +10,38 @@ The **AudioEncoder** module provides the functions for audio encoding. This modu
9
## Summary
### Files
| Name| Description|
| -------- | -------- |
| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding.<br>File to include: <multimedia/player_framework/native_avcodec_audioencoder.h> |
| Name | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_audioencoder.h><br>**Library**: libnative_media_aenc.so|
### Functions
| Name| Description|
| -------- | -------- |
| \*[OHOS::Media::OH_AudioEncoder_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.|
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OHOS::Media::OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance.|
| [OHOS::Media::OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded.|
| [OHOS::Media::OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**.|
| [OHOS::Media::OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully.|
| [OHOS::Media::OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder.|
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.|
| [OHOS::Media::OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_IsValid](#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid.|
| Name | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| \*[OHOS::Media::OH_AudioEncoder_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder. |
| [OHOS::Media::OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance. |
| [OHOS::Media::OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded. |
| [OHOS::Media::OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully. |
| [OHOS::Media::OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. |
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.|
| [OHOS::Media::OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_IsValid](#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid. |
## Function Description
### OH_AudioEncoder_Configure()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
```
......@@ -63,10 +56,10 @@ This function must be called prior to **Prepare**.
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| format | Pointer to an **OH_AVFormat** instance, which provides the description information about the audio track to be encoded.|
| Name | Description |
| ------ | --------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance. |
| format | Pointer to an **OH_AVFormat** instance, which provides the description information about the audio track to be encoded.|
**Returns**
......@@ -76,10 +69,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_CreateByMime()
```
OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByMime (const char * mime)
```
......@@ -92,9 +83,9 @@ Creates an audio encoder instance based on a MIME type. This function is recomme
**Parameters**
| Name| Description|
| -------- | -------- |
| mime | Pointer to a string that describes the MIME type. For details, see **AVCODEC_MIME_TYPE**.|
| Name| Description |
| ---- | ------------------------------------------------------- |
| mime | Pointer to a string that describes the MIME type. For details, see **AVCODEC_MIME_TYPE**.|
**Returns**
......@@ -104,10 +95,8 @@ Returns the pointer to an **OH_AVCodec** instance.
9
### OH_AudioEncoder_CreateByName()
```
OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByName (const char * name)
```
......@@ -120,9 +109,9 @@ Creates an audio encoder instance based on an encoder name. To use this function
**Parameters**
| Name| Description|
| -------- | -------- |
| name | Pointer to an audio encoder name.|
| Name| Description |
| ---- | ---------------- |
| name | Pointer to an audio encoder name.|
**Returns**
......@@ -132,10 +121,8 @@ Returns the pointer to an **OH_AVCodec** instance.
9
### OH_AudioEncoder_Destroy()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Destroy (OH_AVCodec * codec)
```
......@@ -148,9 +135,9 @@ Clears the internal resources of an audio encoder and destroys the encoder insta
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......@@ -160,10 +147,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_Flush()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Flush (OH_AVCodec * codec)
```
......@@ -178,9 +163,9 @@ This function invalidates the indexes of all buffers previously reported through
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......@@ -190,10 +175,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_FreeOutputData()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index )
```
......@@ -206,10 +189,10 @@ Frees an output buffer of an audio encoder.
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| index | Index of the output buffer.|
| Name | Description |
| ----- | ------------------------------ |
| codec | Pointer to an **OH_AVCodec** instance. |
| index | Index of the output buffer.|
**Returns**
......@@ -219,10 +202,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_GetOutputDescription()
```
OH_AVFormat* OHOS::Media::OH_AudioEncoder_GetOutputDescription (OH_AVCodec * codec)
```
......@@ -237,9 +218,9 @@ The caller must manually release the **OH_AVFormat** instance in the return valu
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......@@ -249,10 +230,8 @@ Returns the handle to an **OH_AVFormat** instance. The lifecycle of this instanc
9
### OH_AudioEncoder_IsValid()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_IsValid (OH_AVCodec * codec, bool * isValid )
```
......@@ -265,10 +244,10 @@ Checks whether an audio encoder instance is valid.
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| isValid | Pointer to an instance of the Boolean type. The value **true** means that the encoder instance is valid and **false** means the opposite.|
| Name | Description |
| ------- | ----------------------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance. |
| isValid | Pointer to an instance of the Boolean type. The value **true** means that the encoder instance is valid and **false** means the opposite.|
**Returns**
......@@ -278,10 +257,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
10
### OH_AudioEncoder_Prepare()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Prepare (OH_AVCodec * codec)
```
......@@ -294,9 +271,9 @@ Prepares internal resources for an audio encoder. This function must be called a
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......@@ -306,10 +283,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_PushInputData()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr )
```
......@@ -324,11 +299,11 @@ The **OH_AVCodecOnNeedInputData** callback reports the available input buffer an
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| index | Index of the input buffer.|
| attr | Description information about the data in the buffer.|
| Name | Description |
| ----- | ------------------------------ |
| codec | Pointer to an **OH_AVCodec** instance. |
| index | Index of the input buffer.|
| attr | Description information about the data in the buffer.|
**Returns**
......@@ -338,10 +313,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_Reset()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Reset (OH_AVCodec * codec)
```
......@@ -354,18 +327,16 @@ Resets an audio encoder. To continue encoding, you must call **Configure** to co
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
Returns **AV_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) otherwise.
### OH_AudioEncoder_SetCallback()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData )
```
......@@ -380,11 +351,11 @@ This function must be called prior to **Prepare**.
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| callback | Callback function to set. For details, see **OH_AVCodecAsyncCallback**.|
| userData | User-specific data.|
| Name | Description |
| -------- | ------------------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance. |
| callback | Callback function to set. For details, see **OH_AVCodecAsyncCallback**.|
| userData | User-specific data. |
**Returns**
......@@ -394,10 +365,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_SetParameter()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format )
```
......@@ -412,10 +381,10 @@ This function can be called only after the encoder is started. Incorrect paramet
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| format | Handle to an **OH_AVFormat** instance.|
| Name | Description |
| ------ | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| format | Handle to an **OH_AVFormat** instance. |
**Returns**
......@@ -425,10 +394,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_Start()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Start (OH_AVCodec * codec)
```
......@@ -443,9 +410,9 @@ After being started, the encoder starts to report the **OH_AVCodecOnNeedInputDat
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......@@ -455,10 +422,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9
### OH_AudioEncoder_Stop()
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Stop (OH_AVCodec * codec)
```
......@@ -471,9 +436,9 @@ Stops an audio encoder. After the encoder is stopped, you can call **Start** to
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| Name | Description |
| ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.|
**Returns**
......
......@@ -19,9 +19,9 @@ The **Core** module provides the basic backbone capabilities for the media playb
| Name| Description|
| -------- | -------- |
| [native_averrors.h](native__averrors_8h.md) | Declares the error codes used by the media playback framework.<br>File to include: \<multimedia/player_framework/native_averrors.h> |
| [native_avformat.h](native__avformat_8h.md) | Declares the format-related functions and enums.<br>File to include: \<multimedia/player_framework/native_avformat.h> |
| [native_avmemory.h](native__avmemory_8h.md) | Declares the memory-related functions.<br>File to include: \<multimedia/player_framework/native_avmemory.h> |
| [native_averrors.h](native__averrors_8h.md) | Declares the error codes used by the media playback framework.<br>**File to include**: <multimedia/player_framework/native_averrors.h><br>**Library**: libnative_media_core.so|
| [native_avformat.h](native__avformat_8h.md) | Declares the format-related functions and enums.<br>**File to include**: <multimedia/player_framework/native_avformat.h><br>**Library**: libnative_media_core.so|
| [native_avmemory.h](native__avmemory_8h.md) | Declares the memory-related functions.<br>**File to include**: <multimedia/player_framework/native_avmemory.h><br>**Library**: libnative_media_core.so|
### Types
......@@ -36,8 +36,8 @@ The **Core** module provides the basic backbone capabilities for the media playb
| Name| Description|
| -------- | -------- |
| [OH_AVErrCode](#oh_averrcode) {<br>AV_ERR_OK = 0, AV_ERR_NO_MEMORY = 1, AV_ERR_OPERATE_NOT_PERMIT = 2, AV_ERR_INVALID_VAL = 3,<br>AV_ERR_IO = 4, AV_ERR_TIMEOUT = 5, AV_ERR_UNKNOWN = 6, AV_ERR_SERVICE_DIED = 7,<br>AV_ERR_INVALID_STATE = 8, AV_ERR_UNSUPPORT = 9, AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
| [OH_AVPixelFormat](#oh_avpixelformat) {<br>AV_PIXEL_FORMAT_YUVI420 = 1, AV_PIXEL_FORMAT_NV12 = 2, AV_PIXEL_FORMAT_NV21 = 3, AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
| [OH_AVErrCode](#oh_averrcode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OK = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_NO_MEMORY = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OPERATE_NOT_PERMIT = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_VAL = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_IO = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_TIMEOUT = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNKNOWN = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_SERVICE_DIED = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_STATE = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNSUPPORT = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
| [OH_AVPixelFormat](#oh_avpixelformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_YUVI420 = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV12 = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV21 = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
### Functions
......@@ -75,7 +75,7 @@ The **Core** module provides the basic backbone capabilities for the media playb
```
typedef enum OH_AVErrCodeOH_AVErrCode
typedef enum OH_AVErrCode OH_AVErrCode
```
**Description**
......@@ -93,7 +93,7 @@ Defines an enum that enumerates the audio and video error codes.
```
typedef enum OH_AVPixelFormatOH_AVPixelFormat
typedef enum OH_AVPixelFormat OH_AVPixelFormat
```
**Description**
......@@ -175,7 +175,7 @@ Enumerates the video pixel formats.
```
bool OH_AVFormat_Copy (struct OH_AVFormat * to, struct OH_AVFormat * from )
bool OH_AVFormat_Copy (struct OH_AVFormat *to, struct OH_AVFormat *from)
```
**Description**
......@@ -204,7 +204,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
struct OH_AVFormat* OH_AVFormat_Create (void )
struct OH_AVFormat* OH_AVFormat_Create (void)
```
**Description**
......@@ -226,7 +226,7 @@ Returns the pointer to an **OH_AVFormat** instance.
```
struct OH_AVFormat* OH_AVFormat_CreateAudioFormat (const char * mimeType, int32_t sampleRate, int32_t channelCount )
struct OH_AVFormat* OH_AVFormat_CreateAudioFormat (const char *mimeType, int32_t sampleRate, int32_t channelCount)
```
**Description**
......@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance.
```
struct OH_AVFormat* OH_AVFormat_CreateVideoFormat (const char * mimeType, int32_t width, int32_t height )
struct OH_AVFormat* OH_AVFormat_CreateVideoFormat (const char *mimeType, int32_t width, int32_t height)
```
**Description**
......@@ -286,7 +286,7 @@ Returns the pointer to an **OH_AVFormat** instance.
```
void OH_AVFormat_Destroy (struct OH_AVFormat * format)
void OH_AVFormat_Destroy (struct OH_AVFormat *format)
```
**Description**
......@@ -310,7 +310,7 @@ Destroys an **OH_AVFormat** instance.
```
const char* OH_AVFormat_DumpInfo (struct OH_AVFormat * format)
const char* OH_AVFormat_DumpInfo (struct OH_AVFormat *format)
```
**Description**
......@@ -338,7 +338,7 @@ Returns the pointer to a collection of strings, each of which consists of a key
```
bool OH_AVFormat_GetBuffer (struct OH_AVFormat * format, const char * key, uint8_t ** addr, size_t * size )
bool OH_AVFormat_GetBuffer (struct OH_AVFormat *format, const char *key, uint8_t **addr, size_t *size)
```
**Description**
......@@ -369,7 +369,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_GetDoubleValue (struct OH_AVFormat * format, const char * key, double * out )
bool OH_AVFormat_GetDoubleValue (struct OH_AVFormat *format, const char *key, double *out)
```
**Description**
......@@ -399,7 +399,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_GetFloatValue (struct OH_AVFormat * format, const char * key, float * out )
bool OH_AVFormat_GetFloatValue (struct OH_AVFormat *format, const char *key, float *out)
```
**Description**
......@@ -429,7 +429,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_GetIntValue (struct OH_AVFormat * format, const char * key, int32_t * out )
bool OH_AVFormat_GetIntValue (struct OH_AVFormat *format, const char *key, int32_t *out)
```
**Description**
......@@ -455,7 +455,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_GetLongValue (struct OH_AVFormat * format, const char * key, int64_t * out )
bool OH_AVFormat_GetLongValue (struct OH_AVFormat *format, const char *key, int64_t *out)
```
**Description**
......@@ -485,7 +485,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_GetStringValue (struct OH_AVFormat * format, const char * key, const char ** out )
bool OH_AVFormat_GetStringValue (struct OH_AVFormat *format, const char *key, const char **out)
```
**Description**
......@@ -515,7 +515,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetBuffer (struct OH_AVFormat * format, const char * key, const uint8_t * addr, size_t size )
bool OH_AVFormat_SetBuffer (struct OH_AVFormat *format, const char *key, const uint8_t *addr, size_t size)
```
**Description**
......@@ -546,7 +546,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetDoubleValue (struct OH_AVFormat * format, const char * key, double value )
bool OH_AVFormat_SetDoubleValue (struct OH_AVFormat *format, const char *key, double value)
```
**Description**
......@@ -576,7 +576,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetFloatValue (struct OH_AVFormat * format, const char * key, float value )
bool OH_AVFormat_SetFloatValue (struct OH_AVFormat *format, const char *key, float value)
```
**Description**
......@@ -606,7 +606,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetIntValue (struct OH_AVFormat * format, const char * key, int32_t value )
bool OH_AVFormat_SetIntValue (struct OH_AVFormat *format, const char *key, int32_t value)
```
**Description**
......@@ -636,7 +636,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetLongValue (struct OH_AVFormat * format, const char * key, int64_t value )
bool OH_AVFormat_SetLongValue (struct OH_AVFormat *format, const char *key, int64_t value)
```
**Description**
......@@ -666,7 +666,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
```
bool OH_AVFormat_SetStringValue (struct OH_AVFormat * format, const char * key, const char * value )
bool OH_AVFormat_SetStringValue (struct OH_AVFormat *format, const char *key, const char *value)
```
**Description**
......@@ -724,7 +724,7 @@ Returns the pointer to the **OH_AVMemory** instance created if the operation is
```
OH_AVErrCode OH_AVMemory_Destroy (struct OH_AVMemory * mem)
OH_AVErrCode OH_AVMemory_Destroy (struct OH_AVMemory *mem)
```
**Description**
......@@ -752,7 +752,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
uint8_t* OH_AVMemory_GetAddr (struct OH_AVMemory * mem)
uint8_t* OH_AVMemory_GetAddr (struct OH_AVMemory *mem)
```
**Description**
......@@ -780,7 +780,7 @@ Returns the pointer to the virtual memory address if the memory is valid; return
```
int32_t OH_AVMemory_GetSize (struct OH_AVMemory * mem)
int32_t OH_AVMemory_GetSize (struct OH_AVMemory *mem)
```
**Description**
......
......@@ -19,7 +19,7 @@ The VideoDecoder module provides the functions for video decoding.
| Name| Description|
| -------- | -------- |
| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.<br>File to include: <multimedia/player_framework/native_avcodec_videodecoder.h> |
| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_videodecoder.h><br>**Library**: libnative_media_vdec.so |
### Functions
......@@ -52,7 +52,7 @@ The VideoDecoder module provides the functions for video decoding.
```
OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec *codec, OH_AVFormat *format)
```
**Description**
......@@ -83,7 +83,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVCodec* OH_VideoDecoder_CreateByMime (const char * mime)
OH_AVCodec* OH_VideoDecoder_CreateByMime (const char *mime)
```
**Description**
......@@ -111,7 +111,7 @@ Returns the pointer to an **OH_AVCodec** instance.
```
OH_AVCodec* OH_VideoDecoder_CreateByName (const char * name)
OH_AVCodec* OH_VideoDecoder_CreateByName (const char *name)
```
**Description**
......@@ -139,7 +139,7 @@ Returns the pointer to an **OH_AVCodec** instance.
```
OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec *codec)
```
**Description**
......@@ -167,7 +167,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec *codec)
```
**Description**
......@@ -197,7 +197,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index )
OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec *codec, uint32_t index)
```
**Description**
......@@ -226,7 +226,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec * codec)
OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec *codec)
```
**Description**
......@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance.
```
OH_AVErrCode OH_VideoDecoder_IsValid (OH_AVCodec * codec, bool * isValid )
OH_AVErrCode OH_VideoDecoder_IsValid (OH_AVCodec *codec, bool *isValid)
```
**Description**
......@@ -285,7 +285,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec *codec)
```
**Description**
......@@ -313,7 +313,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr )
OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr)
```
**Description**
......@@ -349,7 +349,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec * codec, uint32_t index )
OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec *codec, uint32_t index)
```
**Description**
......@@ -380,7 +380,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec *codec)
```
**Description**
......@@ -408,7 +408,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData )
OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec *codec, OH_AVCodecAsyncCallback callback, void *userData)
```
**Description**
......@@ -440,7 +440,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format )
OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec *codec, OH_AVFormat *format)
```
**Description**
......@@ -471,7 +471,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec * codec, OHNativeWindow * window )
OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec *codec, OHNativeWindow *window)
```
**Description**
......@@ -500,7 +500,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec *codec)
```
**Description**
......@@ -530,7 +530,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
```
OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec * codec)
OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec *codec)
```
**Description**
......
......@@ -37,8 +37,8 @@ The **native_avcapability.h** file declares the native APIs used to query the co
| Name| Description|
| -------- | -------- |
| [OH_BitrateMode](_a_v_capability.md#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder.|
| [OH_AVCodecCategory](_a_v_capability.md#oh_avcodeccategory) { **HARDWARE** = 0, **SOFTWARE** } | Enumerates the codec categories.|
| [OH_BitrateMode](_a_v_capability.md#oh_bitratemode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_CBR** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_VBR** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_CQ** = 2<br>} | Enumerates the bit rate modes of an encoder.|
| [OH_AVCodecCategory](_a_v_capability.md#oh_avcodeccategory) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**HARDWARE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SOFTWARE**<br>} | Enumerates the codec categories.|
### Functions
......
# native_avcodec_audiodecoder.h
## Overview
The **native_avcodec_audiodecoder.h** file declares the native APIs used for audio decoding.
......@@ -13,26 +12,24 @@ The **native_avcodec_audiodecoder.h** file declares the native APIs used for aud
[AudioDecoder](_audio_decoder.md)
## Summary
### Functions
| Name| Description|
| -------- | -------- |
| \*[OHOS::Media::OH_AudioDecoder_CreateByMime](_audio_decoder.md#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.|
| \*[OHOS::Media::OH_AudioDecoder_CreateByName](_audio_decoder.md#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder.|
| [OHOS::Media::OH_AudioDecoder_Destroy](_audio_decoder.md#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance.|
| [OHOS::Media::OH_AudioDecoder_SetCallback](_audio_decoder.md#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_Configure](_audio_decoder.md#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the audio description information that can be extracted from the container.|
| [OHOS::Media::OH_AudioDecoder_Prepare](_audio_decoder.md#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This function must be called after **Configure**.|
| [OHOS::Media::OH_AudioDecoder_Start](_audio_decoder.md#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This function can be called only after the decoder is prepared successfully.|
| [OHOS::Media::OH_AudioDecoder_Stop](_audio_decoder.md#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_Flush](_audio_decoder.md#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_Reset](_audio_decoder.md#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** to configure the decoder again.|
| \*[OHOS::Media::OH_AudioDecoder_GetOutputDescription](_audio_decoder.md#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio decoder. For details, see **OH_AVFormat**.|
| [OHOS::Media::OH_AudioDecoder_SetParameter](_audio_decoder.md#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This function can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.|
| [OHOS::Media::OH_AudioDecoder_PushInputData](_audio_decoder.md#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_FreeOutputData](_audio_decoder.md#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_IsValid](_audio_decoder.md#oh_audiodecoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio decoder instance is valid.|
| Name | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| \*[OHOS::Media::OH_AudioDecoder_CreateByMime](_audio_decoder.md#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioDecoder_CreateByName](_audio_decoder.md#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder. |
| [OHOS::Media::OH_AudioDecoder_Destroy](_audio_decoder.md#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance. |
| [OHOS::Media::OH_AudioDecoder_SetCallback](_audio_decoder.md#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Configure](_audio_decoder.md#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the audio description information that can be extracted from the container. |
| [OHOS::Media::OH_AudioDecoder_Prepare](_audio_decoder.md#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioDecoder_Start](_audio_decoder.md#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This function can be called only after the decoder is prepared successfully. |
| [OHOS::Media::OH_AudioDecoder_Stop](_audio_decoder.md#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Flush](_audio_decoder.md#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Reset](_audio_decoder.md#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** to configure the decoder again. |
| \*[OHOS::Media::OH_AudioDecoder_GetOutputDescription](_audio_decoder.md#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio decoder. For details, see **OH_AVFormat**. |
| [OHOS::Media::OH_AudioDecoder_SetParameter](_audio_decoder.md#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This function can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.|
| [OHOS::Media::OH_AudioDecoder_PushInputData](_audio_decoder.md#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_FreeOutputData](_audio_decoder.md#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_IsValid](_audio_decoder.md#oh_audiodecoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio decoder instance is valid. |
# native_avcodec_audioencoder.h
## Overview
The **native_avcodec_audioencoder.h** file declares the native APIs used for audio encoding.
......@@ -13,26 +12,24 @@ The **native_avcodec_audioencoder.h** file declares the native APIs used for aud
[AudioEncoder](_audio_encoder.md)
## Summary
### Functions
| Name| Description|
| -------- | -------- |
| \*[OHOS::Media::OH_AudioEncoder_CreateByMime](_audio_encoder.md#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.|
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](_audio_encoder.md#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OHOS::Media::OH_AudioEncoder_Destroy](_audio_encoder.md#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance.|
| [OHOS::Media::OH_AudioEncoder_SetCallback](_audio_encoder.md#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Configure](_audio_encoder.md#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded.|
| [OHOS::Media::OH_AudioEncoder_Prepare](_audio_encoder.md#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**.|
| [OHOS::Media::OH_AudioEncoder_Start](_audio_encoder.md#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully.|
| [OHOS::Media::OH_AudioEncoder_Stop](_audio_encoder.md#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Flush](_audio_encoder.md#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_Reset](_audio_encoder.md#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder.|
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](_audio_encoder.md#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.|
| [OHOS::Media::OH_AudioEncoder_SetParameter](_audio_encoder.md#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_PushInputData](_audio_encoder.md#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](_audio_encoder.md#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder.|
| [OHOS::Media::OH_AudioEncoder_IsValid](_audio_encoder.md#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid.|
| Name | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| \*[OHOS::Media::OH_AudioEncoder_CreateByMime](_audio_encoder.md#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](_audio_encoder.md#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OHOS::Media::OH_AudioEncoder_Destroy](_audio_encoder.md#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance. |
| [OHOS::Media::OH_AudioEncoder_SetCallback](_audio_encoder.md#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Configure](_audio_encoder.md#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded. |
| [OHOS::Media::OH_AudioEncoder_Prepare](_audio_encoder.md#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioEncoder_Start](_audio_encoder.md#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully. |
| [OHOS::Media::OH_AudioEncoder_Stop](_audio_encoder.md#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Flush](_audio_encoder.md#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Reset](_audio_encoder.md#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. |
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](_audio_encoder.md#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**. |
| [OHOS::Media::OH_AudioEncoder_SetParameter](_audio_encoder.md#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_PushInputData](_audio_encoder.md#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](_audio_encoder.md#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_IsValid](_audio_encoder.md#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid. |
......@@ -28,7 +28,7 @@ The **native_avcodec_videoencoder.h** file declares the native APIs used for vid
| Name| Description|
| -------- | -------- |
| [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode) { **CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of a video encoder.|
| [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**CBR** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**VBR** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|
### Functions
......
......@@ -28,4 +28,4 @@ The **native_averrors.h** file declares the error codes used by the media playba
| Name| Description|
| -------- | -------- |
| [OH_AVErrCode](_core.md#oh_averrcode) {<br>AV_ERR_OK = 0, AV_ERR_NO_MEMORY = 1, AV_ERR_OPERATE_NOT_PERMIT = 2, AV_ERR_INVALID_VAL = 3,<br>AV_ERR_IO = 4, AV_ERR_TIMEOUT = 5, AV_ERR_UNKNOWN = 6, AV_ERR_SERVICE_DIED = 7,<br>AV_ERR_INVALID_STATE = 8, AV_ERR_UNSUPPORT = 9, AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
| [OH_AVErrCode](_core.md#oh_averrcode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OK = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_NO_MEMORY = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OPERATE_NOT_PERMIT = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_VAL = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_IO = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_TIMEOUT = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNKNOWN = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_SERVICE_DIED = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_STATE = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNSUPPORT = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
......@@ -28,7 +28,7 @@ The **native_avformat.h** file declares the format-related functions and enums.
| Name| Description|
| -------- | -------- |
| [OH_AVPixelFormat](_core.md#oh_avpixelformat) {<br>AV_PIXEL_FORMAT_YUVI420 = 1, AV_PIXEL_FORMAT_NV12 = 2, AV_PIXEL_FORMAT_NV21 = 3, AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
| [OH_AVPixelFormat](_core.md#oh_avpixelformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_YUVI420 = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV12 = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV21 = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
### Functions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册