harmony 鸿蒙native_avcodec_videodecoder.h

  • 2023-06-24
  • 浏览 (638)

native_avcodec_videodecoder.h

Overview

The native_avcodec_videodecoder.h file declares the native APIs used for video decoding.

Since

9

Related Modules

VideoDecoder

Summary

Functions

Name Description
*OH_VideoDecoder_CreateByMime (const char *mime) Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This function is recommended in most cases.
*OH_VideoDecoder_CreateByName (const char *name) Creates a video decoder instance based on a decoder name. To use this function, you must know the exact name of the decoder.
OH_VideoDecoder_Destroy (OH_AVCodec *codec) Clears the internal resources of a video decoder and destroys the decoder instance.
OH_VideoDecoder_SetCallback (OH_AVCodec *codec, OH_AVCodecAsyncCallback callback, void *userData) Sets an asynchronous callback so that your application can respond to events generated by a video decoder.
OH_VideoDecoder_SetSurface (OH_AVCodec *codec, OHNativeWindow *window) Sets an output surface for a video decoder. This function must be called prior to Prepare.
OH_VideoDecoder_Configure (OH_AVCodec *codec, OH_AVFormat *format) Configures a video decoder. Typically, you need to configure the video track description information that can be extracted from the container.
OH_VideoDecoder_Prepare (OH_AVCodec *codec) Prepares internal resources for a video decoder. This function must be called after Configure.
OH_VideoDecoder_Start (OH_AVCodec *codec) Starts a video decoder. This function can be called only after the decoder is prepared successfully.
OH_VideoDecoder_Stop (OH_AVCodec *codec) Stops a video decoder.
OH_VideoDecoder_Flush (OH_AVCodec *codec) Clears the input and output data in the internal buffer of a video decoder.
OH_VideoDecoder_Reset (OH_AVCodec *codec) Resets a video decoder.
*OH_VideoDecoder_GetOutputDescription (OH_AVCodec *codec) Obtains the description information about the output data of a video decoder.
OH_VideoDecoder_SetParameter (OH_AVCodec *codec, OH_AVFormat *format) Sets dynamic parameters for a video decoder.
OH_VideoDecoder_PushInputData (OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr) Pushes the input buffer filled with data to a video decoder.
OH_VideoDecoder_RenderOutputData (OH_AVCodec *codec, uint32_t index) Frees an output buffer of a video decoder and instructs the decoder to render the decoded data in the buffer on the output surface.
OH_VideoDecoder_FreeOutputData (OH_AVCodec *codec, uint32_t index) Frees an output buffer of a video decoder.
OH_VideoDecoder_IsValid (OH_AVCodec *codec, bool *isValid) Checks whether a video codec instance is valid.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞