@@ -19,7 +19,7 @@ The **AVCapability** module provides functions for querying the codec capability
...
@@ -19,7 +19,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [native_avcapability.h](native__avcapability_8h.md) | Declares the native APIs used to query the codec capability.<br>File to include: \<multimedia/native_avcapability.h>|
| [native_avcapability.h](native__avcapability_8h.md) | Declares the native APIs used to query the codec capability.<br>**File to include**: <multimedia/player_framework/native_avcapability.h><br>**Library**: libnative_media_codecbase.so|
### Structs
### Structs
...
@@ -33,7 +33,7 @@ The **AVCapability** module provides functions for querying the codec capability
...
@@ -33,7 +33,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [OH_BitrateMode](#oh_bitratemode) | Defines an enum that enumerates the bit rate modes of an encoder. |
| [OH_BitrateMode](#oh_bitratemode) | Defines an enum that enumerates the bit rate modes of an encoder.|
| [OH_AVRange](#oh_avrange) | Defines a struct for the value range, which contains the minimum value and maximum value.|
| [OH_AVRange](#oh_avrange) | Defines a struct for the value range, which contains the minimum value and maximum value.|
| [OH_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.|
| [OH_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.|
...
@@ -42,7 +42,7 @@ The **AVCapability** module provides functions for querying the codec capability
...
@@ -42,7 +42,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [OH_BitrateMode](#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder. |
| [OH_BitrateMode](#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder.|
@@ -19,7 +19,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
...
@@ -19,7 +19,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
| 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
### Functions
...
@@ -41,7 +41,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
...
@@ -41,7 +41,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
@@ -19,7 +19,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
...
@@ -19,7 +19,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [native_avmuxer.h](native__avmuxer_8h.md) | Declares native APIs used for audio and video encapsulation.<br>File to include: <multimedia/native_avmuxer.h>|
| [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
### Functions
...
@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
...
@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
@@ -19,7 +19,7 @@ The AVSource module provides functions for constructing audio and video resource
...
@@ -19,7 +19,7 @@ The AVSource module provides functions for constructing audio and video resource
| 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
### Functions
...
@@ -40,7 +40,7 @@ The AVSource module provides functions for constructing audio and video resource
...
@@ -40,7 +40,7 @@ The AVSource module provides functions for constructing audio and video resource
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.
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
...
@@ -11,44 +10,38 @@ The **AudioEncoder** module provides the functions for audio encoding. This modu
| [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> |
| [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|
| \*[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_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_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_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_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_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_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_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_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_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_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_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_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_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_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.|
| [OHOS::Media::OH_AudioEncoder_IsValid](#oh_audioencoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether an audio encoder instance is valid. |
## Function Description
## Function Description
### OH_AudioEncoder_Configure()
### OH_AudioEncoder_Configure()
```
```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
```
```
...
@@ -63,9 +56,9 @@ This function must be called prior to **Prepare**.
...
@@ -63,9 +56,9 @@ This function must be called prior to **Prepare**.
@@ -19,7 +19,7 @@ The **CodecBase** module provides the common structs, character constants, and e
...
@@ -19,7 +19,7 @@ The **CodecBase** module provides the common structs, character constants, and e
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running **OH_AVCodec** instances.<br>File to include: \<multimedia/player_framework/native_avcodec_base.h>|
| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running **OH_AVCodec** instances.<br>**File to include**: <multimedia/player_framework/native_avcodec_base.h><br>**Library**: libnative_media_codecbase.so|
### Structs
### Structs
...
@@ -57,17 +57,17 @@ The **CodecBase** module provides the common structs, character constants, and e
...
@@ -57,17 +57,17 @@ The **CodecBase** module provides the common structs, character constants, and e
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {<br>**AVCODEC_BUFFER_FLAGS_NONE** = 0, **AVCODEC_BUFFER_FLAGS_EOS** = 1 << 0, **AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 << 1, **AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 << 2,<br>**AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 << 3<br>} | Enumerates the flags for the buffer of an **OH_AVCodec** instance.|
| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {<br> **AVCODEC_BUFFER_FLAGS_NONE** = 0,<br> **AVCODEC_BUFFER_FLAGS_EOS** = 1 << 0,<br> **AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 << 1,<br> **AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 << 2,<br> **AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 << 3<br>} | Enumerates the flags for the buffer of an **OH_AVCodec** instance. |
| [OH_AVOutputFormat](#oh_avoutputformat) {**AV_OUTPUT_FORMAT_DEFAULT** = 0, **AV_OUTPUT_FORMAT_MPEG_4** = 2, **AV_OUTPUT_FORMAT_M4A** = 6 } | Enumerates the output file formats of a muxer.|
| [OH_AVOutputFormat](#oh_avoutputformat) {<br> **AV_OUTPUT_FORMAT_DEFAULT** = 0,<br> **AV_OUTPUT_FORMAT_MPEG_4** = 2,<br> **AV_OUTPUT_FORMAT_M4A** = 6<br>} | Enumerates the output file formats of a muxer. |
| [OH_MediaType](#oh_mediatype) {**MEDIA_TYPE_AUD** = 0, **MEDIA_TYPE_VID** = 1 } | Enumerates the media types.|
| [OH_MediaType](#oh_mediatype) {<br> **MEDIA_TYPE_AUD** = 0,<br> **MEDIA_TYPE_VID** = 1<br>} | Enumerates the media types. |
@@ -19,9 +19,9 @@ The **Core** module provides the basic backbone capabilities for the media playb
...
@@ -19,9 +19,9 @@ The **Core** module provides the basic backbone capabilities for the media playb
| Name| Description|
| 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_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> |
| [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> |
| [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
### Types
...
@@ -36,8 +36,8 @@ The **Core** module provides the basic backbone capabilities for the media playb
...
@@ -36,8 +36,8 @@ The **Core** module provides the basic backbone capabilities for the media playb
@@ -19,7 +19,7 @@ The VideoDecoder module provides the functions for video decoding.
...
@@ -19,7 +19,7 @@ The VideoDecoder module provides the functions for video decoding.
| Name| Description|
| 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
### Functions
...
@@ -52,7 +52,7 @@ The VideoDecoder module provides the functions for video decoding.
...
@@ -52,7 +52,7 @@ The VideoDecoder module provides the functions for video decoding.
```
```
OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
@@ -19,21 +19,21 @@ The **VideoEncoder** module provides the functions for video encoding.
...
@@ -19,21 +19,21 @@ The **VideoEncoder** module provides the functions for video encoding.
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.<br>File to include: <multimedia/player_framework/native_avcodec_videoencoder.h> |
| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_videoencoder.h><br>**Library**: libnative_media_venc.so|
### Types
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Defines an enum that enumerates the bit rate modes of a video encoder. |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Defines an enum that enumerates the bit rate modes of a video encoder.|
### Enums
### Enums
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) {**CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of a video encoder.|
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) {<br> **CBR** = 0,<br> **VBR** = 1,<br> **CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|
### Functions
### Functions
...
@@ -67,7 +67,7 @@ The **VideoEncoder** module provides the functions for video encoding.
...
@@ -67,7 +67,7 @@ The **VideoEncoder** module provides the functions for video encoding.
@@ -37,8 +37,8 @@ The **native_avcapability.h** file declares the native APIs used to query the co
...
@@ -37,8 +37,8 @@ The **native_avcapability.h** file declares the native APIs used to query the co
| Name| Description|
| 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_BitrateMode](_a_v_capability.md#oh_bitratemode) {<br> **BITRATE_MODE_CBR** = 0,<br> **BITRATE_MODE_VBR** = 1,<br> **BITRATE_MODE_CQ** = 2<br>} | Enumerates the bit rate modes of an encoder.|
| \*[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_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_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_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_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_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_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_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_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_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_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_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_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_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_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.|
| [OHOS::Media::OH_AudioDecoder_IsValid](_audio_decoder.md#oh_audiodecoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether an audio decoder instance is valid. |
| \*[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_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_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_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_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_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_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_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_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_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_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_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_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_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_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.|
| [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
...
@@ -28,7 +28,7 @@ The **native_avcodec_videoencoder.h** file declares the native APIs used for vid
| Name| Description|
| 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> **CBR** = 0,<br> **VBR** = 1,<br> **CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|