pub struct InputFileReader { /* private fields */ }Expand description
InputFileReader provides a safe API over InputFile by taking ownership
of the storage into which the channel data is to be read and handling all
the Slice pointer offset shenanigans internally.
Implementations§
Source§impl InputFileReader
impl InputFileReader
Sourcepub fn read_pixels(
self,
s1: i32,
s2: i32,
) -> Result<(InputFile, Vec<Frame>), Error>
pub fn read_pixels( self, s1: i32, s2: i32, ) -> Result<(InputFile, Vec<Frame>), Error>
Read all scanlines in the range [s1, s2] and put them in the current frame buffer.
This consumes the InputFileReader and returns the original InputFile
object and the Vec of the read Frames .
§Errors
Error::Base- if any error occurs
Sourcepub fn is_optimization_enabled(&self) -> bool
pub fn is_optimization_enabled(&self) -> bool
Check if SSE optimization is enabled. Decode times will be faster if this returns true.
Optimization depends on:
- The file type (only scanline data is supported),
- The framebuffer channels (RGB/RGBA mono or stereo)
- The framebuffer channel types (all channels half-float format only)
- The file channels (RGB/RGBA mono or stereo)
- The file channel types (all channel half-float format only)
- Whether SSE2 instruction support was detected at compile time
Auto Trait Implementations§
impl Freeze for InputFileReader
impl RefUnwindSafe for InputFileReader
impl !Send for InputFileReader
impl !Sync for InputFileReader
impl Unpin for InputFileReader
impl UnwindSafe for InputFileReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more