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 MediaSegments 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).

A list of unknown tags.

Note

This field is optional.

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.

Builds a new MediaPlaylist.

Errors

If a required field has not been initialized.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.