Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrShortMVHD = formatError("MVHD too short")
View Source
var ErrShortTKHD = formatError("TKHD too short")
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box struct {
Offset, Size int64 // size and offset of the box in the original file
Ext bool // false: 8-byte header, true: 16-byte header
Type string // 4-byte cc4
Raw []byte // raw content, if loaded
Child []Box // child boxes
}
func (*Box) ContentSize ¶
ContentSize returns the payload length, or -1 if the box goes to EOF (or the end of its parent)
func (*Box) HeaderSize ¶
type File ¶
func Parse ¶
Parse parses an MP4 file from r. If r is a io.ReadSeeker then it is used to seek forward within r when necessary.
func (*File) AddUuid ¶
AddUuid inserts the an uuid box into f. The first 16 bits of data is the 16-byte UUID.
type MVHD ¶
type MVHD struct { Version byte Flags [3]byte DateCreated time.Time DateModified time.Time TimeUnit uint32 // time unit per second (default = 600) DurationInUnits uint64 // time length (in time units) Raw []byte // undecoded data after decoded bits above }
func DecodeMVHD ¶
Click to show internal directories.
Click to hide internal directories.