pub struct JxlEncoderOutputProcessor { /* private fields */ }Expand description
The JxlEncoderOutputProcessor structure provides an interface for the
encoder’s output processing. Users of the library, who want to do streaming
encoding, should implement the required callbacks for buffering, writing,
seeking (if supported), and setting a finalized position during the encoding
process.
At a high level, the processor can be in one of two states:
- With an active buffer: This indicates that a buffer has been acquired using
get_bufferand encoded data can be written to it. - Without an active buffer: In this state, no data can be written. A new buffer must be acquired after releasing any previously active buffer.
The library will not acquire more than one buffer at a given time.
The state of the processor includes position and finalized position,
which have the following meaning.
-
position: Represents the current position, in bytes, within the output stream where the encoded data will be written next. This position moves forward with each
release_buffercall as data is written, and can also be adjusted through the optional seek callback, if provided. At this position the next write will occur. -
finalized position: A position in the output stream that ensures all bytes before this point are finalized and won’t be changed by later writes.
All fields but seek are required, seek is optional and can be None.
Trait Implementations§
Source§impl Clone for JxlEncoderOutputProcessor
impl Clone for JxlEncoderOutputProcessor
Source§fn clone(&self) -> JxlEncoderOutputProcessor
fn clone(&self) -> JxlEncoderOutputProcessor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more