# native_avcodec_videodecoder.h ## Overview The **native_avcodec_videodecoder.h** file declares the native APIs used for video decoding. **Since** 9 **Related Modules** [VideoDecoder](_video_decoder.md) ## Summary ### Functions | Name| Description| | -------- | -------- | | \*[OH_VideoDecoder_CreateByMime](_video_decoder.md#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](_video_decoder.md#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](_video_decoder.md#oh_videodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video decoder and destroys the decoder instance.| | [OH_VideoDecoder_SetCallback](_video_decoder.md#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](_video_decoder.md#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](_video_decoder.md#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](_video_decoder.md#oh_videodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video decoder. This function must be called after **Configure**.| | [OH_VideoDecoder_Start](_video_decoder.md#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](_video_decoder.md#oh_videodecoder_stop) (OH_AVCodec \*codec) | Stops a video decoder.| | [OH_VideoDecoder_Flush](_video_decoder.md#oh_videodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of a video decoder.| | [OH_VideoDecoder_Reset](_video_decoder.md#oh_videodecoder_reset) (OH_AVCodec \*codec) | Resets a video decoder.| | \*[OH_VideoDecoder_GetOutputDescription](_video_decoder.md#oh_videodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the description information about the output data of a video decoder.| | [OH_VideoDecoder_SetParameter](_video_decoder.md#oh_videodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video decoder.| | [OH_VideoDecoder_PushInputData](_video_decoder.md#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](_video_decoder.md#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](_video_decoder.md#oh_videodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video decoder.| | [OH_VideoDecoder_IsValid](_video_decoder.md#oh_videodecoder_isvalid) (OH_AVCodec \*codec, bool \*isValid) | Checks whether a video codec instance is valid.|