[][src]Function libaom_sys::aom_codec_set_frame_buffer_functions

pub unsafe extern "C" fn aom_codec_set_frame_buffer_functions(
    ctx: *mut aom_codec_ctx_t,
    cb_get: aom_get_frame_buffer_cb_fn_t,
    cb_release: aom_release_frame_buffer_cb_fn_t,
    cb_priv: *mut c_void
) -> aom_codec_err_t

Pass in external frame buffers for the decoder to use.

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

\param[in] ctx Pointer to this instance's context \param[in] cb_get Pointer to the get callback function \param[in] cb_release Pointer to the release callback function \param[in] cb_priv Callback's private data

\retval #AOM_CODEC_OK External frame buffers will be used by libaom. \retval #AOM_CODEC_INVALID_PARAM One or more of the callbacks were NULL. \retval #AOM_CODEC_ERROR Decoder context not initialized. \retval #AOM_CODEC_INCAPABLE Algorithm not capable of using external frame buffers.

\note When decoding AV1, the application may be required to pass in at least #AOM_MAXIMUM_WORK_BUFFERS external frame buffers.