Versions in this module Expand all Collapse all v0 v0.0.3 Feb 3, 2024 v0.0.2 Feb 3, 2024 Changes in this version + const AVC1 + const AVCC + const CTTS + const DINF + const DREF + const ESDS + const FTYP + const HDLR + const HEV1 + const HVCC + const LenCompositionOffsetEntry + const LenSampleToChunkEntry + const LenTimeToSampleEntry + const LenTrackFragRunEntry + const MDAT + const MDHD + const MDIA + const MFHD + const MINF + const MOOF + const MOOV + const MP4A + const MP4DecConfigDescrTag + const MP4DecSpecificDescrTag + const MP4ESDescrTag + const MVEX + const MVHD + const SMHD + const STBL + const STCO + const STSC + const STSD + const STSS + const STSZ + const STTS + const STYP + const TFDT + const TFHD + const TFHD_BASE_DATA_OFFSET + const TFHD_DEFAULT_BASE_IS_MOOF + const TFHD_DEFAULT_DURATION + const TFHD_DEFAULT_FLAGS + const TFHD_DEFAULT_SIZE + const TFHD_DURATION_IS_EMPTY + const TFHD_STSD_ID + const TKHD + const TRAF + const TRAK + const TREX + const TRUN + const TRUN_DATA_OFFSET + const TRUN_FIRST_SAMPLE_FLAGS + const TRUN_SAMPLE_CTS + const TRUN_SAMPLE_DURATION + const TRUN_SAMPLE_FLAGS + const TRUN_SAMPLE_SIZE + const URL + const VMHD + 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 PutCompositionOffsetEntry(b []byte, self CompositionOffsetEntry) + func PutFixed16(b []byte, f float64) + func PutFixed32(b []byte, f float64) + func PutSampleToChunkEntry(b []byte, self SampleToChunkEntry) + func PutTime32(b []byte, t time.Time) + func PutTime64(b []byte, t time.Time) + func PutTimeToSampleEntry(b []byte, self TimeToSampleEntry) + func PutTrackFragRunEntry(b []byte, self TrackFragRunEntry) + type AVC1Conf struct + Data []byte + func (self *AVC1Conf) Unmarshal(b []byte, offset int) (n int, err error) + func (self AVC1Conf) Children() (r []Atom) + func (self AVC1Conf) Len() (n int) + func (self AVC1Conf) Marshal(b []byte) (n int) + func (self AVC1Conf) Tag() Tag + type AVC1Desc struct + ColorTableId int16 + CompressorName [32]byte + Conf *AVC1Conf + DataRefIdx int16 + Depth int16 + FrameCount int16 + Height int16 + HorizontalResolution float64 + Revision int16 + SpatialQuality int32 + TemporalQuality int32 + Unknowns []Atom + Vendor int32 + Version int16 + VorizontalResolution float64 + Width int16 + func (self *AVC1Desc) Unmarshal(b []byte, offset int) (n int, err error) + func (self AVC1Desc) Children() (r []Atom) + func (self AVC1Desc) Len() (n int) + func (self AVC1Desc) Marshal(b []byte) (n int) + func (self 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 (self AtomPos) Pos() (int, int) + type ChunkOffset struct + Entries []uint32 + Flags uint32 + Version uint8 + func (self *ChunkOffset) Unmarshal(b []byte, offset int) (n int, err error) + func (self ChunkOffset) Children() (r []Atom) + func (self ChunkOffset) Len() (n int) + func (self ChunkOffset) Marshal(b []byte) (n int) + func (self ChunkOffset) String() string + func (self ChunkOffset) Tag() Tag + type CompositionOffset struct + Entries []CompositionOffsetEntry + Flags uint32 + Version uint8 + func (self *CompositionOffset) Unmarshal(b []byte, offset int) (n int, err error) + func (self CompositionOffset) Children() (r []Atom) + func (self CompositionOffset) Len() (n int) + func (self CompositionOffset) Marshal(b []byte) (n int) + func (self CompositionOffset) String() string + func (self CompositionOffset) Tag() Tag + type CompositionOffsetEntry struct + Count uint32 + Offset uint32 + func GetCompositionOffsetEntry(b []byte) (self CompositionOffsetEntry) + type DataInfo struct + Refer *DataRefer + Unknowns []Atom + func (self *DataInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (self DataInfo) Children() (r []Atom) + func (self DataInfo) Len() (n int) + func (self DataInfo) Marshal(b []byte) (n int) + func (self DataInfo) Tag() Tag + type DataRefer struct + Flags uint32 + Url *DataReferUrl + Version uint8 + func (self *DataRefer) Unmarshal(b []byte, offset int) (n int, err error) + func (self DataRefer) Children() (r []Atom) + func (self DataRefer) Len() (n int) + func (self DataRefer) Marshal(b []byte) (n int) + func (self DataRefer) Tag() Tag + type DataReferUrl struct + Flags uint32 + Version uint8 + func (self *DataReferUrl) Unmarshal(b []byte, offset int) (n int, err error) + func (self DataReferUrl) Children() (r []Atom) + func (self DataReferUrl) Len() (n int) + func (self DataReferUrl) Marshal(b []byte) (n int) + func (self DataReferUrl) Tag() Tag + type Dummy struct + Data []byte + Tag_ Tag + func (self *Dummy) Unmarshal(b []byte, offset int) (n int, err error) + func (self Dummy) Children() []Atom + func (self Dummy) Len() int + func (self Dummy) Marshal(b []byte) int + func (self Dummy) Tag() Tag + type ElemStreamDesc struct + DecConfig []byte + TrackId uint16 + func (self *ElemStreamDesc) Unmarshal(b []byte, offset int) (n int, err error) + func (self ElemStreamDesc) Children() []Atom + func (self ElemStreamDesc) Len() (n int) + func (self ElemStreamDesc) Marshal(b []byte) (n int) + func (self ElemStreamDesc) String() string + func (self 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 HV1Conf struct + Data []byte + func (self *HV1Conf) Unmarshal(b []byte, offset int) (n int, err error) + func (self HV1Conf) Children() (r []Atom) + func (self HV1Conf) Len() (n int) + func (self HV1Conf) Marshal(b []byte) (n int) + func (self HV1Conf) Tag() Tag + type HV1Desc struct + ColorTableId int16 + CompressorName [32]byte + Conf *HV1Conf + DataRefIdx int16 + Depth int16 + FrameCount int16 + Height int16 + HorizontalResolution float64 + Revision int16 + SpatialQuality int32 + TemporalQuality int32 + Unknowns []Atom + Vendor int32 + Version int16 + VorizontalResolution float64 + Width int16 + func (self *HV1Desc) Unmarshal(b []byte, offset int) (n int, err error) + func (self HV1Desc) Children() (r []Atom) + func (self HV1Desc) Len() (n int) + func (self HV1Desc) Marshal(b []byte) (n int) + func (self HV1Desc) Tag() Tag + type HandlerRefer struct + Flags uint32 + Name []byte + SubType [4]byte + Type [4]byte + Version uint8 + func (self *HandlerRefer) Unmarshal(b []byte, offset int) (n int, err error) + func (self HandlerRefer) Children() (r []Atom) + func (self HandlerRefer) Len() (n int) + func (self HandlerRefer) Marshal(b []byte) (n int) + func (self 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 (self *MP4ADesc) Unmarshal(b []byte, offset int) (n int, err error) + func (self MP4ADesc) Children() (r []Atom) + func (self MP4ADesc) Len() (n int) + func (self MP4ADesc) Marshal(b []byte) (n int) + func (self MP4ADesc) Tag() Tag + type Media struct + Handler *HandlerRefer + Header *MediaHeader + Info *MediaInfo + Unknowns []Atom + func (self *Media) Unmarshal(b []byte, offset int) (n int, err error) + func (self Media) Children() (r []Atom) + func (self Media) Len() (n int) + func (self Media) Marshal(b []byte) (n int) + func (self Media) Tag() Tag + type MediaHeader struct + CreateTime time.Time + Duration int32 + Flags uint32 + Language int16 + ModifyTime time.Time + Quality int16 + TimeScale int32 + Version uint8 + func (self *MediaHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (self MediaHeader) Children() (r []Atom) + func (self MediaHeader) Len() (n int) + func (self MediaHeader) Marshal(b []byte) (n int) + func (self MediaHeader) Tag() Tag + type MediaInfo struct + Data *DataInfo + Sample *SampleTable + Sound *SoundMediaInfo + Unknowns []Atom + Video *VideoMediaInfo + func (self *MediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (self MediaInfo) Children() (r []Atom) + func (self MediaInfo) Len() (n int) + func (self MediaInfo) Marshal(b []byte) (n int) + func (self MediaInfo) Tag() Tag + type Movie struct + Header *MovieHeader + MovieExtend *MovieExtend + Tracks []*Track + Unknowns []Atom + func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error) + func (self Movie) Children() (r []Atom) + func (self Movie) Len() (n int) + func (self Movie) Marshal(b []byte) (n int) + func (self Movie) Tag() Tag + type MovieExtend struct + Tracks []*TrackExtend + Unknowns []Atom + func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) + func (self MovieExtend) Children() (r []Atom) + func (self MovieExtend) Len() (n int) + func (self MovieExtend) Marshal(b []byte) (n int) + func (self MovieExtend) Tag() Tag + type MovieFrag struct + Header *MovieFragHeader + Tracks []*TrackFrag + Unknowns []Atom + func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) + func (self MovieFrag) Children() (r []Atom) + func (self MovieFrag) Len() (n int) + func (self MovieFrag) Marshal(b []byte) (n int) + func (self MovieFrag) Tag() Tag + type MovieFragHeader struct + Flags uint32 + Seqnum uint32 + Version uint8 + func (self *MovieFragHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (self MovieFragHeader) Children() (r []Atom) + func (self MovieFragHeader) Len() (n int) + func (self MovieFragHeader) Marshal(b []byte) (n int) + func (self MovieFragHeader) Tag() Tag + type MovieHeader struct + CreateTime time.Time + CurrentTime time.Time + Duration int32 + Flags uint32 + Matrix [9]int32 + ModifyTime time.Time + NextTrackId int32 + PosterTime time.Time + PreferredRate float64 + PreferredVolume float64 + PreviewDuration time.Time + PreviewTime time.Time + SelectionDuration time.Time + SelectionTime time.Time + TimeScale int32 + Version uint8 + func (self *MovieHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (self MovieHeader) Children() (r []Atom) + func (self MovieHeader) Len() (n int) + func (self MovieHeader) Marshal(b []byte) (n int) + func (self MovieHeader) String() string + func (self MovieHeader) Tag() Tag + type ParseError struct + Debug string + Offset int + func (self *ParseError) Error() string + type SampleDesc struct + AVC1Desc *AVC1Desc + HV1Desc *HV1Desc + MP4ADesc *MP4ADesc + Unknowns []Atom + Version uint8 + func (self *SampleDesc) Unmarshal(b []byte, offset int) (n int, err error) + func (self SampleDesc) Children() (r []Atom) + func (self SampleDesc) Len() (n int) + func (self SampleDesc) Marshal(b []byte) (n int) + func (self SampleDesc) Tag() Tag + type SampleSize struct + Entries []uint32 + Flags uint32 + SampleSize uint32 + Version uint8 + func (self *SampleSize) Unmarshal(b []byte, offset int) (n int, err error) + func (self SampleSize) Children() (r []Atom) + func (self SampleSize) Len() (n int) + func (self SampleSize) Marshal(b []byte) (n int) + func (self SampleSize) String() string + func (self SampleSize) Tag() Tag + type SampleTable struct + ChunkOffset *ChunkOffset + CompositionOffset *CompositionOffset + SampleDesc *SampleDesc + SampleSize *SampleSize + SampleToChunk *SampleToChunk + SyncSample *SyncSample + TimeToSample *TimeToSample + func (self *SampleTable) Unmarshal(b []byte, offset int) (n int, err error) + func (self SampleTable) Children() (r []Atom) + func (self SampleTable) Len() (n int) + func (self SampleTable) Marshal(b []byte) (n int) + func (self SampleTable) Tag() Tag + type SampleToChunk struct + Entries []SampleToChunkEntry + Flags uint32 + Version uint8 + func (self *SampleToChunk) Unmarshal(b []byte, offset int) (n int, err error) + func (self SampleToChunk) Children() (r []Atom) + func (self SampleToChunk) Len() (n int) + func (self SampleToChunk) Marshal(b []byte) (n int) + func (self SampleToChunk) String() string + func (self SampleToChunk) Tag() Tag + type SampleToChunkEntry struct + FirstChunk uint32 + SampleDescId uint32 + SamplesPerChunk uint32 + func GetSampleToChunkEntry(b []byte) (self SampleToChunkEntry) + 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 (self *SoundMediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (self SoundMediaInfo) Children() (r []Atom) + func (self SoundMediaInfo) Len() (n int) + func (self SoundMediaInfo) Marshal(b []byte) (n int) + func (self SoundMediaInfo) Tag() Tag + type SyncSample struct + Entries []uint32 + Flags uint32 + Version uint8 + func (self *SyncSample) Unmarshal(b []byte, offset int) (n int, err error) + func (self SyncSample) Children() (r []Atom) + func (self SyncSample) Len() (n int) + func (self SyncSample) Marshal(b []byte) (n int) + func (self SyncSample) String() string + func (self SyncSample) Tag() Tag + type Tag uint32 + func StringToTag(tag string) Tag + func (self Tag) String() string + type TimeToSample struct + Entries []TimeToSampleEntry + Flags uint32 + Version uint8 + func (self *TimeToSample) Unmarshal(b []byte, offset int) (n int, err error) + func (self TimeToSample) Children() (r []Atom) + func (self TimeToSample) Len() (n int) + func (self TimeToSample) Marshal(b []byte) (n int) + func (self TimeToSample) String() string + func (self TimeToSample) Tag() Tag + type TimeToSampleEntry struct + Count uint32 + Duration uint32 + func GetTimeToSampleEntry(b []byte) (self TimeToSampleEntry) + type Track struct + Header *TrackHeader + Media *Media + Unknowns []Atom + func (self *Track) GetAVC1Conf() (conf *AVC1Conf) + func (self *Track) GetElemStreamDesc() (esds *ElemStreamDesc) + func (self *Track) Unmarshal(b []byte, offset int) (n int, err error) + func (self Track) Children() (r []Atom) + func (self Track) Len() (n int) + func (self Track) Marshal(b []byte) (n int) + func (self Track) Tag() Tag + type TrackExtend struct + DefaultSampleDescIdx uint32 + DefaultSampleDuration uint32 + DefaultSampleFlags uint32 + DefaultSampleSize uint32 + Flags uint32 + TrackId uint32 + Version uint8 + func (self *TrackExtend) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackExtend) Children() (r []Atom) + func (self TrackExtend) Len() (n int) + func (self TrackExtend) Marshal(b []byte) (n int) + func (self TrackExtend) Tag() Tag + type TrackFrag struct + DecodeTime *TrackFragDecodeTime + Header *TrackFragHeader + Run *TrackFragRun + Unknowns []Atom + func (self *TrackFrag) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackFrag) Children() (r []Atom) + func (self TrackFrag) Len() (n int) + func (self TrackFrag) Marshal(b []byte) (n int) + func (self TrackFrag) Tag() Tag + type TrackFragDecodeTime struct + Flags uint32 + Time time.Time + Version uint8 + func (self *TrackFragDecodeTime) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackFragDecodeTime) Children() (r []Atom) + func (self TrackFragDecodeTime) Len() (n int) + func (self TrackFragDecodeTime) Marshal(b []byte) (n int) + func (self TrackFragDecodeTime) Tag() Tag + type TrackFragHeader struct + BaseDataOffset uint64 + DefaultDuration uint32 + DefaultFlags uint32 + DefaultSize uint32 + Flags uint32 + StsdId uint32 + Version uint8 + func (self *TrackFragHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackFragHeader) Children() (r []Atom) + func (self TrackFragHeader) Len() (n int) + func (self TrackFragHeader) Marshal(b []byte) (n int) + func (self TrackFragHeader) String() string + func (self TrackFragHeader) Tag() Tag + type TrackFragRun struct + DataOffset uint32 + Entries []TrackFragRunEntry + FirstSampleFlags uint32 + Flags uint32 + Version uint8 + func (self *TrackFragRun) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackFragRun) Children() (r []Atom) + func (self TrackFragRun) Len() (n int) + func (self TrackFragRun) Marshal(b []byte) (n int) + func (self TrackFragRun) String() string + func (self TrackFragRun) Tag() Tag + type TrackFragRunEntry struct + Cts uint32 + Duration uint32 + Flags uint32 + Size uint32 + func GetTrackFragRunEntry(b []byte) (self TrackFragRunEntry) + type TrackHeader struct + AlternateGroup int16 + CreateTime time.Time + Duration int32 + Flags uint32 + Layer int16 + Matrix [9]int32 + ModifyTime time.Time + TrackHeight float64 + TrackId int32 + TrackWidth float64 + Version uint8 + Volume float64 + func (self *TrackHeader) Unmarshal(b []byte, offset int) (n int, err error) + func (self TrackHeader) Children() (r []Atom) + func (self TrackHeader) Len() (n int) + func (self TrackHeader) Marshal(b []byte) (n int) + func (self TrackHeader) Tag() Tag + type VideoMediaInfo struct + Flags uint32 + GraphicsMode int16 + Opcolor [3]int16 + Version uint8 + func (self *VideoMediaInfo) Unmarshal(b []byte, offset int) (n int, err error) + func (self VideoMediaInfo) Children() (r []Atom) + func (self VideoMediaInfo) Len() (n int) + func (self VideoMediaInfo) Marshal(b []byte) (n int) + func (self VideoMediaInfo) Tag() Tag