Struct hls_m3u8::builder::MediaPlaylistBuilder [−][src]
pub struct MediaPlaylistBuilder<'a> { /* fields omitted */ }
Expand description
Builder for MediaPlaylist
.
Implementations
Specifies the maximum MediaSegment::duration
. A typical target
duration is 10 seconds.
Note
This field is required.
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.
Allows synchronization between different renditions of the same
VariantStream
.
Note
This field is optional and by default a vaule of 0 is assumed.
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.
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.
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
.
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.
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
.
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)
.
Adds a media segment to the resulting playlist and assigns the next free
MediaSegment::number
to the segment.
Parse the rest of the MediaPlaylist
from an m3u8 file.
Adds segments to the resulting playlist and assigns a
MediaSegment::number
to each segment.
Note
The MediaSegment::number
will be assigned based on the order of the
input (e.g. the first element will be 0, second element 1, ..) or if a
number has been set explicitly. This function assumes, that all segments
will be present in the final media playlist and the following is only
possible if the segment is marked with ExtXDiscontinuity
.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for MediaPlaylistBuilder<'a>
impl<'a> Send for MediaPlaylistBuilder<'a>
impl<'a> Sync for MediaPlaylistBuilder<'a>
impl<'a> Unpin for MediaPlaylistBuilder<'a>
impl<'a> UnwindSafe for MediaPlaylistBuilder<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more