Membrane.HTTPAdaptiveStream.Manifest.Track (Membrane HTTP Adaptive Stream plugin v0.3.0) View Source

Struct representing a state of a single manifest track and functions to operate on it.

Link to this section Summary

Types

t()

The struct representing a track.

Link to this section Types

Specs

id_t() :: any()

Specs

segment_duration_t() :: Membrane.Time.t() | Ratio.t()

Specs

segments_t() :: Qex.t({name :: String.t(), segment_duration_t()})

Specs

t() :: %Membrane.HTTPAdaptiveStream.Manifest.Track{
  content_type: :audio | :video,
  current_seq_num: non_neg_integer(),
  finished?: boolean(),
  header_extension: String.t(),
  header_name: String.t(),
  id: id_t(),
  id_string: String.t(),
  persist?: boolean(),
  segment_extension: String.t(),
  segments: segments_t(),
  stale_segments: segments_t(),
  target_segment_duration: segment_duration_t(),
  target_window_duration: Membrane.Time.t() | Ratio.t(),
  window_duration: non_neg_integer()
}

The struct representing a track.

Consists of all the fields from Config.t and also:

  • id_string - serialized id
  • header_name - name of the header file
  • current_seq_num - the number to identify the next segment
  • segments - segments' names and durations
  • stale_segments - stale segments' names and durations, kept empty unless persist? is set to true
  • finished? - determines whether the track is finished
  • window_duration - current window duration

Link to this section Functions

Link to this function

add_segment(track, duration)

View Source

Specs

add_segment(t(), segment_duration_t()) ::
  {{to_add_name :: String.t(), to_remove_names :: [String.t()]}, t()}

Specs

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

Specs

finish(t()) :: t()

Specs

from_beginning(t()) :: t()

Specs