native_avcodec_videodecoder.h
Overview
The native_avcodec_videodecoder.h file declares the native APIs used for video decoding.
Since
9
Related Modules
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. |