Membrane.HTTPAdaptiveStream.Manifest behaviour (Membrane HTTP Adaptive Stream plugin v0.4.0) View Source

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

Specs

t() :: %Membrane.HTTPAdaptiveStream.Manifest{
  module: module(),
  name: String.t(),
  tracks: %{
    required(id :: any()) => Membrane.HTTPAdaptiveStream.Manifest.Track.t()
  }
}

Link to this section Callbacks

Specs

serialize(t()) :: [
  {manifest_name :: String.t(), manifest_content :: String.t()}
]

Link to this section Functions

Link to this function

add_segment(manifest, track_id, duration, bytes_size, attributes \\ [])

View Source

Specs

Link to this function

add_track(manifest, config)

View Source

Specs

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.

Specs

all_segments(t()) :: [[track_name :: String.t()]]

Returns stale and current segments' names from all tracks

Link to this function

discontinue_track(manifest, track_id)

View Source

Specs

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.

Link to this function

finish(manifest, track_id)

View Source

Specs

Link to this function

from_beginning(manifest)

View Source

Specs

from_beginning(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

Link to this function

has_track?(manifest, track_id)

View Source

Specs

Specs

serialize(t()) :: [{name :: String.t(), manifest :: String.t()}]