View Source ExMP4.Track.Fragment (MP4 Reader and Writer v0.4.0)

Module representing a movie fragment (moof) of a single track.

Summary

Types

@type t() :: %ExMP4.Track.Fragment{
  base_data_offset: integer(),
  base_media_decode_time: integer(),
  current_run: ExMP4.Track.Fragment.Run.t() | nil,
  default_sample_description_index: pos_integer() | nil,
  default_sample_duration: pos_integer() | nil,
  default_sample_flags: integer() | nil,
  default_sample_size: pos_integer() | nil,
  runs: [ExMP4.Track.Fragment.Run.t()],
  track_id: ExMP4.Track.id()
}

Functions

@spec add_run(t(), ExMP4.Track.Fragment.Run.t()) :: t()
Link to this function

duration(moof, default_duration \\ nil)

View Source
@spec duration(t(), integer() | nil) :: integer()
@spec flush(t()) :: t()
Link to this function

new(track_id, opts \\ [])

View Source
@spec new(ExMP4.Track.id(), Keyword.t()) :: t()
Link to this function

store_sample(fragment, sample)

View Source
@spec store_sample(t(), ExMP4.Sample.t()) :: t()
@spec total_samples(t()) :: integer()
Link to this function

total_size(fragment, default_size)

View Source
@spec total_size(t(), integer() | nil) :: integer()
Link to this function

update_base_data_offset(fragment, offset)

View Source
@spec update_base_data_offset(t(), integer()) :: t()