Versions in this module Expand all Collapse all v0 v0.0.28 Jan 24, 2025 Changes in this version + const AVC1 + const AVCC + const CTTS + const DINF + const DOPS + const DREF + const ESDS + const FTYP + const HDLR + const MDAT + const MDHD + const MDIA + const MFHD + const MINF + const MOOF + const MOOV + const MP4A + const MVEX + const MVHD + const OPUS + const PASP + const SIDX + const SMHD + const STBL + const STCO + const STSC + const STSD + const STSS + const STSZ + const STTS + const STYP + const SoundHandler + const TFDT + const TFHD + const TKHD + const TRAF + const TRAK + const TREX + const TRUN + const URL + const VMHD + const VideoHandler + func FprintAtom(out io.Writer, root Atom) + func GetFixed16(b []byte) float64 + func GetFixed32(b []byte) float64 + func GetTime32(b []byte) (t time.Time) + func GetTime64(b []byte) (t time.Time) + func PrintAtom(root Atom) + func PutFixed16(b []byte, f float64) + func PutFixed32(b []byte, f float64) + func PutTime32(b []byte, t time.Time) + func PutTime64(b []byte, t time.Time) + type AVC1Conf struct + Data []byte + func (a *AVC1Conf) Unmarshal(b []byte, offset int) (n int, err error) + func (a AVC1Conf) Children() (r []Atom) + func (a AVC1Conf) Len() (n int) + func (a AVC1Conf) Marshal(b []byte) (n int) + func (a AVC1Conf) Tag() Tag + type AVC1Desc struct + ColorTableId int16 + CompressorName [32]byte + Conf *AVC1Conf + DataRefIdx int16 + Depth int16 + FrameCount int16 + Height int16 + HorizontalResolution float64 + PixelAspect *PixelAspect + Revision int16 + SpatialQuality int32 + TemporalQuality int32 + Unknowns []Atom + Vendor int32 + Version int16 + VorizontalResolution float64 + Width int16 + func (a *AVC1Desc) Unmarshal(b []byte, offset int) (n int, err error) + func (a AVC1Desc) Children() (r []Atom) + func (a AVC1Desc) Len() (n int) + func (a AVC1Desc) Marshal(b []byte) (n int) + func (a AVC1Desc) Tag() Tag + type Atom interface + Children func() []Atom + Len func() int + Marshal func([]byte) int + Pos func() (int, int) + Tag func() Tag + Unmarshal func([]byte, int) (int, error) + func FindChildren(root Atom, tag Tag) Atom + func FindChildrenByName(root Atom, tag string) Atom + func ReadFileAtoms(r io.ReadSeeker) (atoms []Atom, err error) + type AtomPos struct + Offset int + Size int + func (a AtomPos) Pos() (int, int) + type ChunkOffset struct + Entries []uint32 + Flags uint32 + Version uint8 + func (a *ChunkOffset) Unmarshal(b []byte, offset int) (n int, err error) + func (a ChunkOffset) Children() (r []Atom) + func (a ChunkOffset) Len() (n int) + func (a ChunkOffset) Marshal(b []byte) (n int) + func (a ChunkOffset) String() string + func (a ChunkOffset) Tag() Tag + type CompositionOffset struct + Entries []CompositionOffsetEntry + Flags uint32 + Version uint8 + func (a *CompositionOffset) Unmarshal(b []byte, offset int) (n int, err error) + func (a CompositionOffset) Children() (r []Atom) + func (a CompositionOffset) Len() (n int) + func (a CompositionOffset) Marshal(b []byte) (n int) + func (a CompositionOffset) String() string + func (a CompositionOffset) Tag() Tag + type CompositionOffsetEntry struct + Count uint32 + Offset uint32 + type DataInfo struct + Refer *DataRefer + Unknowns []Atom + func (a *DataInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (a DataInfo) Children() (r []Atom) + func (a DataInfo) Len() (n int) + func (a DataInfo) Marshal(b []byte) (n int) + func (a DataInfo) Tag() Tag + type DataRefer struct + Flags uint32 + Url *DataReferUrl + Version uint8 + func (a *DataRefer) Unmarshal(b []byte, offset int) (n int, err error) + func (a DataRefer) Children() (r []Atom) + func (a DataRefer) Len() (n int) + func (a DataRefer) Marshal(b []byte) (n int) + func (a DataRefer) Tag() Tag + type DataReferUrl struct + Flags uint32 + Version uint8 + func (a *DataReferUrl) Unmarshal(b []byte, offset int) (n int, err error) + func (a DataReferUrl) Children() (r []Atom) + func (a DataReferUrl) Len() (n int) + func (a DataReferUrl) Marshal(b []byte) (n int) + func (a DataReferUrl) Tag() Tag + type Dummy struct + Data []byte + Tag_ Tag + func (a *Dummy) Unmarshal(b []byte, offset int) (n int, err error) + func (a Dummy) Children() []Atom + func (a Dummy) Len() int + func (a Dummy) Marshal(b []byte) int + func (a Dummy) Tag() Tag + type ElemStreamDesc struct + StreamDescriptor *esio.StreamDescriptor + func (a *ElemStreamDesc) Unmarshal(b []byte, offset int) (n int, err error) + func (a ElemStreamDesc) Children() []Atom + func (a ElemStreamDesc) Len() (n int) + func (a ElemStreamDesc) Marshal(b []byte) (n int) + func (a ElemStreamDesc) Tag() Tag + type FileType struct + CompatibleBrands []uint32 + MajorBrand uint32 + MinorVersion uint32 + func (f *FileType) Unmarshal(b []byte, offset int) (n int, err error) + func (f FileType) Children() []Atom + func (f FileType) Len() int + func (f FileType) Marshal(b []byte) (n int) + func (t FileType) Tag() Tag + type FullAtom struct + Flags uint32 + Version uint8 + type HandlerRefer struct + Flags uint32 + Name string + Predefined uint32 + Reserved [3]uint32 + Type uint32 + Version uint8 + func (a *HandlerRefer) Unmarshal(b []byte, offset int) (n int, err error) + func (a HandlerRefer) Children() (r []Atom) + func (a HandlerRefer) Len() (n int) + func (a HandlerRefer) Marshal(b []byte) (n int) + func (a HandlerRefer) Tag() Tag + type MP4ADesc struct + CompressionId int16 + Conf *ElemStreamDesc + DataRefIdx int16 + NumberOfChannels int16 + RevisionLevel int16 + SampleRate float64 + SampleSize int16 + Unknowns []Atom + Vendor int32 + Version int16 + func (a *MP4ADesc) Unmarshal(b []byte, offset int) (n int, err error) + func (a MP4ADesc) Children() (r []Atom) + func (a MP4ADesc) Len() (n int) + func (a MP4ADesc) Marshal(b []byte) (n int) + func (a MP4ADesc) Tag() Tag + type Media struct + Handler *HandlerRefer + Header *MediaHeader + Info *MediaInfo + Unknowns []Atom + func (a *Media) Unmarshal(b []byte, offset int) (n int, err error) + func (a Media) Children() (r []Atom) + func (a Media) Len() (n int) + func (a Media) Marshal(b []byte) (n int) + func (a Media) Tag() Tag + type MediaHeader struct + CreateTime time.Time + Duration uint32 + Flags uint32 + Language int16 + ModifyTime time.Time + Quality int16 + TimeScale uint32 + Version uint8 + func (a *MediaHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (a MediaHeader) Children() (r []Atom) + func (a MediaHeader) Len() (n int) + func (a MediaHeader) Marshal(b []byte) (n int) + func (a MediaHeader) Tag() Tag + type MediaInfo struct + Data *DataInfo + Sample *SampleTable + Sound *SoundMediaInfo + Unknowns []Atom + Video *VideoMediaInfo + func (a *MediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (a MediaInfo) Children() (r []Atom) + func (a MediaInfo) Len() (n int) + func (a MediaInfo) Marshal(b []byte) (n int) + func (a MediaInfo) Tag() Tag + type Movie struct + Header *MovieHeader + MovieExtend *MovieExtend + Tracks []*Track + Unknowns []Atom + func (a *Movie) Unmarshal(b []byte, offset int) (n int, err error) + func (a Movie) Children() (r []Atom) + func (a Movie) Len() (n int) + func (a Movie) Marshal(b []byte) (n int) + func (a Movie) Tag() Tag + type MovieExtend struct + Tracks []*TrackExtend + Unknowns []Atom + func (a *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) + func (a MovieExtend) Children() (r []Atom) + func (a MovieExtend) Len() (n int) + func (a MovieExtend) Marshal(b []byte) (n int) + func (a MovieExtend) Tag() Tag + type MovieFrag struct + Header *MovieFragHeader + Tracks []*TrackFrag + Unknowns []Atom + func (a *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) + func (a MovieFrag) Children() (r []Atom) + func (a MovieFrag) Len() (n int) + func (a MovieFrag) Marshal(b []byte) (n int) + func (a MovieFrag) Tag() Tag + type MovieFragHeader struct + Flags uint32 + Seqnum uint32 + Version uint8 + func (a *MovieFragHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (a MovieFragHeader) Children() (r []Atom) + func (a MovieFragHeader) Len() (n int) + func (a MovieFragHeader) Marshal(b []byte) (n int) + func (a MovieFragHeader) Tag() Tag + type MovieHeader struct + CreateTime time.Time + Duration uint32 + Flags uint32 + Matrix [9]int32 + ModifyTime time.Time + NextTrackID uint32 + PreferredRate float64 + PreferredVolume float64 + TimeScale uint32 + Version uint8 + func (a *MovieHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (a MovieHeader) Children() (r []Atom) + func (a MovieHeader) Len() (n int) + func (a MovieHeader) Marshal(b []byte) (n int) + func (a MovieHeader) String() string + func (a MovieHeader) Tag() Tag + type OpusSampleEntry struct + CompressionID uint16 + Conf *OpusSpecificConfiguration + DataRefIdx uint16 + NumberOfChannels uint16 + SampleRate float64 + SampleSize uint16 + func (a *OpusSampleEntry) Unmarshal(b []byte, offset int) (n int, err error) + func (a OpusSampleEntry) Children() (r []Atom) + func (a OpusSampleEntry) Len() (n int) + func (a OpusSampleEntry) Marshal(b []byte) (n int) + func (a OpusSampleEntry) Tag() Tag + type OpusSpecificConfiguration struct + ChannelMappingFamily uint8 + InputSampleRate uint32 + OutputChannelCount uint8 + OutputGain int16 + PreSkip uint16 + Version uint8 + func (a *OpusSpecificConfiguration) Unmarshal(b []byte, offset int) (n int, err error) + func (a OpusSpecificConfiguration) Children() []Atom + func (a OpusSpecificConfiguration) Len() (n int) + func (a OpusSpecificConfiguration) Marshal(b []byte) (n int) + func (a OpusSpecificConfiguration) Tag() Tag + type ParseError struct + Debug string + Offset int + func (a *ParseError) Error() string + type PixelAspect struct + HorizontalSpacing uint32 + VerticalSpacing uint32 + func (a *PixelAspect) Children() (r []Atom) + func (a *PixelAspect) Unmarshal(b []byte, offset int) (n int, err error) + func (a PixelAspect) Len() (n int) + func (a PixelAspect) Marshal(b []byte) (n int) + func (a PixelAspect) Tag() Tag + type SampleDesc struct + AVC1Desc *AVC1Desc + MP4ADesc *MP4ADesc + OpusDesc *OpusSampleEntry + Unknowns []Atom + Version uint8 + func (a *SampleDesc) Unmarshal(b []byte, offset int) (n int, err error) + func (a SampleDesc) Children() (r []Atom) + func (a SampleDesc) Len() (n int) + func (a SampleDesc) Marshal(b []byte) (n int) + func (a SampleDesc) Tag() Tag + type SampleFlags uint32 + const SampleHasDependencies + const SampleIsNonSync + const SampleNoDependencies + const SampleNonKeyframe + type SampleSize struct + Entries []uint32 + Flags uint32 + SampleSize uint32 + Version uint8 + func (a *SampleSize) Unmarshal(b []byte, offset int) (n int, err error) + func (a SampleSize) Children() (r []Atom) + func (a SampleSize) Len() (n int) + func (a SampleSize) Marshal(b []byte) (n int) + func (a SampleSize) String() string + func (a SampleSize) Tag() Tag + type SampleTable struct + ChunkOffset *ChunkOffset + CompositionOffset *CompositionOffset + SampleDesc *SampleDesc + SampleSize *SampleSize + SampleToChunk *SampleToChunk + SyncSample *SyncSample + TimeToSample *TimeToSample + func (a *SampleTable) Unmarshal(b []byte, offset int) (n int, err error) + func (a SampleTable) Children() (r []Atom) + func (a SampleTable) Len() (n int) + func (a SampleTable) Marshal(b []byte) (n int) + func (a SampleTable) Tag() Tag + type SampleToChunk struct + Entries []SampleToChunkEntry + Flags uint32 + Version uint8 + func (a *SampleToChunk) Unmarshal(b []byte, offset int) (n int, err error) + func (a SampleToChunk) Children() (r []Atom) + func (a SampleToChunk) Len() (n int) + func (a SampleToChunk) Marshal(b []byte) (n int) + func (a SampleToChunk) String() string + func (a SampleToChunk) Tag() Tag + type SampleToChunkEntry struct + FirstChunk uint32 + SampleDescId uint32 + SamplesPerChunk uint32 + type SegmentIndex struct + EarliestPTS uint64 + FirstOffset uint64 + ReferenceID uint32 + References []SegmentReference + TimeScale uint32 + func (s *SegmentIndex) Unmarshal(b []byte, offset int) (n int, err error) + func (s SegmentIndex) Children() []Atom + func (s SegmentIndex) Len() (n int) + func (s SegmentIndex) Marshal(b []byte) (n int) + func (s SegmentIndex) Tag() Tag + type SegmentReference struct + ReferencedSize uint32 + ReferencesBox bool + SAPDeltaTime uint32 + SAPType uint8 + StartsWithSAP bool + SubsegmentDuration uint32 + type SegmentType struct + CompatibleBrands []uint32 + MajorBrand uint32 + MinorVersion uint32 + func (f *SegmentType) Unmarshal(b []byte, offset int) (n int, err error) + func (f SegmentType) Children() []Atom + func (f SegmentType) Len() int + func (f SegmentType) Marshal(b []byte) (n int) + func (t SegmentType) Tag() Tag + type SoundMediaInfo struct + Balance int16 + Flags uint32 + Version uint8 + func (a *SoundMediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (a SoundMediaInfo) Children() (r []Atom) + func (a SoundMediaInfo) Len() (n int) + func (a SoundMediaInfo) Marshal(b []byte) (n int) + func (a SoundMediaInfo) Tag() Tag + type SyncSample struct + Entries []uint32 + Flags uint32 + Version uint8 + func (a *SyncSample) Unmarshal(b []byte, offset int) (n int, err error) + func (a SyncSample) Children() (r []Atom) + func (a SyncSample) Len() (n int) + func (a SyncSample) Marshal(b []byte) (n int) + func (a SyncSample) String() string + func (a SyncSample) Tag() Tag + type Tag uint32 + func StringToTag(tag string) Tag + func (a Tag) String() string + type TimeToSample struct + Entries []TimeToSampleEntry + Flags uint32 + Version uint8 + func (a *TimeToSample) Unmarshal(b []byte, offset int) (n int, err error) + func (a TimeToSample) Children() (r []Atom) + func (a TimeToSample) Len() (n int) + func (a TimeToSample) Marshal(b []byte) (n int) + func (a TimeToSample) String() string + func (a TimeToSample) Tag() Tag + type TimeToSampleEntry struct + Count uint32 + Duration uint32 + type Track struct + Header *TrackHeader + Media *Media + Unknowns []Atom + func (a *Track) GetAVC1Conf() (conf *AVC1Conf) + func (a *Track) GetElemStreamDesc() (esds *ElemStreamDesc) + func (a *Track) Unmarshal(b []byte, offset int) (n int, err error) + func (a Track) Children() (r []Atom) + func (a Track) Len() (n int) + func (a Track) Marshal(b []byte) (n int) + func (a Track) Tag() Tag + type TrackExtend struct + DefaultSampleDescIdx uint32 + DefaultSampleDuration uint32 + DefaultSampleFlags uint32 + DefaultSampleSize uint32 + Flags uint32 + TrackID uint32 + Version uint8 + func (a *TrackExtend) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackExtend) Children() (r []Atom) + func (a TrackExtend) Len() (n int) + func (a TrackExtend) Marshal(b []byte) (n int) + func (a TrackExtend) Tag() Tag + type TrackFrag struct + DecodeTime *TrackFragDecodeTime + Header *TrackFragHeader + Run *TrackFragRun + Unknowns []Atom + func (a *TrackFrag) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackFrag) Children() (r []Atom) + func (a TrackFrag) Len() (n int) + func (a TrackFrag) Marshal(b []byte) (n int) + func (a TrackFrag) Tag() Tag + type TrackFragDecodeTime struct + Flags uint32 + Time uint64 + Version uint8 + func (a *TrackFragDecodeTime) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackFragDecodeTime) Children() (r []Atom) + func (a TrackFragDecodeTime) Len() (n int) + func (a TrackFragDecodeTime) Marshal(b []byte) (n int) + func (a TrackFragDecodeTime) Tag() Tag + type TrackFragFlags uint32 + const TrackFragBaseDataOffset + const TrackFragDefaultBaseIsMOOF + const TrackFragDefaultDuration + const TrackFragDefaultFlags + const TrackFragDefaultSize + const TrackFragDurationIsEmpty + const TrackFragStsdID + type TrackFragHeader struct + BaseDataOffset uint64 + DefaultDuration uint32 + DefaultFlags SampleFlags + DefaultSize uint32 + Flags TrackFragFlags + StsdID uint32 + TrackID uint32 + Version uint8 + func (a *TrackFragHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackFragHeader) Children() (r []Atom) + func (a TrackFragHeader) Len() (n int) + func (a TrackFragHeader) Marshal(b []byte) (n int) + func (a TrackFragHeader) String() string + func (a TrackFragHeader) Tag() Tag + type TrackFragRun struct + DataOffset uint32 + Entries []TrackFragRunEntry + FirstSampleFlags SampleFlags + Flags TrackRunFlags + Version uint8 + func (a *TrackFragRun) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackFragRun) Children() (r []Atom) + func (a TrackFragRun) Len() (n int) + func (a TrackFragRun) Marshal(b []byte) (n int) + func (a TrackFragRun) String() string + func (a TrackFragRun) Tag() Tag + type TrackFragRunEntry struct + CTS int32 + Duration uint32 + Flags SampleFlags + Size uint32 + type TrackHeader struct + AlternateGroup int16 + CreateTime time.Time + Duration uint32 + Flags uint32 + Layer int16 + Matrix [9]int32 + ModifyTime time.Time + TrackHeight float64 + TrackID uint32 + TrackWidth float64 + Version uint8 + Volume float64 + func (a *TrackHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (a TrackHeader) Children() (r []Atom) + func (a TrackHeader) Len() (n int) + func (a TrackHeader) Marshal(b []byte) (n int) + func (a TrackHeader) Tag() Tag + type TrackRunFlags uint32 + const TrackRunDataOffset + const TrackRunFirstSampleFlags + const TrackRunSampleCTS + const TrackRunSampleDuration + const TrackRunSampleFlags + const TrackRunSampleSize + type VideoMediaInfo struct + Flags uint32 + GraphicsMode int16 + Opcolor [3]int16 + Version uint8 + func (a *VideoMediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (a VideoMediaInfo) Children() (r []Atom) + func (a VideoMediaInfo) Len() (n int) + func (a VideoMediaInfo) Marshal(b []byte) (n int) + func (a VideoMediaInfo) Tag() Tag