pub enum PlayerEvent {
SeekCompleted(Duration),
Eof,
PositionUpdate(Duration),
Error(String),
}Expand description
Events emitted by PlayerRunner::run
and delivered to callers via
PlayerHandle::poll_event.
Variants§
SeekCompleted(Duration)
A seek initiated via PlayerHandle::seek
has completed.
pts is the actual presentation timestamp of the first frame available
after the seek, which may differ slightly from the requested target due
to I-frame boundaries.
Eof
The media file has been fully decoded; run() is about to return.
PositionUpdate(Duration)
Current playback position; emitted once per decoded and presented video frame.
Not emitted during seeking (while FrameResult::Seeking
is being returned) — only for fully decoded frames.
Error(String)
A non-fatal decode error encountered by the background decode thread.
Playback continues until EOF; PlayerEvent::Eof follows shortly after.
Auto Trait Implementations§
impl Freeze for PlayerEvent
impl RefUnwindSafe for PlayerEvent
impl Send for PlayerEvent
impl Sync for PlayerEvent
impl Unpin for PlayerEvent
impl UnsafeUnpin for PlayerEvent
impl UnwindSafe for PlayerEvent
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