[][src]Function jpegxl_sys::JpegxlDecoderProcessInput

pub unsafe extern "C" fn JpegxlDecoderProcessInput(
    dec: *mut JpegxlDecoder,
    next_in: *mut *const u8,
    avail_in: *mut size_t
) -> JpegxlDecoderStatus

Decodes JPEG XL file using the available bytes. @p *avail_in indicates how many input bytes are available, and @p *next_in points to the input bytes. *avail_in will be decremented by the amount of bytes that have been processed by the decoder and *next_in will be incremented by the same amount, so *next_in will now point at the amount of *avail_in unprocessed bytes. For the next call to this function, all unprocessed bytes must be provided again (the address need not match, but the contents must), and more bytes may be concatenated after the unprocessed bytes.

The returned status indicates whether the decoder needs more input bytes, or more output buffer for a certain type of output data. No matter what the returned status is (other than JPEGXL_DEC_ERROR), new information, such as JpegxlDecoderGetBasicInfo, may have become available after this call. When the return value is not JPEGXL_DEC_ERROR or JPEGXL_DEC_SUCCESS, the decoding requires more JpegxlDecoderProcessInput calls to continue.

@param dec decoder object @param next_in pointer to next bytes to read from @param avail_in amount of bytes available starting from *next_in @return JPEGXL_DEC_SUCCESS when decoding finished and all events handled. @return JPEGXL_DEC_ERROR when decoding failed, e.g. invalid codestream. TODO(lode) document the input data mechanism @return JPEGXL_DEC_NEED_MORE_INPUT more input data is necessary. @return JPEGXL_DEC_BASIC_INFO when basic info such as image dimensions is available and this informative event is subscribed to. @return JPEGXL_DEC_EXTENSIONS when JPEG XL codestream user extensions are available and this informative event is subscribed to. @return JPEGXL_DEC_PREVIEW_HEADER when preview dimensions are available and this informative event is subscribed to. @return JPEGXL_DEC_ANIMATION_HEADER when animation information is available and this informative event is subscribed to. @return JPEGXL_DEC_COLOR_ENCODING when color profile information is available and this informative event is subscribed to. @return JPEGXL_DEC_DC when DC pixel information is available and output in the DC buffer. @return JPEGXL_DEC_FULL_IMAGE when all pixel information at highest detail is available and has been output in the pixel buffer.