The following function is required to be implemented for all decoders that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability. More...

Functions

vpx_codec_err_t vpx_codec_set_frame_buffer_functions (vpx_codec_ctx_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv)
 Pass in external frame buffers for the decoder to use. More...
 

Detailed Description

The following function is required to be implemented for all decoders that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.

The following section is required to be implemented for all decoders that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.

Calling this function for codecs that don't advertise this capability will result in an error code being returned, usually VPX_CODEC_INCAPABLE.

Note
Currently this only works with VP9.

Calling this function for codecs that don't advertise this capability will result in an error code being returned, usually VPX_CODEC_ERROR.

Note
Currently this only works with VP9.

Function Documentation

◆ vpx_codec_set_frame_buffer_functions()

vpx_codec_err_t vpx_codec_set_frame_buffer_functions ( vpx_codec_ctx_t ctx,
vpx_get_frame_buffer_cb_fn_t  cb_get,
vpx_release_frame_buffer_cb_fn_t  cb_release,
void *  cb_priv 
)

Pass in external frame buffers for the decoder to use.

Registers functions to be called when libvpx needs a frame buffer to decode the current frame and a function to be called when libvpx does not internally reference the frame buffer. This set function must be called before the first call to decode or libvpx will assume the default behavior of allocating frame buffers internally.

Parameters
[in]ctxPointer to this instance's context
[in]cb_getPointer to the get callback function
[in]cb_releasePointer to the release callback function
[in]cb_privCallback's private data
Return values
VPX_CODEC_OKExternal frame buffers will be used by libvpx.
VPX_CODEC_INVALID_PARAMOne or more of the callbacks were NULL.
VPX_CODEC_ERRORDecoder context not initialized.
VPX_CODEC_INCAPABLEAlgorithm not capable of using external frame buffers.
Note
When decoding VP9, the application may be required to pass in at least #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame buffers.

Registers functions to be called when libvpx needs a frame buffer to decode the current frame and a function to be called when libvpx does not internally reference the frame buffer. This set function must be called before the first call to decode or libvpx will assume the default behavior of allocating frame buffers internally.

Parameters
[in]ctxPointer to this instance's context
[in]cb_getPointer to the get callback function
[in]cb_releasePointer to the release callback function
[in]cb_privCallback's private data
Return values
VPX_CODEC_OKExternal frame buffers will be used by libvpx.
VPX_CODEC_INVALID_PARAMOne or more of the callbacks were NULL.
VPX_CODEC_ERRORDecoder context not initialized, or algorithm not capable of using external frame buffers.
Note
When decoding VP9, the application may be required to pass in at least #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame buffers.