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
@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
@spec add_chunk( t(), track_id :: Membrane.HTTPAdaptiveStream.Manifest.Track.id_t(), Membrane.Buffer.t() ) :: {Membrane.HTTPAdaptiveStream.Manifest.Changeset.t(), t()}
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
.
@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.
@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()) :: {Membrane.HTTPAdaptiveStream.Manifest.Changeset.t(), t()}
Filter all tracks that have option :persisted?
set to true, then
restores all the stale segments in those tracks.
@spec has_track?(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.id_t()) :: boolean()
Returns one header per track
@spec persisted?(t(), Membrane.HTTPAdaptiveStream.Manifest.Track.id_t()) :: boolean()
Returns all segments grouped by the track id.
@spec serialize(t()) :: serialized_manifests_t()