pub struct VideoView { /* private fields */ }Expand description
A video in a view, following a clock.
Implementations§
Source§impl VideoView
impl VideoView
Sourcepub fn new(
source: Box<dyn VideoSource>,
clock: Entity<Clock>,
alignment: Alignment,
cx: &mut Context<'_, Self>,
) -> Self
pub fn new( source: Box<dyn VideoSource>, clock: Entity<Clock>, alignment: Alignment, cx: &mut Context<'_, Self>, ) -> Self
source in a view following clock, its time mapped onto the clock’s by alignment.
pub fn info(&self) -> &VideoInfo
Sourcepub fn set_alignment(
&mut self,
alignment: Alignment,
cx: &mut Context<'_, Self>,
)
pub fn set_alignment( &mut self, alignment: Alignment, cx: &mut Context<'_, Self>, )
Maps the video’s clock onto the reference with alignment (a sync-pulse fit, or a shift
set by hand); the frame shown follows.
Sourcepub fn add_overlay(&mut self, overlay: Overlay, cx: &mut Context<'_, Self>)
pub fn add_overlay(&mut self, overlay: Overlay, cx: &mut Context<'_, Self>)
Paints overlay over every frame shown, after the ones added before.
Sourcepub fn clear_overlays(&mut self, cx: &mut Context<'_, Self>)
pub fn clear_overlays(&mut self, cx: &mut Context<'_, Self>)
Removes every overlay.
Sourcepub fn shown_frame(&self) -> Option<usize>
pub fn shown_frame(&self) -> Option<usize>
The frame index shown, when one is.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VideoView
impl !Send for VideoView
impl !Sync for VideoView
impl !UnwindSafe for VideoView
impl Forget for VideoView
impl Freeze for VideoViewwhere
*const ArcInner<Mutex<Box<dyn VideoSource>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<Box<dyn VideoSource>>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<f64>: Freeze,
NonZero<u32>: Freeze,
*const (): Freeze,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Freeze,
PhantomData<fn(Clock) -> Clock>: Freeze,
*const ArcInner<Mutex<FrameCache>> is !null: Freeze,
PhantomData<ArcInner<Mutex<FrameCache>>>: Freeze,
*const ArcInner<RenderImage> is !null: Freeze,
PhantomData<ArcInner<RenderImage>>: Freeze,
PhantomData<Rc<dyn Fn(&mut Window, OverlayFrame)>>: Freeze,
*const dyn FnOnce() is !null: Freeze,
PhantomData<dyn FnOnce()>: Freeze,
impl Move for VideoView
impl Unpin for VideoViewwhere
Arc<Mutex<Box<dyn VideoSource>>>: Unpin,
*const u8 is !null: Unpin,
NonZero<u32>: Unpin,
*const (): Unpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Unpin,
Arc<Mutex<FrameCache>>: Unpin,
Arc<RenderImage>: Unpin,
Rc<dyn Fn(&mut Window, OverlayFrame)>: Unpin,
Box<dyn FnOnce()>: Unpin,
impl UnsafeUnpin for VideoViewwhere
*const ArcInner<Mutex<Box<dyn VideoSource>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Box<dyn VideoSource>>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: UnsafeUnpin,
PhantomData<fn(Clock) -> Clock>: UnsafeUnpin,
*const ArcInner<Mutex<FrameCache>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<FrameCache>>>: UnsafeUnpin,
*const ArcInner<RenderImage> is !null: UnsafeUnpin,
PhantomData<ArcInner<RenderImage>>: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&mut Window, OverlayFrame)>>: UnsafeUnpin,
*const dyn FnOnce() is !null: UnsafeUnpin,
PhantomData<dyn FnOnce()>: 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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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