Struct Master

Source
pub struct Master {
    pub playlist: MasterPlaylist,
}
Expand description

Master holds a reference to the master playlist. All functions implemented by this struct can be chained.

Fields§

§playlist: MasterPlaylist

Implementations§

Source§

impl Master

Source

pub fn filter_fps(&mut self, rate: Option<f64>) -> &mut Self

Filter variants from a master playlist based on the frame rate passed.

Source

pub fn filter_bandwidth( &mut self, min: Option<u64>, max: Option<u64>, ) -> &mut Self

Filter variants from a master playlist based on the bandwidh passed.

Variants can be filtered using min and max values for bandwidth.

There’s no need to pass a min value if you don’t need to. The same happens for max value. For min we will set to zero by default and for the max we’ll use the u64::MAX value.

Source

pub fn first_variant_by_index(&mut self, index: Option<u64>) -> &mut Self

Set the first variant by index to appear in the playlist for the one that best suites the device needs. Most of the times such feature will be used to skip the initial variant (too low for some devices).

If the index passed in could cause “out of bounds” error, the playlist will keep untouched.

§Arguments
  • index - an Option containing the index you want to be the first variant. Variants will be swapped.
Source

pub fn first_variant_by_closest_bandwidth( &mut self, closest_bandwidth: Option<u64>, ) -> &mut Self

Set the first variant by closes bandwidth to appear in the playlist for the one that best suites the device needs. Most of the times such feature will be used to skip the initial variant (too low for some devices).

§Arguments
  • closest_bandwidth - an Option containing an approximate bandwidth value you want for the first variant.

Auto Trait Implementations§

§

impl Freeze for Master

§

impl RefUnwindSafe for Master

§

impl Send for Master

§

impl Sync for Master

§

impl Unpin for Master

§

impl UnwindSafe for Master

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.