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: MasterPlaylistImplementations§
Source§impl Master
impl Master
Sourcepub fn filter_fps(&mut self, rate: Option<f64>) -> &mut Self
pub fn filter_fps(&mut self, rate: Option<f64>) -> &mut Self
Filter variants from a master playlist based on the frame rate passed.
Sourcepub fn filter_bandwidth(
&mut self,
min: Option<u64>,
max: Option<u64>,
) -> &mut Self
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.
Sourcepub fn first_variant_by_index(&mut self, index: Option<u64>) -> &mut Self
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.
Sourcepub fn first_variant_by_closest_bandwidth(
&mut self,
closest_bandwidth: Option<u64>,
) -> &mut Self
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.