pub struct FrameCache { /* private fields */ }Expand description
Decoded frames held in memory for ranges of a film, so those ranges play without the decoder — an instant start, a loop that never waits on a keyframe.
Ranges are frame numbers, start included and end not, counted from the
first frame at the file’s frame rate. The frames are the ranges’ frames,
in order, end to end.
Implementations§
Source§impl FrameCache
impl FrameCache
Sourcepub fn new(ranges: Vec<(u64, u64)>, frames: Vec<Frame>) -> Result<Self>
pub fn new(ranges: Vec<(u64, u64)>, frames: Vec<Frame>) -> Result<Self>
A cache of frames for ranges.
§Errors
Error::Unsupported for an empty or backwards range, ranges that
overlap, or a number of frames that is not what the ranges add up to —
each of which would serve the wrong picture rather than fail later.
Trait Implementations§
Source§impl Clone for FrameCache
impl Clone for FrameCache
Auto Trait Implementations§
impl Freeze for FrameCache
impl RefUnwindSafe for FrameCache
impl Send for FrameCache
impl Sync for FrameCache
impl Unpin for FrameCache
impl UnsafeUnpin for FrameCache
impl UnwindSafe for FrameCache
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