View Source Membrane.HTTPAdaptiveStream.Manifest.Segment (Membrane HTTP Adaptive Stream plugin v0.18.3)

Structure representing a single manifest segment.

It stores the following fields:

  • name - the segment's name
  • duration - the segment's total duration
  • size - the byte size of the segment payload
  • attributes - the meta attributes associated with the segment
  • type - decides if the structure is a full segment that can exist on its own
         or if it hosts and awaits more partial segments
  • parts - the partial segments making up the full segment

Summary

Types

Structure of partial segment.

t()

Determines if segment is full and independent or partial and consists of several partial segments.

Types

@type partial_segment_t() :: %{
  name: String.t(),
  independent?: boolean(),
  duration: segment_duration_t(),
  size: non_neg_integer(),
  payload: binary() | nil
}

Structure of partial segment.

Attributes representing a partial segment:

  • independent? - decides if a segment can be played on its own e.g. starts with a keyframe or is an audio sample
  • duration - the duration of the partial segment
  • attributes - the attributes for the particular partial segment
@type segment_duration_t() :: Membrane.Time.t() | Ratio.t()
@type t() :: %Membrane.HTTPAdaptiveStream.Manifest.Segment{
  attributes: [Membrane.HTTPAdaptiveStream.Manifest.SegmentAttribute.t()],
  duration: segment_duration_t(),
  name: String.t(),
  parts: [partial_segment_t()],
  size: non_neg_integer(),
  type: type_t()
}
@type type_t() :: :full | :partial

Determines if segment is full and independent or partial and consists of several partial segments.