Prepare to decode a frame from a stream
#include <img.h>
int img_decode_begin( img_codec_t codec,
io_stream_t *input,
uintptr_t *decode_data );
- codec
- The codec to use. To figure out a codec to use, see img_codec_list, list_byext, list_bymime, and img_decode_validate.
- input
- The input source.
- decode_data
- An address of a uintptr_t which the decoder uses to store data it needs across the decode process. You should not pass NULL, but instead pass a valid address of a uintptr_t initialized to 0.
img
This function prepares to decode a frame (or series of frames) from a stream.
- IMG_ERR_OK
- Success.
- IMG_ERR_NOTIMPL
- The codec doesn't support decoding (Currently, all codecs shipped with the Neutrino image library support decoding).
- Other
- Any other code that a decoder's begin() function may pass back to flag an error (see img_errno.h for a list of defined errors).
Image library
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
img_decode_finish()
img_decode_frame()