Documentation ¶
Index ¶
- Constants
- 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
- type AVC1Desc
- type Atom
- type AtomPos
- type ChunkOffset
- type CompositionOffset
- 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
- func (a *CompositionOffset) Unmarshal(b []byte, offset int) (n int, err error)
- type CompositionOffsetEntry
- type DataInfo
- type DataRefer
- type DataReferUrl
- type Dummy
- type ElemStreamDesc
- type FileType
- type FullAtom
- type HandlerRefer
- type MP4ADesc
- type Media
- type MediaHeader
- type MediaInfo
- type Movie
- type MovieExtend
- type MovieFrag
- type MovieFragHeader
- type MovieHeader
- type OpusSampleEntry
- type OpusSpecificConfiguration
- type ParseError
- type PixelAspect
- type SampleDesc
- type SampleFlags
- type SampleSize
- type SampleTable
- type SampleToChunk
- type SampleToChunkEntry
- type SegmentIndex
- type SegmentReference
- type SegmentType
- type SoundMediaInfo
- type SyncSample
- type Tag
- type TimeToSample
- type TimeToSampleEntry
- type Track
- func (a Track) Children() (r []Atom)
- func (a *Track) GetAVC1Conf() (conf *AVC1Conf)
- func (a *Track) GetElemStreamDesc() (esds *ElemStreamDesc)
- func (a Track) Len() (n int)
- func (a Track) Marshal(b []byte) (n int)
- func (a Track) Tag() Tag
- func (a *Track) Unmarshal(b []byte, offset int) (n int, err error)
- type TrackExtend
- type TrackFrag
- type TrackFragDecodeTime
- type TrackFragFlags
- type TrackFragHeader
- type TrackFragRun
- type TrackFragRunEntry
- type TrackHeader
- type TrackRunFlags
- type VideoMediaInfo
Constants ¶
View Source
const ( OPUS = Tag(0x4f707573) DOPS = Tag(0x644f7073) )
View Source
const ( VideoHandler = 0x76696465 // vide SoundHandler = 0x736f756e // soun )
View Source
const AVC1 = Tag(0x61766331)
View Source
const AVCC = Tag(0x61766343)
View Source
const CTTS = Tag(0x63747473)
View Source
const DINF = Tag(0x64696e66)
View Source
const DREF = Tag(0x64726566)
View Source
const ESDS = Tag(0x65736473)
View Source
const FTYP = Tag(0x66747970)
View Source
const HDLR = Tag(0x68646c72)
View Source
const MDAT = Tag(0x6d646174)
View Source
const MDHD = Tag(0x6d646864)
View Source
const MDIA = Tag(0x6d646961)
View Source
const MFHD = Tag(0x6d666864)
View Source
const MINF = Tag(0x6d696e66)
View Source
const MOOF = Tag(0x6d6f6f66)
View Source
const MOOV = Tag(0x6d6f6f76)
View Source
const MP4A = Tag(0x6d703461)
View Source
const MVEX = Tag(0x6d766578)
View Source
const MVHD = Tag(0x6d766864)
View Source
const PASP = Tag(0x70617370)
View Source
const SIDX = Tag(0x73696478)
View Source
const SMHD = Tag(0x736d6864)
View Source
const STBL = Tag(0x7374626c)
View Source
const STCO = Tag(0x7374636f)
View Source
const STSC = Tag(0x73747363)
View Source
const STSD = Tag(0x73747364)
View Source
const STSS = Tag(0x73747373)
View Source
const STSZ = Tag(0x7374737a)
View Source
const STTS = Tag(0x73747473)
View Source
const STYP = Tag(0x73747970)
View Source
const TFDT = Tag(0x74666474)
View Source
const TFHD = Tag(0x74666864)
TFHD is the atom type for TrackFragHeader
View Source
const TKHD = Tag(0x746b6864)
View Source
const TRAF = Tag(0x74726166)
View Source
const TRAK = Tag(0x7472616b)
View Source
const TREX = Tag(0x74726578)
View Source
const TRUN = Tag(0x7472756e)
TRUN is the atom type for TrackFragRun
View Source
const URL = Tag(0x75726c20)
View Source
const VMHD = Tag(0x766d6864)
Variables ¶
This section is empty.
Functions ¶
func FprintAtom ¶
func GetFixed16 ¶
func GetFixed32 ¶
func PutFixed16 ¶
func PutFixed32 ¶
Types ¶
type AVC1Desc ¶
type AVC1Desc struct { DataRefIdx int16 Version int16 Revision int16 Vendor int32 TemporalQuality int32 SpatialQuality int32 Width int16 Height int16 HorizontalResolution float64 VorizontalResolution float64 FrameCount int16 CompressorName [32]byte Depth int16 ColorTableId int16 Conf *AVC1Conf PixelAspect *PixelAspect Unknowns []Atom AtomPos }
type Atom ¶
type Atom interface { Pos() (int, int) Tag() Tag Marshal([]byte) int Unmarshal([]byte, int) (int, error) Len() int Children() []Atom }
func FindChildren ¶
func FindChildrenByName ¶
func ReadFileAtoms ¶
func ReadFileAtoms(r io.ReadSeeker) (atoms []Atom, err error)
type ChunkOffset ¶
func (ChunkOffset) Children ¶
func (a ChunkOffset) Children() (r []Atom)
func (ChunkOffset) Len ¶
func (a ChunkOffset) Len() (n int)
func (ChunkOffset) Marshal ¶
func (a ChunkOffset) Marshal(b []byte) (n int)
func (ChunkOffset) String ¶
func (a ChunkOffset) String() string
func (ChunkOffset) Tag ¶
func (a ChunkOffset) Tag() Tag
type CompositionOffset ¶
type CompositionOffset struct { Version uint8 Flags uint32 Entries []CompositionOffsetEntry AtomPos }
func (CompositionOffset) Children ¶
func (a CompositionOffset) Children() (r []Atom)
func (CompositionOffset) Len ¶
func (a CompositionOffset) Len() (n int)
func (CompositionOffset) Marshal ¶
func (a CompositionOffset) Marshal(b []byte) (n int)
func (CompositionOffset) String ¶
func (a CompositionOffset) String() string
func (CompositionOffset) Tag ¶
func (a CompositionOffset) Tag() Tag
type CompositionOffsetEntry ¶
type DataReferUrl ¶
func (DataReferUrl) Children ¶
func (a DataReferUrl) Children() (r []Atom)
func (DataReferUrl) Len ¶
func (a DataReferUrl) Len() (n int)
func (DataReferUrl) Marshal ¶
func (a DataReferUrl) Marshal(b []byte) (n int)
func (DataReferUrl) Tag ¶
func (a DataReferUrl) Tag() Tag
type ElemStreamDesc ¶
type ElemStreamDesc struct { StreamDescriptor *esio.StreamDescriptor AtomPos }
func (ElemStreamDesc) Children ¶
func (a ElemStreamDesc) Children() []Atom
func (ElemStreamDesc) Len ¶
func (a ElemStreamDesc) Len() (n int)
func (ElemStreamDesc) Marshal ¶
func (a ElemStreamDesc) Marshal(b []byte) (n int)
func (ElemStreamDesc) Tag ¶
func (a ElemStreamDesc) Tag() Tag
type HandlerRefer ¶
type HandlerRefer struct { Version uint8 Flags uint32 Predefined uint32 Type uint32 Reserved [3]uint32 Name string AtomPos }
func (HandlerRefer) Children ¶
func (a HandlerRefer) Children() (r []Atom)
func (HandlerRefer) Len ¶
func (a HandlerRefer) Len() (n int)
func (HandlerRefer) Marshal ¶
func (a HandlerRefer) Marshal(b []byte) (n int)
func (HandlerRefer) Tag ¶
func (a HandlerRefer) Tag() Tag
type MP4ADesc ¶
type Media ¶
type Media struct { Header *MediaHeader Handler *HandlerRefer Info *MediaInfo Unknowns []Atom AtomPos }
type MediaHeader ¶
type MediaHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TimeScale uint32 Duration uint32 Language int16 Quality int16 AtomPos }
func (MediaHeader) Children ¶
func (a MediaHeader) Children() (r []Atom)
func (MediaHeader) Len ¶
func (a MediaHeader) Len() (n int)
func (MediaHeader) Marshal ¶
func (a MediaHeader) Marshal(b []byte) (n int)
func (MediaHeader) Tag ¶
func (a MediaHeader) Tag() Tag
type MediaInfo ¶
type MediaInfo struct { Sound *SoundMediaInfo Video *VideoMediaInfo Data *DataInfo Sample *SampleTable Unknowns []Atom AtomPos }
type Movie ¶
type Movie struct { Header *MovieHeader MovieExtend *MovieExtend Tracks []*Track Unknowns []Atom AtomPos }
type MovieExtend ¶
type MovieExtend struct { Tracks []*TrackExtend Unknowns []Atom AtomPos }
func (MovieExtend) Children ¶
func (a MovieExtend) Children() (r []Atom)
func (MovieExtend) Len ¶
func (a MovieExtend) Len() (n int)
func (MovieExtend) Marshal ¶
func (a MovieExtend) Marshal(b []byte) (n int)
func (MovieExtend) Tag ¶
func (a MovieExtend) Tag() Tag
type MovieFrag ¶
type MovieFrag struct { Header *MovieFragHeader Tracks []*TrackFrag Unknowns []Atom AtomPos }
type MovieFragHeader ¶
func (MovieFragHeader) Children ¶
func (a MovieFragHeader) Children() (r []Atom)
func (MovieFragHeader) Len ¶
func (a MovieFragHeader) Len() (n int)
func (MovieFragHeader) Marshal ¶
func (a MovieFragHeader) Marshal(b []byte) (n int)
func (MovieFragHeader) Tag ¶
func (a MovieFragHeader) Tag() Tag
type MovieHeader ¶
type MovieHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TimeScale uint32 Duration uint32 PreferredRate float64 PreferredVolume float64 Matrix [9]int32 NextTrackID uint32 AtomPos }
func (MovieHeader) Children ¶
func (a MovieHeader) Children() (r []Atom)
func (MovieHeader) Len ¶
func (a MovieHeader) Len() (n int)
func (MovieHeader) Marshal ¶
func (a MovieHeader) Marshal(b []byte) (n int)
func (MovieHeader) String ¶
func (a MovieHeader) String() string
func (MovieHeader) Tag ¶
func (a MovieHeader) Tag() Tag
type OpusSampleEntry ¶
type OpusSampleEntry struct { DataRefIdx uint16 NumberOfChannels uint16 SampleSize uint16 CompressionID uint16 SampleRate float64 Conf *OpusSpecificConfiguration AtomPos }
func (OpusSampleEntry) Children ¶
func (a OpusSampleEntry) Children() (r []Atom)
func (OpusSampleEntry) Len ¶
func (a OpusSampleEntry) Len() (n int)
func (OpusSampleEntry) Marshal ¶
func (a OpusSampleEntry) Marshal(b []byte) (n int)
func (OpusSampleEntry) Tag ¶
func (a OpusSampleEntry) Tag() Tag
type OpusSpecificConfiguration ¶
type OpusSpecificConfiguration struct { Version uint8 OutputChannelCount uint8 PreSkip uint16 InputSampleRate uint32 OutputGain int16 ChannelMappingFamily uint8 AtomPos }
func (OpusSpecificConfiguration) Children ¶
func (a OpusSpecificConfiguration) Children() []Atom
func (OpusSpecificConfiguration) Len ¶
func (a OpusSpecificConfiguration) Len() (n int)
func (OpusSpecificConfiguration) Marshal ¶
func (a OpusSpecificConfiguration) Marshal(b []byte) (n int)
func (OpusSpecificConfiguration) Tag ¶
func (a OpusSpecificConfiguration) Tag() Tag
type ParseError ¶
func (*ParseError) Error ¶
func (a *ParseError) Error() string
type PixelAspect ¶
func (*PixelAspect) Children ¶
func (a *PixelAspect) Children() (r []Atom)
func (PixelAspect) Len ¶
func (a PixelAspect) Len() (n int)
func (PixelAspect) Marshal ¶
func (a PixelAspect) Marshal(b []byte) (n int)
func (PixelAspect) Tag ¶
func (a PixelAspect) Tag() Tag
type SampleDesc ¶
type SampleDesc struct { Version uint8 AVC1Desc *AVC1Desc MP4ADesc *MP4ADesc OpusDesc *OpusSampleEntry Unknowns []Atom AtomPos }
func (SampleDesc) Children ¶
func (a SampleDesc) Children() (r []Atom)
func (SampleDesc) Len ¶
func (a SampleDesc) Len() (n int)
func (SampleDesc) Marshal ¶
func (a SampleDesc) Marshal(b []byte) (n int)
func (SampleDesc) Tag ¶
func (a SampleDesc) Tag() Tag
type SampleFlags ¶
type SampleFlags uint32
const ( SampleIsNonSync SampleFlags = 0x00010000 SampleHasDependencies SampleFlags = 0x01000000 SampleNoDependencies SampleFlags = 0x02000000 SampleNonKeyframe = SampleHasDependencies | SampleIsNonSync )
fragment sample flags
type SampleSize ¶
func (SampleSize) Children ¶
func (a SampleSize) Children() (r []Atom)
func (SampleSize) Len ¶
func (a SampleSize) Len() (n int)
func (SampleSize) Marshal ¶
func (a SampleSize) Marshal(b []byte) (n int)
func (SampleSize) String ¶
func (a SampleSize) String() string
func (SampleSize) Tag ¶
func (a SampleSize) Tag() Tag
type SampleTable ¶
type SampleTable struct { SampleDesc *SampleDesc TimeToSample *TimeToSample CompositionOffset *CompositionOffset SampleToChunk *SampleToChunk SyncSample *SyncSample ChunkOffset *ChunkOffset SampleSize *SampleSize AtomPos }
func (SampleTable) Children ¶
func (a SampleTable) Children() (r []Atom)
func (SampleTable) Len ¶
func (a SampleTable) Len() (n int)
func (SampleTable) Marshal ¶
func (a SampleTable) Marshal(b []byte) (n int)
func (SampleTable) Tag ¶
func (a SampleTable) Tag() Tag
type SampleToChunk ¶
type SampleToChunk struct { Version uint8 Flags uint32 Entries []SampleToChunkEntry AtomPos }
func (SampleToChunk) Children ¶
func (a SampleToChunk) Children() (r []Atom)
func (SampleToChunk) Len ¶
func (a SampleToChunk) Len() (n int)
func (SampleToChunk) Marshal ¶
func (a SampleToChunk) Marshal(b []byte) (n int)
func (SampleToChunk) String ¶
func (a SampleToChunk) String() string
func (SampleToChunk) Tag ¶
func (a SampleToChunk) Tag() Tag
type SampleToChunkEntry ¶
type SegmentIndex ¶
type SegmentIndex struct { FullAtom ReferenceID uint32 TimeScale uint32 EarliestPTS uint64 FirstOffset uint64 References []SegmentReference }
func (SegmentIndex) Children ¶
func (s SegmentIndex) Children() []Atom
func (SegmentIndex) Len ¶
func (s SegmentIndex) Len() (n int)
func (SegmentIndex) Marshal ¶
func (s SegmentIndex) Marshal(b []byte) (n int)
func (SegmentIndex) Tag ¶
func (s SegmentIndex) Tag() Tag
type SegmentReference ¶
type SegmentType ¶
func (SegmentType) Children ¶
func (f SegmentType) Children() []Atom
func (SegmentType) Len ¶
func (f SegmentType) Len() int
func (SegmentType) Marshal ¶
func (f SegmentType) Marshal(b []byte) (n int)
func (SegmentType) Tag ¶
func (t SegmentType) Tag() Tag
type SoundMediaInfo ¶
func (SoundMediaInfo) Children ¶
func (a SoundMediaInfo) Children() (r []Atom)
func (SoundMediaInfo) Len ¶
func (a SoundMediaInfo) Len() (n int)
func (SoundMediaInfo) Marshal ¶
func (a SoundMediaInfo) Marshal(b []byte) (n int)
func (SoundMediaInfo) Tag ¶
func (a SoundMediaInfo) Tag() Tag
type SyncSample ¶
func (SyncSample) Children ¶
func (a SyncSample) Children() (r []Atom)
func (SyncSample) Len ¶
func (a SyncSample) Len() (n int)
func (SyncSample) Marshal ¶
func (a SyncSample) Marshal(b []byte) (n int)
func (SyncSample) String ¶
func (a SyncSample) String() string
func (SyncSample) Tag ¶
func (a SyncSample) Tag() Tag
type TimeToSample ¶
type TimeToSample struct { Version uint8 Flags uint32 Entries []TimeToSampleEntry AtomPos }
func (TimeToSample) Children ¶
func (a TimeToSample) Children() (r []Atom)
func (TimeToSample) Len ¶
func (a TimeToSample) Len() (n int)
func (TimeToSample) Marshal ¶
func (a TimeToSample) Marshal(b []byte) (n int)
func (TimeToSample) String ¶
func (a TimeToSample) String() string
func (TimeToSample) Tag ¶
func (a TimeToSample) Tag() Tag
type TimeToSampleEntry ¶
type Track ¶
type Track struct { Header *TrackHeader Media *Media Unknowns []Atom AtomPos }
func (*Track) GetAVC1Conf ¶
func (*Track) GetElemStreamDesc ¶
func (a *Track) GetElemStreamDesc() (esds *ElemStreamDesc)
type TrackExtend ¶
type TrackExtend struct { Version uint8 Flags uint32 TrackID uint32 DefaultSampleDescIdx uint32 DefaultSampleDuration uint32 DefaultSampleSize uint32 DefaultSampleFlags uint32 AtomPos }
func (TrackExtend) Children ¶
func (a TrackExtend) Children() (r []Atom)
func (TrackExtend) Len ¶
func (a TrackExtend) Len() (n int)
func (TrackExtend) Marshal ¶
func (a TrackExtend) Marshal(b []byte) (n int)
func (TrackExtend) Tag ¶
func (a TrackExtend) Tag() Tag
type TrackFrag ¶
type TrackFrag struct { Header *TrackFragHeader DecodeTime *TrackFragDecodeTime Run *TrackFragRun Unknowns []Atom AtomPos }
type TrackFragDecodeTime ¶
func (TrackFragDecodeTime) Children ¶
func (a TrackFragDecodeTime) Children() (r []Atom)
func (TrackFragDecodeTime) Len ¶
func (a TrackFragDecodeTime) Len() (n int)
func (TrackFragDecodeTime) Marshal ¶
func (a TrackFragDecodeTime) Marshal(b []byte) (n int)
func (TrackFragDecodeTime) Tag ¶
func (a TrackFragDecodeTime) Tag() Tag
type TrackFragFlags ¶
type TrackFragFlags uint32
TrackFragFlags is the type of TrackFragHeader's Flags
const ( TrackFragBaseDataOffset TrackFragFlags = 0x01 TrackFragStsdID TrackFragFlags = 0x02 TrackFragDefaultDuration TrackFragFlags = 0x08 TrackFragDefaultSize TrackFragFlags = 0x10 TrackFragDefaultFlags TrackFragFlags = 0x20 TrackFragDurationIsEmpty TrackFragFlags = 0x010000 TrackFragDefaultBaseIsMOOF TrackFragFlags = 0x020000 )
Defined flags for TrackFragHeader
type TrackFragHeader ¶
type TrackFragHeader struct { Version uint8 Flags TrackFragFlags TrackID uint32 BaseDataOffset uint64 StsdID uint32 DefaultDuration uint32 DefaultSize uint32 DefaultFlags SampleFlags AtomPos }
TrackFragHeader atom
func (TrackFragHeader) Children ¶
func (a TrackFragHeader) Children() (r []Atom)
func (TrackFragHeader) Len ¶
func (a TrackFragHeader) Len() (n int)
func (TrackFragHeader) Marshal ¶
func (a TrackFragHeader) Marshal(b []byte) (n int)
func (TrackFragHeader) String ¶
func (a TrackFragHeader) String() string
func (TrackFragHeader) Tag ¶
func (a TrackFragHeader) Tag() Tag
type TrackFragRun ¶
type TrackFragRun struct { Version uint8 Flags TrackRunFlags DataOffset uint32 FirstSampleFlags SampleFlags Entries []TrackFragRunEntry AtomPos }
TrackFragRun atom
func (TrackFragRun) Children ¶
func (a TrackFragRun) Children() (r []Atom)
func (TrackFragRun) Len ¶
func (a TrackFragRun) Len() (n int)
func (TrackFragRun) Marshal ¶
func (a TrackFragRun) Marshal(b []byte) (n int)
func (TrackFragRun) String ¶
func (a TrackFragRun) String() string
func (TrackFragRun) Tag ¶
func (a TrackFragRun) Tag() Tag
type TrackFragRunEntry ¶
type TrackFragRunEntry struct { Duration uint32 Size uint32 Flags SampleFlags CTS int32 }
type TrackHeader ¶
type TrackHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TrackID uint32 Duration uint32 Layer int16 AlternateGroup int16 Volume float64 Matrix [9]int32 TrackWidth float64 TrackHeight float64 AtomPos }
func (TrackHeader) Children ¶
func (a TrackHeader) Children() (r []Atom)
func (TrackHeader) Len ¶
func (a TrackHeader) Len() (n int)
func (TrackHeader) Marshal ¶
func (a TrackHeader) Marshal(b []byte) (n int)
func (TrackHeader) Tag ¶
func (a TrackHeader) Tag() Tag
type TrackRunFlags ¶
type TrackRunFlags uint32
TrackRunFlags is the type of TrackFragRun's Flags
const ( TrackRunDataOffset TrackRunFlags = 0x01 TrackRunFirstSampleFlags TrackRunFlags = 0x04 TrackRunSampleDuration TrackRunFlags = 0x100 TrackRunSampleSize TrackRunFlags = 0x200 TrackRunSampleFlags TrackRunFlags = 0x400 TrackRunSampleCTS TrackRunFlags = 0x800 )
Defined flags for TrackFragRun
type VideoMediaInfo ¶
type VideoMediaInfo struct { Version uint8 Flags uint32 GraphicsMode int16 Opcolor [3]int16 AtomPos }
func (VideoMediaInfo) Children ¶
func (a VideoMediaInfo) Children() (r []Atom)
func (VideoMediaInfo) Len ¶
func (a VideoMediaInfo) Len() (n int)
func (VideoMediaInfo) Marshal ¶
func (a VideoMediaInfo) Marshal(b []byte) (n int)
func (VideoMediaInfo) Tag ¶
func (a VideoMediaInfo) Tag() Tag
Click to show internal directories.
Click to hide internal directories.