pub struct MediaCapabilities {
pub seeking: bool,
pub speed: bool,
pub looping: bool,
pub analysis: bool,
pub session: bool,
pub equalizer: bool,
pub probing: bool,
}Expand description
What a platform media stack can actually do.
Reported rather than assumed: a screen greys out a speed control the device will not honour instead of offering one that silently does nothing.
Fields§
§seeking: boolWhether seek_media moves the position.
speed: boolWhether set_media_speed changes the rate.
looping: boolWhether set_media_looping repeats the item when it ends.
analysis: boolWhether the backend can publish MediaSamples while it plays.
session: boolWhether metadata reaches a platform media session — the lock screen, the notification, the headset buttons.
equalizer: boolWhether the backend has an equalizer. The bands it has are reported by
media_equalizer_bands, because a platform effect has the bands its
implementation has rather than the ones a screen would like.
probing: boolWhether probe_media_duration can read an item’s length without
playing it. A playlist that shows durations for entries nobody has
opened needs this; one that does not, does not.
Implementations§
Source§impl MediaCapabilities
impl MediaCapabilities
Sourcepub const TRANSPORT: MediaCapabilities
pub const TRANSPORT: MediaCapabilities
A backend that plays, pauses and seeks and does nothing else, which is the floor for anything worth calling a media player.
Trait Implementations§
Source§impl Clone for MediaCapabilities
impl Clone for MediaCapabilities
Source§fn clone(&self) -> MediaCapabilities
fn clone(&self) -> MediaCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MediaCapabilities
Source§impl Debug for MediaCapabilities
impl Debug for MediaCapabilities
Source§impl Default for MediaCapabilities
impl Default for MediaCapabilities
Source§fn default() -> MediaCapabilities
fn default() -> MediaCapabilities
impl Eq for MediaCapabilities
Source§impl PartialEq for MediaCapabilities
impl PartialEq for MediaCapabilities
impl StructuralPartialEq for MediaCapabilities
Auto Trait Implementations§
impl Freeze for MediaCapabilities
impl RefUnwindSafe for MediaCapabilities
impl Send for MediaCapabilities
impl Sync for MediaCapabilities
impl Unpin for MediaCapabilities
impl UnsafeUnpin for MediaCapabilities
impl UnwindSafe for MediaCapabilities
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.