[−][src]Struct hls_m3u8::MediaPlaylist
Media playlist.
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.target_duration: Duration
Specifies the maximum MediaSegment::duration
. A typical target
duration is 10 seconds.
Note
This field is required.
media_sequence: usize
The MediaSegment::number
of the first MediaSegment
that
appears in a MediaPlaylist
.
Note
This field is optional and by default a value of 0 is assumed.
discontinuity_sequence: usize
Allows synchronization between different renditions of the same
VariantStream
.
Note
This field is optional and by default a vaule of 0 is assumed.
playlist_type: Option<PlaylistType>
Provides mutability information about a MediaPlaylist
.
-
PlaylistType::Vod
indicates that the playlist must not change. -
PlaylistType::Event
indicates that the server does not change or delete any part of the playlist, but may append new lines to it.
Note
This field is optional.
has_i_frames_only: bool
Indicates that each MediaSegment
in the playlist describes a single
I-frame. I-frames are encoded video frames, whose decoding does not
depend on any other frame. I-frame Playlists can be used for trick
play, such as fast forward, rapid reverse, and scrubbing.
Note
This field is optional.
has_independent_segments: bool
This indicates that all media samples in a MediaSegment
can be
decoded without information from other segments.
Note
This field is optional and by default false
. If the value is true
it
applies to every MediaSegment
in this MediaPlaylist
.
start: Option<ExtXStart>
Indicates a preferred point at which to start playing a playlist. By default, clients should start playback at this point when beginning a playback session.
Note
This field is optional.
has_end_list: bool
Indicates that no more MediaSegment
s will be added to the
MediaPlaylist
file.
Note
This field is optional and by default false
.
A false
indicates that the client should reload the MediaPlaylist
from the server, until a playlist is encountered, where this field is
true
.
segments: BTreeMap<usize, MediaSegment>
allowable_excess_duration: Duration
The allowable excess duration of each media segment in the associated playlist.
Error
If there is a media segment of which duration exceeds
#EXT-X-TARGETDURATION + allowable_excess_duration
,
the invocation of MediaPlaylistBuilder::build()
method will fail.
Note
This field is optional and the default value is
Duration::from_secs(0)
.
unknown: Vec<String>
Methods
impl MediaPlaylist
[src]
#[must_use]pub fn builder() -> MediaPlaylistBuilder
[src]
Returns a builder for MediaPlaylist
.
#[must_use]pub fn duration(&self) -> Duration
[src]
Computes the Duration
of the MediaPlaylist
, by adding each segment
duration together.
Trait Implementations
impl Clone for MediaPlaylist
[src]
fn clone(&self) -> MediaPlaylist
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MediaPlaylist
[src]
impl Display for MediaPlaylist
[src]
impl Eq for MediaPlaylist
[src]
impl FromStr for MediaPlaylist
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(input: &str) -> Result<Self, Self::Err>
[src]
impl Hash for MediaPlaylist
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for MediaPlaylist
[src]
fn cmp(&self, other: &MediaPlaylist) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<MediaPlaylist> for MediaPlaylist
[src]
fn eq(&self, other: &MediaPlaylist) -> bool
[src]
fn ne(&self, other: &MediaPlaylist) -> bool
[src]
impl PartialOrd<MediaPlaylist> for MediaPlaylist
[src]
fn partial_cmp(&self, other: &MediaPlaylist) -> Option<Ordering>
[src]
fn lt(&self, other: &MediaPlaylist) -> bool
[src]
fn le(&self, other: &MediaPlaylist) -> bool
[src]
fn gt(&self, other: &MediaPlaylist) -> bool
[src]
fn ge(&self, other: &MediaPlaylist) -> bool
[src]
impl StructuralEq for MediaPlaylist
[src]
impl StructuralPartialEq for MediaPlaylist
[src]
Auto Trait Implementations
impl RefUnwindSafe for MediaPlaylist
impl Send for MediaPlaylist
impl Sync for MediaPlaylist
impl Unpin for MediaPlaylist
impl UnwindSafe for MediaPlaylist
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,