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 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
- type AVC1Desc
- type Atom
- type AtomPos
- type ChunkOffset
- type CompositionOffset
- 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
- func (self *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 HV1Conf
- type HV1Desc
- type HandlerRefer
- type MP4ADesc
- type Media
- type MediaHeader
- type MediaInfo
- type Movie
- type MovieExtend
- type MovieFrag
- type MovieFragHeader
- type MovieHeader
- type ParseError
- type SampleDesc
- type SampleSize
- type SampleTable
- type SampleToChunk
- type SampleToChunkEntry
- type SegmentType
- type SoundMediaInfo
- type SyncSample
- type Tag
- type TimeToSample
- type TimeToSampleEntry
- type Track
- func (self Track) Children() (r []Atom)
- func (self *Track) GetAVC1Conf() (conf *AVC1Conf)
- func (self *Track) GetElemStreamDesc() (esds *ElemStreamDesc)
- func (self Track) Len() (n int)
- func (self Track) Marshal(b []byte) (n int)
- func (self Track) Tag() Tag
- func (self *Track) Unmarshal(b []byte, offset int) (n int, err error)
- type TrackExtend
- type TrackFrag
- type TrackFragDecodeTime
- type TrackFragHeader
- 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
- func (self *TrackFragHeader) Unmarshal(b []byte, offset int) (n int, err error)
- type TrackFragRun
- type TrackFragRunEntry
- type TrackHeader
- type VideoMediaInfo
Constants ¶
View Source
const ( TFHD_BASE_DATA_OFFSET = 0x01 TFHD_STSD_ID = 0x02 TFHD_DEFAULT_DURATION = 0x08 TFHD_DEFAULT_SIZE = 0x10 TFHD_DEFAULT_FLAGS = 0x20 TFHD_DURATION_IS_EMPTY = 0x010000 TFHD_DEFAULT_BASE_IS_MOOF = 0x020000 )
View Source
const ( TRUN_DATA_OFFSET = 0x01 TRUN_FIRST_SAMPLE_FLAGS = 0x04 TRUN_SAMPLE_DURATION = 0x100 TRUN_SAMPLE_SIZE = 0x200 TRUN_SAMPLE_FLAGS = 0x400 TRUN_SAMPLE_CTS = 0x800 )
View Source
const ( MP4ESDescrTag = 3 MP4DecConfigDescrTag = 4 MP4DecSpecificDescrTag = 5 )
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 HEV1 = Tag(0x68766331)
0x31766568
View Source
const HVCC = Tag(0x68766343)
View Source
const LenCompositionOffsetEntry = 8
View Source
const LenSampleToChunkEntry = 12
View Source
const LenTimeToSampleEntry = 8
View Source
const LenTrackFragRunEntry = 16
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 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)
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)
View Source
const URL = Tag(0x75726c20)
const HVC1 = Tag(0x68766331)
func (self HVC1Desc) Tag() Tag { return HVC1 }
View Source
const VMHD = Tag(0x766d6864)
Variables ¶
This section is empty.
Functions ¶
func FprintAtom ¶
func GetFixed16 ¶
func GetFixed32 ¶
func PutCompositionOffsetEntry ¶
func PutCompositionOffsetEntry(b []byte, self CompositionOffsetEntry)
func PutFixed16 ¶
func PutFixed32 ¶
func PutSampleToChunkEntry ¶
func PutSampleToChunkEntry(b []byte, self SampleToChunkEntry)
func PutTimeToSampleEntry ¶
func PutTimeToSampleEntry(b []byte, self TimeToSampleEntry)
func PutTrackFragRunEntry ¶
func PutTrackFragRunEntry(b []byte, self TrackFragRunEntry)
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 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 (self ChunkOffset) Children() (r []Atom)
func (ChunkOffset) Len ¶
func (self ChunkOffset) Len() (n int)
func (ChunkOffset) Marshal ¶
func (self ChunkOffset) Marshal(b []byte) (n int)
func (ChunkOffset) String ¶
func (self ChunkOffset) String() string
func (ChunkOffset) Tag ¶
func (self ChunkOffset) Tag() Tag
type CompositionOffset ¶
type CompositionOffset struct { Version uint8 Flags uint32 Entries []CompositionOffsetEntry AtomPos }
func (CompositionOffset) Children ¶
func (self CompositionOffset) Children() (r []Atom)
func (CompositionOffset) Len ¶
func (self CompositionOffset) Len() (n int)
func (CompositionOffset) Marshal ¶
func (self CompositionOffset) Marshal(b []byte) (n int)
func (CompositionOffset) String ¶
func (self CompositionOffset) String() string
func (CompositionOffset) Tag ¶
func (self CompositionOffset) Tag() Tag
type CompositionOffsetEntry ¶
func GetCompositionOffsetEntry ¶
func GetCompositionOffsetEntry(b []byte) (self CompositionOffsetEntry)
type DataReferUrl ¶
func (DataReferUrl) Children ¶
func (self DataReferUrl) Children() (r []Atom)
func (DataReferUrl) Len ¶
func (self DataReferUrl) Len() (n int)
func (DataReferUrl) Marshal ¶
func (self DataReferUrl) Marshal(b []byte) (n int)
func (DataReferUrl) Tag ¶
func (self DataReferUrl) Tag() Tag
type ElemStreamDesc ¶
func (ElemStreamDesc) Children ¶
func (self ElemStreamDesc) Children() []Atom
func (ElemStreamDesc) Len ¶
func (self ElemStreamDesc) Len() (n int)
func (ElemStreamDesc) Marshal ¶
func (self ElemStreamDesc) Marshal(b []byte) (n int)
func (ElemStreamDesc) String ¶
func (self ElemStreamDesc) String() string
func (ElemStreamDesc) Tag ¶
func (self ElemStreamDesc) Tag() Tag
type HV1Desc ¶
type HV1Desc 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 *HV1Conf Unknowns []Atom AtomPos }
type HandlerRefer ¶
type HandlerRefer struct { Version uint8 Flags uint32 Type [4]byte SubType [4]byte Name []byte AtomPos }
func (HandlerRefer) Children ¶
func (self HandlerRefer) Children() (r []Atom)
func (HandlerRefer) Len ¶
func (self HandlerRefer) Len() (n int)
func (HandlerRefer) Marshal ¶
func (self HandlerRefer) Marshal(b []byte) (n int)
func (HandlerRefer) Tag ¶
func (self 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 int32 Duration int32 Language int16 Quality int16 AtomPos }
func (MediaHeader) Children ¶
func (self MediaHeader) Children() (r []Atom)
func (MediaHeader) Len ¶
func (self MediaHeader) Len() (n int)
func (MediaHeader) Marshal ¶
func (self MediaHeader) Marshal(b []byte) (n int)
func (MediaHeader) Tag ¶
func (self 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 (self MovieExtend) Children() (r []Atom)
func (MovieExtend) Len ¶
func (self MovieExtend) Len() (n int)
func (MovieExtend) Marshal ¶
func (self MovieExtend) Marshal(b []byte) (n int)
func (MovieExtend) Tag ¶
func (self MovieExtend) Tag() Tag
type MovieFrag ¶
type MovieFrag struct { Header *MovieFragHeader Tracks []*TrackFrag Unknowns []Atom AtomPos }
type MovieFragHeader ¶
func (MovieFragHeader) Children ¶
func (self MovieFragHeader) Children() (r []Atom)
func (MovieFragHeader) Len ¶
func (self MovieFragHeader) Len() (n int)
func (MovieFragHeader) Marshal ¶
func (self MovieFragHeader) Marshal(b []byte) (n int)
func (MovieFragHeader) Tag ¶
func (self MovieFragHeader) Tag() Tag
type MovieHeader ¶
type MovieHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TimeScale int32 Duration int32 PreferredRate float64 PreferredVolume float64 Matrix [9]int32 PreviewTime time.Time PreviewDuration time.Time PosterTime time.Time SelectionTime time.Time SelectionDuration time.Time CurrentTime time.Time NextTrackId int32 AtomPos }
func (MovieHeader) Children ¶
func (self MovieHeader) Children() (r []Atom)
func (MovieHeader) Len ¶
func (self MovieHeader) Len() (n int)
func (MovieHeader) Marshal ¶
func (self MovieHeader) Marshal(b []byte) (n int)
func (MovieHeader) String ¶
func (self MovieHeader) String() string
func (MovieHeader) Tag ¶
func (self MovieHeader) Tag() Tag
type ParseError ¶
func (*ParseError) Error ¶
func (self *ParseError) Error() string
type SampleDesc ¶
type SampleDesc struct { Version uint8 AVC1Desc *AVC1Desc HV1Desc *HV1Desc MP4ADesc *MP4ADesc Unknowns []Atom AtomPos }
func (SampleDesc) Children ¶
func (self SampleDesc) Children() (r []Atom)
func (SampleDesc) Len ¶
func (self SampleDesc) Len() (n int)
func (SampleDesc) Marshal ¶
func (self SampleDesc) Marshal(b []byte) (n int)
func (SampleDesc) Tag ¶
func (self SampleDesc) Tag() Tag
type SampleSize ¶
func (SampleSize) Children ¶
func (self SampleSize) Children() (r []Atom)
func (SampleSize) Len ¶
func (self SampleSize) Len() (n int)
func (SampleSize) Marshal ¶
func (self SampleSize) Marshal(b []byte) (n int)
func (SampleSize) String ¶
func (self SampleSize) String() string
func (SampleSize) Tag ¶
func (self 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 (self SampleTable) Children() (r []Atom)
func (SampleTable) Len ¶
func (self SampleTable) Len() (n int)
func (SampleTable) Marshal ¶
func (self SampleTable) Marshal(b []byte) (n int)
func (SampleTable) Tag ¶
func (self SampleTable) Tag() Tag
type SampleToChunk ¶
type SampleToChunk struct { Version uint8 Flags uint32 Entries []SampleToChunkEntry AtomPos }
func (SampleToChunk) Children ¶
func (self SampleToChunk) Children() (r []Atom)
func (SampleToChunk) Len ¶
func (self SampleToChunk) Len() (n int)
func (SampleToChunk) Marshal ¶
func (self SampleToChunk) Marshal(b []byte) (n int)
func (SampleToChunk) String ¶
func (self SampleToChunk) String() string
func (SampleToChunk) Tag ¶
func (self SampleToChunk) Tag() Tag
type SampleToChunkEntry ¶
func GetSampleToChunkEntry ¶
func GetSampleToChunkEntry(b []byte) (self SampleToChunkEntry)
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 (self SoundMediaInfo) Children() (r []Atom)
func (SoundMediaInfo) Len ¶
func (self SoundMediaInfo) Len() (n int)
func (SoundMediaInfo) Marshal ¶
func (self SoundMediaInfo) Marshal(b []byte) (n int)
func (SoundMediaInfo) Tag ¶
func (self SoundMediaInfo) Tag() Tag
type SyncSample ¶
func (SyncSample) Children ¶
func (self SyncSample) Children() (r []Atom)
func (SyncSample) Len ¶
func (self SyncSample) Len() (n int)
func (SyncSample) Marshal ¶
func (self SyncSample) Marshal(b []byte) (n int)
func (SyncSample) String ¶
func (self SyncSample) String() string
func (SyncSample) Tag ¶
func (self SyncSample) Tag() Tag
type TimeToSample ¶
type TimeToSample struct { Version uint8 Flags uint32 Entries []TimeToSampleEntry AtomPos }
func (TimeToSample) Children ¶
func (self TimeToSample) Children() (r []Atom)
func (TimeToSample) Len ¶
func (self TimeToSample) Len() (n int)
func (TimeToSample) Marshal ¶
func (self TimeToSample) Marshal(b []byte) (n int)
func (TimeToSample) String ¶
func (self TimeToSample) String() string
func (TimeToSample) Tag ¶
func (self TimeToSample) Tag() Tag
type TimeToSampleEntry ¶
func GetTimeToSampleEntry ¶
func GetTimeToSampleEntry(b []byte) (self TimeToSampleEntry)
type Track ¶
type Track struct { Header *TrackHeader Media *Media Unknowns []Atom AtomPos }
func (*Track) GetAVC1Conf ¶
func (*Track) GetElemStreamDesc ¶
func (self *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 (self TrackExtend) Children() (r []Atom)
func (TrackExtend) Len ¶
func (self TrackExtend) Len() (n int)
func (TrackExtend) Marshal ¶
func (self TrackExtend) Marshal(b []byte) (n int)
func (TrackExtend) Tag ¶
func (self TrackExtend) Tag() Tag
type TrackFrag ¶
type TrackFrag struct { Header *TrackFragHeader DecodeTime *TrackFragDecodeTime Run *TrackFragRun Unknowns []Atom AtomPos }
type TrackFragDecodeTime ¶
func (TrackFragDecodeTime) Children ¶
func (self TrackFragDecodeTime) Children() (r []Atom)
func (TrackFragDecodeTime) Len ¶
func (self TrackFragDecodeTime) Len() (n int)
func (TrackFragDecodeTime) Marshal ¶
func (self TrackFragDecodeTime) Marshal(b []byte) (n int)
func (TrackFragDecodeTime) Tag ¶
func (self TrackFragDecodeTime) Tag() Tag
type TrackFragHeader ¶
type TrackFragHeader struct { Version uint8 Flags uint32 BaseDataOffset uint64 StsdId uint32 DefaultDuration uint32 DefaultSize uint32 DefaultFlags uint32 AtomPos }
func (TrackFragHeader) Children ¶
func (self TrackFragHeader) Children() (r []Atom)
func (TrackFragHeader) Len ¶
func (self TrackFragHeader) Len() (n int)
func (TrackFragHeader) Marshal ¶
func (self TrackFragHeader) Marshal(b []byte) (n int)
func (TrackFragHeader) String ¶
func (self TrackFragHeader) String() string
func (TrackFragHeader) Tag ¶
func (self TrackFragHeader) Tag() Tag
type TrackFragRun ¶
type TrackFragRun struct { Version uint8 Flags uint32 DataOffset uint32 FirstSampleFlags uint32 Entries []TrackFragRunEntry AtomPos }
func (TrackFragRun) Children ¶
func (self TrackFragRun) Children() (r []Atom)
func (TrackFragRun) Len ¶
func (self TrackFragRun) Len() (n int)
func (TrackFragRun) Marshal ¶
func (self TrackFragRun) Marshal(b []byte) (n int)
func (TrackFragRun) String ¶
func (self TrackFragRun) String() string
func (TrackFragRun) Tag ¶
func (self TrackFragRun) Tag() Tag
type TrackFragRunEntry ¶
func GetTrackFragRunEntry ¶
func GetTrackFragRunEntry(b []byte) (self TrackFragRunEntry)
type TrackHeader ¶
type TrackHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TrackId int32 Duration int32 Layer int16 AlternateGroup int16 Volume float64 Matrix [9]int32 TrackWidth float64 TrackHeight float64 AtomPos }
func (TrackHeader) Children ¶
func (self TrackHeader) Children() (r []Atom)
func (TrackHeader) Len ¶
func (self TrackHeader) Len() (n int)
func (TrackHeader) Marshal ¶
func (self TrackHeader) Marshal(b []byte) (n int)
func (TrackHeader) Tag ¶
func (self TrackHeader) Tag() Tag
type VideoMediaInfo ¶
type VideoMediaInfo struct { Version uint8 Flags uint32 GraphicsMode int16 Opcolor [3]int16 AtomPos }
func (VideoMediaInfo) Children ¶
func (self VideoMediaInfo) Children() (r []Atom)
func (VideoMediaInfo) Len ¶
func (self VideoMediaInfo) Len() (n int)
func (VideoMediaInfo) Marshal ¶
func (self VideoMediaInfo) Marshal(b []byte) (n int)
func (VideoMediaInfo) Tag ¶
func (self VideoMediaInfo) Tag() Tag
Click to show internal directories.
Click to hide internal directories.