pub struct StreamSources<F> { /* private fields */ }Expand description
Opens one crate::video_stream::VideoStream per cursor and keeps decoding forward while
requests stay within the sequential gap, seeking otherwise.
A cursor its reads say is finished is closed, at most a set number of video streams stay open, and one decoded still serves every cursor of its source. A closed cursor reopens with a seek.
Implementations§
Source§impl<F> StreamSources<F>
impl<F> StreamSources<F>
Sourcepub fn with_reads(self, reads: CursorReads) -> Self
pub fn with_reads(self, reads: CursorReads) -> Self
Closes a cursor once reads say it reads nothing more (SourceFrames::release_finished).
A cursor reads does not know is never closed this way.
Sourcepub fn with_session_limit(self, limit: usize) -> Self
pub fn with_session_limit(self, limit: usize) -> Self
Before opening a video stream while limit are open, closes the one read longest ago that
the current output frame does not read.
Sourcepub fn open_streams(&self) -> usize
pub fn open_streams(&self) -> usize
Video streams open now.
Sourcepub const fn dropped_layers(&self) -> &BTreeMap<SourceId, DroppedLayer>
pub const fn dropped_layers(&self) -> &BTreeMap<SourceId, DroppedLayer>
What the pictures of each source opened so far go without, one entry per source.
Sourcepub fn with_surface_import(self, import: Arc<dyn SurfaceImport>) -> Self
pub fn with_surface_import(self, import: Arc<dyn SurfaceImport>) -> Self
Prepares the decoder surfaces the streams produce with import; without it a surface
frame fails its source.
Trait Implementations§
Source§impl<F> SourceFrames for StreamSources<F>
impl<F> SourceFrames for StreamSources<F>
Source§fn frame(
&mut self,
need: &FrameNeed,
index: u64,
cancel: &CancelToken,
) -> Result<Option<SourceFrame>, String>
fn frame( &mut self, need: &FrameNeed, index: u64, cancel: &CancelToken, ) -> Result<Option<SourceFrame>, String>
need of output frame index shows: the frame presented at its media
time; None for an audio source, which audio clips name but nothing draws. Read moreSource§fn release_finished(&mut self, time: MediaTime)
fn release_finished(&mut self, time: MediaTime)
time read; called before the frame at time
is decoded.Source§fn held_bytes(&self) -> u64
fn held_bytes(&self) -> u64
Auto Trait Implementations§
impl<F> !RefUnwindSafe for StreamSources<F>
impl<F> !Sync for StreamSources<F>
impl<F> !UnwindSafe for StreamSources<F>
impl<F> Forget for StreamSources<F>
impl<F> Freeze for StreamSources<F>where
F: Freeze,
impl<F> Move for StreamSources<F>
impl<F> Send for StreamSources<F>where
F: Send,
impl<F> Unpin for StreamSources<F>where
F: Unpin,
impl<F> UnsafeUnpin for StreamSources<F>where
F: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more