Struct hls_m3u8::builder::MediaSegmentBuilder[][src]

pub struct MediaSegmentBuilder<'a> { /* fields omitted */ }
Expand description

Builder for MediaSegment.

Implementations

This field specifies how to decrypt a MediaSegment, which can only be encrypted with one EncryptionMethod, using one DecryptionKey and DecryptionKey::iv.

However, a server may offer multiple ways to retrieve that key by providing multiple keys with different DecryptionKey::formats.

Any unencrypted segment that is preceded by an encrypted segment must have an ExtXKey::empty. Otherwise, the client will misinterpret those segments as encrypted.

The server may set the HTTP Expires header in the key response to indicate the duration for which the key can be cached.

Note

This field is optional and a missing value or an ExtXKey::empty() indicates an unencrypted media segment.

This field specifies how to obtain the Media Initialization Section required to parse the applicable MediaSegments.

Note

This field is optional, but should be specified for media segments in playlists with an ExtXIFramesOnly tag when the first MediaSegment in the playlist (or the first segment following a segment marked with MediaSegment::has_discontinuity) does not immediately follow the Media Initialization Section at the beginning of its resource.

This field indicates that a MediaSegment is a sub-range of the resource identified by its URI.

Note

This field is optional.

This field associates a date-range (i.e., a range of time defined by a starting and ending date) with a set of attribute/value pairs.

Note

This field is optional.

This field indicates a discontinuity between the MediaSegment that follows it and the one that preceded it.

Note

This field is required if any of the following characteristics change:

  • file format
  • number, type, and identifiers of tracks
  • timestamp, sequence

This field should be present if any of the following characteristics change:

  • encoding parameters
  • encoding sequence

This field associates the first sample of a media segment with an absolute date and/or time.

Note

This field is optional.

This field indicates the duration of a media segment.

Note

This field is required.

The URI of a media segment.

Note

This field is required.

Builds a new MediaSegment.

Errors

If a required field has not been initialized.

Pushes an ExtXKey tag.

The number of a MediaSegment. Normally this should not be set explicitly, because the MediaPlaylist::builder will automatically apply the correct number.

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.