The following function is required to be implemented for all decoders that advertise the AOM_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 AOM_CODEC_INCAPABLE.
◆ aom_codec_set_frame_buffer_functions()
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.
- Parameters
-
[in] | ctx | Pointer to this instance's context |
[in] | cb_get | Pointer to the get callback function |
[in] | cb_release | Pointer to the release callback function |
[in] | cb_priv | Callback's private data |
- Return values
-
- Note
- When decoding AV1, the application may be required to pass in at least AOM_MAXIMUM_WORK_BUFFERS external frame buffers.