View Source Membrane.MP4.Demuxer.ISOM.Engine (Membrane MP4 plugin v0.36.0)

A module capable of demuxing streams packed in MP4 ISOM container.

It is used to demux streams in Membrane.MP4.Demuxer.ISOM.

Summary

Types

A type representing a callback that is used to provide data to the demuxer. The callback needs to accept the start position and size (both expressed in bytes) and needs to return a binary of that size.

t()

A type representing the Membrane.MP4.Demuxer.ISOM.Engine.

Functions

Returns a map describing tracks found in the MP4 file.

Reads the sample from given track.

Moves the track cursor so that it points at the first sample with DTS equal or greater than provided timestamp_ms.

Types

@type provide_data_cb() :: (start :: non_neg_integer(),
                      size :: pos_integer(),
                      state :: any() ->
                        {data :: binary(), state :: any()})

A type representing a callback that is used to provide data to the demuxer. The callback needs to accept the start position and size (both expressed in bytes) and needs to return a binary of that size.

@opaque t()

A type representing the Membrane.MP4.Demuxer.ISOM.Engine.

Functions

@spec get_tracks_info(t()) :: %{
  required(track_id :: pos_integer()) => Membrane.MP4.Track.SampleTable.t()
}

Returns a map describing tracks found in the MP4 file.

@spec new(provide_data_cb()) :: t()

Returns new instance of the Membrane.MP4.Demuxer.ISOM.Engine.

Link to this function

read_sample(state, track_id)

View Source
@spec read_sample(t(), track_id :: pos_integer()) ::
  {:ok, Membrane.MP4.Demuxer.Sample.t(), t()} | :end_of_stream

Reads the sample from given track.

Link to this function

seek_in_samples(state, track_id, timestamp_ms)

View Source
@spec seek_in_samples(
  t(),
  track_id :: pos_integer(),
  timestamp_ms :: non_neg_integer()
) :: t()

Moves the track cursor so that it points at the first sample with DTS equal or greater than provided timestamp_ms.