Typed view of the trun Track Run box (per-sample list).
Summary
Functions
Decode a trun box.
Encode a %TrackRun{} into a trun box. Always writes data-offset + per-sample
duration/size/flags; writes composition offsets (v1, signed) iff any sample has a
nonzero offset. Writes first_sample_flags (32-bit, after data_offset) when non-nil.
Types
@type sample() :: %{ duration: non_neg_integer() | nil, size: non_neg_integer() | nil, flags: non_neg_integer() | nil, composition_offset: integer() | nil }
@type t() :: %ISOMedia.Boxes.TrackRun{ data_offset: integer() | nil, first_sample_flags: non_neg_integer() | nil, sample_count: non_neg_integer(), samples: [sample()], version: 0 | 1 | nil }
Functions
@spec decode(ISOMedia.Box.t()) :: t()
Decode a trun box.
@spec encode(t()) :: ISOMedia.Box.t()
Encode a %TrackRun{} into a trun box. Always writes data-offset + per-sample
duration/size/flags; writes composition offsets (v1, signed) iff any sample has a
nonzero offset. Writes first_sample_flags (32-bit, after data_offset) when non-nil.