View Source Membrane.HTTPAdaptiveStream.Manifest behaviour (Membrane HTTP Adaptive Stream plugin v0.8.0)
Behaviour for manifest serialization.
Link to this section Summary
Functions
Adds a track to the manifest.
Returns stale and current segments' names from all tracks
Append a discontinuity to the track.
Restores all the stale segments in all tracks.
Link to this section Types
@type t() :: %Membrane.HTTPAdaptiveStream.Manifest{ module: module(), name: String.t(), tracks: %{ required(id :: any()) => Membrane.HTTPAdaptiveStream.Manifest.Track.t() } }
Link to this section Callbacks
Link to this section Functions
Link to this function
add_segment(manifest, track_id, duration, bytes_size, attributes \\ [])
View Source@spec add_segment( t(), track_id :: Membrane.HTTPAdaptiveStream.Manifest.Track.id_t(), Membrane.HTTPAdaptiveStream.Manifest.Track.segment_duration_t(), Membrane.HTTPAdaptiveStream.Manifest.Track.segment_bytes_size_t(), [Membrane.HTTPAdaptiveStream.Manifest.SegmentAttribute.t()] ) :: {{to_add_name :: String.t(), to_remove_names :: Membrane.HTTPAdaptiveStream.Manifest.Track.to_remove_names_t()}, t()}
@spec add_track(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.Config.t()) :: {header_name :: String.t(), t()}
Adds a track to the manifest.
Returns the name under which the header file should be stored.
Returns stale and current segments' names from all tracks
@spec discontinue_track(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.id_t()) :: {header_name :: String.t(), t()}
Append a discontinuity to the track.
This will inform the player that eg. the parameters of the encoder changed and allow you to provide a new MP4 header. For details on discontinuities refer to RFC 8216.
@spec finish(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.id_t()) :: t()
Restores all the stale segments in all tracks.
All the tracks must be configured to be persisted beforehand, otherwise this function will raise
@spec has_track?(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.id_t()) :: boolean()