Skip to main content

PrefetchedSampleProvider

Struct PrefetchedSampleProvider 

Source
pub struct PrefetchedSampleProvider { /* private fields */ }
Expand description

A SampleProvider that answers from a TrackSampleLoader’s cache and reports ErrorKind::WouldBlock for a sample that is not loaded yet.

Trait Implementations§

Source§

impl SampleProvider for PrefetchedSampleProvider

Source§

fn len(&self) -> usize

The number of samples, in decode order.
Source§

fn is_random_access(&self, decode_index: usize) -> bool

Source§

fn presentation_index(&self, decode_index: usize) -> FrameIndex

Source§

fn read(&self, decode_index: usize) -> Result<Cow<'_, [u8]>>

Returns the compressed bytes of one decode-order sample.
Source§

fn is_empty(&self) -> bool

Auto Trait Implementations§

§

impl Forget for PrefetchedSampleProvider

§

impl Freeze for PrefetchedSampleProvider
where *const u8 is !null: Freeze, PhantomData<u64>: Freeze, PhantomData<bool>: Freeze, *const ArcInner<Mutex<CacheState>> is !null: Freeze, PhantomData<ArcInner<Mutex<CacheState>>>: Freeze,

§

impl Move for PrefetchedSampleProvider

§

impl RefUnwindSafe for PrefetchedSampleProvider

§

impl Send for PrefetchedSampleProvider
where RawVecInner: Send, Arc<Mutex<CacheState>>: Send,

§

impl Sync for PrefetchedSampleProvider
where RawVecInner: Sync, Arc<Mutex<CacheState>>: Sync,

§

impl Unpin for PrefetchedSampleProvider
where *const u8 is !null: Unpin, Arc<Mutex<CacheState>>: Unpin,

§

impl UnsafeUnpin for PrefetchedSampleProvider
where *const u8 is !null: UnsafeUnpin, PhantomData<u64>: UnsafeUnpin, PhantomData<bool>: UnsafeUnpin, *const ArcInner<Mutex<CacheState>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<CacheState>>>: UnsafeUnpin,

§

impl UnwindSafe for PrefetchedSampleProvider
where RawVecInner: UnwindSafe, Arc<Mutex<CacheState>>: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.