img_encode_finish()

Release encode resources

Synopsis:

#include <img/img.h>

int img_encode_finish( img_codec_t     codec,
                       io_stream_t *   output,
                       uintptr_t *     encode_data );


Arguments:

codec
The handle of the codec that was used to encode.
output
A pointer to an output stream for the image data.
encode_data
The address of the uintptr_t that was used for img_encode_begin() and img_encode_frame() .

Library:

libimg

Use the -l img option to qcc to link against this library.

Description:

This function finalizes the encode process and releases resources allocated during an encoding session. You should call this function after you've finished encoding a series of frames, to release any resources that the encoder may have allocated in association with those frames.

Returns:

IMG_ERR_OK
Success.
IMG_ERR_NOTIMPL
The codec doesn't support encoding.
Other
Any other code that a decoder's encode_finish() function may pass back to flag an error (see img_errno.h for a list of defined errors).

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No