View Source Membrane.MP4.Track (Membrane MP4 plugin v0.22.3)

A module defining a structure that represents an MPEG-4 track.

All new samples of a track must be stored in the structure first in order to build a sample table of a regular MP4 container. Samples that were stored can be flushed later in form of chunks.

Link to this section Summary

Link to this section Types

@type t() :: %Membrane.MP4.Track{
  content: struct(),
  duration: non_neg_integer() | nil,
  height: non_neg_integer(),
  id: pos_integer(),
  movie_duration: non_neg_integer() | nil,
  sample_table: Membrane.MP4.Track.SampleTable.t(),
  timescale: pos_integer(),
  width: non_neg_integer()
}

Link to this section Functions

Link to this function

current_chunk_duration(map)

View Source
@spec current_chunk_duration(t()) :: non_neg_integer()
Link to this function

finalize(track, movie_timescale)

View Source
@spec finalize(t(), pos_integer()) :: t()
Link to this function

flush_chunk(track, chunk_offset)

View Source
@spec flush_chunk(t(), non_neg_integer()) :: {binary(), t()}
@spec new(%{
  id: pos_integer(),
  content: struct(),
  height: non_neg_integer(),
  width: non_neg_integer(),
  timescale: pos_integer()
}) :: t()
Link to this function

store_sample(track, buffer)

View Source
@spec store_sample(t(), Membrane.Buffer.t()) :: t()