harmony 鸿蒙native_avcodec_audiodecoder.h

2023-06-24 浏览 (608)

native_avcodec_audiodecoder.h

Overview

The native_avcodec_audiodecoder.h file declares the native APIs used for audio decoding.

Since

9

Related Modules

AudioDecoder

Summary

Functions

NameDescription
*OHOS::Media::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 (const char *name)Creates an audio decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder.
OHOS::Media::OH_AudioDecoder_Destroy (OH_AVCodec *codec)Clears the internal resources of an audio decoder and destroys the decoder instance.
OHOS::Media::OH_AudioDecoder_SetCallback (OH_AVCodec *codec, OH_AVCodecAsyncCallback callback, void *userData)Sets an asynchronous callback so that your application can respond to events generated by an audio decoder.
OHOS::Media::OH_AudioDecoder_Configure (OH_AVCodec *codec, OH_AVFormat *format)Configures an audio decoder. Typically, you need to configure the audio description information that can be extracted from the container.
OHOS::Media::OH_AudioDecoder_Prepare (OH_AVCodec *codec)Prepares internal resources for an audio decoder. This function must be called after Configure.
OHOS::Media::OH_AudioDecoder_Start (OH_AVCodec *codec)Starts an audio decoder. This function can be called only after the decoder is prepared successfully.
OHOS::Media::OH_AudioDecoder_Stop (OH_AVCodec *codec)Stops an audio decoder.
OHOS::Media::OH_AudioDecoder_Flush (OH_AVCodec *codec)Clears the input and output data in the internal buffer of an audio decoder.
OHOS::Media::OH_AudioDecoder_Reset (OH_AVCodec *codec)Resets an audio decoder. To continue decoding, you must call Configure to configure the decoder again.
*OHOS::Media::OH_AudioDecoder_GetOutputDescription (OH_AVCodec *codec)Obtains the description information about the output data of an audio decoder. For details, see OH_AVFormat.
OHOS::Media::OH_AudioDecoder_SetParameter (OH_AVCodec *codec, OH_AVFormat *format)Sets dynamic parameters for an audio decoder. This function can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.
OHOS::Media::OH_AudioDecoder_PushInputData (OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr)Pushes the input buffer filled with data to an audio decoder.
OHOS::Media::OH_AudioDecoder_FreeOutputData (OH_AVCodec *codec, uint32_t index)Frees an output buffer of an audio decoder.
OHOS::Media::OH_AudioDecoder_IsValid (OH_AVCodec *codec, bool *isValid)Checks whether an audio decoder instance is valid.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/222297b0972c45e388082beacfae68d4