View Source ExMP4.Box.Traf (MP4 Reader and Writer v0.6.0)
A module repsenting an traf
box.
Summary
Functions
Get the total duration of the track fragment.
Get the next sample from the fragment.
Get the count of samples of the track fragment.
Get the total size of the track fragment.
Types
@type t() :: %ExMP4.Box.Traf{ tfdt: ExMP4.Box.Tfdt.t() | nil, tfhd: ExMP4.Box.Tfhd.t(), trun: [ExMP4.Box.Trun.t()] }
Functions
@spec duration(t(), ExMP4.Box.Trex.t() | nil) :: integer()
Get the total duration of the track fragment.
@spec next_sample(t(), ExMP4.Box.Trex.t(), integer()) :: {t(), ExMP4.SampleMetadata.t()}
Get the next sample from the fragment.
The trex
argument is the trex
box that contains global defaults.
The duration
refers to the total duration of the extracted samples. This field
should be updated by the caller and provided in each call.
It returns a tuple with the first element being the traf
box after removing
the sample entry and the second element as the sample metadata.
Get the count of samples of the track fragment.
@spec store_sample(t(), ExMP4.Sample.t()) :: t()
@spec total_size(t(), ExMP4.Box.Trex.t() | nil) :: integer()
Get the total size of the track fragment.