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, inst CompositionOffsetEntry)
- func PutFixed16(b []byte, f float64)
- func PutFixed32(b []byte, f float64)
- func PutSampleToChunkEntry(b []byte, inst SampleToChunkEntry)
- func PutTime32(b []byte, t time.Time)
- func PutTime64(b []byte, t time.Time)
- func PutTimeToSampleEntry(b []byte, inst TimeToSampleEntry)
- func PutTrackFragRunEntry(b []byte, inst TrackFragRunEntry)
- type AVC1Conf
- type AVC1Desc
- type Atom
- type AtomPos
- type ChunkOffset
- type CompositionOffset
- func (inst CompositionOffset) Children() (r []Atom)
- func (inst CompositionOffset) Len() (n int)
- func (inst CompositionOffset) Marshal(b []byte) (n int)
- func (inst CompositionOffset) String() string
- func (inst CompositionOffset) Tag() Tag
- func (inst *CompositionOffset) Unmarshal(b []byte, offset int) (n int, err error)
- type CompositionOffsetEntry
- type DataInfo
- type DataRefer
- type DataReferURL
- type Dummy
- type ElemStreamDesc
- 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 SoundMediaInfo
- type SyncSample
- type Tag
- type TimeToSample
- type TimeToSampleEntry
- type Track
- func (inst Track) Children() (r []Atom)
- func (inst *Track) GetAVC1Conf() (conf *AVC1Conf)
- func (inst *Track) GetElemStreamDesc() (esds *ElemStreamDesc)
- func (inst Track) Len() (n int)
- func (inst Track) Marshal(b []byte) (n int)
- func (inst Track) Tag() Tag
- func (inst *Track) Unmarshal(b []byte, offset int) (n int, err error)
- type TrackExtend
- type TrackFrag
- type TrackFragDecodeTime
- type TrackFragHeader
- func (inst TrackFragHeader) Children() (r []Atom)
- func (inst TrackFragHeader) Len() (n int)
- func (inst TrackFragHeader) Marshal(b []byte) (n int)
- func (inst TrackFragHeader) String() string
- func (inst TrackFragHeader) Tag() Tag
- func (inst *TrackFragHeader) Unmarshal(b []byte, offset int) (n int, err error)
- type TrackFragRun
- type TrackFragRunEntry
- type TrackHeader
- type VideoMediaInfo
Constants ¶
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 )
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 )
const ( MP4ESDescrTag = 3 MP4DecConfigDescrTag = 4 MP4DecSpecificDescrTag = 5 )
const AVC1 = Tag(0x61766331)
AVC1 const
const AVCC = Tag(0x61766343)
AVCC const
const CTTS = Tag(0x63747473)
CTTS const
const DINF = Tag(0x64696e66)
DINF const
const DREF = Tag(0x64726566)
DREF const
const ESDS = Tag(0x65736473)
ESDS const
const HDLR = Tag(0x68646c72)
HDLR const
const LenCompositionOffsetEntry = 8
LenCompositionOffsetEntry func
const LenSampleToChunkEntry = 12
LenSampleToChunkEntry const
const LenTimeToSampleEntry = 8
LenTimeToSampleEntry const
const LenTrackFragRunEntry = 16
LenTrackFragRunEntry const
const MDAT = Tag(0x6d646174)
MDAT const
const MDHD = Tag(0x6d646864)
MDHD const
const MDIA = Tag(0x6d646961)
MDIA const
const MFHD = Tag(0x6d666864)
MFHD const
const MINF = Tag(0x6d696e66)
MINF const
const MOOF = Tag(0x6d6f6f66)
MOOF const
const MOOV = Tag(0x6d6f6f76)
MOOV const
const MP4A = Tag(0x6d703461)
MP4A const
const MVEX = Tag(0x6d766578)
MVEX const
const MVHD = Tag(0x6d766864)
MVHD const
const SMHD = Tag(0x736d6864)
SMHD const
const STBL = Tag(0x7374626c)
STBL const
const STCO = Tag(0x7374636f)
STCO const
const STSC = Tag(0x73747363)
STSC const
const STSD = Tag(0x73747364)
STSD const
const STSS = Tag(0x73747373)
STSS const
const STSZ = Tag(0x7374737a)
STSZ const
const STTS = Tag(0x73747473)
STTS const
const TFDT = Tag(0x74666474)
TFDT const
const TFHD = Tag(0x74666864)
TFHD const
const TKHD = Tag(0x746b6864)
TKHD const
const TRAF = Tag(0x74726166)
TRAF const
const TRAK = Tag(0x7472616b)
TRAK const
const TREX = Tag(0x74726578)
TREX const
const TRUN = Tag(0x7472756e)
TRUN const
const URL = Tag(0x75726c20)
URL const
const VMHD = Tag(0x766d6864)
VMHD const
Variables ¶
This section is empty.
Functions ¶
func PutCompositionOffsetEntry ¶
func PutCompositionOffsetEntry(b []byte, inst CompositionOffsetEntry)
PutCompositionOffsetEntry func
func PutSampleToChunkEntry ¶
func PutSampleToChunkEntry(b []byte, inst SampleToChunkEntry)
PutSampleToChunkEntry func
func PutTimeToSampleEntry ¶
func PutTimeToSampleEntry(b []byte, inst TimeToSampleEntry)
PutTimeToSampleEntry func
func PutTrackFragRunEntry ¶
func PutTrackFragRunEntry(b []byte, inst TrackFragRunEntry)
PutTrackFragRunEntry func
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 }
AVC1Desc struct
type Atom ¶
type Atom interface { Pos() (int, int) Tag() Tag Marshal([]byte) int Unmarshal([]byte, int) (int, error) Len() int Children() []Atom }
Atom interface
func FindChildrenByName ¶
FindChildrenByName func
func ReadFileAtoms ¶
func ReadFileAtoms(r io.ReadSeeker) (atoms []Atom, err error)
ReadFileAtoms func
type ChunkOffset ¶
ChunkOffset struct
func (ChunkOffset) String ¶
func (inst ChunkOffset) String() string
type CompositionOffset ¶
type CompositionOffset struct { Version uint8 Flags uint32 Entries []CompositionOffsetEntry AtomPos }
CompositionOffset struct
func (CompositionOffset) Children ¶
func (inst CompositionOffset) Children() (r []Atom)
Children func
func (CompositionOffset) Marshal ¶
func (inst CompositionOffset) Marshal(b []byte) (n int)
Marshal func
func (CompositionOffset) String ¶
func (inst CompositionOffset) String() string
type CompositionOffsetEntry ¶
CompositionOffsetEntry struct
func GetCompositionOffsetEntry ¶
func GetCompositionOffsetEntry(b []byte) (inst CompositionOffsetEntry)
GetCompositionOffsetEntry func
type DataRefer ¶
type DataRefer struct { Version uint8 Flags uint32 URL *DataReferURL AtomPos }
DataRefer struct
type DataReferURL ¶
DataReferURL struct
type ElemStreamDesc ¶
ElemStreamDesc struct
func (ElemStreamDesc) String ¶
func (inst ElemStreamDesc) String() string
type HandlerRefer ¶
type HandlerRefer struct { Version uint8 Flags uint32 Type [4]byte SubType [4]byte Name []byte AtomPos }
HandlerRefer struct
type MP4ADesc ¶
type MP4ADesc struct { DataRefIdx int16 Version int16 RevisionLevel int16 Vendor int32 NumberOfChannels int16 SampleSize int16 CompressionID int16 SampleRate float64 Conf *ElemStreamDesc Unknowns []Atom AtomPos }
MP4ADesc struct
type Media ¶
type Media struct { Header *MediaHeader Handler *HandlerRefer Info *MediaInfo Unknowns []Atom AtomPos }
Media struct
type MediaHeader ¶
type MediaHeader struct { Version uint8 Flags uint32 CreateTime time.Time ModifyTime time.Time TimeScale int32 Duration int32 Language int16 Quality int16 AtomPos }
MediaHeader struct
type MediaInfo ¶
type MediaInfo struct { Sound *SoundMediaInfo Video *VideoMediaInfo Data *DataInfo Sample *SampleTable Unknowns []Atom AtomPos }
MediaInfo struct
type Movie ¶
type Movie struct { Header *MovieHeader MovieExtend *MovieExtend Tracks []*Track Unknowns []Atom AtomPos }
Movie struct
type MovieExtend ¶
type MovieExtend struct { Tracks []*TrackExtend Unknowns []Atom AtomPos }
MovieExtend struct
type MovieFrag ¶
type MovieFrag struct { Header *MovieFragHeader Tracks []*TrackFrag Unknowns []Atom AtomPos }
MovieFrag struct
type MovieFragHeader ¶
MovieFragHeader struct
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 }
MovieHeader struct
func (MovieHeader) String ¶
func (inst MovieHeader) String() string
type ParseError ¶
ParseError struct
type SampleDesc ¶
type SampleDesc struct { Version uint8 AVC1Desc *AVC1Desc MP4ADesc *MP4ADesc Unknowns []Atom AtomPos }
SampleDesc struct
type SampleSize ¶
SampleSize struct
func (SampleSize) String ¶
func (inst SampleSize) String() string
type SampleTable ¶
type SampleTable struct { SampleDesc *SampleDesc TimeToSample *TimeToSample CompositionOffset *CompositionOffset SampleToChunk *SampleToChunk SyncSample *SyncSample ChunkOffset *ChunkOffset SampleSize *SampleSize AtomPos }
SampleTable struct
type SampleToChunk ¶
type SampleToChunk struct { Version uint8 Flags uint32 Entries []SampleToChunkEntry AtomPos }
SampleToChunk struct
func (SampleToChunk) String ¶
func (inst SampleToChunk) String() string
type SampleToChunkEntry ¶
SampleToChunkEntry struct
func GetSampleToChunkEntry ¶
func GetSampleToChunkEntry(b []byte) (inst SampleToChunkEntry)
GetSampleToChunkEntry func
type SoundMediaInfo ¶
SoundMediaInfo struct
type SyncSample ¶
SyncSample struct
func (SyncSample) String ¶
func (inst SyncSample) String() string
type TimeToSample ¶
type TimeToSample struct { Version uint8 Flags uint32 Entries []TimeToSampleEntry AtomPos }
TimeToSample struct
func (TimeToSample) String ¶
func (inst TimeToSample) String() string
type TimeToSampleEntry ¶
TimeToSampleEntry struct
func GetTimeToSampleEntry ¶
func GetTimeToSampleEntry(b []byte) (inst TimeToSampleEntry)
GetTimeToSampleEntry func
type Track ¶
type Track struct { Header *TrackHeader Media *Media Unknowns []Atom AtomPos }
Track struct
func (*Track) GetElemStreamDesc ¶
func (inst *Track) GetElemStreamDesc() (esds *ElemStreamDesc)
GetElemStreamDesc func
type TrackExtend ¶
type TrackExtend struct { Version uint8 Flags uint32 TrackID uint32 DefaultSampleDescIdx uint32 DefaultSampleDuration uint32 DefaultSampleSize uint32 DefaultSampleFlags uint32 AtomPos }
TrackExtend struct
type TrackFrag ¶
type TrackFrag struct { Header *TrackFragHeader DecodeTime *TrackFragDecodeTime Run *TrackFragRun Unknowns []Atom AtomPos }
TrackFrag struct
type TrackFragDecodeTime ¶
TrackFragDecodeTime struct
func (TrackFragDecodeTime) Children ¶
func (inst TrackFragDecodeTime) Children() (r []Atom)
Children func
func (TrackFragDecodeTime) Marshal ¶
func (inst TrackFragDecodeTime) Marshal(b []byte) (n int)
Marshal func
type TrackFragHeader ¶
type TrackFragHeader struct { Version uint8 Flags uint32 BaseDataOffset uint64 StsdID uint32 DefaultDuration uint32 DefaultSize uint32 DefaultFlags uint32 AtomPos }
TrackFragHeader struct
func (TrackFragHeader) String ¶
func (inst TrackFragHeader) String() string
type TrackFragRun ¶
type TrackFragRun struct { Version uint8 Flags uint32 DataOffset uint32 FirstSampleFlags uint32 Entries []TrackFragRunEntry AtomPos }
TrackFragRun struct
func (TrackFragRun) String ¶
func (inst TrackFragRun) String() string
type TrackFragRunEntry ¶
TrackFragRunEntry struct
func GetTrackFragRunEntry ¶
func GetTrackFragRunEntry(b []byte) (inst TrackFragRunEntry)
GetTrackFragRunEntry func
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 }
TrackHeader struct