[][src]Function jpegxl_sys::JxlDecoderProcessInput

pub unsafe extern "C" fn JxlDecoderProcessInput(
    dec: *mut JxlDecoder,
    next_in: *mut *const u8,
    avail_in: *mut size_t
) -> JxlDecoderStatus

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 JXL_DEC_ERROR), new information, such as JxlDecoderGetBasicInfo, may have become available after this call. When the return value is not JXL_DEC_ERROR or JXL_DEC_SUCCESS, the decoding requires more JxlDecoderProcessInput 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 JXL_DEC_SUCCESS when decoding finished and all events handled. @return JXL_DEC_ERROR when decoding failed, e.g. invalid codestream. TODO(lode) document the input data mechanism @return JXL_DEC_NEED_MORE_INPUT more input data is necessary. @return JXL_DEC_BASIC_INFO when basic info such as image dimensions is available and this informative event is subscribed to. @return JXL_DEC_EXTENSIONS when JPEG XL codestream user extensions are available and this informative event is subscribed to. @return JXL_DEC_COLOR_ENCODING when color profile information is available and this informative event is subscribed to. @return JXL_DEC_PREVIEW_IMAGE when preview pixel information is available and output in the preview buffer. @return JXL_DEC_DC_IMAGE when DC pixel information (8x8 downscaled version of the image) is available and output in the DC buffer. @return JXL_DEC_FULL_IMAGE when all pixel information at highest detail is available and has been output in the pixel buffer.