Skip to main content

PlayerEvent

Enum PlayerEvent 

Source
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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.