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

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

Merge pull request !21429 from wusongqing/TR20706
...@@ -19,7 +19,7 @@ The **AVCapability** module provides functions for querying the codec capability ...@@ -19,7 +19,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avcapability.h](native__avcapability_8h.md) | Declares the native APIs used to query the codec capability.<br>File to include: \<multimedia/native_avcapability.h>| | [native_avcapability.h](native__avcapability_8h.md) | Declares the native APIs used to query the codec capability.<br>**File to include**: <multimedia/player_framework/native_avcapability.h><br>**Library**: libnative_media_codecbase.so|
### Structs ### Structs
...@@ -33,7 +33,7 @@ The **AVCapability** module provides functions for querying the codec capability ...@@ -33,7 +33,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_BitrateMode](#oh_bitratemode) | Defines an enum that enumerates the bit rate modes of an encoder. | | [OH_BitrateMode](#oh_bitratemode) | Defines an enum that enumerates the bit rate modes of an encoder.|
| [OH_AVRange](#oh_avrange) | Defines a struct for the value range, which contains the minimum value and maximum value.| | [OH_AVRange](#oh_avrange) | Defines a struct for the value range, which contains the minimum value and maximum value.|
| [OH_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.| | [OH_AVCodecCategory](#oh_avcodeccategory) | Defines an enum that enumerates the codec categories.|
...@@ -42,7 +42,7 @@ The **AVCapability** module provides functions for querying the codec capability ...@@ -42,7 +42,7 @@ The **AVCapability** module provides functions for querying the codec capability
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_BitrateMode](#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder. | | [OH_BitrateMode](#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder.|
| [OH_AVCodecCategory](#oh_avcodeccategory) { **HARDWARE** = 0, **SOFTWARE** } | Enumerates the codec categories.| | [OH_AVCodecCategory](#oh_avcodeccategory) { **HARDWARE** = 0, **SOFTWARE** } | Enumerates the codec categories.|
...@@ -92,7 +92,7 @@ The **AVCapability** module provides functions for querying the codec capability ...@@ -92,7 +92,7 @@ The **AVCapability** module provides functions for querying the codec capability
``` ```
typedef enum OH_AVCodecCategoryOH_AVCodecCategory typedef enum OH_AVCodecCategory OH_AVCodecCategory
``` ```
**Description** **Description**
...@@ -110,7 +110,7 @@ Defines an enum that enumerates the codec categories. ...@@ -110,7 +110,7 @@ Defines an enum that enumerates the codec categories.
``` ```
typedef struct OH_AVRangeOH_AVRange typedef struct OH_AVRange OH_AVRange
``` ```
**Description** **Description**
...@@ -128,7 +128,7 @@ Defines a struct for the value range, which contains the minimum value and maxim ...@@ -128,7 +128,7 @@ Defines a struct for the value range, which contains the minimum value and maxim
``` ```
typedef enum OH_BitrateModeOH_BitrateMode typedef enum OH_BitrateMode OH_BitrateMode
``` ```
**Description** **Description**
...@@ -154,7 +154,7 @@ enum OH_AVCodecCategory ...@@ -154,7 +154,7 @@ enum OH_AVCodecCategory
**Description** **Description**
Enumerates the codec categories. Defines an enum that enumerates the codec categories.
\@syscap SystemCapability.Multimedia.Media.CodecBase \@syscap SystemCapability.Multimedia.Media.CodecBase
...@@ -177,7 +177,7 @@ enum OH_BitrateMode ...@@ -177,7 +177,7 @@ enum OH_BitrateMode
**Description** **Description**
Enumerates the bit rate modes of an encoder. Defines an enum that enumerates the bit rate modes of an encoder.
\@syscap SystemCapability.Multimedia.Media.CodecBase \@syscap SystemCapability.Multimedia.Media.CodecBase
...@@ -199,7 +199,7 @@ Enumerates the bit rate modes of an encoder. ...@@ -199,7 +199,7 @@ Enumerates the bit rate modes of an encoder.
``` ```
bool OH_AVCapability_AreProfileAndLevelSupported (OH_AVCapability *capability, int32_t profile, int32_t level ) bool OH_AVCapability_AreProfileAndLevelSupported (OH_AVCapability *capability, int32_t profile, int32_t level)
``` ```
**Description** **Description**
...@@ -229,7 +229,7 @@ Returns **true** if the combination of the profile and level is supported; retur ...@@ -229,7 +229,7 @@ Returns **true** if the combination of the profile and level is supported; retur
``` ```
bool OH_AVCapability_AreVideoSizeAndFrameRateSupported (OH_AVCapability *capability, int32_t width, int32_t height, int32_t frameRate ) bool OH_AVCapability_AreVideoSizeAndFrameRateSupported (OH_AVCapability *capability, int32_t width, int32_t height, int32_t frameRate)
``` ```
**Description** **Description**
...@@ -260,7 +260,7 @@ Returns **true** if the combination of the video size and frame rate is supporte ...@@ -260,7 +260,7 @@ Returns **true** if the combination of the video size and frame rate is supporte
``` ```
OH_AVErrCode OH_AVCapability_GetAudioChannelCountRange (OH_AVCapability * capability, OH_AVRange * channelCountRange ) OH_AVErrCode OH_AVCapability_GetAudioChannelCountRange (OH_AVCapability *capability, OH_AVRange *channelCountRange)
``` ```
**Description** **Description**
...@@ -289,7 +289,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -289,7 +289,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates (OH_AVCapability * capability, const int32_t ** sampleRates, uint32_t * sampleRateNum ) OH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates (OH_AVCapability *capability, const int32_t **sampleRates, uint32_t *sampleRateNum)
``` ```
**Description** **Description**
...@@ -319,7 +319,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -319,7 +319,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetEncoderBitrateRange (OH_AVCapability * capability, OH_AVRange * bitrateRange ) OH_AVErrCode OH_AVCapability_GetEncoderBitrateRange (OH_AVCapability *capability, OH_AVRange *bitrateRange)
``` ```
**Description** **Description**
...@@ -348,7 +348,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -348,7 +348,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetEncoderComplexityRange (OH_AVCapability * capability, OH_AVRange * complexityRange ) OH_AVErrCode OH_AVCapability_GetEncoderComplexityRange (OH_AVCapability *capability, OH_AVRange *complexityRange)
``` ```
**Description** **Description**
...@@ -377,7 +377,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -377,7 +377,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetEncoderQualityRange (OH_AVCapability * capability, OH_AVRange * qualityRange ) OH_AVErrCode OH_AVCapability_GetEncoderQualityRange (OH_AVCapability *capability, OH_AVRange *qualityRange)
``` ```
**Description** **Description**
...@@ -406,7 +406,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -406,7 +406,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
int32_t OH_AVCapability_GetMaxSupportedInstances (OH_AVCapability * capability) int32_t OH_AVCapability_GetMaxSupportedInstances (OH_AVCapability *capability)
``` ```
**Description** **Description**
...@@ -434,7 +434,7 @@ Returns the maximum number of codec instances supported. ...@@ -434,7 +434,7 @@ Returns the maximum number of codec instances supported.
``` ```
const char* OH_AVCapability_GetName (OH_AVCapability * capability) const char* OH_AVCapability_GetName (OH_AVCapability *capability)
``` ```
**Description** **Description**
...@@ -462,7 +462,7 @@ Returns the codec name string. ...@@ -462,7 +462,7 @@ Returns the codec name string.
``` ```
OH_AVErrCode OH_AVCapability_GetSupportedLevelsForProfile (OH_AVCapability * capability, int32_t profile, const int32_t ** levels, uint32_t * levelNum ) OH_AVErrCode OH_AVCapability_GetSupportedLevelsForProfile (OH_AVCapability *capability, int32_t profile, const int32_t **levels, uint32_t *levelNum)
``` ```
**Description** **Description**
...@@ -493,7 +493,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -493,7 +493,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetSupportedProfiles (OH_AVCapability * capability, const int32_t ** profiles, uint32_t * profileNum ) OH_AVErrCode OH_AVCapability_GetSupportedProfiles (OH_AVCapability *capability, const int32_t **profiles, uint32_t *profileNum)
``` ```
**Description** **Description**
...@@ -523,7 +523,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -523,7 +523,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoFrameRateRange (OH_AVCapability * capability, OH_AVRange * frameRateRange ) OH_AVErrCode OH_AVCapability_GetVideoFrameRateRange (OH_AVCapability *capability, OH_AVRange *frameRateRange)
``` ```
**Description** **Description**
...@@ -552,7 +552,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -552,7 +552,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoFrameRateRangeForSize (OH_AVCapability * capability, int32_t width, int32_t height, OH_AVRange * frameRateRange ) OH_AVErrCode OH_AVCapability_GetVideoFrameRateRangeForSize (OH_AVCapability *capability, int32_t width, int32_t height, OH_AVRange *frameRateRange)
``` ```
**Description** **Description**
...@@ -583,7 +583,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -583,7 +583,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoHeightAlignment (OH_AVCapability * capability, int32_t * heightAlignment ) OH_AVErrCode OH_AVCapability_GetVideoHeightAlignment (OH_AVCapability *capability, int32_t *heightAlignment)
``` ```
**Description** **Description**
...@@ -612,7 +612,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -612,7 +612,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoHeightRange (OH_AVCapability * capability, OH_AVRange * heightRange ) OH_AVErrCode OH_AVCapability_GetVideoHeightRange (OH_AVCapability *capability, OH_AVRange *heightRange)
``` ```
**Description** **Description**
...@@ -641,7 +641,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -641,7 +641,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth (OH_AVCapability * capability, int32_t width, OH_AVRange * heightRange ) OH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth (OH_AVCapability *capability, int32_t width, OH_AVRange *heightRange)
``` ```
**Description** **Description**
...@@ -671,7 +671,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -671,7 +671,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoSupportedPixelFormats (OH_AVCapability * capability, const int32_t ** pixelFormats, uint32_t * pixelFormatNum ) OH_AVErrCode OH_AVCapability_GetVideoSupportedPixelFormats (OH_AVCapability *capability, const int32_t **pixelFormats, uint32_t *pixelFormatNum)
``` ```
**Description** **Description**
...@@ -701,7 +701,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -701,7 +701,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoWidthAlignment (OH_AVCapability * capability, int32_t * widthAlignment ) OH_AVErrCode OH_AVCapability_GetVideoWidthAlignment (OH_AVCapability *capability, int32_t *widthAlignment)
``` ```
**Description** **Description**
...@@ -730,7 +730,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -730,7 +730,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoWidthRange (OH_AVCapability * capability, OH_AVRange * widthRange ) OH_AVErrCode OH_AVCapability_GetVideoWidthRange (OH_AVCapability *capability, OH_AVRange *widthRange)
``` ```
**Description** **Description**
...@@ -759,7 +759,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -759,7 +759,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight (OH_AVCapability * capability, int32_t height, OH_AVRange * widthRange ) OH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight (OH_AVCapability *capability, int32_t height, OH_AVRange *widthRange)
``` ```
**Description** **Description**
...@@ -789,7 +789,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -789,7 +789,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
bool OH_AVCapability_IsEncoderBitrateModeSupported (OH_AVCapability * capability, OH_BitrateMode bitrateMode ) bool OH_AVCapability_IsEncoderBitrateModeSupported (OH_AVCapability *capability, OH_BitrateMode bitrateMode)
``` ```
**Description** **Description**
...@@ -818,7 +818,7 @@ Returns **true** if the bit rate mode is supported; returns **false** otherwise. ...@@ -818,7 +818,7 @@ Returns **true** if the bit rate mode is supported; returns **false** otherwise.
``` ```
bool OH_AVCapability_IsHardware (OH_AVCapability * capability) bool OH_AVCapability_IsHardware (OH_AVCapability *capability)
``` ```
**Description** **Description**
...@@ -846,7 +846,7 @@ Returns **true** if the codec capability instance describes a hardware codec; re ...@@ -846,7 +846,7 @@ Returns **true** if the codec capability instance describes a hardware codec; re
``` ```
bool OH_AVCapability_IsVideoSizeSupported (OH_AVCapability * capability, int32_t width, int32_t height ) bool OH_AVCapability_IsVideoSizeSupported (OH_AVCapability *capability, int32_t width, int32_t height)
``` ```
**Description** **Description**
...@@ -876,7 +876,7 @@ Returns **true** if the video size is supported; returns **false** otherwise. ...@@ -876,7 +876,7 @@ Returns **true** if the video size is supported; returns **false** otherwise.
``` ```
OH_AVCapability* OH_AVCodec_GetCapability (const char * mime, bool isEncoder ) OH_AVCapability* OH_AVCodec_GetCapability (const char *mime, bool isEncoder)
``` ```
**Description** **Description**
...@@ -905,12 +905,14 @@ Returns a pointer to the codec capability instance if an existing codec matches; ...@@ -905,12 +905,14 @@ Returns a pointer to the codec capability instance if an existing codec matches;
``` ```
OH_AVCapability* OH_AVCodec_GetCapabilityByCategory (const char * mime, bool isEncoder, OH_AVCodecCategory category ) OH_AVCapability* OH_AVCodec_GetCapabilityByCategory (const char *mime, bool isEncoder, OH_AVCodecCategory category)
``` ```
**Description** **Description**
Obtains the codec capability by category, which can be a hardware codec or software codec. Obtains the codec capability by category,
which can be a hardware codec or software codec.
\@syscap SystemCapability.Multimedia.Media.CodecBase \@syscap SystemCapability.Multimedia.Media.CodecBase
......
...@@ -19,7 +19,7 @@ The AVDemuxer module provides functions for audio and video decapsulation. ...@@ -19,7 +19,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avdemuxer.h](native__avdemuxer_8h.md) | Declares the native APIs used for audio and video decapsulation.<br>File to include: \<multimedia/native_avdemuxer.h> | | [native_avdemuxer.h](native__avdemuxer_8h.md) | Declares the native APIs used for audio and video decapsulation.<br>**File to include**: <multimedia/player_framework/native_avdemuxer.h><br>**Library**: libnative_media_avdemuxer.so|
### Functions ### Functions
...@@ -41,7 +41,7 @@ The AVDemuxer module provides functions for audio and video decapsulation. ...@@ -41,7 +41,7 @@ The AVDemuxer module provides functions for audio and video decapsulation.
``` ```
OH_AVDemuxer* OH_AVDemuxer_CreateWithSource (OH_AVSource * source) OH_AVDemuxer* OH_AVDemuxer_CreateWithSource (OH_AVSource *source)
``` ```
**Description** **Description**
...@@ -69,7 +69,7 @@ Returns the pointer to an **OH_AVDemuxer** instance. ...@@ -69,7 +69,7 @@ Returns the pointer to an **OH_AVDemuxer** instance.
``` ```
OH_AVErrCode OH_AVDemuxer_Destroy (OH_AVDemuxer * demuxer) OH_AVErrCode OH_AVDemuxer_Destroy (OH_AVDemuxer *demuxer)
``` ```
**Description** **Description**
...@@ -99,7 +99,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -99,7 +99,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVDemuxer_ReadSample (OH_AVDemuxer * demuxer, uint32_t trackIndex, OH_AVMemory * sample, OH_AVCodecBufferAttr * info ) OH_AVErrCode OH_AVDemuxer_ReadSample (OH_AVDemuxer *demuxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr *info)
``` ```
**Description** **Description**
...@@ -132,7 +132,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -132,7 +132,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVDemuxer_SeekToTime (OH_AVDemuxer * demuxer, int64_t millisecond, OH_AVSeekMode mode ) OH_AVErrCode OH_AVDemuxer_SeekToTime (OH_AVDemuxer *demuxer, int64_t millisecond, OH_AVSeekMode mode)
``` ```
**Description** **Description**
...@@ -162,7 +162,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -162,7 +162,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVDemuxer_SelectTrackByID (OH_AVDemuxer * demuxer, uint32_t trackIndex ) OH_AVErrCode OH_AVDemuxer_SelectTrackByID (OH_AVDemuxer *demuxer, uint32_t trackIndex)
``` ```
**Description** **Description**
...@@ -195,7 +195,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -195,7 +195,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVDemuxer_UnselectTrackByID (OH_AVDemuxer * demuxer, uint32_t trackIndex ) OH_AVErrCode OH_AVDemuxer_UnselectTrackByID (OH_AVDemuxer *demuxer, uint32_t trackIndex)
``` ```
**Description** **Description**
......
...@@ -19,7 +19,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation. ...@@ -19,7 +19,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avmuxer.h](native__avmuxer_8h.md) | Declares native APIs used for audio and video encapsulation.<br>File to include: &lt;multimedia/native_avmuxer.h&gt;| | [native_avmuxer.h](native__avmuxer_8h.md) | Declares native APIs used for audio and video encapsulation.<br>**File to include**: <multimedia/player_framework/native_avmuxer.h><br>**Library**: libnative_media_avmuxer.so|
### Functions ### Functions
...@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation. ...@@ -42,7 +42,7 @@ The **AVMuxer** module provides functions for audio and video encapsulation.
``` ```
OH_AVErrCode OH_AVMuxer_AddTrack (OH_AVMuxer * muxer, int32_t * trackIndex, OH_AVFormat * trackFormat ) OH_AVErrCode OH_AVMuxer_AddTrack (OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFormat *trackFormat)
``` ```
**Description** **Description**
...@@ -74,7 +74,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -74,7 +74,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVMuxer* OH_AVMuxer_Create (int32_t fd, OH_AVOutputFormat format ) OH_AVMuxer* OH_AVMuxer_Create (int32_t fd, OH_AVOutputFormat format)
``` ```
**Description** **Description**
...@@ -103,7 +103,7 @@ Returns the pointer to the **OH_AVMuxer** instance created. You must call **OH_A ...@@ -103,7 +103,7 @@ Returns the pointer to the **OH_AVMuxer** instance created. You must call **OH_A
``` ```
OH_AVErrCode OH_AVMuxer_Destroy (OH_AVMuxer * muxer) OH_AVErrCode OH_AVMuxer_Destroy (OH_AVMuxer *muxer)
``` ```
**Description** **Description**
...@@ -131,7 +131,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -131,7 +131,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVMuxer_SetRotation (OH_AVMuxer * muxer, int32_t rotation ) OH_AVErrCode OH_AVMuxer_SetRotation (OH_AVMuxer *muxer, int32_t rotation)
``` ```
**Description** **Description**
...@@ -162,7 +162,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -162,7 +162,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVMuxer_Start (OH_AVMuxer * muxer) OH_AVErrCode OH_AVMuxer_Start (OH_AVMuxer *muxer)
``` ```
**Description** **Description**
...@@ -192,7 +192,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -192,7 +192,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVMuxer_Stop (OH_AVMuxer * muxer) OH_AVErrCode OH_AVMuxer_Stop (OH_AVMuxer *muxer)
``` ```
**Description** **Description**
...@@ -222,7 +222,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -222,7 +222,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_AVMuxer_WriteSample (OH_AVMuxer * muxer, uint32_t trackIndex, OH_AVMemory * sample, OH_AVCodecBufferAttr info ) OH_AVErrCode OH_AVMuxer_WriteSample (OH_AVMuxer *muxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr info)
``` ```
**Description** **Description**
......
...@@ -19,7 +19,7 @@ The AVSource module provides functions for constructing audio and video resource ...@@ -19,7 +19,7 @@ The AVSource module provides functions for constructing audio and video resource
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avsource.h](native__avsource_8h.md) | Declares the native APIs used to construct audio and video resource objects.<br>File to include: \<multimedia/native_avsource.h>| | [native_avsource.h](native__avsource_8h.md) | Declares the native APIs used to construct audio and video resource objects.<br>**File to include**: <multimedia/player_framework/native_avsource.h><br>**Library**: libnative_media_avsource.so|
### Functions ### Functions
...@@ -40,7 +40,7 @@ The AVSource module provides functions for constructing audio and video resource ...@@ -40,7 +40,7 @@ The AVSource module provides functions for constructing audio and video resource
``` ```
OH_AVSource* OH_AVSource_CreateWithFD (int32_t fd, int64_t offset, int64_t size ) OH_AVSource* OH_AVSource_CreateWithFD (int32_t fd, int64_t offset, int64_t size)
``` ```
**Description** **Description**
...@@ -74,7 +74,7 @@ Returns the pointer to an **OH_AVSource** instance. ...@@ -74,7 +74,7 @@ Returns the pointer to an **OH_AVSource** instance.
``` ```
OH_AVSource* OH_AVSource_CreateWithURI (char * uri) OH_AVSource* OH_AVSource_CreateWithURI (char *uri)
``` ```
**Description** **Description**
...@@ -102,7 +102,7 @@ Returns the pointer to an **OH_AVSource** instance. ...@@ -102,7 +102,7 @@ Returns the pointer to an **OH_AVSource** instance.
``` ```
OH_AVErrCode OH_AVSource_Destroy (OH_AVSource * source) OH_AVErrCode OH_AVSource_Destroy (OH_AVSource *source)
``` ```
**Description** **Description**
...@@ -134,7 +134,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -134,7 +134,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVFormat* OH_AVSource_GetSourceFormat (OH_AVSource * source) OH_AVFormat* OH_AVSource_GetSourceFormat (OH_AVSource *source)
``` ```
**Description** **Description**
...@@ -162,7 +162,7 @@ Returns the basic information obtained. ...@@ -162,7 +162,7 @@ Returns the basic information obtained.
``` ```
OH_AVFormat* OH_AVSource_GetTrackFormat (OH_AVSource * source, uint32_t trackIndex ) OH_AVFormat* OH_AVSource_GetTrackFormat (OH_AVSource *source, uint32_t trackIndex)
``` ```
**Description** **Description**
......
# AudioEncoder # AudioEncoder
## Overview ## Overview
The **AudioEncoder** module provides the functions for audio encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether your device supports this module. The **AudioEncoder** module provides the functions for audio encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether your device supports this module.
...@@ -11,44 +10,38 @@ The **AudioEncoder** module provides the functions for audio encoding. This modu ...@@ -11,44 +10,38 @@ The **AudioEncoder** module provides the functions for audio encoding. This modu
9 9
## Summary ## Summary
### Files ### Files
| Name| Description| | 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 ### Functions
| Name| Description| | 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_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.| | \*[OHOS::Media::OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder. |
| [OHOS::Media::OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance.| | [OHOS::Media::OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance. |
| [OHOS::Media::OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder.| | [OHOS::Media::OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded.| | [OHOS::Media::OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded. |
| [OHOS::Media::OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**.| | [OHOS::Media::OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully.| | [OHOS::Media::OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully. |
| [OHOS::Media::OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. |
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.| | \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.|
| [OHOS::Media::OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder.| | [OHOS::Media::OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder.| | [OHOS::Media::OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder.| | [OHOS::Media::OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_IsValid](#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid.| | [OHOS::Media::OH_AudioEncoder_IsValid](#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid. |
## Function Description ## Function Description
### OH_AudioEncoder_Configure() ### OH_AudioEncoder_Configure()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format )
``` ```
...@@ -63,9 +56,9 @@ This function must be called prior to **Prepare**. ...@@ -63,9 +56,9 @@ This function must be called prior to **Prepare**.
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ------ | --------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | 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.| | format | Pointer to an **OH_AVFormat** instance, which provides the description information about the audio track to be encoded.|
**Returns** **Returns**
...@@ -76,10 +69,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -76,10 +69,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_CreateByMime() ### OH_AudioEncoder_CreateByMime()
``` ```
OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByMime (const char * mime) OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByMime (const char * mime)
``` ```
...@@ -92,8 +83,8 @@ Creates an audio encoder instance based on a MIME type. This function is recomme ...@@ -92,8 +83,8 @@ Creates an audio encoder instance based on a MIME type. This function is recomme
**Parameters** **Parameters**
| Name| Description| | Name| Description |
| -------- | -------- | | ---- | ------------------------------------------------------- |
| mime | Pointer to a string that describes the MIME type. For details, see **AVCODEC_MIME_TYPE**.| | mime | Pointer to a string that describes the MIME type. For details, see **AVCODEC_MIME_TYPE**.|
**Returns** **Returns**
...@@ -104,10 +95,8 @@ Returns the pointer to an **OH_AVCodec** instance. ...@@ -104,10 +95,8 @@ Returns the pointer to an **OH_AVCodec** instance.
9 9
### OH_AudioEncoder_CreateByName() ### OH_AudioEncoder_CreateByName()
``` ```
OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByName (const char * name) OH_AVCodec* OHOS::Media::OH_AudioEncoder_CreateByName (const char * name)
``` ```
...@@ -120,8 +109,8 @@ Creates an audio encoder instance based on an encoder name. To use this function ...@@ -120,8 +109,8 @@ Creates an audio encoder instance based on an encoder name. To use this function
**Parameters** **Parameters**
| Name| Description| | Name| Description |
| -------- | -------- | | ---- | ---------------- |
| name | Pointer to an audio encoder name.| | name | Pointer to an audio encoder name.|
**Returns** **Returns**
...@@ -132,10 +121,8 @@ Returns the pointer to an **OH_AVCodec** instance. ...@@ -132,10 +121,8 @@ Returns the pointer to an **OH_AVCodec** instance.
9 9
### OH_AudioEncoder_Destroy() ### OH_AudioEncoder_Destroy()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Destroy (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Destroy (OH_AVCodec * codec)
``` ```
...@@ -148,8 +135,8 @@ Clears the internal resources of an audio encoder and destroys the encoder insta ...@@ -148,8 +135,8 @@ Clears the internal resources of an audio encoder and destroys the encoder insta
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
...@@ -160,10 +147,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -160,10 +147,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_Flush() ### OH_AudioEncoder_Flush()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Flush (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Flush (OH_AVCodec * codec)
``` ```
...@@ -178,8 +163,8 @@ This function invalidates the indexes of all buffers previously reported through ...@@ -178,8 +163,8 @@ This function invalidates the indexes of all buffers previously reported through
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
...@@ -190,10 +175,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -190,10 +175,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_FreeOutputData() ### OH_AudioEncoder_FreeOutputData()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index )
``` ```
...@@ -206,9 +189,9 @@ Frees an output buffer of an audio encoder. ...@@ -206,9 +189,9 @@ Frees an output buffer of an audio encoder.
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | ------------------------------ |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance. |
| index | Index of the output buffer.| | index | Index of the output buffer.|
**Returns** **Returns**
...@@ -219,10 +202,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -219,10 +202,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_GetOutputDescription() ### OH_AudioEncoder_GetOutputDescription()
``` ```
OH_AVFormat* OHOS::Media::OH_AudioEncoder_GetOutputDescription (OH_AVCodec * codec) OH_AVFormat* OHOS::Media::OH_AudioEncoder_GetOutputDescription (OH_AVCodec * codec)
``` ```
...@@ -237,8 +218,8 @@ The caller must manually release the **OH_AVFormat** instance in the return valu ...@@ -237,8 +218,8 @@ The caller must manually release the **OH_AVFormat** instance in the return valu
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
...@@ -249,10 +230,8 @@ Returns the handle to an **OH_AVFormat** instance. The lifecycle of this instanc ...@@ -249,10 +230,8 @@ Returns the handle to an **OH_AVFormat** instance. The lifecycle of this instanc
9 9
### OH_AudioEncoder_IsValid() ### OH_AudioEncoder_IsValid()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_IsValid (OH_AVCodec * codec, bool * isValid ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_IsValid (OH_AVCodec * codec, bool * isValid )
``` ```
...@@ -265,9 +244,9 @@ Checks whether an audio encoder instance is valid. ...@@ -265,9 +244,9 @@ Checks whether an audio encoder instance is valid.
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ------- | ----------------------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance. |
| isValid | Pointer to an instance of the Boolean type. The value **true** means that the encoder instance is valid and **false** means the opposite.| | isValid | Pointer to an instance of the Boolean type. The value **true** means that the encoder instance is valid and **false** means the opposite.|
**Returns** **Returns**
...@@ -278,10 +257,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -278,10 +257,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
10 10
### OH_AudioEncoder_Prepare() ### OH_AudioEncoder_Prepare()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Prepare (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Prepare (OH_AVCodec * codec)
``` ```
...@@ -294,8 +271,8 @@ Prepares internal resources for an audio encoder. This function must be called a ...@@ -294,8 +271,8 @@ Prepares internal resources for an audio encoder. This function must be called a
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
...@@ -306,10 +283,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -306,10 +283,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_PushInputData() ### OH_AudioEncoder_PushInputData()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr )
``` ```
...@@ -324,9 +299,9 @@ The **OH_AVCodecOnNeedInputData** callback reports the available input buffer an ...@@ -324,9 +299,9 @@ The **OH_AVCodecOnNeedInputData** callback reports the available input buffer an
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | ------------------------------ |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance. |
| index | Index of the input buffer.| | index | Index of the input buffer.|
| attr | Description information about the data in the buffer.| | attr | Description information about the data in the buffer.|
...@@ -338,10 +313,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -338,10 +313,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_Reset() ### OH_AudioEncoder_Reset()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Reset (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Reset (OH_AVCodec * codec)
``` ```
...@@ -354,18 +327,16 @@ Resets an audio encoder. To continue encoding, you must call **Configure** to co ...@@ -354,18 +327,16 @@ Resets an audio encoder. To continue encoding, you must call **Configure** to co
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
Returns **AV_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) otherwise. Returns **AV_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) otherwise.
### OH_AudioEncoder_SetCallback() ### OH_AudioEncoder_SetCallback()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData )
``` ```
...@@ -380,11 +351,11 @@ This function must be called prior to **Prepare**. ...@@ -380,11 +351,11 @@ This function must be called prior to **Prepare**.
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | ------------------------------------------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance. |
| callback | Callback function to set. For details, see **OH_AVCodecAsyncCallback**.| | callback | Callback function to set. For details, see **OH_AVCodecAsyncCallback**.|
| userData | User-specific data.| | userData | User-specific data. |
**Returns** **Returns**
...@@ -394,10 +365,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -394,10 +365,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_SetParameter() ### OH_AudioEncoder_SetParameter()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OHOS::Media::OH_AudioEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format )
``` ```
...@@ -412,10 +381,10 @@ This function can be called only after the encoder is started. Incorrect paramet ...@@ -412,10 +381,10 @@ This function can be called only after the encoder is started. Incorrect paramet
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ------ | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
| format | Handle to an **OH_AVFormat** instance.| | format | Handle to an **OH_AVFormat** instance. |
**Returns** **Returns**
...@@ -425,10 +394,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -425,10 +394,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_Start() ### OH_AudioEncoder_Start()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Start (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Start (OH_AVCodec * codec)
``` ```
...@@ -443,8 +410,8 @@ After being started, the encoder starts to report the **OH_AVCodecOnNeedInputDat ...@@ -443,8 +410,8 @@ After being started, the encoder starts to report the **OH_AVCodecOnNeedInputDat
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
...@@ -455,10 +422,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -455,10 +422,8 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
9 9
### OH_AudioEncoder_Stop() ### OH_AudioEncoder_Stop()
``` ```
OH_AVErrCode OHOS::Media::OH_AudioEncoder_Stop (OH_AVCodec * codec) OH_AVErrCode OHOS::Media::OH_AudioEncoder_Stop (OH_AVCodec * codec)
``` ```
...@@ -471,8 +436,8 @@ Stops an audio encoder. After the encoder is stopped, you can call **Start** to ...@@ -471,8 +436,8 @@ Stops an audio encoder. After the encoder is stopped, you can call **Start** to
**Parameters** **Parameters**
| Name| Description| | Name | Description |
| -------- | -------- | | ----- | -------------------------- |
| codec | Pointer to an **OH_AVCodec** instance.| | codec | Pointer to an **OH_AVCodec** instance.|
**Returns** **Returns**
......
...@@ -19,7 +19,7 @@ The **CodecBase** module provides the common structs, character constants, and e ...@@ -19,7 +19,7 @@ The **CodecBase** module provides the common structs, character constants, and e
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running **OH_AVCodec** instances.<br>File to include: \<multimedia/player_framework/native_avcodec_base.h>| | [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running **OH_AVCodec** instances.<br>**File to include**: <multimedia/player_framework/native_avcodec_base.h><br>**Library**: libnative_media_codecbase.so|
### Structs ### Structs
...@@ -57,17 +57,17 @@ The **CodecBase** module provides the common structs, character constants, and e ...@@ -57,17 +57,17 @@ The **CodecBase** module provides the common structs, character constants, and e
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {<br>**AVCODEC_BUFFER_FLAGS_NONE** = 0, **AVCODEC_BUFFER_FLAGS_EOS** = 1 &lt;&lt; 0, **AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 &lt;&lt; 1, **AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 &lt;&lt; 2,<br>**AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 &lt;&lt; 3<br>} | Enumerates the flags for the buffer of an **OH_AVCodec** instance.| | [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_NONE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_EOS** = 1 &lt;&lt; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 &lt;&lt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 &lt;&lt; 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 &lt;&lt; 3<br>} | Enumerates the flags for the buffer of an **OH_AVCodec** instance. |
| [OH_AVOutputFormat](#oh_avoutputformat) { **AV_OUTPUT_FORMAT_DEFAULT** = 0, **AV_OUTPUT_FORMAT_MPEG_4** = 2, **AV_OUTPUT_FORMAT_M4A** = 6 } | Enumerates the output file formats of a muxer.| | [OH_AVOutputFormat](#oh_avoutputformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_DEFAULT** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_MPEG_4** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_M4A** = 6<br>} | Enumerates the output file formats of a muxer. |
| [OH_MediaType](#oh_mediatype) { **MEDIA_TYPE_AUD** = 0, **MEDIA_TYPE_VID** = 1 } | Enumerates the media types.| | [OH_MediaType](#oh_mediatype) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**MEDIA_TYPE_AUD** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MEDIA_TYPE_VID** = 1<br>} | Enumerates the media types. |
| [OH_AVCProfile](#oh_avcprofile) { **AVC_PROFILE_BASELINE** = 0, **AVC_PROFILE_HIGH** = 4, **AVC_PROFILE_MAIN** = 8 } | Enumerates the AVC profiles.| | [OH_AVCProfile](#oh_avcprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_BASELINE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_HIGH** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_MAIN** = 8<br>} | Enumerates the AVC profiles. |
| [OH_HEVCProfile](#oh_hevcprofile) {<br>**HEVC_PROFILE_MAIN** = 0, **HEVC_PROFILE_MAIN_10** = 1, **HEVC_PROFILE_MAIN_STILL** = 2, **HEVC_PROFILE_MAIN_10_HDR10** = 3,<br>**HEVC_PROFILE_MAIN_10_HDR10_PLUS** = 4<br>} | Enumerates the HEVC profiles.| | [OH_HEVCProfile](#oh_hevcprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_STILL** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10_HDR10** = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10_HDR10_PLUS** = 4<br>} | Enumerates the HEVC profiles. |
| [OH_AACProfile](#oh_aacprofile) { **AAC_PROFILE_LC** = 0 } | Enumerates the AAC profiles.| | [OH_AACProfile](#oh_aacprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AAC_PROFILE_LC** = 0<br>} | Enumerates the AAC profiles. |
| [OH_AVSeekMode](#oh_avseekmode) { **SEEK_MODE_NEXT_SYNC** = 0, **SEEK_MODE_PREVIOUS_SYNC**, **SEEK_MODE_CLOSEST_SYNC** } | Enumerates the seek modes.| | [OH_AVSeekMode](#oh_avseekmode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_NEXT_SYNC** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_PREVIOUS_SYNC**,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_CLOSEST_SYNC**<br>} | Enumerates the seek modes. |
| [OH_ColorPrimary](#oh_colorprimary) {<br>**COLOR_PRIMARY_BT709** = 1, **COLOR_PRIMARY_UNSPECIFIED** = 2, **COLOR_PRIMARY_BT470_M** = 4, **COLOR_PRIMARY_BT601_625** = 5,<br>**COLOR_PRIMARY_BT601_525** = 6, **COLOR_PRIMARY_SMPTE_ST240** = 7, **COLOR_PRIMARY_GENERIC_FILM** = 8, **COLOR_PRIMARY_BT2020** = 9,<br>**COLOR_PRIMARY_SMPTE_ST428** = 10, **COLOR_PRIMARY_P3DCI** = 11, **COLOR_PRIMARY_P3D65** = 12<br>} | Enumerates the primary colors.| | [OH_ColorPrimary](#oh_colorprimary) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT470_M** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT601_625** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT601_525** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_GENERIC_FILM** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT2020** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_SMPTE_ST428** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_P3DCI** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_P3D65** = 12<br>} | Enumerates the primary colors.|
| [OH_TransferCharacteristic](#oh_transfercharacteristic) {<br>**TRANSFER_CHARACTERISTIC_BT709** = 1, **TRANSFER_CHARACTERISTIC_UNSPECIFIED** = 2, **TRANSFER_CHARACTERISTIC_GAMMA_2_2** = 4, **TRANSFER_CHARACTERISTIC_GAMMA_2_8** = 5,<br>**TRANSFER_CHARACTERISTIC_BT601** = 6, **TRANSFER_CHARACTERISTIC_SMPTE_ST240** = 7, **TRANSFER_CHARACTERISTIC_LINEAR** = 8, **TRANSFER_CHARACTERISTIC_LOG** = 9,<br>**TRANSFER_CHARACTERISTIC_LOG_SQRT** = 10, **TRANSFER_CHARACTERISTIC_IEC_61966_2_4** = 11, **TRANSFER_CHARACTERISTIC_BT1361** = 12, **TRANSFER_CHARACTERISTIC_IEC_61966_2_1** = 13,<br>**TRANSFER_CHARACTERISTIC_BT2020_10BIT** = 14, **TRANSFER_CHARACTERISTIC_BT2020_12BIT** = 15, **TRANSFER_CHARACTERISTIC_PQ** = 16, **TRANSFER_CHARACTERISTIC_SMPTE_ST428** = 17,<br>**TRANSFER_CHARACTERISTIC_HLG** = 18<br>} | Enumerates the transfer characteristics.| | [OH_TransferCharacteristic](#oh_transfercharacteristic) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_GAMMA_2_2** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_GAMMA_2_8** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT601** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LINEAR** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LOG** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LOG_SQRT** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_IEC_61966_2_4** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT1361** = 12,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_IEC_61966_2_1** = 13,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT2020_10BIT** = 14,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT2020_12BIT** = 15,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_PQ** = 16,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_SMPTE_ST428** = 17,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_HLG** = 18<br>} | Enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](#oh_matrixcoefficient) {<br>**MATRIX_COEFFICIENT_IDENTITY** = 0, **MATRIX_COEFFICIENT_BT709** = 1, **MATRIX_COEFFICIENT_UNSPECIFIED** = 2, **MATRIX_COEFFICIENT_FCC** = 4,<br>**MATRIX_COEFFICIENT_BT601_625** = 5, **MATRIX_COEFFICIENT_BT601_525** = 6, **MATRIX_COEFFICIENT_SMPTE_ST240** = 7, **MATRIX_COEFFICIENT_YCGCO** = 8,<br>**MATRIX_COEFFICIENT_BT2020_NCL** = 9, **MATRIX_COEFFICIENT_BT2020_CL** = 10, **MATRIX_COEFFICIENT_SMPTE_ST2085** = 11, **MATRIX_COEFFICIENT_CHROMATICITY_NCL** = 12,<br>**MATRIX_COEFFICIENT_CHROMATICITY_CL** = 13, **MATRIX_COEFFICIENT_ICTCP** = 14<br>} | Enumerates the matrix coefficients.| | [OH_MatrixCoefficient](#oh_matrixcoefficient) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_IDENTITY** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_FCC** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT601_625** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT601_525** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_YCGCO** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT2020_NCL** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT2020_CL** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_SMPTE_ST2085** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_CHROMATICITY_NCL** = 12,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_CHROMATICITY_CL** = 13,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_ICTCP** = 14<br>} | Enumerates the matrix coefficients.|
| [OH_BitsPerSample](#oh_bitspersample) {<br>**SAMPLE_U8** = 0, **SAMPLE_S16LE** = 1, **SAMPLE_S24LE** = 2, **SAMPLE_S32LE** = 3,<br>**SAMPLE_F32LE** = 4, **SAMPLE_U8P** = 5, **SAMPLE_S16P** = 6, **SAMPLE_S24P** = 7,<br>**SAMPLE_S32P** = 8, **SAMPLE_F32P** = 9, **INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.| | [OH_BitsPerSample](#oh_bitspersample) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_U8** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S16LE** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S24LE** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S32LE** = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_F32LE** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_U8P** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S16P** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S24P** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S32P** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_F32P** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.|
### Variables ### Variables
...@@ -145,7 +145,7 @@ The **CodecBase** module provides the common structs, character constants, and e ...@@ -145,7 +145,7 @@ The **CodecBase** module provides the common structs, character constants, and e
``` ```
typedef enum OH_AACProfileOH_AACProfile typedef enum OH_AACProfile OH_AACProfile
``` ```
**Description** **Description**
...@@ -159,7 +159,7 @@ Defines an enum that enumerates the AAC profiles. ...@@ -159,7 +159,7 @@ Defines an enum that enumerates the AAC profiles.
``` ```
typedef struct OH_AVCodecAsyncCallbackOH_AVCodecAsyncCallback typedef struct OH_AVCodecAsyncCallback OH_AVCodecAsyncCallback
``` ```
**Description** **Description**
...@@ -182,7 +182,7 @@ Defines a struct for all the asynchronous callback function pointers of an **OH_ ...@@ -182,7 +182,7 @@ Defines a struct for all the asynchronous callback function pointers of an **OH_
``` ```
typedef struct OH_AVCodecBufferAttrOH_AVCodecBufferAttr typedef struct OH_AVCodecBufferAttr OH_AVCodecBufferAttr
``` ```
**Description** **Description**
...@@ -196,7 +196,7 @@ Defines a struct for the description information about the buffer of an **OH_AVC ...@@ -196,7 +196,7 @@ Defines a struct for the description information about the buffer of an **OH_AVC
``` ```
typedef enum OH_AVCodecBufferFlagsOH_AVCodecBufferFlags typedef enum OH_AVCodecBufferFlags OH_AVCodecBufferFlags
``` ```
**Description** **Description**
...@@ -210,7 +210,7 @@ Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** in ...@@ -210,7 +210,7 @@ Defines an enum that enumerates the flags for the buffer of an **OH_AVCodec** in
``` ```
typedef void(* OH_AVCodecOnError) (OH_AVCodec *codec, int32_t errorCode, void *userData) typedef void (*OH_AVCodecOnError) (OH_AVCodec *codec, int32_t errorCode, void *userData)
``` ```
**Description** **Description**
...@@ -232,7 +232,7 @@ Defines the pointer to the function that is called to report error information w ...@@ -232,7 +232,7 @@ Defines the pointer to the function that is called to report error information w
``` ```
typedef void(* OH_AVCodecOnNeedInputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, void *userData) typedef void (*OH_AVCodecOnNeedInputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, void *userData)
``` ```
**Description** **Description**
...@@ -255,7 +255,7 @@ Defines the pointer to the function that is called when new input data is requir ...@@ -255,7 +255,7 @@ Defines the pointer to the function that is called when new input data is requir
``` ```
typedef void(* OH_AVCodecOnNewOutputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, OH_AVCodecBufferAttr *attr, void *userData) typedef void (*OH_AVCodecOnNewOutputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, OH_AVCodecBufferAttr *attr, void *userData)
``` ```
**Description** **Description**
...@@ -279,7 +279,7 @@ Defines the pointer to the function that is called when new output data is gener ...@@ -279,7 +279,7 @@ Defines the pointer to the function that is called when new output data is gener
``` ```
typedef void(* OH_AVCodecOnStreamChanged) (OH_AVCodec *codec, OH_AVFormat *format, void *userData) typedef void (*OH_AVCodecOnStreamChanged) (OH_AVCodec *codec, OH_AVFormat *format, void *userData)
``` ```
**Description** **Description**
...@@ -301,7 +301,7 @@ Defines the pointer to the function that is called to report the new stream desc ...@@ -301,7 +301,7 @@ Defines the pointer to the function that is called to report the new stream desc
``` ```
typedef enum OH_AVCProfileOH_AVCProfile typedef enum OH_AVCProfile OH_AVCProfile
``` ```
**Description** **Description**
...@@ -315,7 +315,7 @@ Defines an enum that enumerates the AVC profiles. ...@@ -315,7 +315,7 @@ Defines an enum that enumerates the AVC profiles.
``` ```
typedef enum OH_AVOutputFormatOH_AVOutputFormat typedef enum OH_AVOutputFormat OH_AVOutputFormat
``` ```
**Description** **Description**
...@@ -327,7 +327,7 @@ Defines an enum that enumerates the output file formats of a muxer. ...@@ -327,7 +327,7 @@ Defines an enum that enumerates the output file formats of a muxer.
``` ```
typedef enum OH_AVSeekModeOH_AVSeekMode typedef enum OH_AVSeekMode OH_AVSeekMode
``` ```
**Description** **Description**
...@@ -341,7 +341,7 @@ Defines an enum that enumerates the seek modes. ...@@ -341,7 +341,7 @@ Defines an enum that enumerates the seek modes.
``` ```
typedef enum OH_BitsPerSampleOH_BitsPerSample typedef enum OH_BitsPerSample OH_BitsPerSample
``` ```
**Description** **Description**
...@@ -355,7 +355,7 @@ Defines an enum that enumerates the number of audio bits for each coded sample. ...@@ -355,7 +355,7 @@ Defines an enum that enumerates the number of audio bits for each coded sample.
``` ```
typedef enum OH_ColorPrimaryOH_ColorPrimary typedef enum OH_ColorPrimary OH_ColorPrimary
``` ```
**Description** **Description**
...@@ -369,7 +369,7 @@ Defines an enum that enumerates the primary colors. ...@@ -369,7 +369,7 @@ Defines an enum that enumerates the primary colors.
``` ```
typedef enum OH_HEVCProfileOH_HEVCProfile typedef enum OH_HEVCProfile OH_HEVCProfile
``` ```
**Description** **Description**
...@@ -383,7 +383,7 @@ Defines an enum that enumerates the HEVC profiles. ...@@ -383,7 +383,7 @@ Defines an enum that enumerates the HEVC profiles.
``` ```
typedef enum OH_MatrixCoefficientOH_MatrixCoefficient typedef enum OH_MatrixCoefficient OH_MatrixCoefficient
``` ```
**Description** **Description**
...@@ -397,7 +397,7 @@ Defines an enum that enumerates the matrix coefficients. ...@@ -397,7 +397,7 @@ Defines an enum that enumerates the matrix coefficients.
``` ```
typedef enum OH_MediaTypeOH_MediaType typedef enum OH_MediaType OH_MediaType
``` ```
**Description** **Description**
...@@ -411,7 +411,7 @@ Defines an enum that enumerates the media types. ...@@ -411,7 +411,7 @@ Defines an enum that enumerates the media types.
``` ```
typedef enum OH_TransferCharacteristicOH_TransferCharacteristic typedef enum OH_TransferCharacteristic OH_TransferCharacteristic
``` ```
**Description** **Description**
......
...@@ -19,9 +19,9 @@ The **Core** module provides the basic backbone capabilities for the media playb ...@@ -19,9 +19,9 @@ The **Core** module provides the basic backbone capabilities for the media playb
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_averrors.h](native__averrors_8h.md) | Declares the error codes used by the media playback framework.<br>File to include: \<multimedia/player_framework/native_averrors.h> | | [native_averrors.h](native__averrors_8h.md) | Declares the error codes used by the media playback framework.<br>**File to include**: <multimedia/player_framework/native_averrors.h><br>**Library**: libnative_media_core.so|
| [native_avformat.h](native__avformat_8h.md) | Declares the format-related functions and enums.<br>File to include: \<multimedia/player_framework/native_avformat.h> | | [native_avformat.h](native__avformat_8h.md) | Declares the format-related functions and enums.<br>**File to include**: <multimedia/player_framework/native_avformat.h><br>**Library**: libnative_media_core.so|
| [native_avmemory.h](native__avmemory_8h.md) | Declares the memory-related functions.<br>File to include: \<multimedia/player_framework/native_avmemory.h> | | [native_avmemory.h](native__avmemory_8h.md) | Declares the memory-related functions.<br>**File to include**: <multimedia/player_framework/native_avmemory.h><br>**Library**: libnative_media_core.so|
### Types ### Types
...@@ -36,8 +36,8 @@ The **Core** module provides the basic backbone capabilities for the media playb ...@@ -36,8 +36,8 @@ The **Core** module provides the basic backbone capabilities for the media playb
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_AVErrCode](#oh_averrcode) {<br>AV_ERR_OK = 0, AV_ERR_NO_MEMORY = 1, AV_ERR_OPERATE_NOT_PERMIT = 2, AV_ERR_INVALID_VAL = 3,<br>AV_ERR_IO = 4, AV_ERR_TIMEOUT = 5, AV_ERR_UNKNOWN = 6, AV_ERR_SERVICE_DIED = 7,<br>AV_ERR_INVALID_STATE = 8, AV_ERR_UNSUPPORT = 9, AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.| | [OH_AVErrCode](#oh_averrcode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OK = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_NO_MEMORY = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OPERATE_NOT_PERMIT = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_VAL = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_IO = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_TIMEOUT = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNKNOWN = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_SERVICE_DIED = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_STATE = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNSUPPORT = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
| [OH_AVPixelFormat](#oh_avpixelformat) {<br>AV_PIXEL_FORMAT_YUVI420 = 1, AV_PIXEL_FORMAT_NV12 = 2, AV_PIXEL_FORMAT_NV21 = 3, AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.| | [OH_AVPixelFormat](#oh_avpixelformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_YUVI420 = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV12 = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV21 = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
### Functions ### Functions
...@@ -75,7 +75,7 @@ The **Core** module provides the basic backbone capabilities for the media playb ...@@ -75,7 +75,7 @@ The **Core** module provides the basic backbone capabilities for the media playb
``` ```
typedef enum OH_AVErrCodeOH_AVErrCode typedef enum OH_AVErrCode OH_AVErrCode
``` ```
**Description** **Description**
...@@ -93,7 +93,7 @@ Defines an enum that enumerates the audio and video error codes. ...@@ -93,7 +93,7 @@ Defines an enum that enumerates the audio and video error codes.
``` ```
typedef enum OH_AVPixelFormatOH_AVPixelFormat typedef enum OH_AVPixelFormat OH_AVPixelFormat
``` ```
**Description** **Description**
...@@ -175,7 +175,7 @@ Enumerates the video pixel formats. ...@@ -175,7 +175,7 @@ Enumerates the video pixel formats.
``` ```
bool OH_AVFormat_Copy (struct OH_AVFormat * to, struct OH_AVFormat * from ) bool OH_AVFormat_Copy (struct OH_AVFormat *to, struct OH_AVFormat *from)
``` ```
**Description** **Description**
...@@ -204,7 +204,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -204,7 +204,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
struct OH_AVFormat* OH_AVFormat_Create (void ) struct OH_AVFormat* OH_AVFormat_Create (void)
``` ```
**Description** **Description**
...@@ -226,7 +226,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -226,7 +226,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
struct OH_AVFormat* OH_AVFormat_CreateAudioFormat (const char * mimeType, int32_t sampleRate, int32_t channelCount ) struct OH_AVFormat* OH_AVFormat_CreateAudioFormat (const char *mimeType, int32_t sampleRate, int32_t channelCount)
``` ```
**Description** **Description**
...@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
struct OH_AVFormat* OH_AVFormat_CreateVideoFormat (const char * mimeType, int32_t width, int32_t height ) struct OH_AVFormat* OH_AVFormat_CreateVideoFormat (const char *mimeType, int32_t width, int32_t height)
``` ```
**Description** **Description**
...@@ -286,7 +286,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -286,7 +286,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
void OH_AVFormat_Destroy (struct OH_AVFormat * format) void OH_AVFormat_Destroy (struct OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -310,7 +310,7 @@ Destroys an **OH_AVFormat** instance. ...@@ -310,7 +310,7 @@ Destroys an **OH_AVFormat** instance.
``` ```
const char* OH_AVFormat_DumpInfo (struct OH_AVFormat * format) const char* OH_AVFormat_DumpInfo (struct OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -338,7 +338,7 @@ Returns the pointer to a collection of strings, each of which consists of a key ...@@ -338,7 +338,7 @@ Returns the pointer to a collection of strings, each of which consists of a key
``` ```
bool OH_AVFormat_GetBuffer (struct OH_AVFormat * format, const char * key, uint8_t ** addr, size_t * size ) bool OH_AVFormat_GetBuffer (struct OH_AVFormat *format, const char *key, uint8_t **addr, size_t *size)
``` ```
**Description** **Description**
...@@ -369,7 +369,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -369,7 +369,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_GetDoubleValue (struct OH_AVFormat * format, const char * key, double * out ) bool OH_AVFormat_GetDoubleValue (struct OH_AVFormat *format, const char *key, double *out)
``` ```
**Description** **Description**
...@@ -399,7 +399,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -399,7 +399,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_GetFloatValue (struct OH_AVFormat * format, const char * key, float * out ) bool OH_AVFormat_GetFloatValue (struct OH_AVFormat *format, const char *key, float *out)
``` ```
**Description** **Description**
...@@ -429,7 +429,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -429,7 +429,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_GetIntValue (struct OH_AVFormat * format, const char * key, int32_t * out ) bool OH_AVFormat_GetIntValue (struct OH_AVFormat *format, const char *key, int32_t *out)
``` ```
**Description** **Description**
...@@ -455,7 +455,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -455,7 +455,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_GetLongValue (struct OH_AVFormat * format, const char * key, int64_t * out ) bool OH_AVFormat_GetLongValue (struct OH_AVFormat *format, const char *key, int64_t *out)
``` ```
**Description** **Description**
...@@ -485,7 +485,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -485,7 +485,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_GetStringValue (struct OH_AVFormat * format, const char * key, const char ** out ) bool OH_AVFormat_GetStringValue (struct OH_AVFormat *format, const char *key, const char **out)
``` ```
**Description** **Description**
...@@ -515,7 +515,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -515,7 +515,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetBuffer (struct OH_AVFormat * format, const char * key, const uint8_t * addr, size_t size ) bool OH_AVFormat_SetBuffer (struct OH_AVFormat *format, const char *key, const uint8_t *addr, size_t size)
``` ```
**Description** **Description**
...@@ -546,7 +546,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -546,7 +546,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetDoubleValue (struct OH_AVFormat * format, const char * key, double value ) bool OH_AVFormat_SetDoubleValue (struct OH_AVFormat *format, const char *key, double value)
``` ```
**Description** **Description**
...@@ -576,7 +576,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -576,7 +576,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetFloatValue (struct OH_AVFormat * format, const char * key, float value ) bool OH_AVFormat_SetFloatValue (struct OH_AVFormat *format, const char *key, float value)
``` ```
**Description** **Description**
...@@ -606,7 +606,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -606,7 +606,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetIntValue (struct OH_AVFormat * format, const char * key, int32_t value ) bool OH_AVFormat_SetIntValue (struct OH_AVFormat *format, const char *key, int32_t value)
``` ```
**Description** **Description**
...@@ -636,7 +636,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -636,7 +636,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetLongValue (struct OH_AVFormat * format, const char * key, int64_t value ) bool OH_AVFormat_SetLongValue (struct OH_AVFormat *format, const char *key, int64_t value)
``` ```
**Description** **Description**
...@@ -666,7 +666,7 @@ Returns **true** if the operation is successful; returns **false** otherwise. ...@@ -666,7 +666,7 @@ Returns **true** if the operation is successful; returns **false** otherwise.
``` ```
bool OH_AVFormat_SetStringValue (struct OH_AVFormat * format, const char * key, const char * value ) bool OH_AVFormat_SetStringValue (struct OH_AVFormat *format, const char *key, const char *value)
``` ```
**Description** **Description**
...@@ -724,7 +724,7 @@ Returns the pointer to the **OH_AVMemory** instance created if the operation is ...@@ -724,7 +724,7 @@ Returns the pointer to the **OH_AVMemory** instance created if the operation is
``` ```
OH_AVErrCode OH_AVMemory_Destroy (struct OH_AVMemory * mem) OH_AVErrCode OH_AVMemory_Destroy (struct OH_AVMemory *mem)
``` ```
**Description** **Description**
...@@ -752,7 +752,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -752,7 +752,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
uint8_t* OH_AVMemory_GetAddr (struct OH_AVMemory * mem) uint8_t* OH_AVMemory_GetAddr (struct OH_AVMemory *mem)
``` ```
**Description** **Description**
...@@ -780,7 +780,7 @@ Returns the pointer to the virtual memory address if the memory is valid; return ...@@ -780,7 +780,7 @@ Returns the pointer to the virtual memory address if the memory is valid; return
``` ```
int32_t OH_AVMemory_GetSize (struct OH_AVMemory * mem) int32_t OH_AVMemory_GetSize (struct OH_AVMemory *mem)
``` ```
**Description** **Description**
......
...@@ -230,7 +230,7 @@ Enumerates the encoding types of audio streams. ...@@ -230,7 +230,7 @@ Enumerates the encoding types of audio streams.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_ENCODING_TYPE_RAW | PCM encoding.| | AUDIOSTREAM_ENCODING_TYPE_RAW | PCM encoding.|
...@@ -252,7 +252,7 @@ Enumerates the latency modes of audio streams. ...@@ -252,7 +252,7 @@ Enumerates the latency modes of audio streams.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_LATENCY_MODE_NORMAL | Normal latency mode.| | AUDIOSTREAM_LATENCY_MODE_NORMAL | Normal latency mode.|
...@@ -274,7 +274,7 @@ Enumerates the audio stream operation results. ...@@ -274,7 +274,7 @@ Enumerates the audio stream operation results.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_SUCCESS | Operation successful.| | AUDIOSTREAM_SUCCESS | Operation successful.|
| AUDIOSTREAM_ERROR_INVALID_PARAM | Invalid input parameter.| | AUDIOSTREAM_ERROR_INVALID_PARAM | Invalid input parameter.|
...@@ -299,7 +299,7 @@ Enumerates the sampling formats of audio streams. ...@@ -299,7 +299,7 @@ Enumerates the sampling formats of audio streams.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_SAMPLE_U8 | Unsigned 8-bit.| | AUDIOSTREAM_SAMPLE_U8 | Unsigned 8-bit.|
| AUDIOSTREAM_SAMPLE_S16LE | Short 16-bit little-endian.| | AUDIOSTREAM_SAMPLE_S16LE | Short 16-bit little-endian.|
...@@ -324,7 +324,7 @@ Enumerates the usage scenarios of an audio capturer, that is, the usage scenario ...@@ -324,7 +324,7 @@ Enumerates the usage scenarios of an audio capturer, that is, the usage scenario
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_SOURCE_TYPE_INVALID | Invalid state.| | AUDIOSTREAM_SOURCE_TYPE_INVALID | Invalid state.|
| AUDIOSTREAM_SOURCE_TYPE_MIC | Audio recording.| | AUDIOSTREAM_SOURCE_TYPE_MIC | Audio recording.|
...@@ -349,7 +349,7 @@ Enumerates the audio stream states. ...@@ -349,7 +349,7 @@ Enumerates the audio stream states.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_STATE_INVALID | Invalid state.| | AUDIOSTREAM_STATE_INVALID | Invalid state.|
| AUDIOSTREAM_STATE_PREPARED | Prepared.| | AUDIOSTREAM_STATE_PREPARED | Prepared.|
...@@ -376,7 +376,7 @@ Enumerates the audio stream types. ...@@ -376,7 +376,7 @@ Enumerates the audio stream types.
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_TYPE_RENDERER | The audio stream is an output stream.| | AUDIOSTREAM_TYPE_RENDERER | The audio stream is an output stream.|
| AUDIOSTREAM_TYPE_CAPTURER | The audio stream is an input stream.| | AUDIOSTREAM_TYPE_CAPTURER | The audio stream is an input stream.|
...@@ -399,7 +399,7 @@ Enumerates the usage scenarios of an audio renderer, that is, the usage scenario ...@@ -399,7 +399,7 @@ Enumerates the usage scenarios of an audio renderer, that is, the usage scenario
10 10
| Value| Description| | Value| Description|
| -------- | -------- | | -------- | -------- |
| AUDIOSTREAM_USAGE_UNKNOWN | Undefined.| | AUDIOSTREAM_USAGE_UNKNOWN | Undefined.|
| AUDIOSTREAM_USAGE_MUSIC | Music.| | AUDIOSTREAM_USAGE_MUSIC | Music.|
...@@ -901,8 +901,6 @@ OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo (OH_AudioRenderer * rende ...@@ -901,8 +901,6 @@ OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo (OH_AudioRenderer * rende
Obtains the usage scenario of an audio renderer. Obtains the usage scenario of an audio renderer.
The renderer information includes the values of [OH_AudioStream_Usage](#oh_audiostream_usage) and **OH_AudioStream_Content**.
**Parameters** **Parameters**
| Name| Description| | Name| Description|
......
...@@ -19,7 +19,7 @@ The VideoDecoder module provides the functions for video decoding. ...@@ -19,7 +19,7 @@ The VideoDecoder module provides the functions for video decoding.
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.<br>File to include: <multimedia/player_framework/native_avcodec_videodecoder.h> | | [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_videodecoder.h><br>**Library**: libnative_media_vdec.so |
### Functions ### Functions
...@@ -52,7 +52,7 @@ The VideoDecoder module provides the functions for video decoding. ...@@ -52,7 +52,7 @@ The VideoDecoder module provides the functions for video decoding.
``` ```
OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec *codec, OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -83,7 +83,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -83,7 +83,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVCodec* OH_VideoDecoder_CreateByMime (const char * mime) OH_AVCodec* OH_VideoDecoder_CreateByMime (const char *mime)
``` ```
**Description** **Description**
...@@ -111,7 +111,7 @@ Returns the pointer to an **OH_AVCodec** instance. ...@@ -111,7 +111,7 @@ Returns the pointer to an **OH_AVCodec** instance.
``` ```
OH_AVCodec* OH_VideoDecoder_CreateByName (const char * name) OH_AVCodec* OH_VideoDecoder_CreateByName (const char *name)
``` ```
**Description** **Description**
...@@ -139,7 +139,7 @@ Returns the pointer to an **OH_AVCodec** instance. ...@@ -139,7 +139,7 @@ Returns the pointer to an **OH_AVCodec** instance.
``` ```
OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -167,7 +167,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -167,7 +167,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -197,7 +197,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -197,7 +197,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index ) OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec *codec, uint32_t index)
``` ```
**Description** **Description**
...@@ -226,7 +226,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -226,7 +226,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec * codec) OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -256,7 +256,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
OH_AVErrCode OH_VideoDecoder_IsValid (OH_AVCodec * codec, bool * isValid ) OH_AVErrCode OH_VideoDecoder_IsValid (OH_AVCodec *codec, bool *isValid)
``` ```
**Description** **Description**
...@@ -285,7 +285,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -285,7 +285,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -313,7 +313,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -313,7 +313,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr ) OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr)
``` ```
**Description** **Description**
...@@ -349,7 +349,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -349,7 +349,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec * codec, uint32_t index ) OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec *codec, uint32_t index)
``` ```
**Description** **Description**
...@@ -380,7 +380,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -380,7 +380,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -408,7 +408,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -408,7 +408,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData ) OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec *codec, OH_AVCodecAsyncCallback callback, void *userData)
``` ```
**Description** **Description**
...@@ -440,7 +440,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -440,7 +440,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec *codec, OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -471,7 +471,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -471,7 +471,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec * codec, OHNativeWindow * window ) OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec *codec, OHNativeWindow *window)
``` ```
**Description** **Description**
...@@ -500,7 +500,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -500,7 +500,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -530,7 +530,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -530,7 +530,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec * codec) OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec *codec)
``` ```
**Description** **Description**
......
...@@ -19,21 +19,21 @@ The **VideoEncoder** module provides the functions for video encoding. ...@@ -19,21 +19,21 @@ The **VideoEncoder** module provides the functions for video encoding.
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.<br>File to include: <multimedia/player_framework/native_avcodec_videoencoder.h> | | [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.<br>**File to include**: <multimedia/player_framework/native_avcodec_videoencoder.h><br> **Library**: libnative_media_venc.so|
### Types ### Types
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Defines an enum that enumerates the bit rate modes of a video encoder. | | [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Defines an enum that enumerates the bit rate modes of a video encoder.|
### Enums ### Enums
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) { **CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of a video encoder.| | [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**CBR** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**VBR** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|
### Functions ### Functions
...@@ -67,7 +67,7 @@ The **VideoEncoder** module provides the functions for video encoding. ...@@ -67,7 +67,7 @@ The **VideoEncoder** module provides the functions for video encoding.
``` ```
typedef enum OH_VideoEncodeBitrateModeOH_VideoEncodeBitrateMode typedef enum OH_VideoEncodeBitrateMode OH_VideoEncodeBitrateMode
``` ```
**Description** **Description**
...@@ -88,7 +88,7 @@ Defines the bit rate mode of a video encoder. ...@@ -88,7 +88,7 @@ Defines the bit rate mode of a video encoder.
``` ```
enum OH_VideoEncodeBitrateMode enum OH_VideoEncode BitrateMode
``` ```
**Description** **Description**
...@@ -115,7 +115,7 @@ Enumerates the bit rate modes of a video encoder. ...@@ -115,7 +115,7 @@ Enumerates the bit rate modes of a video encoder.
``` ```
OH_AVErrCode OH_VideoEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OH_VideoEncoder_Configure (OH_AVCodec *codec, OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -146,7 +146,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -146,7 +146,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVCodec* OH_VideoEncoder_CreateByMime (const char * mime) OH_AVCodec* OH_VideoEncoder_CreateByMime (const char *mime)
``` ```
**Description** **Description**
...@@ -174,7 +174,7 @@ Returns the pointer to the **OH_AVCodec** instance created. You must call **OH_V ...@@ -174,7 +174,7 @@ Returns the pointer to the **OH_AVCodec** instance created. You must call **OH_V
``` ```
OH_AVCodec* OH_VideoEncoder_CreateByName (const char * name) OH_AVCodec* OH_VideoEncoder_CreateByName (const char *name)
``` ```
**Description** **Description**
...@@ -202,7 +202,7 @@ Returns the pointer to an **OH_AVCodec** instance. ...@@ -202,7 +202,7 @@ Returns the pointer to an **OH_AVCodec** instance.
``` ```
OH_AVErrCode OH_VideoEncoder_Destroy (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Destroy (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -230,7 +230,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -230,7 +230,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_Flush (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Flush (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -260,7 +260,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -260,7 +260,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index ) OH_AVErrCode OH_VideoEncoder_FreeOutputData (OH_AVCodec *codec, uint32_t index)
``` ```
**Description** **Description**
...@@ -289,7 +289,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -289,7 +289,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVFormat* OH_VideoEncoder_GetInputDescription (OH_AVCodec * codec) OH_AVFormat* OH_VideoEncoder_GetInputDescription (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -319,7 +319,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -319,7 +319,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
OH_AVFormat* OH_VideoEncoder_GetOutputDescription (OH_AVCodec * codec) OH_AVFormat* OH_VideoEncoder_GetOutputDescription (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -349,7 +349,7 @@ Returns the pointer to an **OH_AVFormat** instance. ...@@ -349,7 +349,7 @@ Returns the pointer to an **OH_AVFormat** instance.
``` ```
OH_AVErrCode OH_VideoEncoder_GetSurface (OH_AVCodec * codec, OHNativeWindow ** window ) OH_AVErrCode OH_VideoEncoder_GetSurface (OH_AVCodec *codec, OHNativeWindow **window)
``` ```
**Description** **Description**
...@@ -378,7 +378,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -378,7 +378,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_IsValid (OH_AVCodec * codec, bool * isValid ) OH_AVErrCode OH_VideoEncoder_IsValid (OH_AVCodec *codec, bool *isValid)
``` ```
**Description** **Description**
...@@ -407,7 +407,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -407,7 +407,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -437,7 +437,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -437,7 +437,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_Prepare (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Prepare (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -465,7 +465,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -465,7 +465,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr ) OH_AVErrCode OH_VideoEncoder_PushInputData (OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr)
``` ```
**Description** **Description**
...@@ -495,7 +495,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -495,7 +495,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_Reset (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Reset (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -523,7 +523,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -523,7 +523,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCallback callback, void * userData ) OH_AVErrCode OH_VideoEncoder_SetCallback (OH_AVCodec *codec, OH_AVCodecAsyncCallback callback, void *userData)
``` ```
**Description** **Description**
...@@ -555,7 +555,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -555,7 +555,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * format ) OH_AVErrCode OH_VideoEncoder_SetParameter (OH_AVCodec *codec, OH_AVFormat *format)
``` ```
**Description** **Description**
...@@ -586,7 +586,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -586,7 +586,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_Start (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Start (OH_AVCodec *codec)
``` ```
**Description** **Description**
...@@ -616,7 +616,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi ...@@ -616,7 +616,7 @@ Returns **AV_ERR_OK** if the operation is successful; returns an error code defi
``` ```
OH_AVErrCode OH_VideoEncoder_Stop (OH_AVCodec * codec) OH_AVErrCode OH_VideoEncoder_Stop (OH_AVCodec *codec)
``` ```
**Description** **Description**
......
...@@ -37,8 +37,8 @@ The **native_avcapability.h** file declares the native APIs used to query the co ...@@ -37,8 +37,8 @@ The **native_avcapability.h** file declares the native APIs used to query the co
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_BitrateMode](_a_v_capability.md#oh_bitratemode) { **BITRATE_MODE_CBR** = 0, **BITRATE_MODE_VBR** = 1, **BITRATE_MODE_CQ** = 2 } | Enumerates the bit rate modes of an encoder.| | [OH_BitrateMode](_a_v_capability.md#oh_bitratemode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_CBR** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_VBR** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**BITRATE_MODE_CQ** = 2<br>} | Enumerates the bit rate modes of an encoder.|
| [OH_AVCodecCategory](_a_v_capability.md#oh_avcodeccategory) { **HARDWARE** = 0, **SOFTWARE** } | Enumerates the codec categories.| | [OH_AVCodecCategory](_a_v_capability.md#oh_avcodeccategory) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**HARDWARE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SOFTWARE**<br>} | Enumerates the codec categories.|
### Functions ### Functions
......
# native_avcodec_audiodecoder.h # native_avcodec_audiodecoder.h
## Overview ## Overview
The **native_avcodec_audiodecoder.h** file declares the native APIs used for audio decoding. 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 ...@@ -13,26 +12,24 @@ The **native_avcodec_audiodecoder.h** file declares the native APIs used for aud
[AudioDecoder](_audio_decoder.md) [AudioDecoder](_audio_decoder.md)
## Summary ## Summary
### Functions ### Functions
| Name| Description| | 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_CreateByMime](_audio_decoder.md#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioDecoder_CreateByName](_audio_decoder.md#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder.| | \*[OHOS::Media::OH_AudioDecoder_CreateByName](_audio_decoder.md#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder. |
| [OHOS::Media::OH_AudioDecoder_Destroy](_audio_decoder.md#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance.| | [OHOS::Media::OH_AudioDecoder_Destroy](_audio_decoder.md#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the decoder instance. |
| [OHOS::Media::OH_AudioDecoder_SetCallback](_audio_decoder.md#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder.| | [OHOS::Media::OH_AudioDecoder_SetCallback](_audio_decoder.md#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Configure](_audio_decoder.md#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the audio description information that can be extracted from the container.| | [OHOS::Media::OH_AudioDecoder_Configure](_audio_decoder.md#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the audio description information that can be extracted from the container. |
| [OHOS::Media::OH_AudioDecoder_Prepare](_audio_decoder.md#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This function must be called after **Configure**.| | [OHOS::Media::OH_AudioDecoder_Prepare](_audio_decoder.md#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioDecoder_Start](_audio_decoder.md#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This function can be called only after the decoder is prepared successfully.| | [OHOS::Media::OH_AudioDecoder_Start](_audio_decoder.md#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This function can be called only after the decoder is prepared successfully. |
| [OHOS::Media::OH_AudioDecoder_Stop](_audio_decoder.md#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder.| | [OHOS::Media::OH_AudioDecoder_Stop](_audio_decoder.md#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Flush](_audio_decoder.md#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder.| | [OHOS::Media::OH_AudioDecoder_Flush](_audio_decoder.md#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_Reset](_audio_decoder.md#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** to configure the decoder again.| | [OHOS::Media::OH_AudioDecoder_Reset](_audio_decoder.md#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** to configure the decoder again. |
| \*[OHOS::Media::OH_AudioDecoder_GetOutputDescription](_audio_decoder.md#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio decoder. For details, see **OH_AVFormat**.| | \*[OHOS::Media::OH_AudioDecoder_GetOutputDescription](_audio_decoder.md#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio decoder. For details, see **OH_AVFormat**. |
| [OHOS::Media::OH_AudioDecoder_SetParameter](_audio_decoder.md#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This function can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.| | [OHOS::Media::OH_AudioDecoder_SetParameter](_audio_decoder.md#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This function can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.|
| [OHOS::Media::OH_AudioDecoder_PushInputData](_audio_decoder.md#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio decoder.| | [OHOS::Media::OH_AudioDecoder_PushInputData](_audio_decoder.md#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_FreeOutputData](_audio_decoder.md#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder.| | [OHOS::Media::OH_AudioDecoder_FreeOutputData](_audio_decoder.md#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder. |
| [OHOS::Media::OH_AudioDecoder_IsValid](_audio_decoder.md#oh_audiodecoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio decoder instance is valid.| | [OHOS::Media::OH_AudioDecoder_IsValid](_audio_decoder.md#oh_audiodecoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio decoder instance is valid. |
# native_avcodec_audioencoder.h # native_avcodec_audioencoder.h
## Overview ## Overview
The **native_avcodec_audioencoder.h** file declares the native APIs used for audio encoding. 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 ...@@ -13,26 +12,24 @@ The **native_avcodec_audioencoder.h** file declares the native APIs used for aud
[AudioEncoder](_audio_encoder.md) [AudioEncoder](_audio_encoder.md)
## Summary ## Summary
### Functions ### Functions
| Name| Description| | 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_CreateByMime](_audio_encoder.md#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases. |
| \*[OHOS::Media::OH_AudioEncoder_CreateByName](_audio_encoder.md#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.| | \*[OHOS::Media::OH_AudioEncoder_CreateByName](_audio_encoder.md#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an encoder name. To use this function, you must know the exact name of the encoder.|
| [OHOS::Media::OH_AudioEncoder_Destroy](_audio_encoder.md#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance.| | [OHOS::Media::OH_AudioEncoder_Destroy](_audio_encoder.md#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the encoder instance. |
| [OHOS::Media::OH_AudioEncoder_SetCallback](_audio_encoder.md#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder.| | [OHOS::Media::OH_AudioEncoder_SetCallback](_audio_encoder.md#oh_audioencoder_setcallback) (OH_AVCodec \*codec, OH_AVCodecAsyncCallback callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Configure](_audio_encoder.md#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded.| | [OHOS::Media::OH_AudioEncoder_Configure](_audio_encoder.md#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the description information about the audio track to be encoded. |
| [OHOS::Media::OH_AudioEncoder_Prepare](_audio_encoder.md#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**.| | [OHOS::Media::OH_AudioEncoder_Prepare](_audio_encoder.md#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This function must be called after **Configure**. |
| [OHOS::Media::OH_AudioEncoder_Start](_audio_encoder.md#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully.| | [OHOS::Media::OH_AudioEncoder_Start](_audio_encoder.md#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This function can be called only after the encoder is prepared successfully. |
| [OHOS::Media::OH_AudioEncoder_Stop](_audio_encoder.md#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Stop](_audio_encoder.md#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Flush](_audio_encoder.md#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Flush](_audio_encoder.md#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_Reset](_audio_encoder.md#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder.| | [OHOS::Media::OH_AudioEncoder_Reset](_audio_encoder.md#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. |
| \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](_audio_encoder.md#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**.| | \*[OHOS::Media::OH_AudioEncoder_GetOutputDescription](_audio_encoder.md#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of an audio encoder. For details, see **OH_AVFormat**. |
| [OHOS::Media::OH_AudioEncoder_SetParameter](_audio_encoder.md#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder.| | [OHOS::Media::OH_AudioEncoder_SetParameter](_audio_encoder.md#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_PushInputData](_audio_encoder.md#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder.| | [OHOS::Media::OH_AudioEncoder_PushInputData](_audio_encoder.md#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, OH_AVCodecBufferAttr attr) | Pushes the input buffer filled with data to an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_FreeOutputData](_audio_encoder.md#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder.| | [OHOS::Media::OH_AudioEncoder_FreeOutputData](_audio_encoder.md#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. |
| [OHOS::Media::OH_AudioEncoder_IsValid](_audio_encoder.md#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid.| | [OHOS::Media::OH_AudioEncoder_IsValid](_audio_encoder.md#oh_audioencoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether an audio encoder instance is valid. |
...@@ -52,17 +52,17 @@ The **native_avcodec_base.h** file declares the common structs, character consta ...@@ -52,17 +52,17 @@ The **native_avcodec_base.h** file declares the common structs, character consta
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags) {<br>**AVCODEC_BUFFER_FLAGS_NONE** = 0, **AVCODEC_BUFFER_FLAGS_EOS** = 1 &lt;&lt; 0, **AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 &lt;&lt; 1, **AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 &lt;&lt; 2,<br>**AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 &lt;&lt; 3<br>} | Enumerates the flags for the buffer of an **OH_AVCodec** instance.| | [OH_AVCodecBufferFlags](_codec_base.md#oh_avcodecbufferflags) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_NONE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_EOS** = 1 &lt;&lt; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 &lt;&lt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 &lt;&lt; 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVCODEC_BUFFER_FLAGS_CODEC_DATA** = 1 &lt;&lt; 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_AVOutputFormat](_codec_base.md#oh_avoutputformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_DEFAULT** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_MPEG_4** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AV_OUTPUT_FORMAT_M4A** = 6<br>} | 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_MediaType](_codec_base.md#oh_mediatype) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**MEDIA_TYPE_AUD** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MEDIA_TYPE_VID** = 1<br>} | Enumerates the media types. |
| [OH_AVCProfile](_codec_base.md#oh_avcprofile) { **AVC_PROFILE_BASELINE** = 0, **AVC_PROFILE_HIGH** = 4, **AVC_PROFILE_MAIN** = 8 } | Enumerates the AVC profiles.| | [OH_AVCProfile](_codec_base.md#oh_avcprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_BASELINE** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_HIGH** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**AVC_PROFILE_MAIN** = 8<br>} | Enumerates the AVC profiles. |
| [OH_HEVCProfile](_codec_base.md#oh_hevcprofile) {<br>**HEVC_PROFILE_MAIN** = 0, **HEVC_PROFILE_MAIN_10** = 1, **HEVC_PROFILE_MAIN_STILL** = 2, **HEVC_PROFILE_MAIN_10_HDR10** = 3,<br>**HEVC_PROFILE_MAIN_10_HDR10_PLUS** = 4<br>} | Enumerates the HEVC profiles.| | [OH_HEVCProfile](_codec_base.md#oh_hevcprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_STILL** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10_HDR10** = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;**HEVC_PROFILE_MAIN_10_HDR10_PLUS** = 4<br>} | Enumerates the HEVC profiles. |
| [OH_AACProfile](_codec_base.md#oh_aacprofile) { **AAC_PROFILE_LC** = 0 } | Enumerates the AAC profiles.| | [OH_AACProfile](_codec_base.md#oh_aacprofile) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**AAC_PROFILE_LC** = 0<br>} | Enumerates the AAC profiles. |
| [OH_AVSeekMode](_codec_base.md#oh_avseekmode) { **SEEK_MODE_NEXT_SYNC** = 0, **SEEK_MODE_PREVIOUS_SYNC**, **SEEK_MODE_CLOSEST_SYNC** } | Enumerates the seek modes.| | [OH_AVSeekMode](_codec_base.md#oh_avseekmode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_NEXT_SYNC** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_PREVIOUS_SYNC**,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SEEK_MODE_CLOSEST_SYNC**<br>} | Enumerates the seek modes. |
| [OH_ColorPrimary](_codec_base.md#oh_colorprimary) {<br>**COLOR_PRIMARY_BT709** = 1, **COLOR_PRIMARY_UNSPECIFIED** = 2, **COLOR_PRIMARY_BT470_M** = 4, **COLOR_PRIMARY_BT601_625** = 5,<br>**COLOR_PRIMARY_BT601_525** = 6, **COLOR_PRIMARY_SMPTE_ST240** = 7, **COLOR_PRIMARY_GENERIC_FILM** = 8, **COLOR_PRIMARY_BT2020** = 9,<br>**COLOR_PRIMARY_SMPTE_ST428** = 10, **COLOR_PRIMARY_P3DCI** = 11, **COLOR_PRIMARY_P3D65** = 12<br>} | Enumerates the primary colors.| | [OH_ColorPrimary](_codec_base.md#oh_colorprimary) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT470_M** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT601_625** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT601_525** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_GENERIC_FILM** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_BT2020** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_SMPTE_ST428** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_P3DCI** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**COLOR_PRIMARY_P3D65** = 12<br>} | Enumerates the primary colors.|
| [OH_TransferCharacteristic](_codec_base.md#oh_transfercharacteristic) {<br>**TRANSFER_CHARACTERISTIC_BT709** = 1, **TRANSFER_CHARACTERISTIC_UNSPECIFIED** = 2, **TRANSFER_CHARACTERISTIC_GAMMA_2_2** = 4, **TRANSFER_CHARACTERISTIC_GAMMA_2_8** = 5,<br>**TRANSFER_CHARACTERISTIC_BT601** = 6, **TRANSFER_CHARACTERISTIC_SMPTE_ST240** = 7, **TRANSFER_CHARACTERISTIC_LINEAR** = 8, **TRANSFER_CHARACTERISTIC_LOG** = 9,<br>**TRANSFER_CHARACTERISTIC_LOG_SQRT** = 10, **TRANSFER_CHARACTERISTIC_IEC_61966_2_4** = 11, **TRANSFER_CHARACTERISTIC_BT1361** = 12, **TRANSFER_CHARACTERISTIC_IEC_61966_2_1** = 13,<br>**TRANSFER_CHARACTERISTIC_BT2020_10BIT** = 14, **TRANSFER_CHARACTERISTIC_BT2020_12BIT** = 15, **TRANSFER_CHARACTERISTIC_PQ** = 16, **TRANSFER_CHARACTERISTIC_SMPTE_ST428** = 17,<br>**TRANSFER_CHARACTERISTIC_HLG** = 18<br>} | Enumerates the transfer characteristics.| | [OH_TransferCharacteristic](_codec_base.md#oh_transfercharacteristic) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_GAMMA_2_2** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_GAMMA_2_8** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT601** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LINEAR** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LOG** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_LOG_SQRT** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_IEC_61966_2_4** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT1361** = 12,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_IEC_61966_2_1** = 13,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT2020_10BIT** = 14,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_BT2020_12BIT** = 15,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_PQ** = 16,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_SMPTE_ST428** = 17,<br>&nbsp;&nbsp;&nbsp;&nbsp;**TRANSFER_CHARACTERISTIC_HLG** = 18<br>} | Enumerates the transfer characteristics.|
| [OH_MatrixCoefficient](_codec_base.md#oh_matrixcoefficient) {<br>**MATRIX_COEFFICIENT_IDENTITY** = 0, **MATRIX_COEFFICIENT_BT709** = 1, **MATRIX_COEFFICIENT_UNSPECIFIED** = 2, **MATRIX_COEFFICIENT_FCC** = 4,<br>**MATRIX_COEFFICIENT_BT601_625** = 5, **MATRIX_COEFFICIENT_BT601_525** = 6, **MATRIX_COEFFICIENT_SMPTE_ST240** = 7, **MATRIX_COEFFICIENT_YCGCO** = 8,<br>**MATRIX_COEFFICIENT_BT2020_NCL** = 9, **MATRIX_COEFFICIENT_BT2020_CL** = 10, **MATRIX_COEFFICIENT_SMPTE_ST2085** = 11, **MATRIX_COEFFICIENT_CHROMATICITY_NCL** = 12,<br>**MATRIX_COEFFICIENT_CHROMATICITY_CL** = 13, **MATRIX_COEFFICIENT_ICTCP** = 14<br>} | Enumerates the matrix coefficients.| | [OH_MatrixCoefficient](_codec_base.md#oh_matrixcoefficient) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_IDENTITY** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT709** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_UNSPECIFIED** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_FCC** = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT601_625** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT601_525** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_SMPTE_ST240** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_YCGCO** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT2020_NCL** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_BT2020_CL** = 10,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_SMPTE_ST2085** = 11,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_CHROMATICITY_NCL** = 12,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_CHROMATICITY_CL** = 13,<br>&nbsp;&nbsp;&nbsp;&nbsp;**MATRIX_COEFFICIENT_ICTCP** = 14<br>} | Enumerates the matrix coefficients.|
| [OH_BitsPerSample](_codec_base.md#oh_bitspersample) {<br>**SAMPLE_U8** = 0, **SAMPLE_S16LE** = 1, **SAMPLE_S24LE** = 2, **SAMPLE_S32LE** = 3,<br>**SAMPLE_F32LE** = 4, **SAMPLE_U8P** = 5, **SAMPLE_S16P** = 6, **SAMPLE_S24P** = 7,<br>**SAMPLE_S32P** = 8, **SAMPLE_F32P** = 9, **INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.| | [OH_BitsPerSample](_codec_base.md#oh_bitspersample) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_U8** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S16LE** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S24LE** = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S32LE** = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_F32LE** = 4,i<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_U8P** = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S16P** = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S24P** = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_S32P** = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;**SAMPLE_F32P** = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;**INVALID_WIDTH** = -1<br>} | Enumerates the number of audio bits for each coded sample.|
### Variables ### Variables
......
...@@ -28,7 +28,7 @@ The **native_avcodec_videoencoder.h** file declares the native APIs used for vid ...@@ -28,7 +28,7 @@ The **native_avcodec_videoencoder.h** file declares the native APIs used for vid
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode) { **CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of a video encoder.| | [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;**CBR** = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;**VBR** = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;**CQ** = 2<br>} | Enumerates the bit rate modes of a video encoder.|
### Functions ### Functions
......
...@@ -28,4 +28,4 @@ The **native_averrors.h** file declares the error codes used by the media playba ...@@ -28,4 +28,4 @@ The **native_averrors.h** file declares the error codes used by the media playba
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_AVErrCode](_core.md#oh_averrcode) {<br>AV_ERR_OK = 0, AV_ERR_NO_MEMORY = 1, AV_ERR_OPERATE_NOT_PERMIT = 2, AV_ERR_INVALID_VAL = 3,<br>AV_ERR_IO = 4, AV_ERR_TIMEOUT = 5, AV_ERR_UNKNOWN = 6, AV_ERR_SERVICE_DIED = 7,<br>AV_ERR_INVALID_STATE = 8, AV_ERR_UNSUPPORT = 9, AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.| | [OH_AVErrCode](_core.md#oh_averrcode) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OK = 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_NO_MEMORY = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_OPERATE_NOT_PERMIT = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_VAL = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_IO = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_TIMEOUT = 5,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNKNOWN = 6,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_SERVICE_DIED = 7,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_INVALID_STATE = 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_UNSUPPORT = 9,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_ERR_EXTEND_START = 100<br>} | Enumerates the audio and video error codes.|
...@@ -28,7 +28,7 @@ The **native_avformat.h** file declares the format-related functions and enums. ...@@ -28,7 +28,7 @@ The **native_avformat.h** file declares the format-related functions and enums.
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| [OH_AVPixelFormat](_core.md#oh_avpixelformat) {<br>AV_PIXEL_FORMAT_YUVI420 = 1, AV_PIXEL_FORMAT_NV12 = 2, AV_PIXEL_FORMAT_NV21 = 3, AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.| | [OH_AVPixelFormat](_core.md#oh_avpixelformat) {<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_YUVI420 = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV12 = 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_NV21 = 3,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_SURFACE_FORMAT = 4,<br>&nbsp;&nbsp;&nbsp;&nbsp;AV_PIXEL_FORMAT_RGBA = 5<br>} | Enumerates the video pixel formats.|
### Functions ### Functions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册