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

Behaviour for manifest serialization.

Summary

Functions

Adds segment to the manifest. In case of ll-hls it will add partial segment, and also full segment if needed. Returns Membrane.HTTPAdaptiveStream.Manifest.Track.Changeset.

Add a track to the manifest.

Append a discontinuity to the track.

Filter all tracks that have option :persisted? set to true, then restores all the stale segments in those tracks.

Returns one header per track

Returns all segments grouped by the track id.

Types

Link to this type

serialized_manifest_t()

View Source
@type serialized_manifest_t() ::
  {manifest_name :: String.t(), manifest_content :: String.t()}
Link to this type

serialized_manifests_t()

View Source
@type serialized_manifests_t() :: %{
  master_manifest: serialized_manifest_t(),
  manifest_per_track: %{optional(track_id :: any()) => serialized_manifest_t()}
}
@type t() :: %Membrane.HTTPAdaptiveStream.Manifest{
  module: module(),
  name: String.t(),
  tracks: %{
    required(id :: any()) => Membrane.HTTPAdaptiveStream.Manifest.Track.t()
  }
}

Callbacks

@callback serialize(t()) :: serialized_manifests_t()

Functions

Link to this function

add_chunk(manifest, track_id, buffer)

View Source

Adds segment to the manifest. In case of ll-hls it will add partial segment, and also full segment if needed. Returns Membrane.HTTPAdaptiveStream.Manifest.Track.Changeset.

Link to this function

add_track(manifest, config)

View Source
@spec add_track(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.Config.t()) ::
  {header_name :: String.t(), t()}

Add a track to the manifest.

Returns the name under which the header file should be stored.

Link to this function

discontinue_track(manifest, track_id)

View Source
@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.

Link to this function

finish(manifest, track_id)

View Source
Link to this function

from_beginning(manifest)

View Source
@spec from_beginning(t()) :: t()

Filter all tracks that have option :persisted? set to true, then restores all the stale segments in those tracks.

Link to this function

has_track?(manifest, track_id)

View Source
Link to this function

header_per_track(manifest)

View Source
@spec header_per_track(t()) :: %{optional(track_id :: term()) => String.t()}

Returns one header per track

Link to this function

persisted?(manifest, track_id)

View Source
Link to this function

segments_per_track(manifest)

View Source
@spec segments_per_track(t()) :: %{
  optional(track_id :: term()) => [segment_name :: String.t()]
}

Returns all segments grouped by the track id.

@spec serialize(t()) :: serialized_manifests_t()