@@ -17,72 +17,72 @@ The **AVCapability** module provides functions for querying the codec capability
### Files
| 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
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVRange](_o_h___a_v_range.md) | Defines the value range, which contains the minimum value and maximum value.|
| [OH_AVRange](_o_h___a_v_range.md) | Defines the value range, which contains the minimum value and maximum value.|
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| [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_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.|
| [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_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.|
### Enums
| 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_AVCodec_GetCapability](#oh_avcodec_getcapability)(const char \*mime, bool isEncoder) | Obtains the codec capability recommended by the system.|
| \*[OH_AVCodec_GetCapabilityByCategory](#oh_avcodec_getcapabilitybycategory)(const char \*mime, bool isEncoder, [OH_AVCodecCategory](#oh_avcodeccategory) category) | Obtains the codec capability by category, which can be a hardware codec or software codec.|
| [OH_AVCapability_IsHardware](#oh_avcapability_ishardware)(OH_AVCapability\*capability) | Checks whether a codec capability instance describes a hardware codec.|
| \*[OH_AVCapability_GetName](#oh_avcapability_getname)(OH_AVCapability\*capability) | Obtains the codec name.|
| [OH_AVCapability_GetMaxSupportedInstances](#oh_avcapability_getmaxsupportedinstances)(OH_AVCapability\*capability) | Obtains the maximum number of codec instances supported by a codec.|
| [OH_AVCapability_GetEncoderBitrateRange](#oh_avcapability_getencoderbitraterange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*bitrateRange) | Obtains the bit rate range supported by an encoder.|
| [OH_AVCapability_IsEncoderBitrateModeSupported](#oh_avcapability_isencoderbitratemodesupported)(OH_AVCapability\*capability, [OH_BitrateMode](#oh_bitratemode) bitrateMode) | Checks whether an encoder supports a specific bit rate mode.|
| [OH_AVCapability_GetEncoderQualityRange](#oh_avcapability_getencoderqualityrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*qualityRange) | Obtains the quality range supported by an encoder.|
| [OH_AVCapability_GetEncoderComplexityRange](#oh_avcapability_getencodercomplexityrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*complexityRange) | Obtains the complexity range supported by an encoder.|
| [OH_AVCapability_GetAudioSupportedSampleRates](#oh_avcapability_getaudiosupportedsamplerates)(OH_AVCapability\*capability, const int32_t \*\*sampleRates, uint32_t \*sampleRateNum) | Obtains the sampling rates supported by an audio codec.|
| [OH_AVCapability_GetAudioChannelCountRange](#oh_avcapability_getaudiochannelcountrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*channelCountRange) | Obtains the count range of audio channels supported by an audio codec.|
| [OH_AVCapability_GetVideoWidthAlignment](#oh_avcapability_getvideowidthalignment)(OH_AVCapability\*capability, int32_t \*widthAlignment) | Obtains the video width alignment supported by a video codec.|
| [OH_AVCapability_GetVideoHeightAlignment](#oh_avcapability_getvideoheightalignment)(OH_AVCapability\*capability, int32_t \*heightAlignment) | Obtains the video height alignment supported by a video codec.|
| [OH_AVCapability_GetVideoWidthRangeForHeight](#oh_avcapability_getvideowidthrangeforheight)(OH_AVCapability\*capability, int32_t height, [OH_AVRange](_o_h___a_v_range.md)\*widthRange) | Obtains the video width range supported by a video codec based on a given height.|
| [OH_AVCapability_GetVideoHeightRangeForWidth](#oh_avcapability_getvideoheightrangeforwidth)(OH_AVCapability\*capability, int32_t width, [OH_AVRange](_o_h___a_v_range.md)\*heightRange) | Obtains the video height range supported by a video codec based on a given width.|
| [OH_AVCapability_GetVideoWidthRange](#oh_avcapability_getvideowidthrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*widthRange) | Obtains the video width range supported by a video codec.|
| [OH_AVCapability_GetVideoHeightRange](#oh_avcapability_getvideoheightrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*heightRange) | Obtains the video height range supported by a video codec.|
| [OH_AVCapability_IsVideoSizeSupported](#oh_avcapability_isvideosizesupported)(OH_AVCapability\*capability, int32_t width, int32_t height) | Checks whether a video codec supports a specific video size.|
| [OH_AVCapability_GetVideoFrameRateRange](#oh_avcapability_getvideoframeraterange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*frameRateRange) | Obtains the video frame rate range supported by a video codec.|
| [OH_AVCapability_GetVideoFrameRateRangeForSize](#oh_avcapability_getvideoframeraterangeforsize)(OH_AVCapability\*capability, int32_t width, int32_t height, [OH_AVRange](_o_h___a_v_range.md)\*frameRateRange) | Obtains the video frame rate range supported by a video codec based on a given video size.|
| [OH_AVCapability_AreVideoSizeAndFrameRateSupported](#oh_avcapability_arevideosizeandframeratesupported)(OH_AVCapability\*capability, int32_t width, int32_t height, int32_t frameRate) | Checks whether a video codec supports the combination of a video size and frame rate.|
| [OH_AVCapability_GetVideoSupportedPixelFormats](#oh_avcapability_getvideosupportedpixelformats)(OH_AVCapability\*capability, const int32_t \*\*pixelFormats, uint32_t \*pixelFormatNum) | Obtains the video pixel formats supported by a video codec.|
| [OH_AVCapability_GetSupportedProfiles](#oh_avcapability_getsupportedprofiles)(OH_AVCapability\*capability, const int32_t \*\*profiles, uint32_t \*profileNum) | Obtains the profiles supported by a codec.|
| [OH_AVCapability_GetSupportedLevelsForProfile](#oh_avcapability_getsupportedlevelsforprofile)(OH_AVCapability\*capability, int32_t profile, const int32_t \*\*levels, uint32_t \*levelNum) | Obtains the codec levels supported by a profile.|
| [OH_AVCapability_AreProfileAndLevelSupported](#oh_avcapability_areprofileandlevelsupported)(OH_AVCapability\*capability, int32_t profile, int32_t level) | Checks whether a codec supports the combination of a profile and level.|
| Name| Description|
| -------- | -------- |
| \*[OH_AVCodec_GetCapability](#oh_avcodec_getcapability)(const char \*mime, bool isEncoder) | Obtains the codec capability recommended by the system.|
| \*[OH_AVCodec_GetCapabilityByCategory](#oh_avcodec_getcapabilitybycategory)(const char \*mime, bool isEncoder, [OH_AVCodecCategory](#oh_avcodeccategory) category) | Obtains the codec capability by category, which can be a hardware codec or software codec.|
| [OH_AVCapability_IsHardware](#oh_avcapability_ishardware)(OH_AVCapability\*capability) | Checks whether a codec capability instance describes a hardware codec.|
| \*[OH_AVCapability_GetName](#oh_avcapability_getname)(OH_AVCapability\*capability) | Obtains the codec name.|
| [OH_AVCapability_GetMaxSupportedInstances](#oh_avcapability_getmaxsupportedinstances)(OH_AVCapability\*capability) | Obtains the maximum number of codec instances supported by a codec.|
| [OH_AVCapability_GetEncoderBitrateRange](#oh_avcapability_getencoderbitraterange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*bitrateRange) | Obtains the bit rate range supported by an encoder.|
| [OH_AVCapability_IsEncoderBitrateModeSupported](#oh_avcapability_isencoderbitratemodesupported)(OH_AVCapability\*capability, [OH_BitrateMode](#oh_bitratemode) bitrateMode) | Checks whether an encoder supports a specific bit rate mode.|
| [OH_AVCapability_GetEncoderQualityRange](#oh_avcapability_getencoderqualityrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*qualityRange) | Obtains the quality range supported by an encoder.|
| [OH_AVCapability_GetEncoderComplexityRange](#oh_avcapability_getencodercomplexityrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*complexityRange) | Obtains the complexity range supported by an encoder.|
| [OH_AVCapability_GetAudioSupportedSampleRates](#oh_avcapability_getaudiosupportedsamplerates)(OH_AVCapability\*capability, const int32_t \*\*sampleRates, uint32_t \*sampleRateNum) | Obtains the sampling rates supported by an audio codec.|
| [OH_AVCapability_GetAudioChannelCountRange](#oh_avcapability_getaudiochannelcountrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*channelCountRange) | Obtains the count range of audio channels supported by an audio codec.|
| [OH_AVCapability_GetVideoWidthAlignment](#oh_avcapability_getvideowidthalignment)(OH_AVCapability\*capability, int32_t \*widthAlignment) | Obtains the video width alignment supported by a video codec.|
| [OH_AVCapability_GetVideoHeightAlignment](#oh_avcapability_getvideoheightalignment)(OH_AVCapability\*capability, int32_t \*heightAlignment) | Obtains the video height alignment supported by a video codec.|
| [OH_AVCapability_GetVideoWidthRangeForHeight](#oh_avcapability_getvideowidthrangeforheight)(OH_AVCapability\*capability, int32_t height, [OH_AVRange](_o_h___a_v_range.md)\*widthRange) | Obtains the video width range supported by a video codec based on a given height.|
| [OH_AVCapability_GetVideoHeightRangeForWidth](#oh_avcapability_getvideoheightrangeforwidth)(OH_AVCapability\*capability, int32_t width, [OH_AVRange](_o_h___a_v_range.md)\*heightRange) | Obtains the video height range supported by a video codec based on a given width.|
| [OH_AVCapability_GetVideoWidthRange](#oh_avcapability_getvideowidthrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*widthRange) | Obtains the video width range supported by a video codec.|
| [OH_AVCapability_GetVideoHeightRange](#oh_avcapability_getvideoheightrange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*heightRange) | Obtains the video height range supported by a video codec.|
| [OH_AVCapability_IsVideoSizeSupported](#oh_avcapability_isvideosizesupported)(OH_AVCapability\*capability, int32_t width, int32_t height) | Checks whether a video codec supports a specific video size.|
| [OH_AVCapability_GetVideoFrameRateRange](#oh_avcapability_getvideoframeraterange)(OH_AVCapability\*capability, [OH_AVRange](_o_h___a_v_range.md)\*frameRateRange) | Obtains the video frame rate range supported by a video codec.|
| [OH_AVCapability_GetVideoFrameRateRangeForSize](#oh_avcapability_getvideoframeraterangeforsize)(OH_AVCapability\*capability, int32_t width, int32_t height, [OH_AVRange](_o_h___a_v_range.md)\*frameRateRange) | Obtains the video frame rate range supported by a video codec based on a given video size.|
| [OH_AVCapability_AreVideoSizeAndFrameRateSupported](#oh_avcapability_arevideosizeandframeratesupported)(OH_AVCapability\*capability, int32_t width, int32_t height, int32_t frameRate) | Checks whether a video codec supports the combination of a video size and frame rate.|
| [OH_AVCapability_GetVideoSupportedPixelFormats](#oh_avcapability_getvideosupportedpixelformats)(OH_AVCapability\*capability, const int32_t \*\*pixelFormats, uint32_t \*pixelFormatNum) | Obtains the video pixel formats supported by a video codec.|
| [OH_AVCapability_GetSupportedProfiles](#oh_avcapability_getsupportedprofiles)(OH_AVCapability\*capability, const int32_t \*\*profiles, uint32_t \*profileNum) | Obtains the profiles supported by a codec.|
| [OH_AVCapability_GetSupportedLevelsForProfile](#oh_avcapability_getsupportedlevelsforprofile)(OH_AVCapability\*capability, int32_t profile, const int32_t \*\*levels, uint32_t \*levelNum) | Obtains the codec levels supported by a profile.|
| [OH_AVCapability_AreProfileAndLevelSupported](#oh_avcapability_areprofileandlevelsupported)(OH_AVCapability\*capability, int32_t profile, int32_t level) | Checks whether a codec supports the combination of a profile and level.|
### Variables
| Name| Description|
| Name| Description|
| -------- | -------- |
| **OH_AVRange::minVal** | Defines the minimum value.|
| **OH_AVRange::maxVal** | Defines the maximum value.|
| **OH_AVRange::minVal** | Defines the minimum value.|
| **OH_AVRange::maxVal** | Defines the maximum value.|
## Type Description
...
...
@@ -90,9 +90,9 @@ The **AVCapability** module provides functions for querying the codec capability
### OH_AVCodecCategory
```
typedef enum OH_AVCodecCategoryOH_AVCodecCategory
typedef enum OH_AVCodecCategoryOH_AVCodecCategory
```
**Description**
...
...
@@ -108,9 +108,9 @@ Defines an enum that enumerates the codec categories.
### OH_AVRange
```
typedef struct OH_AVRangeOH_AVRange
typedef struct OH_AVRangeOH_AVRange
```
**Description**
...
...
@@ -126,9 +126,9 @@ Defines a struct for the value range, which contains the minimum value and maxim
### OH_BitrateMode
```
typedef enum OH_BitrateModeOH_BitrateMode
typedef enum OH_BitrateModeOH_BitrateMode
```
**Description**
...
...
@@ -147,14 +147,14 @@ Defines an enum that enumerates the bit rate modes of an encoder.
### OH_AVCodecCategory
```
enum OH_AVCodecCategory
```
**Description**
Enumerates the codec categories.
Defines an enum that enumerates the codec categories.
@@ -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.
@@ -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: <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
...
...
@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
@@ -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
The **AudioDecoder** module provides the functions for audio decoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether your device supports this module.
...
...
@@ -11,53 +10,46 @@ The **AudioDecoder** module provides the functions for audio decoding. This modu
9
## Summary
### Files
| Name| Description|
| -------- | -------- |
| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding.<br>File to include: <multimedia/player_framework/native_avcodec_audiodecoder.h>|
| [avcodec_audio_channel_layout.h](avcodec__audio__channel__layout_8h.md) | Declares the enums used for audio codec.<br>File to include: \<multimedia/avcodec_audio_channel_layout.h>|
| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_audiodecoder.h><br>**Library**: libnative_media_adec.so|
| [avcodec_audio_channel_layout.h](avcodec__audio__channel__layout_8h.md) | Declares the enums used for audio codec.<br>**File to include**: <multimedia/player_framework/avcodec_audio_channel_layout.h><br>**Library**: libnative_media_codecbase.so |
| \*[OHOS::Media::OH_AudioDecoder_CreateByMime](#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](#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](#oh_audiodecoder_destroy)(OH_AVCodec\*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance.|
| [OHOS::Media::OH_AudioDecoder_SetCallback](#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](#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](#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](#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](#oh_audiodecoder_stop)(OH_AVCodec\*codec) | Stops an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_Flush](#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](#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](#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](#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](#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](#oh_audiodecoder_freeoutputdata)(OH_AVCodec\*codec, uint32_t index) | Frees an output buffer of an audio decoder.|
| [OHOS::Media::OH_AudioDecoder_IsValid](#oh_audiodecoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether an audio decoder instance is valid.|
| \*[OHOS::Media::OH_AudioDecoder_CreateByMime](#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](#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](#oh_audiodecoder_destroy)(OH_AVCodec\*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance. |
| [OHOS::Media::OH_AudioDecoder_SetCallback](#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](#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](#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](#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](#oh_audiodecoder_stop)(OH_AVCodec\*codec) | Stops an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Flush](#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](#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](#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](#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](#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](#oh_audiodecoder_freeoutputdata)(OH_AVCodec\*codec, uint32_t index) | Frees an output buffer of an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_IsValid](#oh_audiodecoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether an audio decoder instance is valid. |
## Enum Description
### AudioChannelLayout
```
enum OHOS::Media::AudioChannelLayout : uint64_t
```
...
...
@@ -72,10 +64,8 @@ Enumerates the types of the audio channel numbers. The output format of the deco
10
### AudioChannelSet
```
enum OHOS::Media::AudioChannelSet : uint64_t
```
...
...
@@ -90,35 +80,32 @@ Enumerates the audio channel numbers. Each channel number is mapped to a variabl
10
| Value| Description|
| -------- | -------- |
| AMBISONICS_ACN1 | Channel 0 for the zero-order stereo.|
| AMBISONICS_ACN2 | Channel 1 for the first-order stereo.|
| AMBISONICS_ACN3 | Channel 2 for the first-order stereo.|
| AMBISONICS_W | Channel 3 for the first-order stereo.|
| AMBISONICS_Y | Equivalent to channel 0 for the zero-order stereo.|
| AMBISONICS_Z | Equivalent to channel 1 for the first-order stereo.|
| AMBISONICS_X | Equivalent to channel 2 for the first-order stereo.|
| AMBISONICS_ACN4 | Equivalent to channel 3 for the first-order stereo.|
| AMBISONICS_ACN5 | Channel 4 for the second-order stereo.|
| AMBISONICS_ACN6 | Channel 5 for the second-order stereo.|
| AMBISONICS_ACN7 | Channel 6 for the second-order stereo.|
| AMBISONICS_ACN8 | Channel 7 for the second-order stereo.|
| AMBISONICS_ACN9 | Channel 8 for the second-order stereo.|
| AMBISONICS_ACN10 | Channel 9 for the third-order stereo.|
| AMBISONICS_ACN11 | Channel 10 for the third-order stereo.|
| AMBISONICS_ACN12 | Channel 11 for the third-order stereo.|
| AMBISONICS_ACN13 | Channel 12 for the third-order stereo.|
| AMBISONICS_ACN14 | Channel 13 for the third-order stereo.|
| AMBISONICS_ACN15 | Channel 14 for the third-order stereo.|
| Value | Description |
| ---------------- | ---------------------- |
| AMBISONICS_ACN1 | Channel 0 for the zero-order stereo. |
| AMBISONICS_ACN2 | Channel 1 for the first-order stereo. |
| AMBISONICS_ACN3 | Channel 2 for the first-order stereo. |
| AMBISONICS_W | Channel 3 for the first-order stereo. |
| AMBISONICS_Y | Equivalent to channel 0 for the zero-order stereo.|
| AMBISONICS_Z | Equivalent to channel 1 for the first-order stereo.|
| AMBISONICS_X | Equivalent to channel 2 for the first-order stereo.|
| AMBISONICS_ACN4 | Equivalent to channel 3 for the first-order stereo.|
| AMBISONICS_ACN5 | Channel 4 for the second-order stereo. |
| AMBISONICS_ACN6 | Channel 5 for the second-order stereo. |
| AMBISONICS_ACN7 | Channel 6 for the second-order stereo. |
| AMBISONICS_ACN8 | Channel 7 for the second-order stereo. |
| AMBISONICS_ACN9 | Channel 8 for the second-order stereo. |
| AMBISONICS_ACN10 | Channel 9 for the third-order stereo. |
| AMBISONICS_ACN11 | Channel 10 for the third-order stereo. |
| AMBISONICS_ACN12 | Channel 11 for the third-order stereo. |
| AMBISONICS_ACN13 | Channel 12 for the third-order stereo. |
| AMBISONICS_ACN14 | Channel 13 for the third-order stereo. |
| AMBISONICS_ACN15 | Channel 14 for the third-order stereo. |
## Function Description
### OH_AudioDecoder_Configure()
```
OH_AVErrCode OHOS::Media::OH_AudioDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
```
...
...
@@ -133,10 +120,10 @@ This function must be called prior to **Prepare**.
**Parameters**
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| format | Pointer to the **OH_AVFormat** instance, which provides the description information about the audio track to be decoded.|
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> |
| [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.|
| \*[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.|
@@ -17,125 +17,125 @@ The **CodecBase** module provides the common structs, character constants, and e
### Files
| 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
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the description information about the buffer of an **OH_AVCodec** instance.|
| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the description information about the buffer of an **OH_AVCodec** instance.|
| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) | Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** instance.|
| [OH_AVOutputFormat](#oh_avoutputformat) | Defines an enum that enumerates the output file formats of a muxer.|
| [OH_AVCodecBufferAttr](#oh_avcodecbufferattr) | Defines a struct for the description information about the buffer of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnError](#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the pointer to the function that is called to report the new stream description when the output stream changes.|
| (\*[OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.|
| (\*[OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)\*attr, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.|
| [OH_AVCodecAsyncCallback](#oh_avcodecasynccallback) | Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_MediaType](#oh_mediatype) | Defines an enum that enumerates the media types.|
| [OH_AVCProfile](#oh_avcprofile) | Defines an enum that enumerates the Advanced Video Coding (AVC) profiles.|
| [OH_HEVCProfile](#oh_hevcprofile) | Defines an enum that enumerates the High Efficiency Video Coding (HEVC) profiles.|
| [OH_AACProfile](#oh_aacprofile) | Defines an enum that enumerates the Advanced Audio Coding (AAC) profiles.|
| [OH_AVSeekMode](#oh_avseekmode) | Defines an enum that enumerates the seek modes.|
| [OH_ColorPrimary](#oh_colorprimary) | Defines an enum that enumerates the primary colors.|
| [OH_TransferCharacteristic](#oh_transfercharacteristic) | Defines an enum that enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](#oh_matrixcoefficient) | Defines an enum that enumerates the matrix coefficients.|
| [OH_BitsPerSample](#oh_bitspersample) | Defines an enum that enumerates the number of audio bits for each coded sample.|
| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) | Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** instance.|
| [OH_AVOutputFormat](#oh_avoutputformat) | Defines an enum that enumerates the output file formats of a muxer.|
| [OH_AVCodecBufferAttr](#oh_avcodecbufferattr) | Defines a struct for the description information about the buffer of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnError](#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the pointer to the function that is called to report the new stream description when the output stream changes.|
| (\*[OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.|
| (\*[OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)\*attr, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.|
| [OH_AVCodecAsyncCallback](#oh_avcodecasynccallback) | Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_MediaType](#oh_mediatype) | Defines an enum that enumerates the media types.|
| [OH_AVCProfile](#oh_avcprofile) | Defines an enum that enumerates the Advanced Video Coding (AVC) profiles.|
| [OH_HEVCProfile](#oh_hevcprofile) | Defines an enum that enumerates the High Efficiency Video Coding (HEVC) profiles.|
| [OH_AACProfile](#oh_aacprofile) | Defines an enum that enumerates the Advanced Audio Coding (AAC) profiles.|
| [OH_AVSeekMode](#oh_avseekmode) | Defines an enum that enumerates the seek modes.|
| [OH_ColorPrimary](#oh_colorprimary) | Defines an enum that enumerates the primary colors.|
| [OH_TransferCharacteristic](#oh_transfercharacteristic) | Defines an enum that enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](#oh_matrixcoefficient) | Defines an enum that enumerates the matrix coefficients.|
| [OH_BitsPerSample](#oh_bitspersample) | Defines an enum that enumerates the number of audio bits for each coded sample.|
### Enums
| 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_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_MediaType](#oh_mediatype) {**MEDIA_TYPE_AUD** = 0, **MEDIA_TYPE_VID** = 1 } | Enumerates the media types.|
| [OH_BitsPerSample](#oh_bitspersample) {<br> **SAMPLE_U8** = 0,<br> **SAMPLE_S16LE** = 1,<br> **SAMPLE_S24LE** = 2,<br> **SAMPLE_S32LE** = 3,<br> **SAMPLE_F32LE** = 4,<br> **SAMPLE_U8P** = 5,<br> **SAMPLE_S16P** = 6,<br> **SAMPLE_S24P** = 7,<br> **SAMPLE_S32P** = 8,<br> **SAMPLE_F32P** = 9,<br> **INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.|
### Variables
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferAttr::pts](_o_h___a_v_codec_buffer_attr.md#pts) | Defines the display timestamp of the buffer, in microseconds.|
| [OH_AVCodecBufferAttr::size](_o_h___a_v_codec_buffer_attr.md#size) | Defines the size of data contained in the buffer, in bytes.|
| [OH_AVCodecBufferAttr::offset](_o_h___a_v_codec_buffer_attr.md#offset) | Defines the offset of valid data in the buffer.|
| [OH_AVCodecBufferAttr::flags](_o_h___a_v_codec_buffer_attr.md#flags) | Defines the flags of the buffer. It is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags).|
| [OH_AVCodecAsyncCallback::onError](_o_h___a_v_codec_async_callback.md#onerror) | Defines the callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
| [OH_AVCodecAsyncCallback::onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Defines the callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
| [OH_AVCodecAsyncCallback::onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).|
| [OH_AVCodecAsyncCallback::onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | Defines the pointer to the Multipurpose Internet Mail Extension (MIME) type for AVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | Defines the pointer to the MIME type for AAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](#oh_avcodec_mimetype_video_mpeg4) | Defines the pointer to the MIME type for MPEG4 video codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_HEVC](#oh_avcodec_mimetype_video_hevc) | Defines the pointer to the MIME type for HEVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_MPEG](#oh_avcodec_mimetype_audio_mpeg) | Defines the pointer to the MIME type for MPEG audio codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_JPG](#oh_avcodec_mimetype_image_jpg) | Defines the pointer to the MIME type for JPG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_PNG](#oh_avcodec_mimetype_image_png) | Defines the pointer to the MIME type for PNG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_BMP](#oh_avcodec_mimetype_image_bmp) | Defines the pointer to the MIME type for BMP image codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_FLAC](#oh_avcodec_mimetype_audio_flac) | Defines the pointer to the MIME type for FLAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](#oh_avcodec_mimetype_audio_vorbis) | Defines the pointer to the MIME type for VORBIS audio codec.|
| \*[OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp) | Defines the pointer to the timestamp in the extra data of the surface. The value type is int64.|
| \*[OH_ED_KEY_EOS](#oh_ed_key_eos) | Defines the pointer to the end of stream (EOS) in the extra data of the surface. The value type is Boolean.|
| \*[OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type) | Defines the pointer to a container for storing media descriptions.|
| \*[OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime) | Define the pointer to the MIME type of codec. The value is a string.|
| \*[OH_MD_KEY_DURATION](#oh_md_key_duration) | Defines the pointer to the duration. The value type is int64_t.|
| \*[OH_MD_KEY_BITRATE](#oh_md_key_bitrate) | Defines the pointer to the bit rate. The value type is uint32_t.|
| \*[OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size) | Defines the pointer to the maximum input size. The value type is uint32_t.|
| \*[OH_MD_KEY_WIDTH](#oh_md_key_width) | Defines the pointer to the video width. The value type is uint32_t.|
| \*[OH_MD_KEY_HEIGHT](#oh_md_key_height) | Defines the pointer to the video height. The value type is uint32_t.|
| \*[OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format) | Defines the pointer to the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
| \*[OH_MD_KEY_RANGE_FLAG](#oh_md_key_range_flag) | Defines the pointer to the video YUV value range flag. The value type is Boolean.|
| \*[OH_MD_KEY_COLOR_PRIMARIES](#oh_md_key_color_primaries) | Defines the pointer to the primary color of the video. The value type is int32_t.|
| \*[OH_MD_KEY_TRANSFER_CHARACTERISTICS](#oh_md_key_transfer_characteristics) | Defines the pointer to the video transfer characteristics. The value type is int32_t.|
| \*[OH_MD_KEY_MATRIX_COEFFICIENTS](#oh_md_key_matrix_coefficients) | Defines the pointer to the video matrix coefficient. The value type is int32_t.|
| \*[OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Defines the pointer to the original audio format. The value type is uint32_t.|
| \*[OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate) | Defines the pointer to the video frame rate. The value is a double-precision floating point number.|
| \*[OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Defines the pointer to the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode).|
| \*[OH_MD_KEY_PROFILE](#oh_md_key_profile) | Defines the pointer to the encoding template. The value is a number. For details, see [OH_AVCProfile](#oh_avcprofile), [OH_AACProfile](#oh_aacprofile), or [OH_HEVCProfile](#oh_hevcprofile).|
| \*[OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count) | Defines the pointer to the number of audio channels. The value type is uint32_t.|
| \*[OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate) | Defines the pointer to the audio sampling rate. The value type is uint32_t.|
| \*[OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval) | Defines the pointer to the key frame interval, in milliseconds. The value type is int32_t.|
| \*[OH_MD_KEY_ROTATION](#oh_md_key_rotation) | Defines the pointer to the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0.|
| \*[OH_MD_KEY_CODEC_CONFIG](#oh_md_key_codec_config) | Defines the pointer to the codec-specific data. The value type is uint8_t\*.|
| \*[OH_MD_KEY_REQUEST_I_FRAME](#oh_md_key_request_i_frame) | Defines the pointer to the request for immediate encoding of I-frames. The value type is Boolean.|
| \*[OH_MD_KEY_QUALITY](#oh_md_key_quality) | Defines the pointer to the required encoding quality. The value type is uint32_t. This key applies only to encoders configured in constant quality mode.|
| \*[OH_MD_KEY_CHANNEL_LAYOUT](#oh_md_key_channel_layout) | Defines the pointer to the required encoding channel layout. The value type is int64_t. This key applies only to encoders.|
| \*[OH_MD_KEY_BITS_PER_CODED_SAMPLE](#oh_md_key_bits_per_coded_sample) | Defines the pointer to the number of bits for each coded sample. The value type is uint32_t. This key applies to FLAC encoders. For details, see **\@OH_BitsPerSample**.|
| \*[OH_MD_KEY_AAC_IS_ADTS](#oh_md_key_aac_is_adts) | Defines the pointer to the AAC format. The value type is uint32_t. This key applies to AAC decoders.|
| \*[OH_MD_KEY_SBR](#oh_md_key_sbr) | Defines the pointer to the AAC SBR format. The value type is uint32_t. This key applies to AAC encoders.|
| \*[OH_MD_KEY_COMPLIANCE_LEVEL](#oh_md_key_compliance_level) | Defines the pointer to the FLAC compliance level. The value type is int32_t.|
| \*[OH_MD_KEY_IDENTIFICATION_HEADER](#oh_md_key_identification_header) | Defines the pointer to the VORBIS identification header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_SETUP_HEADER](#oh_md_key_setup_header) | Defines the pointer to the VORBIS setup header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_TITLE](#oh_md_key_title) | Defines the pointer to the title of the input media. The value is a string.|
| \*[OH_MD_KEY_ARTIST](#oh_md_key_artist) | Defines the pointer to the artist of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM](#oh_md_key_album) | Defines the pointer to the album of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM_ARTIST](#oh_md_key_album_artist) | Defines the pointer to the album_artist of the input media. The value is a string.|
| \*[OH_MD_KEY_DATE](#oh_md_key_date) | Defines the pointer to the date of the input media. The value is a string.|
| \*[OH_MD_KEY_COMMENT](#oh_md_key_comment) | Defines the pointer to the comment of the input media. The value is a string.|
| \*[OH_MD_KEY_GENRE](#oh_md_key_genre) | Defines the pointer to the genre of the input media. The value is a string.|
| \*[OH_MD_KEY_COPYRIGHT](#oh_md_key_copyright) | Defines the pointer to the copyright of the input media. The value is a string.|
| \*[OH_MD_KEY_LANGUAGE](#oh_md_key_language) | Defines the pointer to the language of the input media. The value is a string.|
| \*[OH_MD_KEY_DESCRIPTION](#oh_md_key_description) | Defines the pointer to the description of the input media. The value is a string.|
| \*[OH_MD_KEY_LYRICS](#oh_md_key_lyrics) | Defines the pointer to the lyrics of the input media. The value is a string.|
| \*[OH_MD_KEY_TRACK_COUNT](#oh_md_key_track_count) | Defines the pointer to the track count of the input media. The value type is uint32_t.|
| [OH_AVCodecBufferAttr::pts](_o_h___a_v_codec_buffer_attr.md#pts) | Defines the display timestamp of the buffer, in microseconds.|
| [OH_AVCodecBufferAttr::size](_o_h___a_v_codec_buffer_attr.md#size) | Defines the size of data contained in the buffer, in bytes.|
| [OH_AVCodecBufferAttr::offset](_o_h___a_v_codec_buffer_attr.md#offset) | Defines the offset of valid data in the buffer.|
| [OH_AVCodecBufferAttr::flags](_o_h___a_v_codec_buffer_attr.md#flags) | Defines the flags of the buffer. It is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags).|
| [OH_AVCodecAsyncCallback::onError](_o_h___a_v_codec_async_callback.md#onerror) | Defines the callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
| [OH_AVCodecAsyncCallback::onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Defines the callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
| [OH_AVCodecAsyncCallback::onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).|
| [OH_AVCodecAsyncCallback::onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | Defines the pointer to the Multipurpose Internet Mail Extension (MIME) type for AVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | Defines the pointer to the MIME type for AAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](#oh_avcodec_mimetype_video_mpeg4) | Defines the pointer to the MIME type for MPEG4 video codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_HEVC](#oh_avcodec_mimetype_video_hevc) | Defines the pointer to the MIME type for HEVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_MPEG](#oh_avcodec_mimetype_audio_mpeg) | Defines the pointer to the MIME type for MPEG audio codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_JPG](#oh_avcodec_mimetype_image_jpg) | Defines the pointer to the MIME type for JPG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_PNG](#oh_avcodec_mimetype_image_png) | Defines the pointer to the MIME type for PNG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_BMP](#oh_avcodec_mimetype_image_bmp) | Defines the pointer to the MIME type for BMP image codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_FLAC](#oh_avcodec_mimetype_audio_flac) | Defines the pointer to the MIME type for FLAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](#oh_avcodec_mimetype_audio_vorbis) | Defines the pointer to the MIME type for VORBIS audio codec.|
| \*[OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp) | Defines the pointer to the timestamp in the extra data of the surface. The value type is int64.|
| \*[OH_ED_KEY_EOS](#oh_ed_key_eos) | Defines the pointer to the end of stream (EOS) in the extra data of the surface. The value type is Boolean.|
| \*[OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type) | Defines the pointer to a container for storing media descriptions.|
| \*[OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime) | Define the pointer to the MIME type of codec. The value is a string.|
| \*[OH_MD_KEY_DURATION](#oh_md_key_duration) | Defines the pointer to the duration. The value type is int64_t.|
| \*[OH_MD_KEY_BITRATE](#oh_md_key_bitrate) | Defines the pointer to the bit rate. The value type is uint32_t.|
| \*[OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size) | Defines the pointer to the maximum input size. The value type is uint32_t.|
| \*[OH_MD_KEY_WIDTH](#oh_md_key_width) | Defines the pointer to the video width. The value type is uint32_t.|
| \*[OH_MD_KEY_HEIGHT](#oh_md_key_height) | Defines the pointer to the video height. The value type is uint32_t.|
| \*[OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format) | Defines the pointer to the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
| \*[OH_MD_KEY_RANGE_FLAG](#oh_md_key_range_flag) | Defines the pointer to the video YUV value range flag. The value type is Boolean.|
| \*[OH_MD_KEY_COLOR_PRIMARIES](#oh_md_key_color_primaries) | Defines the pointer to the primary color of the video. The value type is int32_t.|
| \*[OH_MD_KEY_TRANSFER_CHARACTERISTICS](#oh_md_key_transfer_characteristics) | Defines the pointer to the video transfer characteristics. The value type is int32_t.|
| \*[OH_MD_KEY_MATRIX_COEFFICIENTS](#oh_md_key_matrix_coefficients) | Defines the pointer to the video matrix coefficient. The value type is int32_t.|
| \*[OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Defines the pointer to the original audio format. The value type is uint32_t.|
| \*[OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate) | Defines the pointer to the video frame rate. The value is a double-precision floating point number.|
| \*[OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Defines the pointer to the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode).|
| \*[OH_MD_KEY_PROFILE](#oh_md_key_profile) | Defines the pointer to the encoding template. The value is a number. For details, see [OH_AVCProfile](#oh_avcprofile), [OH_AACProfile](#oh_aacprofile), or [OH_HEVCProfile](#oh_hevcprofile).|
| \*[OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count) | Defines the pointer to the number of audio channels. The value type is uint32_t.|
| \*[OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate) | Defines the pointer to the audio sampling rate. The value type is uint32_t.|
| \*[OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval) | Defines the pointer to the key frame interval, in milliseconds. The value type is int32_t.|
| \*[OH_MD_KEY_ROTATION](#oh_md_key_rotation) | Defines the pointer to the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0.|
| \*[OH_MD_KEY_CODEC_CONFIG](#oh_md_key_codec_config) | Defines the pointer to the codec-specific data. The value type is uint8_t\*.|
| \*[OH_MD_KEY_REQUEST_I_FRAME](#oh_md_key_request_i_frame) | Defines the pointer to the request for immediate encoding of I-frames. The value type is Boolean.|
| \*[OH_MD_KEY_QUALITY](#oh_md_key_quality) | Defines the pointer to the required encoding quality. The value type is uint32_t. This key applies only to encoders configured in constant quality mode.|
| \*[OH_MD_KEY_CHANNEL_LAYOUT](#oh_md_key_channel_layout) | Defines the pointer to the required encoding channel layout. The value type is int64_t. This key applies only to encoders.|
| \*[OH_MD_KEY_BITS_PER_CODED_SAMPLE](#oh_md_key_bits_per_coded_sample) | Defines the pointer to the number of bits for each coded sample. The value type is uint32_t. This key applies to FLAC encoders. For details, see **\@OH_BitsPerSample**.|
| \*[OH_MD_KEY_AAC_IS_ADTS](#oh_md_key_aac_is_adts) | Defines the pointer to the AAC format. The value type is uint32_t. This key applies to AAC decoders.|
| \*[OH_MD_KEY_SBR](#oh_md_key_sbr) | Defines the pointer to the AAC SBR format. The value type is uint32_t. This key applies to AAC encoders.|
| \*[OH_MD_KEY_COMPLIANCE_LEVEL](#oh_md_key_compliance_level) | Defines the pointer to the FLAC compliance level. The value type is int32_t.|
| \*[OH_MD_KEY_IDENTIFICATION_HEADER](#oh_md_key_identification_header) | Defines the pointer to the VORBIS identification header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_SETUP_HEADER](#oh_md_key_setup_header) | Defines the pointer to the VORBIS setup header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_TITLE](#oh_md_key_title) | Defines the pointer to the title of the input media. The value is a string.|
| \*[OH_MD_KEY_ARTIST](#oh_md_key_artist) | Defines the pointer to the artist of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM](#oh_md_key_album) | Defines the pointer to the album of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM_ARTIST](#oh_md_key_album_artist) | Defines the pointer to the album_artist of the input media. The value is a string.|
| \*[OH_MD_KEY_DATE](#oh_md_key_date) | Defines the pointer to the date of the input media. The value is a string.|
| \*[OH_MD_KEY_COMMENT](#oh_md_key_comment) | Defines the pointer to the comment of the input media. The value is a string.|
| \*[OH_MD_KEY_GENRE](#oh_md_key_genre) | Defines the pointer to the genre of the input media. The value is a string.|
| \*[OH_MD_KEY_COPYRIGHT](#oh_md_key_copyright) | Defines the pointer to the copyright of the input media. The value is a string.|
| \*[OH_MD_KEY_LANGUAGE](#oh_md_key_language) | Defines the pointer to the language of the input media. The value is a string.|
| \*[OH_MD_KEY_DESCRIPTION](#oh_md_key_description) | Defines the pointer to the description of the input media. The value is a string.|
| \*[OH_MD_KEY_LYRICS](#oh_md_key_lyrics) | Defines the pointer to the lyrics of the input media. The value is a string.|
| \*[OH_MD_KEY_TRACK_COUNT](#oh_md_key_track_count) | Defines the pointer to the track count of the input media. The value type is uint32_t.|
## Type Description
...
...
@@ -143,9 +143,9 @@ The **CodecBase** module provides the common structs, character constants, and e
### OH_AACProfile
```
typedef enum OH_AACProfileOH_AACProfile
typedef enum OH_AACProfileOH_AACProfile
```
**Description**
...
...
@@ -157,9 +157,9 @@ Defines an enum that enumerates the AAC profiles.
@@ -170,19 +170,19 @@ Defines a struct for all the asynchronous callback function pointers of an **OH_
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| [onError](_o_h___a_v_codec_async_callback.md#onerror) | Callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
| [onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
| [onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).|
| [onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedoutputdata) | Callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).|
| [onError](_o_h___a_v_codec_async_callback.md#onerror) | Callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
| [onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
| [onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).|
| [onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedoutputdata) | Callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).|
@@ -266,20 +266,20 @@ Defines the pointer to the function that is called when new output data is gener
**Parameters**
| Name| Description|
| Name| Description|
| -------- | -------- |
| codec | Pointer to an **OH_AVCodec** instance.|
| index | Index of the new output buffer.|
| data | Pointer to the data filled in the new output buffer.|
| attr | Pointer to the description information about the new output buffer. For details, see [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md).|
| userData | Pointer to user-specific data.|
| codec | Pointer to an **OH_AVCodec** instance.|
| index | Index of the new output buffer.|
| data | Pointer to the data filled in the new output buffer.|
| attr | Pointer to the description information about the new output buffer. For details, see [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md).|
@@ -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
@@ -17,98 +17,98 @@ The **OHAudio** module provides native APIs of the audio module.
### Files
| Name| Description|
| Name| Description|
| -------- | -------- |
| [native_audiocapturer.h](native__audiocapturer_8h.md) | Declares the functions related to an audio capturer.<br>**File to include**: <ohaudio/native_audiocapturer.h><br>**Library**: libohaudio.so|
| [native_audiorenderer.h](native__audiorenderer_8h.md) | Declares the functions related to an audio renderer.<br>**File to include**: <ohaudio/native_audiorenderer.h><br>**Library**: libohaudio.so|
| [native_audiostream_base.h](native__audiostream__base_8h.md) | Declares the basic data structure of **OHAudio**.<br>**File to include**: <ohaudio/native_audiostream_base.h><br>**Library**: libohaudio.so|
| [native_audiostreambuilder.h](native__audiostreambuilder_8h.md) | Declares the functions related to the audio stream builder.<br>**File to include**: <ohaudio/native_audiostreambuilder.h><br>**Library**: libohaudio.so|
| [native_audiocapturer.h](native__audiocapturer_8h.md) | Declares the functions related to an audio capturer.<br>**File to include**: <ohaudio/native_audiocapturer.h><br>**Library**: libohaudio.so|
| [native_audiorenderer.h](native__audiorenderer_8h.md) | Declares the functions related to an audio renderer.<br>**File to include**: <ohaudio/native_audiorenderer.h><br>**Library**: libohaudio.so|
| [native_audiostream_base.h](native__audiostream__base_8h.md) | Declares the basic data structure of **OHAudio**.<br>**File to include**: <ohaudio/native_audiostream_base.h><br>**Library**: libohaudio.so|
| [native_audiostreambuilder.h](native__audiostreambuilder_8h.md) | Declares the functions related to the audio stream builder.<br>**File to include**: <ohaudio/native_audiostreambuilder.h><br>**Library**: libohaudio.so|
### Structs
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AudioRenderer_Callbacks_Struct](_o_h___audio_renderer___callbacks___struct.md) | Defines a pointer to the callback functions related to an audio renderer.|
| [OH_AudioCapturer_Callbacks_Struct](_o_h___audio_capturer___callbacks___struct.md) | Defines a pointer to the callback functions related to an audio capturer.|
| [OH_AudioRenderer_Callbacks_Struct](_o_h___audio_renderer___callbacks___struct.md) | Defines a pointer to the callback functions related to an audio renderer.|
| [OH_AudioCapturer_Callbacks_Struct](_o_h___audio_capturer___callbacks___struct.md) | Defines a pointer to the callback functions related to an audio capturer.|
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AudioStreamBuilder](#oh_audiostreambuilder) | Defines an audio stream builder.|
| [OH_AudioRenderer](#oh_audiorenderer) | Defines an audio renderer.|
| [OH_AudioCapturer](#oh_audiocapturer) | Defines an audio capturer.|
| [OH_AudioRenderer_Callbacks](#oh_audiorenderer_callbacks) | Defines a pointer to the callback functions related to an audio renderer.|
| [OH_AudioCapturer_Callbacks](#oh_audiocapturer_callbacks) | Defines a pointer to the callback functions related to an audio capturer.|
| [OH_AudioStreamBuilder](#oh_audiostreambuilder) | Defines an audio stream builder.|
| [OH_AudioRenderer](#oh_audiorenderer) | Defines an audio renderer.|
| [OH_AudioCapturer](#oh_audiocapturer) | Defines an audio capturer.|
| [OH_AudioRenderer_Callbacks](#oh_audiorenderer_callbacks) | Defines a pointer to the callback functions related to an audio renderer.|
| [OH_AudioCapturer_Callbacks](#oh_audiocapturer_callbacks) | Defines a pointer to the callback functions related to an audio capturer.|
| [OH_AudioCapturer_GetCurrentState](#oh_audiocapturer_getcurrentstate)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_State](#oh_audiostream_state)\*state) | Obtains the state of an audio stream.|
| [OH_AudioCapturer_GetLatencyMode](#oh_audiocapturer_getlatencymode)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode)\*latencyMode) | Obtains the latency mode of an audio stream.|
| [OH_AudioCapturer_GetStreamId](#oh_audiocapturer_getstreamid)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, uint32_t \*streamId) | Obtains the stream ID of an audio stream.|
| [OH_AudioCapturer_GetSamplingRate](#oh_audiocapturer_getsamplingrate)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, int32_t \*rate) | Obtains the sampling rate of an audio stream.|
| [OH_AudioCapturer_GetChannelCount](#oh_audiocapturer_getchannelcount)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, int32_t \*channelCount) | Obtains the number of channels for an audio stream.|
| [OH_AudioCapturer_GetSampleFormat](#oh_audiocapturer_getsampleformat)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat)\*sampleFormat) | Obtains the sampling format of an audio stream.|
| [OH_AudioCapturer_GetEncodingType](#oh_audiocapturer_getencodingtype)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype)\*encodingType) | Obtains the encoding type of an audio stream.|
| [OH_AudioCapturer_GetCapturerInfo](#oh_audiocapturer_getcapturerinfo)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_SourceType](#oh_audiostream_sourcetype)\*sourceType) | Obtains the usage scenario of an audio renderer.|
| [OH_AudioRenderer_Release](#oh_audiorenderer_release)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Releases an audio renderer.|
| [OH_AudioRenderer_Start](#oh_audiorenderer_start)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Starts an audio renderer.|
| [OH_AudioRenderer_Pause](#oh_audiorenderer_pause)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Pauses an audio renderer.|
| [OH_AudioRenderer_Stop](#oh_audiorenderer_stop)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Stops an audio renderer.|
| [OH_AudioRenderer_Flush](#oh_audiorenderer_flush)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Flushes written audio data.|
| [OH_AudioRenderer_GetCurrentState](#oh_audiorenderer_getcurrentstate)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_State](#oh_audiostream_state)\*state) | Obtains the state of an audio stream.|
| [OH_AudioRenderer_GetSamplingRate](#oh_audiorenderer_getsamplingrate)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, int32_t \*rate) | Obtains the sampling rate of an audio stream.|
| [OH_AudioRenderer_GetStreamId](#oh_audiorenderer_getstreamid)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, uint32_t \*streamId) | Obtains the stream ID of an audio stream.|
| [OH_AudioRenderer_GetChannelCount](#oh_audiorenderer_getchannelcount)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, int32_t \*channelCount) | Obtains the number of channels for an audio stream.|
| [OH_AudioRenderer_GetSampleFormat](#oh_audiorenderer_getsampleformat)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat)\*sampleFormat) | Obtains the sampling format of an audio stream.|
| [OH_AudioRenderer_GetLatencyMode](#oh_audiorenderer_getlatencymode)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode)\*latencyMode) | Obtains the latency mode of an audio stream.|
| [OH_AudioRenderer_GetRendererInfo](#oh_audiorenderer_getrendererinfo)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_Usage](#oh_audiostream_usage)\*usage) | Obtains the usage scenario of an audio renderer.|
| [OH_AudioRenderer_GetEncodingType](#oh_audiorenderer_getencodingtype)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype)\*encodingType) | Obtains the encoding type of an audio stream.|
| [OH_AudioStreamBuilder_Create](#oh_audiostreambuilder_create)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*\*builder, [OH_AudioStream_Type](#oh_audiostream_type) type) | Creates an audio stream builder, which can be an audio renderer or capturer.|
| [OH_AudioStreamBuilder_Destroy](#oh_audiostreambuilder_destroy)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder) | Destroys an audio stream builder.|
| [OH_AudioStreamBuilder_SetSamplingRate](#oh_audiostreambuilder_setsamplingrate)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, int32_t rate) | Sets the sampling rate of an audio stream.|
| [OH_AudioStreamBuilder_SetChannelCount](#oh_audiostreambuilder_setchannelcount)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, int32_t channelCount) | Sets the number of channels for an audio stream.|
| [OH_AudioStreamBuilder_SetSampleFormat](#oh_audiostreambuilder_setsampleformat)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat) format) | Sets the sampling format of an audio stream.|
| [OH_AudioStreamBuilder_SetEncodingType](#oh_audiostreambuilder_setencodingtype)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype) encodingType) | Sets the encoding type of an audio stream.|
| [OH_AudioStreamBuilder_SetLatencyMode](#oh_audiostreambuilder_setlatencymode)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode) latencyMode) | Sets the latency mode of an audio stream.|
| [OH_AudioStreamBuilder_SetRendererInfo](#oh_audiostreambuilder_setrendererinfo)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_Usage](#oh_audiostream_usage) usage) | Sets the usage scenario of an audio renderer.|
| [OH_AudioStreamBuilder_SetCapturerInfo](#oh_audiostreambuilder_setcapturerinfo)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_SourceType](#oh_audiostream_sourcetype) sourceType) | Sets the usage scenario of an audio capturer.|
| [OH_AudioStreamBuilder_SetRendererCallback](#oh_audiostreambuilder_setrenderercallback)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioRenderer_Callbacks](#oh_audiorenderer_callbacks) callbacks, void \*userData) | Sets callbacks for an audio renderer.|
| [OH_AudioStreamBuilder_SetCapturerCallback](#oh_audiostreambuilder_setcapturercallback)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioCapturer_Callbacks](#oh_audiocapturer_callbacks) callbacks, void \*userData) | Sets callbacks for an audio capturer.|
| [OH_AudioStreamBuilder_GenerateRenderer](#oh_audiostreambuilder_generaterenderer)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioRenderer](#oh_audiorenderer)\*\*audioRenderer) | Creates an audio renderer instance.|
| [OH_AudioStreamBuilder_GenerateCapturer](#oh_audiostreambuilder_generatecapturer)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioCapturer](#oh_audiocapturer)\*\*audioCapturer) | Creates an audio capturer instance.|
| [OH_AudioCapturer_Release](#oh_audiocapturer_release)([OH_AudioCapturer](#oh_audiocapturer)\*capturer) | Releases an audio capturer.|
| [OH_AudioCapturer_Start](#oh_audiocapturer_start)([OH_AudioCapturer](#oh_audiocapturer)\*capturer) | Starts an audio capturer.|
| [OH_AudioCapturer_Pause](#oh_audiocapturer_pause)([OH_AudioCapturer](#oh_audiocapturer)\*capturer) | Pauses an audio capturer.|
| [OH_AudioCapturer_Stop](#oh_audiocapturer_stop)([OH_AudioCapturer](#oh_audiocapturer)\*capturer) | Stops an audio capturer.|
| [OH_AudioCapturer_GetCurrentState](#oh_audiocapturer_getcurrentstate)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_State](#oh_audiostream_state)\*state) | Obtains the state of an audio stream.|
| [OH_AudioCapturer_GetLatencyMode](#oh_audiocapturer_getlatencymode)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode)\*latencyMode) | Obtains the latency mode of an audio stream.|
| [OH_AudioCapturer_GetStreamId](#oh_audiocapturer_getstreamid)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, uint32_t \*streamId) | Obtains the stream ID of an audio stream.|
| [OH_AudioCapturer_GetSamplingRate](#oh_audiocapturer_getsamplingrate)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, int32_t \*rate) | Obtains the sampling rate of an audio stream.|
| [OH_AudioCapturer_GetChannelCount](#oh_audiocapturer_getchannelcount)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, int32_t \*channelCount) | Obtains the number of channels for an audio stream.|
| [OH_AudioCapturer_GetSampleFormat](#oh_audiocapturer_getsampleformat)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat)\*sampleFormat) | Obtains the sampling format of an audio stream.|
| [OH_AudioCapturer_GetEncodingType](#oh_audiocapturer_getencodingtype)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype)\*encodingType) | Obtains the encoding type of an audio stream.|
| [OH_AudioCapturer_GetCapturerInfo](#oh_audiocapturer_getcapturerinfo)([OH_AudioCapturer](#oh_audiocapturer)\*capturer, [OH_AudioStream_SourceType](#oh_audiostream_sourcetype)\*sourceType) | Obtains the usage scenario of an audio renderer.|
| [OH_AudioRenderer_Release](#oh_audiorenderer_release)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Releases an audio renderer.|
| [OH_AudioRenderer_Start](#oh_audiorenderer_start)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Starts an audio renderer.|
| [OH_AudioRenderer_Pause](#oh_audiorenderer_pause)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Pauses an audio renderer.|
| [OH_AudioRenderer_Stop](#oh_audiorenderer_stop)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Stops an audio renderer.|
| [OH_AudioRenderer_Flush](#oh_audiorenderer_flush)([OH_AudioRenderer](#oh_audiorenderer)\*renderer) | Flushes written audio data.|
| [OH_AudioRenderer_GetCurrentState](#oh_audiorenderer_getcurrentstate)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_State](#oh_audiostream_state)\*state) | Obtains the state of an audio stream.|
| [OH_AudioRenderer_GetSamplingRate](#oh_audiorenderer_getsamplingrate)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, int32_t \*rate) | Obtains the sampling rate of an audio stream.|
| [OH_AudioRenderer_GetStreamId](#oh_audiorenderer_getstreamid)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, uint32_t \*streamId) | Obtains the stream ID of an audio stream.|
| [OH_AudioRenderer_GetChannelCount](#oh_audiorenderer_getchannelcount)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, int32_t \*channelCount) | Obtains the number of channels for an audio stream.|
| [OH_AudioRenderer_GetSampleFormat](#oh_audiorenderer_getsampleformat)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat)\*sampleFormat) | Obtains the sampling format of an audio stream.|
| [OH_AudioRenderer_GetLatencyMode](#oh_audiorenderer_getlatencymode)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode)\*latencyMode) | Obtains the latency mode of an audio stream.|
| [OH_AudioRenderer_GetRendererInfo](#oh_audiorenderer_getrendererinfo)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_Usage](#oh_audiostream_usage)\*usage) | Obtains the usage scenario of an audio renderer.|
| [OH_AudioRenderer_GetEncodingType](#oh_audiorenderer_getencodingtype)([OH_AudioRenderer](#oh_audiorenderer)\*renderer, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype)\*encodingType) | Obtains the encoding type of an audio stream.|
| [OH_AudioStreamBuilder_Create](#oh_audiostreambuilder_create)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*\*builder, [OH_AudioStream_Type](#oh_audiostream_type) type) | Creates an audio stream builder, which can be an audio renderer or capturer.|
| [OH_AudioStreamBuilder_Destroy](#oh_audiostreambuilder_destroy)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder) | Destroys an audio stream builder.|
| [OH_AudioStreamBuilder_SetSamplingRate](#oh_audiostreambuilder_setsamplingrate)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, int32_t rate) | Sets the sampling rate of an audio stream.|
| [OH_AudioStreamBuilder_SetChannelCount](#oh_audiostreambuilder_setchannelcount)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, int32_t channelCount) | Sets the number of channels for an audio stream.|
| [OH_AudioStreamBuilder_SetSampleFormat](#oh_audiostreambuilder_setsampleformat)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_SampleFormat](#oh_audiostream_sampleformat) format) | Sets the sampling format of an audio stream.|
| [OH_AudioStreamBuilder_SetEncodingType](#oh_audiostreambuilder_setencodingtype)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_EncodingType](#oh_audiostream_encodingtype) encodingType) | Sets the encoding type of an audio stream.|
| [OH_AudioStreamBuilder_SetLatencyMode](#oh_audiostreambuilder_setlatencymode)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_LatencyMode](#oh_audiostream_latencymode) latencyMode) | Sets the latency mode of an audio stream.|
| [OH_AudioStreamBuilder_SetRendererInfo](#oh_audiostreambuilder_setrendererinfo)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_Usage](#oh_audiostream_usage) usage) | Sets the usage scenario of an audio renderer.|
| [OH_AudioStreamBuilder_SetCapturerInfo](#oh_audiostreambuilder_setcapturerinfo)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioStream_SourceType](#oh_audiostream_sourcetype) sourceType) | Sets the usage scenario of an audio capturer.|
| [OH_AudioStreamBuilder_SetRendererCallback](#oh_audiostreambuilder_setrenderercallback)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioRenderer_Callbacks](#oh_audiorenderer_callbacks) callbacks, void \*userData) | Sets callbacks for an audio renderer.|
| [OH_AudioStreamBuilder_SetCapturerCallback](#oh_audiostreambuilder_setcapturercallback)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioCapturer_Callbacks](#oh_audiocapturer_callbacks) callbacks, void \*userData) | Sets callbacks for an audio capturer.|
| [OH_AudioStreamBuilder_GenerateRenderer](#oh_audiostreambuilder_generaterenderer)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioRenderer](#oh_audiorenderer)\*\*audioRenderer) | Creates an audio renderer instance.|
| [OH_AudioStreamBuilder_GenerateCapturer](#oh_audiostreambuilder_generatecapturer)([OH_AudioStreamBuilder](#oh_audiostreambuilder)\*builder, [OH_AudioCapturer](#oh_audiocapturer)\*\*audioCapturer) | Creates an audio capturer instance.|
### Variables
| Name| Description|
| Name| Description|
| -------- | -------- |
| (\*[OH_AudioRenderer_Callbacks_Struct::OH_AudioRenderer_OnWriteData](#oh_audiorenderer_onwritedata) )([OH_AudioRenderer](#oh_audiorenderer)\*renderer, void \*userData, void \*buffer, int32_t lenth) | Defines a function pointer to the callback function used to write audio data.|
| (\*[OH_AudioCapturer_Callbacks_Struct::OH_AudioCapturer_OnReadData](#oh_audiocapturer_onreaddata) )([OH_AudioCapturer](#oh_audiocapturer)\*capturer, void \*userData, void \*buffer, int32_t lenth) | Defines a function pointer to the callback function used to read audio data.|
| (\*[OH_AudioRenderer_Callbacks_Struct::OH_AudioRenderer_OnWriteData](#oh_audiorenderer_onwritedata) )([OH_AudioRenderer](#oh_audiorenderer)\*renderer, void \*userData, void \*buffer, int32_t lenth) | Defines a function pointer to the callback function used to write audio data.|
| (\*[OH_AudioCapturer_Callbacks_Struct::OH_AudioCapturer_OnReadData](#oh_audiocapturer_onreaddata) )([OH_AudioCapturer](#oh_audiocapturer)\*capturer, void \*userData, void \*buffer, int32_t lenth) | Defines a function pointer to the callback function used to read audio data.|
## Type Description
...
...
@@ -116,7 +116,7 @@ The **OHAudio** module provides native APIs of the audio module.
@@ -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 )
@@ -17,47 +17,47 @@ The **VideoEncoder** module provides the functions for video encoding.
### Files
| 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
| 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
| 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
| Name| Description|
| Name| Description|
| -------- | -------- |
| \*[OH_VideoEncoder_CreateByMime](#oh_videoencoder_createbymime)(const char \*mime) | Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.|
| \*[OH_VideoEncoder_CreateByName](#oh_videoencoder_createbyname)(const char \*name) | Creates a video encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OH_VideoEncoder_Destroy](#oh_videoencoder_destroy)(OH_AVCodec\*codec) | Clears the internal resources of a video encoder and destroys the encoder instance.|
| [OH_VideoEncoder_SetCallback](#oh_videoencoder_setcallback)(OH_AVCodec\*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video encoder.|
| [OH_VideoEncoder_Configure](#oh_videoencoder_configure)(OH_AVCodec\*codec, OH_AVFormat \*format) | Configures a video encoder. Typically, you need to configure the description information about the video track to be encoded.|
| [OH_VideoEncoder_Prepare](#oh_videoencoder_prepare)(OH_AVCodec\*codec) | Prepares internal resources for a video encoder. This function must be called after **Configure**.|
| [OH_VideoEncoder_Start](#oh_videoencoder_start)(OH_AVCodec\*codec) | Starts a video encoder. This function can be called only after the encoder is prepared successfully.|
| [OH_VideoEncoder_Stop](#oh_videoencoder_stop)(OH_AVCodec\*codec) | Stops a video encoder.|
| [OH_VideoEncoder_Flush](#oh_videoencoder_flush)(OH_AVCodec\*codec) | Clears the input and output data in the internal buffer of a video encoder.|
| [OH_VideoEncoder_Reset](#oh_videoencoder_reset)(OH_AVCodec\*codec) | Resets a video encoder.|
| \*[OH_VideoEncoder_GetOutputDescription](#oh_videoencoder_getoutputdescription)(OH_AVCodec\*codec) | Obtains the description information about the output data of a video encoder. For details, see **OH_AVFormat**.|
| [OH_VideoEncoder_SetParameter](#oh_videoencoder_setparameter)(OH_AVCodec\*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video encoder.|
| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface)(OH_AVCodec\*codec, OHNativeWindow \*\*window) | Sets an input surface for a video encoder. This function must be called prior to **Prepare**.|
| [OH_VideoEncoder_FreeOutputData](#oh_videoencoder_freeoutputdata)(OH_AVCodec\*codec, uint32_t index) | Frees an output buffer of a video encoder.|
| [OH_VideoEncoder_NotifyEndOfStream](#oh_videoencoder_notifyendofstream)(OH_AVCodec\*codec) | Notifies a video encoder that input streams end. You are advised to use this function for notification.|
| [OH_VideoEncoder_PushInputData](#oh_videoencoder_pushinputdata)(OH_AVCodec\*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to a video encoder.|
| \*[OH_VideoEncoder_GetInputDescription](#oh_videoencoder_getinputdescription)(OH_AVCodec\*codec) | Obtains the description information received by the video encoder. This function must be called after **Configure**. For details, see **OH_AVFormat**.|
| [OH_VideoEncoder_IsValid](#oh_videoencoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether a video encoder instance is valid.|
| \*[OH_VideoEncoder_CreateByMime](#oh_videoencoder_createbymime)(const char \*mime) | Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.|
| \*[OH_VideoEncoder_CreateByName](#oh_videoencoder_createbyname)(const char \*name) | Creates a video encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OH_VideoEncoder_Destroy](#oh_videoencoder_destroy)(OH_AVCodec\*codec) | Clears the internal resources of a video encoder and destroys the encoder instance.|
| [OH_VideoEncoder_SetCallback](#oh_videoencoder_setcallback)(OH_AVCodec\*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video encoder.|
| [OH_VideoEncoder_Configure](#oh_videoencoder_configure)(OH_AVCodec\*codec, OH_AVFormat \*format) | Configures a video encoder. Typically, you need to configure the description information about the video track to be encoded.|
| [OH_VideoEncoder_Prepare](#oh_videoencoder_prepare)(OH_AVCodec\*codec) | Prepares internal resources for a video encoder. This function must be called after **Configure**.|
| [OH_VideoEncoder_Start](#oh_videoencoder_start)(OH_AVCodec\*codec) | Starts a video encoder. This function can be called only after the encoder is prepared successfully.|
| [OH_VideoEncoder_Stop](#oh_videoencoder_stop)(OH_AVCodec\*codec) | Stops a video encoder.|
| [OH_VideoEncoder_Flush](#oh_videoencoder_flush)(OH_AVCodec\*codec) | Clears the input and output data in the internal buffer of a video encoder.|
| [OH_VideoEncoder_Reset](#oh_videoencoder_reset)(OH_AVCodec\*codec) | Resets a video encoder.|
| \*[OH_VideoEncoder_GetOutputDescription](#oh_videoencoder_getoutputdescription)(OH_AVCodec\*codec) | Obtains the description information about the output data of a video encoder. For details, see **OH_AVFormat**.|
| [OH_VideoEncoder_SetParameter](#oh_videoencoder_setparameter)(OH_AVCodec\*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video encoder.|
| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface)(OH_AVCodec\*codec, OHNativeWindow \*\*window) | Sets an input surface for a video encoder. This function must be called prior to **Prepare**.|
| [OH_VideoEncoder_FreeOutputData](#oh_videoencoder_freeoutputdata)(OH_AVCodec\*codec, uint32_t index) | Frees an output buffer of a video encoder.|
| [OH_VideoEncoder_NotifyEndOfStream](#oh_videoencoder_notifyendofstream)(OH_AVCodec\*codec) | Notifies a video encoder that input streams end. You are advised to use this function for notification.|
| [OH_VideoEncoder_PushInputData](#oh_videoencoder_pushinputdata)(OH_AVCodec\*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to a video encoder.|
| \*[OH_VideoEncoder_GetInputDescription](#oh_videoencoder_getinputdescription)(OH_AVCodec\*codec) | Obtains the description information received by the video encoder. This function must be called after **Configure**. For details, see **OH_AVFormat**.|
| [OH_VideoEncoder_IsValid](#oh_videoencoder_isvalid)(OH_AVCodec\*codec, bool \*isValid) | Checks whether a video encoder instance is valid.|
## Type Description
...
...
@@ -65,9 +65,9 @@ The **VideoEncoder** module provides the functions for video encoding.
| [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.|
| [OH_AVCodecCategory](_a_v_capability.md#oh_avcodeccategory) {<br> **HARDWARE** = 0,<br> **SOFTWARE**<br>} | Enumerates the codec categories.|
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.|
| \*[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. |
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.|
| \*[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. |
@@ -19,115 +19,115 @@ The **native_avcodec_base.h** file declares the common structs, character consta
### Structs
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the description information about the buffer of an **OH_AVCodec** instance.|
| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the description information about the buffer of an **OH_AVCodec** instance.|
| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags) | Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** instance.|
| [OH_AVOutputFormat](_codec_base.md#oh_avoutputformat) | Defines an enum that enumerates the output file formats of a muxer.|
| [OH_AVCodecBufferAttr](_codec_base.md#oh_avcodecbufferattr) | Defines a struct for the description information about the buffer of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the pointer to the function that is called to report the new stream description when the output stream changes.|
| (\*[OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.|
| (\*[OH_AVCodecOnNewOutputData](_codec_base.md#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)\*attr, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.|
| [OH_AVCodecAsyncCallback](_codec_base.md#oh_avcodecasynccallback) | Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_MediaType](_codec_base.md#oh_mediatype) | Defines an enum that enumerates the media types.|
| [OH_AVCProfile](_codec_base.md#oh_avcprofile) | Defines an enum that enumerates the Advanced Video Coding (AVC) profiles.|
| [OH_HEVCProfile](_codec_base.md#oh_hevcprofile) | Defines an enum that enumerates the High Efficiency Video Coding (HEVC) profiles.|
| [OH_AACProfile](_codec_base.md#oh_aacprofile) | Defines an enum that enumerates the Advanced Audio Coding (AAC) profiles.|
| [OH_AVSeekMode](_codec_base.md#oh_avseekmode) | Defines an enum that enumerates the seek modes.|
| [OH_ColorPrimary](_codec_base.md#oh_colorprimary) | Defines an enum that enumerates the primary colors.|
| [OH_TransferCharacteristic](_codec_base.md#oh_transfercharacteristic) | Defines an enum that enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](_codec_base.md#oh_matrixcoefficient) | Defines an enum that enumerates the matrix coefficients.|
| [OH_BitsPerSample](_codec_base.md#oh_bitspersample) | Defines an enum that enumerates the number of audio bits for each coded sample.|
| [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags) | Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** instance.|
| [OH_AVOutputFormat](_codec_base.md#oh_avoutputformat) | Defines an enum that enumerates the output file formats of a muxer.|
| [OH_AVCodecBufferAttr](_codec_base.md#oh_avcodecbufferattr) | Defines a struct for the description information about the buffer of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.|
| (\*[OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the pointer to the function that is called to report the new stream description when the output stream changes.|
| (\*[OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.|
| (\*[OH_AVCodecOnNewOutputData](_codec_base.md#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)\*attr, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.|
| [OH_AVCodecAsyncCallback](_codec_base.md#oh_avcodecasynccallback) | Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
| [OH_MediaType](_codec_base.md#oh_mediatype) | Defines an enum that enumerates the media types.|
| [OH_AVCProfile](_codec_base.md#oh_avcprofile) | Defines an enum that enumerates the Advanced Video Coding (AVC) profiles.|
| [OH_HEVCProfile](_codec_base.md#oh_hevcprofile) | Defines an enum that enumerates the High Efficiency Video Coding (HEVC) profiles.|
| [OH_AACProfile](_codec_base.md#oh_aacprofile) | Defines an enum that enumerates the Advanced Audio Coding (AAC) profiles.|
| [OH_AVSeekMode](_codec_base.md#oh_avseekmode) | Defines an enum that enumerates the seek modes.|
| [OH_ColorPrimary](_codec_base.md#oh_colorprimary) | Defines an enum that enumerates the primary colors.|
| [OH_TransferCharacteristic](_codec_base.md#oh_transfercharacteristic) | Defines an enum that enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](_codec_base.md#oh_matrixcoefficient) | Defines an enum that enumerates the matrix coefficients.|
| [OH_BitsPerSample](_codec_base.md#oh_bitspersample) | Defines an enum that enumerates the number of audio bits for each coded sample.|
### Enums
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferFlags](_codec_base.md#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_AVOutputFormat](_codec_base.md#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_MediaType](_codec_base.md#oh_mediatype) {**MEDIA_TYPE_AUD** = 0, **MEDIA_TYPE_VID** = 1 } | Enumerates the media types.|
| [OH_BitsPerSample](_codec_base.md#oh_bitspersample) {<br> **SAMPLE_U8** = 0,<br> **SAMPLE_S16LE** = 1,<br> **SAMPLE_S24LE** = 2,<br> **SAMPLE_S32LE** = 3,<br> **SAMPLE_F32LE** = 4,i<br> **SAMPLE_U8P** = 5,<br> **SAMPLE_S16P** = 6,<br> **SAMPLE_S24P** = 7,<br> **SAMPLE_S32P** = 8,<br> **SAMPLE_F32P** = 9,<br> **INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.|
### Variables
| Name| Description|
| Name| Description|
| -------- | -------- |
| [OH_AVCodecBufferAttr::pts](_o_h___a_v_codec_buffer_attr.md#pts) | Defines the display timestamp of the buffer, in microseconds.|
| [OH_AVCodecBufferAttr::size](_o_h___a_v_codec_buffer_attr.md#size) | Defines the size of data contained in the buffer, in bytes.|
| [OH_AVCodecBufferAttr::offset](_o_h___a_v_codec_buffer_attr.md#offset) | Defines the offset of valid data in the buffer.|
| [OH_AVCodecBufferAttr::flags](_o_h___a_v_codec_buffer_attr.md#flags) | Defines the flags of the buffer. It is a combination of multiple [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags).|
| [OH_AVCodecAsyncCallback::onError](_o_h___a_v_codec_async_callback.md#onerror) | Defines the callback used to report a codec operation error. For details, see [OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror).|
| [OH_AVCodecAsyncCallback::onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Defines the callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged).|
| [OH_AVCodecAsyncCallback::onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata).|
| [OH_AVCodecAsyncCallback::onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](_codec_base.md#oh_avcodeconnewoutputdata).|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc) | Defines the pointer to the Multipurpose Internet Mail Extension (MIME) type for AVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac) | Defines the pointer to the MIME type for AAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](_codec_base.md#oh_avcodec_mimetype_video_mpeg4) | Defines the pointer to the MIME type for MPEG4 video codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_HEVC](_codec_base.md#oh_avcodec_mimetype_video_hevc) | Defines the pointer to the MIME type for HEVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_MPEG](_codec_base.md#oh_avcodec_mimetype_audio_mpeg) | Defines the pointer to the MIME type for MPEG audio codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_JPG](_codec_base.md#oh_avcodec_mimetype_image_jpg) | Defines the pointer to the MIME type for JPG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_PNG](_codec_base.md#oh_avcodec_mimetype_image_png) | Defines the pointer to the MIME type for PNG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_BMP](_codec_base.md#oh_avcodec_mimetype_image_bmp) | Defines the pointer to the MIME type for BMP image codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_FLAC](_codec_base.md#oh_avcodec_mimetype_audio_flac) | Defines the pointer to the MIME type for FLAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](_codec_base.md#oh_avcodec_mimetype_audio_vorbis) | Defines the pointer to the MIME type for VORBIS audio codec.|
| \*[OH_ED_KEY_TIME_STAMP](_codec_base.md#oh_ed_key_time_stamp) | Defines the pointer to the timestamp in the extra data of the surface. The value type is int64.|
| \*[OH_ED_KEY_EOS](_codec_base.md#oh_ed_key_eos) | Defines the pointer to the end of stream (EOS) in the extra data of the surface. The value type is Boolean.|
| \*[OH_MD_KEY_TRACK_TYPE](_codec_base.md#oh_md_key_track_type) | Defines the pointer to a container for storing media descriptions.|
| \*[OH_MD_KEY_CODEC_MIME](_codec_base.md#oh_md_key_codec_mime) | Define the pointer to the MIME type of codec. The value is a string.|
| \*[OH_MD_KEY_DURATION](_codec_base.md#oh_md_key_duration) | Defines the pointer to the duration. The value type is int64_t.|
| \*[OH_MD_KEY_BITRATE](_codec_base.md#oh_md_key_bitrate) | Defines the pointer to the bit rate. The value type is uint32_t.|
| \*[OH_MD_KEY_MAX_INPUT_SIZE](_codec_base.md#oh_md_key_max_input_size) | Defines the pointer to the maximum input size. The value type is uint32_t.|
| \*[OH_MD_KEY_WIDTH](_codec_base.md#oh_md_key_width) | Defines the pointer to the video width. The value type is uint32_t.|
| \*[OH_MD_KEY_HEIGHT](_codec_base.md#oh_md_key_height) | Defines the pointer to the video height. The value type is uint32_t.|
| \*[OH_MD_KEY_PIXEL_FORMAT](_codec_base.md#oh_md_key_pixel_format) | Defines the pointer to the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
| \*[OH_MD_KEY_RANGE_FLAG](_codec_base.md#oh_md_key_range_flag) | Defines the pointer to the video YUV value range flag. The value type is Boolean.|
| \*[OH_MD_KEY_COLOR_PRIMARIES](_codec_base.md#oh_md_key_color_primaries) | Defines the pointer to the primary color of the video. The value type is int32_t.|
| \*[OH_MD_KEY_TRANSFER_CHARACTERISTICS](_codec_base.md#oh_md_key_transfer_characteristics) | Defines the pointer to the video transfer characteristics. The value type is int32_t.|
| \*[OH_MD_KEY_MATRIX_COEFFICIENTS](_codec_base.md#oh_md_key_matrix_coefficients) | Defines the pointer to the video matrix coefficient. The value type is int32_t.|
| \*[OH_MD_KEY_AUDIO_SAMPLE_FORMAT](_codec_base.md#oh_md_key_audio_sample_format) | Defines the pointer to the original audio format. The value type is uint32_t.|
| \*[OH_MD_KEY_FRAME_RATE](_codec_base.md#oh_md_key_frame_rate) | Defines the pointer to the video frame rate. The value is a double-precision floating point number.|
| \*[OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](_codec_base.md#oh_md_key_video_encode_bitrate_mode) | Defines the pointer to the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode).|
| \*[OH_MD_KEY_PROFILE](_codec_base.md#oh_md_key_profile) | Defines the pointer to the encoding template. The value is a number. For details, see [OH_AVCProfile](_codec_base.md#oh_avcprofile), [OH_AACProfile](_codec_base.md#oh_aacprofile), or [CodecBase](_codec_base.md#oh_hevcprofile).|
| \*[OH_MD_KEY_AUD_CHANNEL_COUNT](_codec_base.md#oh_md_key_aud_channel_count) | Defines the pointer to the number of audio channels. The value type is uint32_t.|
| \*[OH_MD_KEY_AUD_SAMPLE_RATE](_codec_base.md#oh_md_key_aud_sample_rate) | Defines the pointer to the audio sampling rate. The value type is uint32_t.|
| \*[OH_MD_KEY_I_FRAME_INTERVAL](_codec_base.md#oh_md_key_i_frame_interval) | Defines the pointer to the key frame interval, in milliseconds. The value type is int32_t.|
| \*[OH_MD_KEY_ROTATION](_codec_base.md#oh_md_key_rotation) | Defines the pointer to the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0.|
| \*[OH_MD_KEY_CODEC_CONFIG](_codec_base.md#oh_md_key_codec_config) | Defines the pointer to the codec-specific data. The value type is uint8_t\*.|
| \*[OH_MD_KEY_REQUEST_I_FRAME](_codec_base.md#oh_md_key_request_i_frame) | Defines the pointer to the request for immediate encoding of I-frames. The value type is Boolean.|
| \*[OH_MD_KEY_QUALITY](_codec_base.md#oh_md_key_quality) | Defines the pointer to the required encoding quality. The value type is uint32_t. This key applies only to encoders configured in constant quality mode.|
| \*[OH_MD_KEY_CHANNEL_LAYOUT](_codec_base.md#oh_md_key_channel_layout) | Defines the pointer to the required encoding channel layout. The value type is int64_t. This key applies only to encoders.|
| \*[OH_MD_KEY_BITS_PER_CODED_SAMPLE](_codec_base.md#oh_md_key_bits_per_coded_sample) | Defines the pointer to the number of bits for each coded sample. The value type is uint32_t. This key applies to FLAC encoders.|
| \*[OH_MD_KEY_AAC_IS_ADTS](_codec_base.md#oh_md_key_aac_is_adts) | Defines the pointer to the AAC format. The value type is uint32_t. This key applies to AAC decoders.|
| \*[OH_MD_KEY_SBR](_codec_base.md#oh_md_key_sbr) | Defines the pointer to the AAC SBR format. The value type is uint32_t. This key applies to AAC encoders.|
| \*[OH_MD_KEY_COMPLIANCE_LEVEL](_codec_base.md#oh_md_key_compliance_level) | Defines the pointer to the FLAC compliance level. The value type is int32_t.|
| \*[OH_MD_KEY_IDENTIFICATION_HEADER](_codec_base.md#oh_md_key_identification_header) | Defines the pointer to the VORBIS identification header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_SETUP_HEADER](_codec_base.md#oh_md_key_setup_header) | Defines the pointer to the VORBIS setup header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_TITLE](_codec_base.md#oh_md_key_title) | Defines the pointer to the title of the input media. The value is a string.|
| \*[OH_MD_KEY_ARTIST](_codec_base.md#oh_md_key_artist) | Defines the pointer to the artist of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM](_codec_base.md#oh_md_key_album) | Defines the pointer to the album of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM_ARTIST](_codec_base.md#oh_md_key_album_artist) | Defines the pointer to the album_artist of the input media. The value is a string.|
| \*[OH_MD_KEY_DATE](_codec_base.md#oh_md_key_date) | Defines the pointer to the date of the input media. The value is a string.|
| \*[OH_MD_KEY_COMMENT](_codec_base.md#oh_md_key_comment) | Defines the pointer to the comment of the input media. The value is a string.|
| \*[OH_MD_KEY_GENRE](_codec_base.md#oh_md_key_genre) | Defines the pointer to the genre of the input media. The value is a string.|
| \*[OH_MD_KEY_COPYRIGHT](_codec_base.md#oh_md_key_copyright) | Defines the pointer to the copyright of the input media. The value is a string.|
| \*[OH_MD_KEY_LANGUAGE](_codec_base.md#oh_md_key_language) | Defines the pointer to the language of the input media. The value is a string.|
| \*[OH_MD_KEY_DESCRIPTION](_codec_base.md#oh_md_key_description) | Defines the pointer to the description of the input media. The value is a string.|
| \*[OH_MD_KEY_LYRICS](_codec_base.md#oh_md_key_lyrics) | Defines the pointer to the lyrics of the input media. The value is a string.|
| \*[OH_MD_KEY_TRACK_COUNT](_codec_base.md#oh_md_key_track_count) | Defines the pointer to the track count of the input media. The value type is uint32_t.|
| [OH_AVCodecBufferAttr::pts](_o_h___a_v_codec_buffer_attr.md#pts) | Defines the display timestamp of the buffer, in microseconds.|
| [OH_AVCodecBufferAttr::size](_o_h___a_v_codec_buffer_attr.md#size) | Defines the size of data contained in the buffer, in bytes.|
| [OH_AVCodecBufferAttr::offset](_o_h___a_v_codec_buffer_attr.md#offset) | Defines the offset of valid data in the buffer.|
| [OH_AVCodecBufferAttr::flags](_o_h___a_v_codec_buffer_attr.md#flags) | Defines the flags of the buffer. It is a combination of multiple [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags).|
| [OH_AVCodecAsyncCallback::onError](_o_h___a_v_codec_async_callback.md#onerror) | Defines the callback used to report a codec operation error. For details, see [OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror).|
| [OH_AVCodecAsyncCallback::onStreamChanged](_o_h___a_v_codec_async_callback.md#onstreamchanged) | Defines the callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged).|
| [OH_AVCodecAsyncCallback::onNeedInputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata).|
| [OH_AVCodecAsyncCallback::onNeedOutputData](_o_h___a_v_codec_async_callback.md#onneedinputdata) | Defines the callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](_codec_base.md#oh_avcodeconnewoutputdata).|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc) | Defines the pointer to the Multipurpose Internet Mail Extension (MIME) type for AVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac) | Defines the pointer to the MIME type for AAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](_codec_base.md#oh_avcodec_mimetype_video_mpeg4) | Defines the pointer to the MIME type for MPEG4 video codec.|
| \*[OH_AVCODEC_MIMETYPE_VIDEO_HEVC](_codec_base.md#oh_avcodec_mimetype_video_hevc) | Defines the pointer to the MIME type for HEVC video codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_MPEG](_codec_base.md#oh_avcodec_mimetype_audio_mpeg) | Defines the pointer to the MIME type for MPEG audio codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_JPG](_codec_base.md#oh_avcodec_mimetype_image_jpg) | Defines the pointer to the MIME type for JPG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_PNG](_codec_base.md#oh_avcodec_mimetype_image_png) | Defines the pointer to the MIME type for PNG image codec.|
| \*[OH_AVCODEC_MIMETYPE_IMAGE_BMP](_codec_base.md#oh_avcodec_mimetype_image_bmp) | Defines the pointer to the MIME type for BMP image codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_FLAC](_codec_base.md#oh_avcodec_mimetype_audio_flac) | Defines the pointer to the MIME type for FLAC audio codec.|
| \*[OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](_codec_base.md#oh_avcodec_mimetype_audio_vorbis) | Defines the pointer to the MIME type for VORBIS audio codec.|
| \*[OH_ED_KEY_TIME_STAMP](_codec_base.md#oh_ed_key_time_stamp) | Defines the pointer to the timestamp in the extra data of the surface. The value type is int64.|
| \*[OH_ED_KEY_EOS](_codec_base.md#oh_ed_key_eos) | Defines the pointer to the end of stream (EOS) in the extra data of the surface. The value type is Boolean.|
| \*[OH_MD_KEY_TRACK_TYPE](_codec_base.md#oh_md_key_track_type) | Defines the pointer to a container for storing media descriptions.|
| \*[OH_MD_KEY_CODEC_MIME](_codec_base.md#oh_md_key_codec_mime) | Define the pointer to the MIME type of codec. The value is a string.|
| \*[OH_MD_KEY_DURATION](_codec_base.md#oh_md_key_duration) | Defines the pointer to the duration. The value type is int64_t.|
| \*[OH_MD_KEY_BITRATE](_codec_base.md#oh_md_key_bitrate) | Defines the pointer to the bit rate. The value type is uint32_t.|
| \*[OH_MD_KEY_MAX_INPUT_SIZE](_codec_base.md#oh_md_key_max_input_size) | Defines the pointer to the maximum input size. The value type is uint32_t.|
| \*[OH_MD_KEY_WIDTH](_codec_base.md#oh_md_key_width) | Defines the pointer to the video width. The value type is uint32_t.|
| \*[OH_MD_KEY_HEIGHT](_codec_base.md#oh_md_key_height) | Defines the pointer to the video height. The value type is uint32_t.|
| \*[OH_MD_KEY_PIXEL_FORMAT](_codec_base.md#oh_md_key_pixel_format) | Defines the pointer to the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
| \*[OH_MD_KEY_RANGE_FLAG](_codec_base.md#oh_md_key_range_flag) | Defines the pointer to the video YUV value range flag. The value type is Boolean.|
| \*[OH_MD_KEY_COLOR_PRIMARIES](_codec_base.md#oh_md_key_color_primaries) | Defines the pointer to the primary color of the video. The value type is int32_t.|
| \*[OH_MD_KEY_TRANSFER_CHARACTERISTICS](_codec_base.md#oh_md_key_transfer_characteristics) | Defines the pointer to the video transfer characteristics. The value type is int32_t.|
| \*[OH_MD_KEY_MATRIX_COEFFICIENTS](_codec_base.md#oh_md_key_matrix_coefficients) | Defines the pointer to the video matrix coefficient. The value type is int32_t.|
| \*[OH_MD_KEY_AUDIO_SAMPLE_FORMAT](_codec_base.md#oh_md_key_audio_sample_format) | Defines the pointer to the original audio format. The value type is uint32_t.|
| \*[OH_MD_KEY_FRAME_RATE](_codec_base.md#oh_md_key_frame_rate) | Defines the pointer to the video frame rate. The value is a double-precision floating point number.|
| \*[OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](_codec_base.md#oh_md_key_video_encode_bitrate_mode) | Defines the pointer to the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode).|
| \*[OH_MD_KEY_PROFILE](_codec_base.md#oh_md_key_profile) | Defines the pointer to the encoding template. The value is a number. For details, see [OH_AVCProfile](_codec_base.md#oh_avcprofile), [OH_AACProfile](_codec_base.md#oh_aacprofile), or [CodecBase](_codec_base.md#oh_hevcprofile).|
| \*[OH_MD_KEY_AUD_CHANNEL_COUNT](_codec_base.md#oh_md_key_aud_channel_count) | Defines the pointer to the number of audio channels. The value type is uint32_t.|
| \*[OH_MD_KEY_AUD_SAMPLE_RATE](_codec_base.md#oh_md_key_aud_sample_rate) | Defines the pointer to the audio sampling rate. The value type is uint32_t.|
| \*[OH_MD_KEY_I_FRAME_INTERVAL](_codec_base.md#oh_md_key_i_frame_interval) | Defines the pointer to the key frame interval, in milliseconds. The value type is int32_t.|
| \*[OH_MD_KEY_ROTATION](_codec_base.md#oh_md_key_rotation) | Defines the pointer to the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0.|
| \*[OH_MD_KEY_CODEC_CONFIG](_codec_base.md#oh_md_key_codec_config) | Defines the pointer to the codec-specific data. The value type is uint8_t\*.|
| \*[OH_MD_KEY_REQUEST_I_FRAME](_codec_base.md#oh_md_key_request_i_frame) | Defines the pointer to the request for immediate encoding of I-frames. The value type is Boolean.|
| \*[OH_MD_KEY_QUALITY](_codec_base.md#oh_md_key_quality) | Defines the pointer to the required encoding quality. The value type is uint32_t. This key applies only to encoders configured in constant quality mode.|
| \*[OH_MD_KEY_CHANNEL_LAYOUT](_codec_base.md#oh_md_key_channel_layout) | Defines the pointer to the required encoding channel layout. The value type is int64_t. This key applies only to encoders.|
| \*[OH_MD_KEY_BITS_PER_CODED_SAMPLE](_codec_base.md#oh_md_key_bits_per_coded_sample) | Defines the pointer to the number of bits for each coded sample. The value type is uint32_t. This key applies to FLAC encoders.|
| \*[OH_MD_KEY_AAC_IS_ADTS](_codec_base.md#oh_md_key_aac_is_adts) | Defines the pointer to the AAC format. The value type is uint32_t. This key applies to AAC decoders.|
| \*[OH_MD_KEY_SBR](_codec_base.md#oh_md_key_sbr) | Defines the pointer to the AAC SBR format. The value type is uint32_t. This key applies to AAC encoders.|
| \*[OH_MD_KEY_COMPLIANCE_LEVEL](_codec_base.md#oh_md_key_compliance_level) | Defines the pointer to the FLAC compliance level. The value type is int32_t.|
| \*[OH_MD_KEY_IDENTIFICATION_HEADER](_codec_base.md#oh_md_key_identification_header) | Defines the pointer to the VORBIS identification header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_SETUP_HEADER](_codec_base.md#oh_md_key_setup_header) | Defines the pointer to the VORBIS setup header. The value type is uint8_t\*. This key applies only to VORBIS decoders.|
| \*[OH_MD_KEY_TITLE](_codec_base.md#oh_md_key_title) | Defines the pointer to the title of the input media. The value is a string.|
| \*[OH_MD_KEY_ARTIST](_codec_base.md#oh_md_key_artist) | Defines the pointer to the artist of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM](_codec_base.md#oh_md_key_album) | Defines the pointer to the album of the input media. The value is a string.|
| \*[OH_MD_KEY_ALBUM_ARTIST](_codec_base.md#oh_md_key_album_artist) | Defines the pointer to the album_artist of the input media. The value is a string.|
| \*[OH_MD_KEY_DATE](_codec_base.md#oh_md_key_date) | Defines the pointer to the date of the input media. The value is a string.|
| \*[OH_MD_KEY_COMMENT](_codec_base.md#oh_md_key_comment) | Defines the pointer to the comment of the input media. The value is a string.|
| \*[OH_MD_KEY_GENRE](_codec_base.md#oh_md_key_genre) | Defines the pointer to the genre of the input media. The value is a string.|
| \*[OH_MD_KEY_COPYRIGHT](_codec_base.md#oh_md_key_copyright) | Defines the pointer to the copyright of the input media. The value is a string.|
| \*[OH_MD_KEY_LANGUAGE](_codec_base.md#oh_md_key_language) | Defines the pointer to the language of the input media. The value is a string.|
| \*[OH_MD_KEY_DESCRIPTION](_codec_base.md#oh_md_key_description) | Defines the pointer to the description of the input media. The value is a string.|
| \*[OH_MD_KEY_LYRICS](_codec_base.md#oh_md_key_lyrics) | Defines the pointer to the lyrics of the input media. The value is a string.|
| \*[OH_MD_KEY_TRACK_COUNT](_codec_base.md#oh_md_key_track_count) | Defines the pointer to the track count of the input media. The value type is uint32_t.|
@@ -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> **CBR** = 0,<br> **VBR** = 1,<br> **CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|