package trun
import "41.neocities.org/sofia/trun"
Index
Types
type Box
type Box struct { BoxHeader sofia.BoxHeader FullBoxHeader sofia.FullBoxHeader SampleCount uint32 DataOffset int32 FirstSampleFlags uint32 Sample []Sample }
ISO/IEC 14496-12
If the data-offset is present, it is relative to the base-data-offset established in the track fragment header.
sample-size-present: each sample has its own size, otherwise the default is used.
aligned(8) class TrackRunBox extends FullBox('trun', version, tr_flags) { unsigned int(32) sample_count; signed int(32) data_offset; // 0x000001, assume present unsigned int(32) first_sample_flags; // 0x000004 { unsigned int(32) sample_duration; // 0x000100 unsigned int(32) sample_size; // 0x000200 unsigned int(32) sample_flags // 0x000400 if (version == 0) { unsigned int(32) sample_composition_time_offset; // 0x000800 } else { signed int(32) sample_composition_time_offset; // 0x000800 } }[ sample_count ] }
func (*Box) Append
func (b *Box) Append(buf []byte) ([]byte, error)
func (*Box) Read
func (b *Box) Read(buf []byte) error
type Sample
type Sample struct { Duration uint32 SampleSize uint32 Flags uint32 CompositionTimeOffset [4]byte // contains filtered or unexported fields }
func (*Sample) Append
func (s *Sample) Append(buf []byte) ([]byte, error)
func (*Sample) Decode
func (s *Sample) Decode(buf []byte) (int, error)