View Source Membrane.MP4.Demuxer.CMAF.Engine (Membrane MP4 plugin v0.35.3)
A module capable of demuxing streams packed in CMAF container.
It is used to demux streams in Membrane.MP4.Demuxer.CMAF
.
Summary
Types
@opaque t()
Functions
This function feeds the demuxer engine with the binary data containing content of CMAF MP4 files.
Then, demuxed stream samples can be retrieved using pop_samples/1
.
The function raises if the binary data is malformed.
@spec get_tracks_info(t()) :: {:ok, %{required(track_id :: integer()) => stream_format :: struct()}} | {:error, term()}
Returns the tracks information that has been parsed from the CMAF stream.
The tracks information is a map where keys are track IDs and values are stream format structs.
If the tracks information is not available yet, it returns an error tuple
{:error, :not_available_yet}
and it means that engine has to be fed with
more data before the tracks information can be retrieved.
@spec new() :: t()
@spec pop_samples(t()) :: {:ok, [Membrane.MP4.Demuxer.CMAF.Engine.Sample.t()], t()}
Pops samples that have been demuxed from the CMAF stream privided in feed!/2
.
Returns a tuple with :ok
and a list of samples, and the updated demuxer engine
state.
The samples are instances of Membrane.MP4.Demuxer.CMAF.Sample
.
If no samples are available, it returns an empty list.