mp4io

package
v0.0.0-...-1512c72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 HDLR = Tag(0x68646c72)
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 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)
View Source
const VMHD = Tag(0x766d6864)

Variables

This section is empty.

Functions

func FprintAtom

func FprintAtom(out io.Writer, root Atom)

func GetFixed16

func GetFixed16(b []byte) float64

func GetFixed32

func GetFixed32(b []byte) float64

func GetTime32

func GetTime32(b []byte) (t time.Time)

func GetTime64

func GetTime64(b []byte) (t time.Time)

func PrintAtom

func PrintAtom(root Atom)

func PutCompositionOffsetEntry

func PutCompositionOffsetEntry(b []byte, self CompositionOffsetEntry)

func PutFixed16

func PutFixed16(b []byte, f float64)

func PutFixed32

func PutFixed32(b []byte, f float64)

func PutSampleToChunkEntry

func PutSampleToChunkEntry(b []byte, self SampleToChunkEntry)

func PutTime32

func PutTime32(b []byte, t time.Time)

func PutTime64

func PutTime64(b []byte, t time.Time)

func PutTimeToSampleEntry

func PutTimeToSampleEntry(b []byte, self TimeToSampleEntry)

func PutTrackFragRunEntry

func PutTrackFragRunEntry(b []byte, self TrackFragRunEntry)

Types

type AVC1Conf

type AVC1Conf struct {
	Data []byte
	AtomPos
}

func (AVC1Conf) Children

func (self AVC1Conf) Children() (r []Atom)

func (AVC1Conf) Len

func (self AVC1Conf) Len() (n int)

func (AVC1Conf) Marshal

func (self AVC1Conf) Marshal(b []byte) (n int)

func (AVC1Conf) Tag

func (self AVC1Conf) Tag() Tag

func (*AVC1Conf) Unmarshal

func (self *AVC1Conf) Unmarshal(b []byte, offset int) (n int, err error)

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
}

func (AVC1Desc) Children

func (self AVC1Desc) Children() (r []Atom)

func (AVC1Desc) Len

func (self AVC1Desc) Len() (n int)

func (AVC1Desc) Marshal

func (self AVC1Desc) Marshal(b []byte) (n int)

func (AVC1Desc) Tag

func (self AVC1Desc) Tag() Tag

func (*AVC1Desc) Unmarshal

func (self *AVC1Desc) Unmarshal(b []byte, offset int) (n int, err error)

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 FindChildren(root Atom, tag Tag) Atom

func FindChildrenByName

func FindChildrenByName(root Atom, tag string) Atom

func ReadFileAtoms

func ReadFileAtoms(r io.ReadSeeker) (atoms []Atom, err error)

type AtomPos

type AtomPos struct {
	Offset int
	Size   int
}

func (AtomPos) Pos

func (self AtomPos) Pos() (int, int)

type ChunkOffset

type ChunkOffset struct {
	Version uint8
	Flags   uint32
	Entries []uint32
	AtomPos
}

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

func (*ChunkOffset) Unmarshal

func (self *ChunkOffset) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*CompositionOffset) Unmarshal

func (self *CompositionOffset) Unmarshal(b []byte, offset int) (n int, err error)

type CompositionOffsetEntry

type CompositionOffsetEntry struct {
	Count  uint32
	Offset uint32
}

func GetCompositionOffsetEntry

func GetCompositionOffsetEntry(b []byte) (self CompositionOffsetEntry)

type DataInfo

type DataInfo struct {
	Refer    *DataRefer
	Unknowns []Atom
	AtomPos
}

func (DataInfo) Children

func (self DataInfo) Children() (r []Atom)

func (DataInfo) Len

func (self DataInfo) Len() (n int)

func (DataInfo) Marshal

func (self DataInfo) Marshal(b []byte) (n int)

func (DataInfo) Tag

func (self DataInfo) Tag() Tag

func (*DataInfo) Unmarshal

func (self *DataInfo) Unmarshal(b []byte, offset int) (n int, err error)

type DataRefer

type DataRefer struct {
	Version uint8
	Flags   uint32
	Url     *DataReferUrl
	AtomPos
}

func (DataRefer) Children

func (self DataRefer) Children() (r []Atom)

func (DataRefer) Len

func (self DataRefer) Len() (n int)

func (DataRefer) Marshal

func (self DataRefer) Marshal(b []byte) (n int)

func (DataRefer) Tag

func (self DataRefer) Tag() Tag

func (*DataRefer) Unmarshal

func (self *DataRefer) Unmarshal(b []byte, offset int) (n int, err error)

type DataReferUrl

type DataReferUrl struct {
	Version uint8
	Flags   uint32
	AtomPos
}

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

func (*DataReferUrl) Unmarshal

func (self *DataReferUrl) Unmarshal(b []byte, offset int) (n int, err error)

type Dummy

type Dummy struct {
	Data []byte
	Tag_ Tag
	AtomPos
}

func (Dummy) Children

func (self Dummy) Children() []Atom

func (Dummy) Len

func (self Dummy) Len() int

func (Dummy) Marshal

func (self Dummy) Marshal(b []byte) int

func (Dummy) Tag

func (self Dummy) Tag() Tag

func (*Dummy) Unmarshal

func (self *Dummy) Unmarshal(b []byte, offset int) (n int, err error)

type ElemStreamDesc

type ElemStreamDesc struct {
	DecConfig []byte
	TrackId   uint16
	AtomPos
}

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

func (*ElemStreamDesc) Unmarshal

func (self *ElemStreamDesc) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*HandlerRefer) Unmarshal

func (self *HandlerRefer) Unmarshal(b []byte, offset int) (n int, err error)

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
}

func (MP4ADesc) Children

func (self MP4ADesc) Children() (r []Atom)

func (MP4ADesc) Len

func (self MP4ADesc) Len() (n int)

func (MP4ADesc) Marshal

func (self MP4ADesc) Marshal(b []byte) (n int)

func (MP4ADesc) Tag

func (self MP4ADesc) Tag() Tag

func (*MP4ADesc) Unmarshal

func (self *MP4ADesc) Unmarshal(b []byte, offset int) (n int, err error)

type Media

type Media struct {
	Header   *MediaHeader
	Handler  *HandlerRefer
	Info     *MediaInfo
	Unknowns []Atom
	AtomPos
}

func (Media) Children

func (self Media) Children() (r []Atom)

func (Media) Len

func (self Media) Len() (n int)

func (Media) Marshal

func (self Media) Marshal(b []byte) (n int)

func (Media) Tag

func (self Media) Tag() Tag

func (*Media) Unmarshal

func (self *Media) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*MediaHeader) Unmarshal

func (self *MediaHeader) Unmarshal(b []byte, offset int) (n int, err error)

type MediaInfo

type MediaInfo struct {
	Sound    *SoundMediaInfo
	Video    *VideoMediaInfo
	Data     *DataInfo
	Sample   *SampleTable
	Unknowns []Atom
	AtomPos
}

func (MediaInfo) Children

func (self MediaInfo) Children() (r []Atom)

func (MediaInfo) Len

func (self MediaInfo) Len() (n int)

func (MediaInfo) Marshal

func (self MediaInfo) Marshal(b []byte) (n int)

func (MediaInfo) Tag

func (self MediaInfo) Tag() Tag

func (*MediaInfo) Unmarshal

func (self *MediaInfo) Unmarshal(b []byte, offset int) (n int, err error)

type Movie

type Movie struct {
	Header      *MovieHeader
	MovieExtend *MovieExtend
	Tracks      []*Track
	Unknowns    []Atom
	AtomPos
}

func (Movie) Children

func (self Movie) Children() (r []Atom)

func (Movie) Len

func (self Movie) Len() (n int)

func (Movie) Marshal

func (self Movie) Marshal(b []byte) (n int)

func (Movie) Tag

func (self Movie) Tag() Tag

func (*Movie) Unmarshal

func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*MovieExtend) Unmarshal

func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error)

type MovieFrag

type MovieFrag struct {
	Header   *MovieFragHeader
	Tracks   []*TrackFrag
	Unknowns []Atom
	AtomPos
}

func (MovieFrag) Children

func (self MovieFrag) Children() (r []Atom)

func (MovieFrag) Len

func (self MovieFrag) Len() (n int)

func (MovieFrag) Marshal

func (self MovieFrag) Marshal(b []byte) (n int)

func (MovieFrag) Tag

func (self MovieFrag) Tag() Tag

func (*MovieFrag) Unmarshal

func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error)

type MovieFragHeader

type MovieFragHeader struct {
	Version uint8
	Flags   uint32
	Seqnum  uint32
	AtomPos
}

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

func (*MovieFragHeader) Unmarshal

func (self *MovieFragHeader) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*MovieHeader) Unmarshal

func (self *MovieHeader) Unmarshal(b []byte, offset int) (n int, err error)

type ParseError

type ParseError struct {
	Debug  string
	Offset int
	// contains filtered or unexported fields
}

func (*ParseError) Error

func (self *ParseError) Error() string

type SampleDesc

type SampleDesc struct {
	Version  uint8
	AVC1Desc *AVC1Desc
	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

func (*SampleDesc) Unmarshal

func (self *SampleDesc) Unmarshal(b []byte, offset int) (n int, err error)

type SampleSize

type SampleSize struct {
	Version    uint8
	Flags      uint32
	SampleSize uint32
	Entries    []uint32
	AtomPos
}

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

func (*SampleSize) Unmarshal

func (self *SampleSize) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*SampleTable) Unmarshal

func (self *SampleTable) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*SampleToChunk) Unmarshal

func (self *SampleToChunk) Unmarshal(b []byte, offset int) (n int, err error)

type SampleToChunkEntry

type SampleToChunkEntry struct {
	FirstChunk      uint32
	SamplesPerChunk uint32
	SampleDescId    uint32
}

func GetSampleToChunkEntry

func GetSampleToChunkEntry(b []byte) (self SampleToChunkEntry)

type SoundMediaInfo

type SoundMediaInfo struct {
	Version uint8
	Flags   uint32
	Balance int16
	AtomPos
}

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

func (*SoundMediaInfo) Unmarshal

func (self *SoundMediaInfo) Unmarshal(b []byte, offset int) (n int, err error)

type SyncSample

type SyncSample struct {
	Version uint8
	Flags   uint32
	Entries []uint32
	AtomPos
}

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

func (*SyncSample) Unmarshal

func (self *SyncSample) Unmarshal(b []byte, offset int) (n int, err error)

type Tag

type Tag uint32

func StringToTag

func StringToTag(tag string) Tag

func (Tag) String

func (self Tag) String() string

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

func (*TimeToSample) Unmarshal

func (self *TimeToSample) Unmarshal(b []byte, offset int) (n int, err error)

type TimeToSampleEntry

type TimeToSampleEntry struct {
	Count    uint32
	Duration uint32
}

func GetTimeToSampleEntry

func GetTimeToSampleEntry(b []byte) (self TimeToSampleEntry)

type Track

type Track struct {
	Header   *TrackHeader
	Media    *Media
	Unknowns []Atom
	AtomPos
}

func (Track) Children

func (self Track) Children() (r []Atom)

func (*Track) GetAVC1Conf

func (self *Track) GetAVC1Conf() (conf *AVC1Conf)

func (*Track) GetElemStreamDesc

func (self *Track) GetElemStreamDesc() (esds *ElemStreamDesc)

func (Track) Len

func (self Track) Len() (n int)

func (Track) Marshal

func (self Track) Marshal(b []byte) (n int)

func (Track) Tag

func (self Track) Tag() Tag

func (*Track) Unmarshal

func (self *Track) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*TrackExtend) Unmarshal

func (self *TrackExtend) Unmarshal(b []byte, offset int) (n int, err error)

type TrackFrag

type TrackFrag struct {
	Header     *TrackFragHeader
	DecodeTime *TrackFragDecodeTime
	Run        *TrackFragRun
	Unknowns   []Atom
	AtomPos
}

func (TrackFrag) Children

func (self TrackFrag) Children() (r []Atom)

func (TrackFrag) Len

func (self TrackFrag) Len() (n int)

func (TrackFrag) Marshal

func (self TrackFrag) Marshal(b []byte) (n int)

func (TrackFrag) Tag

func (self TrackFrag) Tag() Tag

func (*TrackFrag) Unmarshal

func (self *TrackFrag) Unmarshal(b []byte, offset int) (n int, err error)

type TrackFragDecodeTime

type TrackFragDecodeTime struct {
	Version uint8
	Flags   uint32
	Time    time.Time
	AtomPos
}

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

func (*TrackFragDecodeTime) Unmarshal

func (self *TrackFragDecodeTime) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*TrackFragHeader) Unmarshal

func (self *TrackFragHeader) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*TrackFragRun) Unmarshal

func (self *TrackFragRun) Unmarshal(b []byte, offset int) (n int, err error)

type TrackFragRunEntry

type TrackFragRunEntry struct {
	Duration uint32
	Size     uint32
	Flags    uint32
	Cts      uint32
}

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

func (*TrackHeader) Unmarshal

func (self *TrackHeader) Unmarshal(b []byte, offset int) (n int, err error)

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

func (*VideoMediaInfo) Unmarshal

func (self *VideoMediaInfo) Unmarshal(b []byte, offset int) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL