mp4

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 12 Imported by: 0

README

mp4

And, in the dream, I knew that he was, going on ahead. He was fixin' to make a fire somewhere out there in all that dark and cold. And I knew that whenever I got there, he'd be there. And then I woke up.

No Country for Old Men (2007)

library for reading and writing MP4

prior art

they seem to be placed in a [uuid] box instead. This is allowed, but not supported by mp4ff library at the moment. In principle the data can be put in any place given by the offset in the saio box

[moof] size=3641
  [traf] size=3617
    [saio] size=20 version=0 flags=000000
     - sampleCount: 1
     - offset[1]=1564
    [uuid] size=1952
     - uuid: a2394f52-5a9b-4f14-a244-6c427c648df4
     - subType: unknown
  1. https://github.com/speced/bikeshed/issues/2717
  2. https://github.com/w3c/webref/issues/1097
  3. https://github.com/tobie/specref/issues/767
  4. https://github.com/mozilla/mp4parse-rust/issues/415
  5. https://github.com/Eyevinn/mp4ff/issues/298
  6. https://github.com/AOMediaCodec/av1-isobmff/issues/178
  7. https://github.com/jjustman/libatsc3/issues/168
  8. https://github.com/alfg/mp4-rust/issues/132
  9. https://github.com/scottlamb/retina/issues/90
  10. https://github.com/MPEGGroup/FileFormat/issues/85
  11. https://github.com/steinwurf/petro/issues/53
  12. https://github.com/alfg/mp4/issues/27
  13. https://github.com/abema/go-mp4/issues/13
  14. https://github.com/garden4hu/fmp4parser-go/issues/4
  15. https://github.com/skyhisi/nb-dashcam-tools/issues/4
  16. https://github.com/eswarantg/mp4box/issues/3
  17. https://github.com/miquels/mp4/issues/2
  18. https://github.com/oikomi/gomp4/issues/2
  19. https://github.com/hr3lxphr6j/mp4-go/issues/1
  20. https://github.com/lomavkin/mp4rs/issues/1
  21. https://github.com/mshafiee/mp4/issues/1
  22. https://github.com/streamer45/libmp4-go/issues/1
  23. https://github.com/FauxFaux/heifers/issues/1

14496-12:2022

  1. https://webstore.ansi.org/standards/incits/incitsisoiec14496122022
  2. https://iso.org/standard/83102.html
  3. https://webstore.iec.ch/publication/74007

I have purchased 14496-12:2022. here is the filename and size from the server response:

HTTP/1.1 200 OK
Content-Length: 5535457
Content-Disposition: attachment; filename="INCITS+ISO+IEC+14496-12+2022+(2022).pdf"

Documentation

Index

Constants

View Source
const (
	SmallHeaderSize = 8
	LargeHeaderSize = 16
)
View Source
const (
	AVCBaselineProfile uint8 = 66  // 0x42
	AVCMainProfile     uint8 = 77  // 0x4d
	AVCExtendedProfile uint8 = 88  // 0x58
	AVCHighProfile     uint8 = 100 // 0x64
	AVCHigh10Profile   uint8 = 110 // 0x6e
	AVCHigh422Profile  uint8 = 122 // 0x7a
)
View Source
const (
	ESDescrTag            = 0x03
	DecoderConfigDescrTag = 0x04
	DecSpecificInfoTag    = 0x05
	SLConfigDescrTag      = 0x06
)
View Source
const (
	DataTypeBinary             = 0
	DataTypeStringUTF8         = 1
	DataTypeStringUTF16        = 2
	DataTypeStringMac          = 3
	DataTypeStringJPEG         = 14
	DataTypeSignedIntBigEndian = 21
	DataTypeFloat32BigEndian   = 22
	DataTypeFloat64BigEndian   = 23
)
View Source
const LengthUnlimited = math.MaxUint32
View Source
const UrlSelfContained = 0x000001
View Source
const UrnSelfContained = 0x000001

Variables

View Source
var ErrBoxInfoNotFound = errors.New("box info not found")
View Source
var ErrUnsupportedBoxVersion = errors.New("unsupported box version")

Functions

func AddAnyTypeBoxDef

func AddAnyTypeBoxDef(payload IAnyType, boxType BoxType, versions ...uint8)

func AddAnyTypeBoxDefEx

func AddAnyTypeBoxDefEx(payload IAnyType, boxType BoxType, isTarget func(Context) bool, versions ...uint8)

func AddBoxDef

func AddBoxDef(payload IBox, versions ...uint8)

func AddBoxDefEx

func AddBoxDefEx(payload IBox, isTarget func(Context) bool, versions ...uint8)

func FindIDRFrames

func FindIDRFrames(r io.ReadSeeker, trackInfo *TrackInfo) ([]int, error)

func IsIlstMetaBoxType

func IsIlstMetaBoxType(boxType BoxType) bool

func Marshal

func Marshal(w io.Writer, src IImmutableBox, ctx Context) (n uint64, err error)

func ReadBoxStructure

func ReadBoxStructure(r io.ReadSeeker, handler ReadHandler, params ...interface{}) ([]interface{}, error)

func ReadBoxStructureFromInternal

func ReadBoxStructureFromInternal(r io.ReadSeeker, bi *BoxInfo, handler ReadHandler, params ...interface{}) (interface{}, error)

func ShouldHasNoChildren

func ShouldHasNoChildren(boxType BoxType) bool

func Stringify

func Stringify(src IImmutableBox, ctx Context) (string, error)

func StringifyWithIndent

func StringifyWithIndent(src IImmutableBox, indent string, ctx Context) (string, error)

func Unmarshal

func Unmarshal(r io.ReadSeeker, payloadSize uint64, dst IBox, ctx Context) (n uint64, err error)

Types

type AVCDecConfigInfo

type AVCDecConfigInfo struct {
	ConfigurationVersion uint8
	Profile              uint8
	ProfileCompatibility uint8
	Level                uint8
	LengthSize           uint16
	Width                uint16
	Height               uint16
}

type AVCDecoderConfiguration

type AVCDecoderConfiguration struct {
	AnyTypeBox
	ConfigurationVersion         uint8             `mp4:"0,size=8"`
	Profile                      uint8             `mp4:"1,size=8"`
	ProfileCompatibility         uint8             `mp4:"2,size=8"`
	Level                        uint8             `mp4:"3,size=8"`
	Reserved                     uint8             `mp4:"4,size=6,const=63"`
	LengthSizeMinusOne           uint8             `mp4:"5,size=2"`
	Reserved2                    uint8             `mp4:"6,size=3,const=7"`
	NumOfSequenceParameterSets   uint8             `mp4:"7,size=5"`
	SequenceParameterSets        []AVCParameterSet `mp4:"8,len=dynamic"`
	NumOfPictureParameterSets    uint8             `mp4:"9,size=8"`
	PictureParameterSets         []AVCParameterSet `mp4:"10,len=dynamic"`
	HighProfileFieldsEnabled     bool              `mp4:"11,hidden"`
	Reserved3                    uint8             `mp4:"12,size=6,opt=dynamic,const=63"`
	ChromaFormat                 uint8             `mp4:"13,size=2,opt=dynamic"`
	Reserved4                    uint8             `mp4:"14,size=5,opt=dynamic,const=31"`
	BitDepthLumaMinus8           uint8             `mp4:"15,size=3,opt=dynamic"`
	Reserved5                    uint8             `mp4:"16,size=5,opt=dynamic,const=31"`
	BitDepthChromaMinus8         uint8             `mp4:"17,size=3,opt=dynamic"`
	NumOfSequenceParameterSetExt uint8             `mp4:"18,size=8,opt=dynamic"`
	SequenceParameterSetsExt     []AVCParameterSet `mp4:"19,len=dynamic,opt=dynamic"`
}

func (*AVCDecoderConfiguration) GetFieldLength

func (avcc *AVCDecoderConfiguration) GetFieldLength(name string, ctx Context) uint

func (*AVCDecoderConfiguration) IsOptFieldEnabled

func (avcc *AVCDecoderConfiguration) IsOptFieldEnabled(name string, ctx Context) bool

func (*AVCDecoderConfiguration) OnReadField

func (avcc *AVCDecoderConfiguration) OnReadField(name string, r util.ReadSeeker, leftBits uint64, ctx Context) (rbits uint64, override bool, err error)

func (*AVCDecoderConfiguration) OnWriteField

func (avcc *AVCDecoderConfiguration) OnWriteField(name string, w util.Writer, ctx Context) (wbits uint64, override bool, err error)

type AVCParameterSet

type AVCParameterSet struct {
	BaseCustomFieldObject
	Length  uint16 `mp4:"0,size=16"`
	NALUnit []byte `mp4:"1,size=8,len=dynamic"`
}

func (*AVCParameterSet) GetFieldLength

func (s *AVCParameterSet) GetFieldLength(name string, ctx Context) uint

type AlternativeStartupEntry

type AlternativeStartupEntry struct {
	BaseCustomFieldObject
	RollCount         uint16                       `mp4:"0,size=16"`
	FirstOutputSample uint16                       `mp4:"1,size=16"`
	SampleOffset      []uint32                     `mp4:"2,size=32,len=dynamic"`
	Opts              []AlternativeStartupEntryOpt `mp4:"3,size=32"`
}

func (*AlternativeStartupEntry) GetFieldLength

func (entry *AlternativeStartupEntry) GetFieldLength(name string, ctx Context) uint

type AlternativeStartupEntryL

type AlternativeStartupEntryL struct {
	DescriptionLength       uint32 `mp4:"0,size=32"`
	AlternativeStartupEntry `mp4:"1,extend,size=dynamic"`
}

func (*AlternativeStartupEntryL) GetFieldSize

func (entry *AlternativeStartupEntryL) GetFieldSize(name string, ctx Context) uint

type AlternativeStartupEntryOpt

type AlternativeStartupEntryOpt struct {
	NumOutputSamples uint16 `mp4:"0,size=16"`
	NumTotalSamples  uint16 `mp4:"1,size=16"`
}

type AnyTypeBox

type AnyTypeBox struct {
	Box
	Type BoxType
}

func (*AnyTypeBox) GetType

func (e *AnyTypeBox) GetType() BoxType

func (*AnyTypeBox) SetType

func (e *AnyTypeBox) SetType(boxType BoxType)

type AudioSampleEntry

type AudioSampleEntry struct {
	SampleEntry   `mp4:"0,extend,opt=dynamic"`
	EntryVersion  uint16    `mp4:"1,size=16,opt=dynamic"`
	Reserved      [3]uint16 `mp4:"2,size=16,opt=dynamic,const=0"`
	ChannelCount  uint16    `mp4:"3,size=16,opt=dynamic"`
	SampleSize    uint16    `mp4:"4,size=16,opt=dynamic"`
	PreDefined    uint16    `mp4:"5,size=16,opt=dynamic"`
	Reserved2     uint16    `mp4:"6,size=16,opt=dynamic,const=0"`
	SampleRate    uint32    `mp4:"7,size=32,opt=dynamic"` // fixed-point 16.16
	QuickTimeData []byte    `mp4:"8,size=8,opt=dynamic,len=dynamic"`
}

func (*AudioSampleEntry) GetFieldLength

func (ase *AudioSampleEntry) GetFieldLength(name string, ctx Context) uint

func (*AudioSampleEntry) GetSampleRate

func (ase *AudioSampleEntry) GetSampleRate() float64

func (*AudioSampleEntry) GetSampleRateInt

func (ase *AudioSampleEntry) GetSampleRateInt() uint16

func (*AudioSampleEntry) IsOptFieldEnabled

func (ase *AudioSampleEntry) IsOptFieldEnabled(name string, ctx Context) bool

func (*AudioSampleEntry) StringifyField

func (ase *AudioSampleEntry) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Av1C

type Av1C struct {
	Box
	Marker                           uint8   `mp4:"0,size=1,const=1"`
	Version                          uint8   `mp4:"1,size=7,const=1"`
	SeqProfile                       uint8   `mp4:"2,size=3"`
	SeqLevelIdx0                     uint8   `mp4:"3,size=5"`
	SeqTier0                         uint8   `mp4:"4,size=1"`
	HighBitdepth                     uint8   `mp4:"5,size=1"`
	TwelveBit                        uint8   `mp4:"6,size=1"`
	Monochrome                       uint8   `mp4:"7,size=1"`
	ChromaSubsamplingX               uint8   `mp4:"8,size=1"`
	ChromaSubsamplingY               uint8   `mp4:"9,size=1"`
	ChromaSamplePosition             uint8   `mp4:"10,size=2"`
	Reserved                         uint8   `mp4:"11,size=3,const=0"`
	InitialPresentationDelayPresent  uint8   `mp4:"12,size=1"`
	InitialPresentationDelayMinusOne uint8   `mp4:"13,size=4"`
	ConfigOBUs                       []uint8 `mp4:"14,size=8"`
}

func (Av1C) GetType

func (Av1C) GetType() BoxType

type BaseCustomFieldObject

type BaseCustomFieldObject struct {
}

func (*BaseCustomFieldObject) BeforeUnmarshal

func (*BaseCustomFieldObject) GetFieldLength

func (box *BaseCustomFieldObject) GetFieldLength(string, Context) uint

GetFieldLength returns length of dynamic field

func (*BaseCustomFieldObject) GetFieldSize

func (box *BaseCustomFieldObject) GetFieldSize(string, Context) uint

GetFieldSize returns size of dynamic field

func (*BaseCustomFieldObject) IsOptFieldEnabled

func (box *BaseCustomFieldObject) IsOptFieldEnabled(string, Context) bool

IsOptFieldEnabled check whether if the optional field is enabled

func (*BaseCustomFieldObject) IsPString

func (*BaseCustomFieldObject) IsPString(name string, bytes []byte, remainingSize uint64, ctx Context) bool

func (*BaseCustomFieldObject) OnReadField

func (*BaseCustomFieldObject) OnWriteField

func (*BaseCustomFieldObject) StringifyField

func (box *BaseCustomFieldObject) StringifyField(string, string, int, Context) (string, bool)

StringifyField returns field value as string

type Box

type Box struct {
	BaseCustomFieldObject
}

func (*Box) AddFlag

func (box *Box) AddFlag(flag uint32)

AddFlag adds the flag

func (*Box) CheckFlag

func (box *Box) CheckFlag(flag uint32) bool

CheckFlag checks the flag status

func (*Box) GetFlags

func (box *Box) GetFlags() uint32

GetFlags returns the flags

func (*Box) GetVersion

func (box *Box) GetVersion() uint8

GetVersion returns the box version

func (*Box) RemoveFlag

func (box *Box) RemoveFlag(flag uint32)

RemoveFlag removes the flag

func (*Box) SetFlags

func (box *Box) SetFlags(uint32)

SetFlags sets the flags

func (*Box) SetVersion

func (box *Box) SetVersion(uint8)

SetVersion sets the box version

type BoxInfo

type BoxInfo struct {
	// Offset specifies an offset of the box in a file.
	Offset uint64

	// Size specifies size(bytes) of box.
	Size uint64

	// HeaderSize specifies size(bytes) of common fields which are defined as "Box" class member at ISO/IEC 14496-12.
	HeaderSize uint64

	// Type specifies box type which is represented by 4 characters.
	Type BoxType

	// ExtendToEOF is set true when Box.size is zero. It means that end of box equals to end of file.
	ExtendToEOF bool

	// Context would be set by ReadBoxStructure, not ReadBoxInfo.
	Context
}

BoxInfo has common infomations of box

func ExtractBox

func ExtractBox(r io.ReadSeeker, parent *BoxInfo, path BoxPath) ([]*BoxInfo, error)

func ExtractBoxes

func ExtractBoxes(r io.ReadSeeker, parent *BoxInfo, paths []BoxPath) ([]*BoxInfo, error)

func ReadBoxInfo

func ReadBoxInfo(r io.ReadSeeker) (*BoxInfo, error)

ReadBoxInfo reads common fields which are defined as "Box" class member at ISO/IEC 14496-12.

func WriteBoxInfo

func WriteBoxInfo(w io.WriteSeeker, bi *BoxInfo) (*BoxInfo, error)

WriteBoxInfo writes common fields which are defined as "Box" class member at ISO/IEC 14496-12. This function ignores bi.Offset and returns BoxInfo which contains real Offset and recalculated Size/HeaderSize.

func (*BoxInfo) IsSupportedType

func (bi *BoxInfo) IsSupportedType() bool

func (*BoxInfo) SeekToEnd

func (bi *BoxInfo) SeekToEnd(s io.Seeker) (int64, error)

func (*BoxInfo) SeekToPayload

func (bi *BoxInfo) SeekToPayload(s io.Seeker) (int64, error)

func (*BoxInfo) SeekToStart

func (bi *BoxInfo) SeekToStart(s io.Seeker) (int64, error)

type BoxInfoWithPayload

type BoxInfoWithPayload struct {
	Info    BoxInfo
	Payload IBox
}

func ExtractBoxWithPayload

func ExtractBoxWithPayload(r io.ReadSeeker, parent *BoxInfo, path BoxPath) ([]*BoxInfoWithPayload, error)

func ExtractBoxesWithPayload

func ExtractBoxesWithPayload(r io.ReadSeeker, parent *BoxInfo, paths []BoxPath) ([]*BoxInfoWithPayload, error)

type BoxPath

type BoxPath []BoxType

type BoxType

type BoxType [4]byte

BoxType is mpeg box type

func BoxTypeAC3

func BoxTypeAC3() BoxType

func BoxTypeAny

func BoxTypeAny() BoxType

func BoxTypeAv01

func BoxTypeAv01() BoxType

func BoxTypeAv1C

func BoxTypeAv1C() BoxType

func BoxTypeAvc1

func BoxTypeAvc1() BoxType

func BoxTypeAvcC

func BoxTypeAvcC() BoxType

func BoxTypeBtrt

func BoxTypeBtrt() BoxType

func BoxTypeCo64

func BoxTypeCo64() BoxType

func BoxTypeColr

func BoxTypeColr() BoxType

func BoxTypeCslg

func BoxTypeCslg() BoxType

func BoxTypeCtts

func BoxTypeCtts() BoxType

func BoxTypeDAC3

func BoxTypeDAC3() BoxType

func BoxTypeDOps

func BoxTypeDOps() BoxType

func BoxTypeData

func BoxTypeData() BoxType

func BoxTypeDinf

func BoxTypeDinf() BoxType

func BoxTypeDref

func BoxTypeDref() BoxType

func BoxTypeEdts

func BoxTypeEdts() BoxType

func BoxTypeElst

func BoxTypeElst() BoxType

func BoxTypeEmsg

func BoxTypeEmsg() BoxType

func BoxTypeEnca

func BoxTypeEnca() BoxType

func BoxTypeEncv

func BoxTypeEncv() BoxType

func BoxTypeEsds

func BoxTypeEsds() BoxType

func BoxTypeFiel

func BoxTypeFiel() BoxType

func BoxTypeFree

func BoxTypeFree() BoxType

func BoxTypeFrma

func BoxTypeFrma() BoxType

func BoxTypeHdlr

func BoxTypeHdlr() BoxType

func BoxTypeHev1

func BoxTypeHev1() BoxType

func BoxTypeHvc1

func BoxTypeHvc1() BoxType

func BoxTypeHvcC

func BoxTypeHvcC() BoxType

func BoxTypeIlst

func BoxTypeIlst() BoxType

func BoxTypeMdhd

func BoxTypeMdhd() BoxType

func BoxTypeMdia

func BoxTypeMdia() BoxType

func BoxTypeMehd

func BoxTypeMehd() BoxType

func BoxTypeMeta

func BoxTypeMeta() BoxType

func BoxTypeMfro

func BoxTypeMfro() BoxType

func BoxTypeMinf

func BoxTypeMinf() BoxType

func BoxTypeMoof

func BoxTypeMoof() BoxType

func BoxTypeMp4a

func BoxTypeMp4a() BoxType

func BoxTypeMp4v

func BoxTypeMp4v() BoxType

func BoxTypeMvex

func BoxTypeMvex() BoxType

func BoxTypeMvhd

func BoxTypeMvhd() BoxType

func BoxTypeOpus

func BoxTypeOpus() BoxType

func BoxTypePasp

func BoxTypePasp() BoxType

func BoxTypePssh

func BoxTypePssh() BoxType

func BoxTypeSaio

func BoxTypeSaio() BoxType

func BoxTypeSbgp

func BoxTypeSbgp() BoxType

func BoxTypeSchi

func BoxTypeSchi() BoxType

func BoxTypeSchm

func BoxTypeSchm() BoxType

func BoxTypeSdtp

func BoxTypeSdtp() BoxType

func BoxTypeSgpd

func BoxTypeSgpd() BoxType

func BoxTypeSinf

func BoxTypeSinf() BoxType

func BoxTypeSkip

func BoxTypeSkip() BoxType

func BoxTypeSmhd

func BoxTypeSmhd() BoxType

func BoxTypeStbl

func BoxTypeStbl() BoxType

func BoxTypeStco

func BoxTypeStco() BoxType

func BoxTypeStsc

func BoxTypeStsc() BoxType

func BoxTypeStsd

func BoxTypeStsd() BoxType

func BoxTypeStss

func BoxTypeStss() BoxType

func BoxTypeStsz

func BoxTypeStsz() BoxType

func BoxTypeStts

func BoxTypeStts() BoxType

func BoxTypeStyp

func BoxTypeStyp() BoxType

func BoxTypeTenc

func BoxTypeTenc() BoxType

func BoxTypeTfra

func BoxTypeTfra() BoxType

func BoxTypeTkhd

func BoxTypeTkhd() BoxType

func BoxTypeTraf

func BoxTypeTraf() BoxType

func BoxTypeTrak

func BoxTypeTrak() BoxType

func BoxTypeTrep

func BoxTypeTrep() BoxType

func BoxTypeTrex

func BoxTypeTrex() BoxType

func BoxTypeUdta

func BoxTypeUdta() BoxType

func BoxTypeUrl

func BoxTypeUrl() BoxType

func BoxTypeUrn

func BoxTypeUrn() BoxType

func BoxTypeVmhd

func BoxTypeVmhd() BoxType

func BoxTypeVp08

func BoxTypeVp08() BoxType

func BoxTypeVp09

func BoxTypeVp09() BoxType

func BoxTypeVpcC

func BoxTypeVpcC() BoxType

func BoxTypeWave

func BoxTypeWave() BoxType

func StrToBoxType

func StrToBoxType(code string) BoxType

func (BoxType) GetSupportedVersions

func (boxType BoxType) GetSupportedVersions(ctx Context) ([]uint8, error)

func (BoxType) IsSupported

func (boxType BoxType) IsSupported(ctx Context) bool

func (BoxType) IsSupportedVersion

func (boxType BoxType) IsSupportedVersion(ver uint8, ctx Context) bool

func (BoxType) MatchWith

func (lhs BoxType) MatchWith(rhs BoxType) bool

func (BoxType) New

func (boxType BoxType) New(ctx Context) (IBox, error)

func (BoxType) String

func (boxType BoxType) String() string

type Btrt

type Btrt struct {
	Box
	BufferSizeDB uint32 `mp4:"0,size=32"`
	MaxBitrate   uint32 `mp4:"1,size=32"`
	AvgBitrate   uint32 `mp4:"2,size=32"`
}

func (*Btrt) GetType

func (*Btrt) GetType() BoxType

GetType returns the BoxType

type Chunk

type Chunk struct {
	DataOffset      uint64
	SamplesPerChunk uint32
}

type Chunks

type Chunks []*Chunk

type Co64

type Co64 struct {
	FullBox     `mp4:"0,extend"`
	EntryCount  uint32   `mp4:"1,size=32"`
	ChunkOffset []uint64 `mp4:"2,size=64,len=dynamic"`
}

func (*Co64) GetFieldLength

func (co64 *Co64) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Co64) GetType

func (*Co64) GetType() BoxType

GetType returns the BoxType

type Codec

type Codec int
const (
	CodecUnknown Codec = iota
	CodecAVC1
	CodecMP4A
)

type Colr

type Colr struct {
	Box
	ColourType              [4]byte `mp4:"0,size=8,string"`
	ColourPrimaries         uint16  `mp4:"1,size=16,opt=dynamic"`
	TransferCharacteristics uint16  `mp4:"2,size=16,opt=dynamic"`
	MatrixCoefficients      uint16  `mp4:"3,size=16,opt=dynamic"`
	FullRangeFlag           bool    `mp4:"4,size=1,opt=dynamic"`
	Reserved                uint8   `mp4:"5,size=7,opt=dynamic"`
	Profile                 []byte  `mp4:"6,size=8,opt=dynamic"`
	Unknown                 []byte  `mp4:"7,size=8,opt=dynamic"`
}

func (*Colr) GetType

func (*Colr) GetType() BoxType

GetType returns the BoxType

func (*Colr) IsOptFieldEnabled

func (colr *Colr) IsOptFieldEnabled(name string, ctx Context) bool

type Context

type Context struct {
	// UnderWave represents whether current box is under the wave box.
	UnderWave bool

	// UnderIlst represents whether current box is under the ilst box.
	UnderIlst bool

	// UnderIlstMeta represents whether current box is under the metadata box under the ilst box.
	UnderIlstMeta bool

	// UnderIlstFreeMeta represents whether current box is under "----" box.
	UnderIlstFreeMeta bool

	// UnderUdta represents whether current box is under the udta box.
	UnderUdta bool
}

type Cslg

type Cslg struct {
	FullBox                        `mp4:"0,extend"`
	CompositionToDTSShiftV0        int32 `mp4:"1,size=32,ver=0"`
	LeastDecodeToDisplayDeltaV0    int32 `mp4:"2,size=32,ver=0"`
	GreatestDecodeToDisplayDeltaV0 int32 `mp4:"3,size=32,ver=0"`
	CompositionStartTimeV0         int32 `mp4:"4,size=32,ver=0"`
	CompositionEndTimeV0           int32 `mp4:"5,size=32,ver=0"`
	CompositionToDTSShiftV1        int64 `mp4:"6,size=64,nver=0"`
	LeastDecodeToDisplayDeltaV1    int64 `mp4:"7,size=64,nver=0"`
	GreatestDecodeToDisplayDeltaV1 int64 `mp4:"8,size=64,nver=0"`
	CompositionStartTimeV1         int64 `mp4:"9,size=64,nver=0"`
	CompositionEndTimeV1           int64 `mp4:"10,size=64,nver=0"`
}

func (*Cslg) GetCompositionEndTime

func (cslg *Cslg) GetCompositionEndTime() int64

func (*Cslg) GetCompositionStartTime

func (cslg *Cslg) GetCompositionStartTime() int64

func (*Cslg) GetCompositionToDTSShift

func (cslg *Cslg) GetCompositionToDTSShift() int64

func (*Cslg) GetGreatestDecodeToDisplayDelta

func (cslg *Cslg) GetGreatestDecodeToDisplayDelta() int64

func (*Cslg) GetLeastDecodeToDisplayDelta

func (cslg *Cslg) GetLeastDecodeToDisplayDelta() int64

func (*Cslg) GetType

func (*Cslg) GetType() BoxType

GetType returns the BoxType

type Ctts

type Ctts struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32      `mp4:"1,size=32"`
	Entries    []CttsEntry `mp4:"2,len=dynamic,size=64"`
}

func (*Ctts) GetFieldLength

func (ctts *Ctts) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Ctts) GetSampleOffset

func (ctts *Ctts) GetSampleOffset(index int) int64

func (*Ctts) GetType

func (*Ctts) GetType() BoxType

GetType returns the BoxType

type CttsEntry

type CttsEntry struct {
	SampleCount    uint32 `mp4:"0,size=32"`
	SampleOffsetV0 uint32 `mp4:"1,size=32,ver=0"`
	SampleOffsetV1 int32  `mp4:"2,size=32,ver=1"`
}

type DOps

type DOps struct {
	Box
	Version              uint8   `mp4:"0,size=8"`
	OutputChannelCount   uint8   `mp4:"1,size=8"`
	PreSkip              uint16  `mp4:"2,size=16"`
	InputSampleRate      uint32  `mp4:"3,size=32"`
	OutputGain           int16   `mp4:"4,size=16"`
	ChannelMappingFamily uint8   `mp4:"5,size=8"`
	StreamCount          uint8   `mp4:"6,opt=dynamic,size=8"`
	CoupledCount         uint8   `mp4:"7,opt=dynamic,size=8"`
	ChannelMapping       []uint8 `mp4:"8,opt=dynamic,size=8,len=dynamic"`
}

func (DOps) GetFieldLength

func (ops DOps) GetFieldLength(name string, ctx Context) uint

func (DOps) GetType

func (DOps) GetType() BoxType

func (DOps) IsOptFieldEnabled

func (dops DOps) IsOptFieldEnabled(name string, ctx Context) bool

type Dac3

type Dac3 struct {
	Box
	Fscod       uint8 `mp4:"0,size=2"`
	Bsid        uint8 `mp4:"1,size=5"`
	Bsmod       uint8 `mp4:"2,size=3"`
	Acmod       uint8 `mp4:"3,size=3"`
	LfeOn       uint8 `mp4:"4,size=1"`
	BitRateCode uint8 `mp4:"5,size=5"`
	Reserved    uint8 `mp4:"6,size=5,const=0"`
}

func (Dac3) GetType

func (Dac3) GetType() BoxType

type Data

type Data struct {
	Box
	DataType uint32 `mp4:"0,size=32"`
	DataLang uint32 `mp4:"1,size=32"`
	Data     []byte `mp4:"2,size=8"`
}

func (*Data) GetType

func (*Data) GetType() BoxType

GetType returns the BoxType

func (*Data) StringifyField

func (data *Data) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type DecoderConfigDescriptor

type DecoderConfigDescriptor struct {
	BaseCustomFieldObject
	ObjectTypeIndication byte   `mp4:"0,size=8"`
	StreamType           int8   `mp4:"1,size=6"`
	UpStream             bool   `mp4:"2,size=1"`
	Reserved             bool   `mp4:"3,size=1"`
	BufferSizeDB         uint32 `mp4:"4,size=24"`
	MaxBitrate           uint32 `mp4:"5,size=32"`
	AvgBitrate           uint32 `mp4:"6,size=32"`
}

type Descriptor

type Descriptor struct {
	BaseCustomFieldObject
	Tag                     int8                     `mp4:"0,size=8"` // must be 0x03
	Size                    uint32                   `mp4:"1,varint"`
	ESDescriptor            *ESDescriptor            `mp4:"2,extend,opt=dynamic"`
	DecoderConfigDescriptor *DecoderConfigDescriptor `mp4:"3,extend,opt=dynamic"`
	Data                    []byte                   `mp4:"4,size=8,opt=dynamic,len=dynamic"`
}

func (*Descriptor) GetFieldLength

func (ds *Descriptor) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Descriptor) IsOptFieldEnabled

func (ds *Descriptor) IsOptFieldEnabled(name string, ctx Context) bool

func (*Descriptor) StringifyField

func (ds *Descriptor) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Dinf

type Dinf struct {
	Box
}

Dinf is ISOBMFF dinf box type

func (*Dinf) GetType

func (*Dinf) GetType() BoxType

GetType returns the BoxType

type Dref

type Dref struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32 `mp4:"1,size=32"`
}

Dref is ISOBMFF dref box type

func (*Dref) GetType

func (*Dref) GetType() BoxType

GetType returns the BoxType

type ESDescriptor

type ESDescriptor struct {
	BaseCustomFieldObject
	ESID                 uint16 `mp4:"0,size=16"`
	StreamDependenceFlag bool   `mp4:"1,size=1"`
	UrlFlag              bool   `mp4:"2,size=1"`
	OcrStreamFlag        bool   `mp4:"3,size=1"`
	StreamPriority       int8   `mp4:"4,size=5"`
	DependsOnESID        uint16 `mp4:"5,size=16,opt=dynamic"`
	URLLength            uint8  `mp4:"6,size=8,opt=dynamic"`
	URLString            []byte `mp4:"7,size=8,len=dynamic,opt=dynamic,string"`
	OCRESID              uint16 `mp4:"8,size=16,opt=dynamic"`
}

func (*ESDescriptor) GetFieldLength

func (esds *ESDescriptor) GetFieldLength(name string, ctx Context) uint

func (*ESDescriptor) IsOptFieldEnabled

func (esds *ESDescriptor) IsOptFieldEnabled(name string, ctx Context) bool

type EditList

type EditList []*EditListEntry

type EditListEntry

type EditListEntry struct {
	MediaTime       int64
	SegmentDuration uint64
}

type Edts

type Edts struct {
	Box
}

Edts is ISOBMFF edts box type

func (*Edts) GetType

func (*Edts) GetType() BoxType

GetType returns the BoxType

type Elst

type Elst struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32      `mp4:"1,size=32"`
	Entries    []ElstEntry `mp4:"2,len=dynamic,size=dynamic"`
}

Elst is ISOBMFF elst box type

func (*Elst) GetFieldLength

func (elst *Elst) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Elst) GetFieldSize

func (elst *Elst) GetFieldSize(name string, ctx Context) uint

GetFieldSize returns size of dynamic field

func (*Elst) GetMediaTime

func (elst *Elst) GetMediaTime(index int) int64

func (*Elst) GetSegmentDuration

func (elst *Elst) GetSegmentDuration(index int) uint64

func (*Elst) GetType

func (*Elst) GetType() BoxType

GetType returns the BoxType

type ElstEntry

type ElstEntry struct {
	SegmentDurationV0 uint32 `mp4:"0,size=32,ver=0"`
	MediaTimeV0       int32  `mp4:"1,size=32,ver=0"`
	SegmentDurationV1 uint64 `mp4:"2,size=64,ver=1"`
	MediaTimeV1       int64  `mp4:"3,size=64,ver=1"`
	MediaRateInteger  int16  `mp4:"4,size=16"`
	MediaRateFraction int16  `mp4:"5,size=16,const=0"`
}

type Emsg

type Emsg struct {
	FullBox               `mp4:"0,extend"`
	SchemeIdUri           string `mp4:"1,string"`
	Value                 string `mp4:"2,string"`
	Timescale             uint32 `mp4:"3,size=32"`
	PresentationTimeDelta uint32 `mp4:"4,size=32,ver=0"`
	PresentationTime      uint64 `mp4:"5,size=64,ver=1"`
	EventDuration         uint32 `mp4:"6,size=32"`
	Id                    uint32 `mp4:"7,size=32"`
	MessageData           []byte `mp4:"8,size=8,string"`
}

Emsg is ISOBMFF emsg box type

func (*Emsg) GetType

func (*Emsg) GetType() BoxType

GetType returns the BoxType

func (*Emsg) OnReadField

func (emsg *Emsg) OnReadField(name string, r util.ReadSeeker, leftBits uint64, ctx Context) (rbits uint64, override bool, err error)

func (*Emsg) OnWriteField

func (emsg *Emsg) OnWriteField(name string, w util.Writer, ctx Context) (wbits uint64, override bool, err error)

type Esds

type Esds struct {
	FullBox     `mp4:"0,extend"`
	Descriptors []Descriptor `mp4:"1,array"`
}

Esds is ES descripter box

func (*Esds) GetType

func (*Esds) GetType() BoxType

GetType returns the BoxType

type Fiel

type Fiel struct {
	Box
	FieldCount    uint8 `mp4:"0,size=8"`
	FieldOrdering uint8 `mp4:"1,size=8"`
}

func (Fiel) GetType

func (Fiel) GetType() BoxType

type FraProbeInfo deprecated

type FraProbeInfo = ProbeInfo

Deprecated: replace with ProbeInfo

func ProbeFra

func ProbeFra(r io.ReadSeeker) (*FraProbeInfo, error)

ProbeFra probes fragmented MP4 file Deprecated: replace with Probe

type Free

type Free FreeSpace

func (*Free) GetType

func (*Free) GetType() BoxType

type FreeSpace

type FreeSpace struct {
	Box
	Data []uint8 `mp4:"0,size=8"`
}

type Frma

type Frma struct {
	Box
	DataFormat [4]byte `mp4:"0,size=8,string"`
}

Frma is ISOBMFF frma box type

func (*Frma) GetType

func (*Frma) GetType() BoxType

GetType returns the BoxType

type FullBox

type FullBox struct {
	BaseCustomFieldObject
	Version uint8   `mp4:"0,size=8"`
	Flags   [3]byte `mp4:"1,size=8"`
}

FullBox is ISOBMFF FullBox

func (*FullBox) AddFlag

func (box *FullBox) AddFlag(flag uint32)

AddFlag adds the flag

func (*FullBox) CheckFlag

func (box *FullBox) CheckFlag(flag uint32) bool

CheckFlag checks the flag status

func (*FullBox) GetFlags

func (box *FullBox) GetFlags() uint32

GetFlags returns the flags

func (*FullBox) GetVersion

func (box *FullBox) GetVersion() uint8

GetVersion returns the box version

func (*FullBox) RemoveFlag

func (box *FullBox) RemoveFlag(flag uint32)

RemoveFlag removes the flag

func (*FullBox) SetFlags

func (box *FullBox) SetFlags(flags uint32)

SetFlags sets the flags

func (*FullBox) SetVersion

func (box *FullBox) SetVersion(version uint8)

SetVersion sets the box version

type HEVCNalu

type HEVCNalu struct {
	BaseCustomFieldObject
	Length  uint16 `mp4:"0,size=16"`
	NALUnit []byte `mp4:"1,size=8,len=dynamic"`
}

func (HEVCNalu) GetFieldLength

func (s HEVCNalu) GetFieldLength(name string, ctx Context) uint

type HEVCNaluArray

type HEVCNaluArray struct {
	BaseCustomFieldObject
	Completeness bool       `mp4:"0,size=1"`
	Reserved     bool       `mp4:"1,size=1"`
	NaluType     uint8      `mp4:"2,size=6"`
	NumNalus     uint16     `mp4:"3,size=16"`
	Nalus        []HEVCNalu `mp4:"4,len=dynamic"`
}

func (HEVCNaluArray) GetFieldLength

func (a HEVCNaluArray) GetFieldLength(name string, ctx Context) uint

type Hdlr

type Hdlr struct {
	FullBox `mp4:"0,extend"`
	// Predefined corresponds to component_type of QuickTime.
	// pre_defined of ISO-14496 has always zero,
	// however component_type has "mhlr" or "dhlr".
	PreDefined  uint32    `mp4:"1,size=32"`
	HandlerType [4]byte   `mp4:"2,size=8,string"`
	Reserved    [3]uint32 `mp4:"3,size=32,const=0"`
	Name        string    `mp4:"4,string"`
}

Hdlr is ISOBMFF hdlr box type

func (*Hdlr) GetType

func (*Hdlr) GetType() BoxType

GetType returns the BoxType

func (*Hdlr) OnReadField

func (hdlr *Hdlr) OnReadField(name string, r util.ReadSeeker, leftBits uint64, ctx Context) (rbits uint64, override bool, err error)

func (*Hdlr) OnReadName

func (hdlr *Hdlr) OnReadName(r util.ReadSeeker, leftBits uint64, ctx Context) (rbits uint64, override bool, err error)

type HvcC

type HvcC struct {
	Box
	ConfigurationVersion        uint8           `mp4:"0,size=8"`
	GeneralProfileSpace         uint8           `mp4:"1,size=2"`
	GeneralTierFlag             bool            `mp4:"2,size=1"`
	GeneralProfileIdc           uint8           `mp4:"3,size=5"`
	GeneralProfileCompatibility [32]bool        `mp4:"4,size=1"`
	GeneralConstraintIndicator  [6]uint8        `mp4:"5,size=8"`
	GeneralLevelIdc             uint8           `mp4:"6,size=8"`
	Reserved1                   uint8           `mp4:"7,size=4,const=15"`
	MinSpatialSegmentationIdc   uint16          `mp4:"8,size=12"`
	Reserved2                   uint8           `mp4:"9,size=6,const=63"`
	ParallelismType             uint8           `mp4:"10,size=2"`
	Reserved3                   uint8           `mp4:"11,size=6,const=63"`
	ChromaFormatIdc             uint8           `mp4:"12,size=2"`
	Reserved4                   uint8           `mp4:"13,size=5,const=31"`
	BitDepthLumaMinus8          uint8           `mp4:"14,size=3"`
	Reserved5                   uint8           `mp4:"15,size=5,const=31"`
	BitDepthChromaMinus8        uint8           `mp4:"16,size=3"`
	AvgFrameRate                uint16          `mp4:"17,size=16"`
	ConstantFrameRate           uint8           `mp4:"18,size=2"`
	NumTemporalLayers           uint8           `mp4:"19,size=2"`
	TemporalIdNested            uint8           `mp4:"20,size=2"`
	LengthSizeMinusOne          uint8           `mp4:"21,size=2"`
	NumOfNaluArrays             uint8           `mp4:"22,size=8"`
	NaluArrays                  []HEVCNaluArray `mp4:"23,len=dynamic"`
}

func (HvcC) GetFieldLength

func (hvcc HvcC) GetFieldLength(name string, ctx Context) uint

func (HvcC) GetType

func (HvcC) GetType() BoxType

type IAnyType

type IAnyType interface {
	IBox
	SetType(BoxType)
}

type IBox

type IBox interface {
	IImmutableBox

	// SetVersion sets the box version
	SetVersion(uint8)

	// SetFlags sets the flags
	SetFlags(uint32)

	// AddFlag adds the flag
	AddFlag(uint32)

	// RemoveFlag removes the flag
	RemoveFlag(uint32)
}

IBox is common interface of box

func UnmarshalAny

func UnmarshalAny(r io.ReadSeeker, boxType BoxType, payloadSize uint64, ctx Context) (box IBox, n uint64, err error)

type ICustomFieldObject

type ICustomFieldObject interface {
	// GetFieldSize returns size of dynamic field
	GetFieldSize(name string, ctx Context) uint

	// GetFieldLength returns length of dynamic field
	GetFieldLength(name string, ctx Context) uint

	// IsOptFieldEnabled check whether if the optional field is enabled
	IsOptFieldEnabled(name string, ctx Context) bool

	// StringifyField returns field value as string
	StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

	IsPString(name string, bytes []byte, remainingSize uint64, ctx Context) bool

	BeforeUnmarshal(r io.ReadSeeker, size uint64, ctx Context) (n uint64, override bool, err error)

	OnReadField(name string, r util.ReadSeeker, leftBits uint64, ctx Context) (rbits uint64, override bool, err error)

	OnWriteField(name string, w util.Writer, ctx Context) (wbits uint64, override bool, err error)
}

type IImmutableBox

type IImmutableBox interface {
	ICustomFieldObject

	// GetVersion returns the box version
	GetVersion() uint8

	// GetFlags returns the flags
	GetFlags() uint32

	// CheckFlag checks the flag status
	CheckFlag(uint32) bool

	// GetType returns the BoxType
	GetType() BoxType
}

IImmutableBox is common interface of box

type Ilst

type Ilst struct {
	Box
}

func (*Ilst) GetType

func (*Ilst) GetType() BoxType

GetType returns the BoxType

type IlstMetaContainer

type IlstMetaContainer struct {
	AnyTypeBox
}

type MP4AInfo

type MP4AInfo struct {
	OTI          uint8
	AudOTI       uint8
	ChannelCount uint16
}

type Mdhd

type Mdhd struct {
	FullBox            `mp4:"0,extend"`
	CreationTimeV0     uint32 `mp4:"1,size=32,ver=0"`
	ModificationTimeV0 uint32 `mp4:"2,size=32,ver=0"`
	CreationTimeV1     uint64 `mp4:"3,size=64,ver=1"`
	ModificationTimeV1 uint64 `mp4:"4,size=64,ver=1"`
	Timescale          uint32 `mp4:"5,size=32"`
	DurationV0         uint32 `mp4:"6,size=32,ver=0"`
	DurationV1         uint64 `mp4:"7,size=64,ver=1"`
	//
	Pad        bool    `mp4:"8,size=1,hidden"`
	Language   [3]byte `mp4:"9,size=5,iso639-2"` // ISO-639-2/T language code
	PreDefined uint16  `mp4:"10,size=16"`
}

Mdhd is ISOBMFF mdhd box type

func (*Mdhd) GetCreationTime

func (mdhd *Mdhd) GetCreationTime() uint64

func (*Mdhd) GetDuration

func (mdhd *Mdhd) GetDuration() uint64

func (*Mdhd) GetModificationTime

func (mdhd *Mdhd) GetModificationTime() uint64

func (*Mdhd) GetType

func (*Mdhd) GetType() BoxType

GetType returns the BoxType

type Mdia

type Mdia struct {
	Box
}

Mdia is ISOBMFF mdia box type

func (*Mdia) GetType

func (*Mdia) GetType() BoxType

GetType returns the BoxType

type Mehd

type Mehd struct {
	FullBox            `mp4:"0,extend"`
	FragmentDurationV0 uint32 `mp4:"1,size=32,ver=0"`
	FragmentDurationV1 uint64 `mp4:"2,size=64,ver=1"`
}

Mehd is ISOBMFF mehd box type

func (*Mehd) GetFragmentDuration

func (mdhd *Mehd) GetFragmentDuration() uint64

func (*Mehd) GetType

func (*Mehd) GetType() BoxType

GetType returns the BoxType

type Meta

type Meta struct {
	FullBox `mp4:"0,extend"`
}

Meta is ISOBMFF meta box type

func (*Meta) BeforeUnmarshal

func (meta *Meta) BeforeUnmarshal(r io.ReadSeeker, size uint64, ctx Context) (n uint64, override bool, err error)

func (*Meta) GetType

func (*Meta) GetType() BoxType

GetType returns the BoxType

type Mfro

type Mfro struct {
	FullBox `mp4:"0,extend"`
	Size    uint32 `mp4:"1,size=32"`
}

Mfro is ISOBMFF mfro box type

func (*Mfro) GetType

func (*Mfro) GetType() BoxType

GetType returns the BoxType

type Minf

type Minf struct {
	Box
}

Minf is ISOBMFF minf box type

func (*Minf) GetType

func (*Minf) GetType() BoxType

GetType returns the BoxType

type Moof

type Moof struct {
	Box
}

Moof is ISOBMFF moof box type

func (*Moof) GetType

func (*Moof) GetType() BoxType

GetType returns the BoxType

type Mvex

type Mvex struct {
	Box
}

Mvex is ISOBMFF mvex box type

func (*Mvex) GetType

func (*Mvex) GetType() BoxType

GetType returns the BoxType

type Mvhd

type Mvhd struct {
	FullBox            `mp4:"0,extend"`
	CreationTimeV0     uint32    `mp4:"1,size=32,ver=0"`
	ModificationTimeV0 uint32    `mp4:"2,size=32,ver=0"`
	CreationTimeV1     uint64    `mp4:"3,size=64,ver=1"`
	ModificationTimeV1 uint64    `mp4:"4,size=64,ver=1"`
	Timescale          uint32    `mp4:"5,size=32"`
	DurationV0         uint32    `mp4:"6,size=32,ver=0"`
	DurationV1         uint64    `mp4:"7,size=64,ver=1"`
	Rate               int32     `mp4:"8,size=32"` // fixed-point 16.16 - template=0x00010000
	Volume             int16     `mp4:"9,size=16"` // template=0x0100
	Reserved           int16     `mp4:"10,size=16,const=0"`
	Reserved2          [2]uint32 `mp4:"11,size=32,const=0"`
	Matrix             [9]int32  `mp4:"12,size=32,hex"` // template={ 0x00010000,0,0,0,0x00010000,0,0,0,0x40000000 }
	PreDefined         [6]int32  `mp4:"13,size=32"`
	NextTrackID        uint32    `mp4:"14,size=32"`
}

Mvhd is ISOBMFF mvhd box type

func (*Mvhd) GetCreationTime

func (mvhd *Mvhd) GetCreationTime() uint64

func (*Mvhd) GetDuration

func (mvhd *Mvhd) GetDuration() uint64

func (*Mvhd) GetModificationTime

func (mvhd *Mvhd) GetModificationTime() uint64

func (*Mvhd) GetRate

func (mvhd *Mvhd) GetRate() float64

GetRate returns value of rate as float64

func (*Mvhd) GetRateInt

func (mvhd *Mvhd) GetRateInt() int16

GetRateInt returns value of rate as int16

func (*Mvhd) GetType

func (*Mvhd) GetType() BoxType

GetType returns the BoxType

func (*Mvhd) StringifyField

func (mvhd *Mvhd) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type PixelAspectRatioBox

type PixelAspectRatioBox struct {
	AnyTypeBox
	HSpacing uint32 `mp4:"0,size=32"`
	VSpacing uint32 `mp4:"1,size=32"`
}

type ProbeInfo

type ProbeInfo struct {
	MajorBrand       [4]byte
	MinorVersion     uint32
	CompatibleBrands [][4]byte
	FastStart        bool
	Timescale        uint32
	Duration         uint64
	Tracks           Tracks
	Segments         Segments
}

func Probe

func Probe(r io.ReadSeeker) (*ProbeInfo, error)

Probe probes MP4 file

type Pssh

type Pssh struct {
	FullBox  `mp4:"0,extend"`
	SystemID [16]byte  `mp4:"1,size=8,uuid"`
	KIDCount uint32    `mp4:"2,size=32,nver=0"`
	KIDs     []PsshKID `mp4:"3,nver=0,len=dynamic,size=128"`
	DataSize int32     `mp4:"4,size=32"`
	Data     []byte    `mp4:"5,size=8,len=dynamic"`
}

Pssh is ISOBMFF pssh box type

func (*Pssh) GetFieldLength

func (pssh *Pssh) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Pssh) GetType

func (*Pssh) GetType() BoxType

GetType returns the BoxType

func (*Pssh) StringifyField

func (pssh *Pssh) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type PsshKID

type PsshKID struct {
	KID [16]byte `mp4:"0,size=8,uuid"`
}

type ReadHandle

type ReadHandle struct {
	Params      []interface{}
	BoxInfo     BoxInfo
	Path        BoxPath
	ReadPayload func() (box IBox, n uint64, err error)
	ReadData    func(io.Writer) (n uint64, err error)
	Expand      func(params ...interface{}) (vals []interface{}, err error)
}

type ReadHandler

type ReadHandler func(handle *ReadHandle) (val interface{}, err error)

type RollDistanceWithLength

type RollDistanceWithLength struct {
	DescriptionLength uint32 `mp4:"0,size=32"`
	RollDistance      int16  `mp4:"1,size=16"`
}

type Saio

type Saio struct {
	FullBox              `mp4:"0,extend"`
	AuxInfoType          [4]byte  `mp4:"1,size=8,opt=0x000001,string"`
	AuxInfoTypeParameter uint32   `mp4:"2,size=32,opt=0x000001,hex"`
	EntryCount           uint32   `mp4:"3,size=32"`
	OffsetV0             []uint32 `mp4:"4,size=32,ver=0,len=dynamic"`
	OffsetV1             []uint64 `mp4:"5,size=64,nver=0,len=dynamic"`
}

func (*Saio) GetFieldLength

func (saio *Saio) GetFieldLength(name string, ctx Context) uint

func (*Saio) GetOffset

func (saio *Saio) GetOffset(index int) uint64

func (*Saio) GetType

func (*Saio) GetType() BoxType

type Sample

type Sample struct {
	Size                  uint32
	TimeDelta             uint32
	CompositionTimeOffset int64
}

type SampleEntry

type SampleEntry struct {
	AnyTypeBox
	Reserved           [6]uint8 `mp4:"0,size=8,const=0"`
	DataReferenceIndex uint16   `mp4:"1,size=16"`
}

type Samples

type Samples []*Sample

func (Samples) GetBitrate

func (samples Samples) GetBitrate(timescale uint32) uint64

func (Samples) GetMaxBitrate

func (samples Samples) GetMaxBitrate(timescale uint32, timeDelta uint64) uint64

type Sbgp

type Sbgp struct {
	FullBox               `mp4:"0,extend"`
	GroupingType          uint32      `mp4:"1,size=32"`
	GroupingTypeParameter uint32      `mp4:"2,size=32,ver=1"`
	EntryCount            uint32      `mp4:"3,size=32"`
	Entries               []SbgpEntry `mp4:"4,len=dynamic,size=64"`
}

func (*Sbgp) GetFieldLength

func (sbgp *Sbgp) GetFieldLength(name string, ctx Context) uint

func (*Sbgp) GetType

func (*Sbgp) GetType() BoxType

type SbgpEntry

type SbgpEntry struct {
	SampleCount           uint32 `mp4:"0,size=32"`
	GroupDescriptionIndex uint32 `mp4:"1,size=32"`
}

type Schi

type Schi struct {
	Box
}

func (*Schi) GetType

func (*Schi) GetType() BoxType

type Schm

type Schm struct {
	FullBox       `mp4:"0,extend"`
	SchemeType    [4]byte `mp4:"1,size=8,string"`
	SchemeVersion uint32  `mp4:"2,size=32,hex"`
	SchemeUri     []byte  `mp4:"3,size=8,opt=0x000001,string"`
}

func (*Schm) GetType

func (*Schm) GetType() BoxType

type Sdtp

type Sdtp struct {
	FullBox `mp4:"0,extend"`
	Samples []SdtpSampleElem `mp4:"1,size=8"`
}

func (*Sdtp) GetType

func (*Sdtp) GetType() BoxType

type SdtpSampleElem

type SdtpSampleElem struct {
	IsLeading           uint8 `mp4:"0,size=2"`
	SampleDependsOn     uint8 `mp4:"1,size=2"`
	SampleIsDependedOn  uint8 `mp4:"2,size=2"`
	SampleHasRedundancy uint8 `mp4:"3,size=2"`
}

type Segment

type Segment struct {
	TrackID               uint32
	MoofOffset            uint64
	BaseMediaDecodeTime   uint64
	DefaultSampleDuration uint32
	SampleCount           uint32
	Duration              uint32
	CompositionTimeOffset int32
	Size                  uint32
}

type SegmentInfo deprecated

type SegmentInfo = Segment

Deprecated: replace with Segment

type Segments

type Segments []*Segment

func (Segments) GetBitrate

func (segments Segments) GetBitrate(trackID uint32, timescale uint32) uint64

func (Segments) GetMaxBitrate

func (segments Segments) GetMaxBitrate(trackID uint32, timescale uint32) uint64

type Sgpd

type Sgpd struct {
	FullBox                       `mp4:"0,extend"`
	GroupingType                  [4]byte                    `mp4:"1,size=8,string"`
	DefaultLength                 uint32                     `mp4:"2,size=32,ver=1"`
	DefaultSampleDescriptionIndex uint32                     `mp4:"3,size=32,ver=2"`
	EntryCount                    uint32                     `mp4:"4,size=32"`
	RollDistances                 []int16                    `mp4:"5,size=16,opt=dynamic"`
	RollDistancesL                []RollDistanceWithLength   `mp4:"6,size=16,opt=dynamic"`
	AlternativeStartupEntries     []AlternativeStartupEntry  `mp4:"7,size=dynamic,len=dynamic,opt=dynamic"`
	AlternativeStartupEntriesL    []AlternativeStartupEntryL `mp4:"8,len=dynamic,opt=dynamic"`
	VisualRandomAccessEntries     []VisualRandomAccessEntry  `mp4:"9,len=dynamic,opt=dynamic"`
	VisualRandomAccessEntriesL    []VisualRandomAccessEntryL `mp4:"10,len=dynamic,opt=dynamic"`
	TemporalLevelEntries          []TemporalLevelEntry       `mp4:"11,len=dynamic,opt=dynamic"`
	TemporalLevelEntriesL         []TemporalLevelEntryL      `mp4:"12,len=dynamic,opt=dynamic"`
	Unsupported                   []byte                     `mp4:"13,size=8,opt=dynamic"`
}

func (*Sgpd) GetFieldLength

func (sgpd *Sgpd) GetFieldLength(name string, ctx Context) uint

func (*Sgpd) GetFieldSize

func (sgpd *Sgpd) GetFieldSize(name string, ctx Context) uint

func (*Sgpd) GetType

func (*Sgpd) GetType() BoxType

func (*Sgpd) IsOptFieldEnabled

func (sgpd *Sgpd) IsOptFieldEnabled(name string, ctx Context) bool

type Sinf

type Sinf struct {
	Box
}

func (*Sinf) GetType

func (*Sinf) GetType() BoxType

type Skip

type Skip FreeSpace

func (*Skip) GetType

func (*Skip) GetType() BoxType

type Smhd

type Smhd struct {
	FullBox  `mp4:"0,extend"`
	Balance  int16  `mp4:"1,size=16"` // fixed-point 8.8 template=0
	Reserved uint16 `mp4:"2,size=16,const=0"`
}

func (*Smhd) GetBalance

func (smhd *Smhd) GetBalance() float32

GetBalance returns value of width as float32

func (*Smhd) GetBalanceInt

func (smhd *Smhd) GetBalanceInt() int8

GetBalanceInt returns value of width as int8

func (*Smhd) GetType

func (*Smhd) GetType() BoxType

func (*Smhd) StringifyField

func (smhd *Smhd) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Stbl

type Stbl struct {
	Box
}

Stbl is ISOBMFF stbl box type

func (*Stbl) GetType

func (*Stbl) GetType() BoxType

GetType returns the BoxType

type Stco

type Stco struct {
	FullBox     `mp4:"0,extend"`
	EntryCount  uint32   `mp4:"1,size=32"`
	ChunkOffset []uint32 `mp4:"2,size=32,len=dynamic"`
}

Stco is ISOBMFF stco box type

func (*Stco) GetFieldLength

func (stco *Stco) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Stco) GetType

func (*Stco) GetType() BoxType

GetType returns the BoxType

type StringData

type StringData struct {
	AnyTypeBox
	Data []byte `mp4:"0,size=8"`
}

func (*StringData) StringifyField

func (sd *StringData) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Stsc

type Stsc struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32      `mp4:"1,size=32"`
	Entries    []StscEntry `mp4:"2,len=dynamic,size=96"`
}

Stsc is ISOBMFF stsc box type

func (*Stsc) GetFieldLength

func (stsc *Stsc) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Stsc) GetType

func (*Stsc) GetType() BoxType

GetType returns the BoxType

type StscEntry

type StscEntry struct {
	FirstChunk             uint32 `mp4:"0,size=32"`
	SamplesPerChunk        uint32 `mp4:"1,size=32"`
	SampleDescriptionIndex uint32 `mp4:"2,size=32"`
}

type Stsd

type Stsd struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32 `mp4:"1,size=32"`
}

Stsd is ISOBMFF stsd box type

func (*Stsd) GetType

func (*Stsd) GetType() BoxType

GetType returns the BoxType

type Stss

type Stss struct {
	FullBox      `mp4:"0,extend"`
	EntryCount   uint32   `mp4:"1,size=32"`
	SampleNumber []uint32 `mp4:"2,len=dynamic,size=32"`
}

func (*Stss) GetFieldLength

func (stss *Stss) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Stss) GetType

func (*Stss) GetType() BoxType

GetType returns the BoxType

type Stsz

type Stsz struct {
	FullBox     `mp4:"0,extend"`
	SampleSize  uint32   `mp4:"1,size=32"`
	SampleCount uint32   `mp4:"2,size=32"`
	EntrySize   []uint32 `mp4:"3,size=32,len=dynamic"`
}

Stsz is ISOBMFF stsz box type

func (*Stsz) GetFieldLength

func (stsz *Stsz) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Stsz) GetType

func (*Stsz) GetType() BoxType

GetType returns the BoxType

type Stts

type Stts struct {
	FullBox    `mp4:"0,extend"`
	EntryCount uint32      `mp4:"1,size=32"`
	Entries    []SttsEntry `mp4:"2,len=dynamic,size=64"`
}

Stts is ISOBMFF stts box type

func (*Stts) GetFieldLength

func (stts *Stts) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Stts) GetType

func (*Stts) GetType() BoxType

GetType returns the BoxType

type SttsEntry

type SttsEntry struct {
	SampleCount uint32 `mp4:"0,size=32"`
	SampleDelta uint32 `mp4:"1,size=32"`
}

type Styp

type Styp struct {
	Box
	MajorBrand   [4]byte `mp4:"0,size=8,string"`
	MinorVersion uint32  `mp4:"1,size=32"`
}

func (*Styp) GetType

func (*Styp) GetType() BoxType

type TemporalLevelEntry

type TemporalLevelEntry struct {
	LevelIndependentlyDecodable bool  `mp4:"0,size=1"`
	Reserved                    uint8 `mp4:"1,size=7,const=0"`
}

type TemporalLevelEntryL

type TemporalLevelEntryL struct {
	DescriptionLength  uint32 `mp4:"0,size=32"`
	TemporalLevelEntry `mp4:"1,extend"`
}

type Tenc

type Tenc struct {
	FullBox                `mp4:"0,extend"`
	Reserved               uint8    `mp4:"1,size=8,dec"`
	DefaultCryptByteBlock  uint8    `mp4:"2,size=4,dec"` // always 0 on version 0
	DefaultSkipByteBlock   uint8    `mp4:"3,size=4,dec"` // always 0 on version 0
	DefaultIsProtected     uint8    `mp4:"4,size=8,dec"`
	DefaultPerSampleIVSize uint8    `mp4:"5,size=8,dec"`
	DefaultKID             [16]byte `mp4:"6,size=8,uuid"`
	DefaultConstantIVSize  uint8    `mp4:"7,size=8,opt=dynamic,dec"`
	DefaultConstantIV      []byte   `mp4:"8,size=8,opt=dynamic,len=dynamic"`
}

Tenc is ISOBMFF tenc box type

func (*Tenc) GetFieldLength

func (tenc *Tenc) GetFieldLength(name string, ctx Context) uint

func (*Tenc) GetType

func (*Tenc) GetType() BoxType

GetType returns the BoxType

func (*Tenc) IsOptFieldEnabled

func (tenc *Tenc) IsOptFieldEnabled(name string, ctx Context) bool

type Tfra

type Tfra struct {
	FullBox               `mp4:"0,extend"`
	TrackID               uint32      `mp4:"1,size=32"`
	Reserved              uint32      `mp4:"2,size=26,const=0"`
	LengthSizeOfTrafNum   byte        `mp4:"3,size=2"`
	LengthSizeOfSampleNum byte        `mp4:"5,size=2"`
	NumberOfEntry         uint32      `mp4:"6,size=32"`
	Entries               []TfraEntry `mp4:"7,len=dynamic,size=dynamic"`
}

Tfra is ISOBMFF tfra box type

func (*Tfra) GetFieldLength

func (tfra *Tfra) GetFieldLength(name string, ctx Context) uint

GetFieldLength returns length of dynamic field

func (*Tfra) GetFieldSize

func (tfra *Tfra) GetFieldSize(name string, ctx Context) uint

GetFieldSize returns size of dynamic field

func (*Tfra) GetMoofOffset

func (tfra *Tfra) GetMoofOffset(index int) uint64

func (*Tfra) GetTime

func (tfra *Tfra) GetTime(index int) uint64

func (*Tfra) GetType

func (*Tfra) GetType() BoxType

GetType returns the BoxType

type TfraEntry

type TfraEntry struct {
	TimeV0       uint32 `mp4:"0,size=32,ver=0"`
	MoofOffsetV0 uint32 `mp4:"1,size=32,ver=0"`
	TimeV1       uint64 `mp4:"2,size=64,ver=1"`
	MoofOffsetV1 uint64 `mp4:"3,size=64,ver=1"`
	TrafNumber   uint32 `mp4:"4,size=dynamic"`
	SampleNumber uint32 `mp4:"6,size=dynamic"`
}

type Tkhd

type Tkhd struct {
	FullBox            `mp4:"0,extend"`
	CreationTimeV0     uint32 `mp4:"1,size=32,ver=0"`
	ModificationTimeV0 uint32 `mp4:"2,size=32,ver=0"`
	CreationTimeV1     uint64 `mp4:"3,size=64,ver=1"`
	ModificationTimeV1 uint64 `mp4:"4,size=64,ver=1"`
	TrackID            uint32 `mp4:"5,size=32"`
	Reserved0          uint32 `mp4:"6,size=32,const=0"`
	DurationV0         uint32 `mp4:"7,size=32,ver=0"`
	DurationV1         uint64 `mp4:"8,size=64,ver=1"`
	//
	Reserved1      [2]uint32 `mp4:"9,size=32,const=0"`
	Layer          int16     `mp4:"10,size=16"` // template=0
	AlternateGroup int16     `mp4:"11,size=16"` // template=0
	Volume         int16     `mp4:"12,size=16"` // template={if track_is_audio 0x0100 else 0}
	Reserved2      uint16    `mp4:"13,size=16,const=0"`
	Matrix         [9]int32  `mp4:"14,size=32,hex"` // template={ 0x00010000,0,0,0,0x00010000,0,0,0,0x40000000 };
	Width          uint32    `mp4:"15,size=32"`     // fixed-point 16.16
	Height         uint32    `mp4:"16,size=32"`     // fixed-point 16.16
}

Tkhd is ISOBMFF tkhd box type

func (*Tkhd) GetCreationTime

func (tkhd *Tkhd) GetCreationTime() uint64

func (*Tkhd) GetDuration

func (tkhd *Tkhd) GetDuration() uint64

func (*Tkhd) GetHeight

func (tkhd *Tkhd) GetHeight() float64

GetHeight returns value of height as float64

func (*Tkhd) GetHeightInt

func (tkhd *Tkhd) GetHeightInt() uint16

GetHeightInt returns value of height as uint16

func (*Tkhd) GetModificationTime

func (tkhd *Tkhd) GetModificationTime() uint64

func (*Tkhd) GetType

func (*Tkhd) GetType() BoxType

GetType returns the BoxType

func (*Tkhd) GetWidth

func (tkhd *Tkhd) GetWidth() float64

GetWidth returns value of width as float64

func (*Tkhd) GetWidthInt

func (tkhd *Tkhd) GetWidthInt() uint16

GetWidthInt returns value of width as uint16

func (*Tkhd) StringifyField

func (tkhd *Tkhd) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Track

type Track struct {
	TrackID   uint32
	Timescale uint32
	Duration  uint64
	Codec     Codec
	Encrypted bool
	EditList  EditList
	Samples   Samples
	Chunks    Chunks
	AVC       *AVCDecConfigInfo
	MP4A      *MP4AInfo
}

type TrackInfo deprecated

type TrackInfo = Track

Deprecated: replace with Track

type Tracks

type Tracks []*Track

type Traf

type Traf struct {
	Box
}

Traf is ISOBMFF traf box type

func (*Traf) GetType

func (*Traf) GetType() BoxType

GetType returns the BoxType

type Trak

type Trak struct {
	Box
}

Trak is ISOBMFF trak box type

func (*Trak) GetType

func (*Trak) GetType() BoxType

GetType returns the BoxType

type Trep

type Trep struct {
	FullBox `mp4:"0,extend"`
	TrackID uint32 `mp4:"1,size=32"`
}

Trep is ISOBMFF trep box type

func (*Trep) GetType

func (*Trep) GetType() BoxType

GetType returns the BoxType

type Trex

type Trex struct {
	FullBox                       `mp4:"0,extend"`
	TrackID                       uint32 `mp4:"1,size=32"`
	DefaultSampleDescriptionIndex uint32 `mp4:"2,size=32"`
	DefaultSampleDuration         uint32 `mp4:"3,size=32"`
	DefaultSampleSize             uint32 `mp4:"4,size=32"`
	DefaultSampleFlags            uint32 `mp4:"5,size=32,hex"`
}

Trex is ISOBMFF trex box type

func (*Trex) GetType

func (*Trex) GetType() BoxType

GetType returns the BoxType

type Udta

type Udta struct {
	Box
}

Udta is ISOBMFF udta box type

func (*Udta) GetType

func (*Udta) GetType() BoxType

GetType returns the BoxType

type Udta3GppString

type Udta3GppString struct {
	AnyTypeBox
	FullBox  `mp4:"0,extend"`
	Pad      bool    `mp4:"1,size=1,hidden"`
	Language [3]byte `mp4:"2,size=5,iso639-2"` // ISO-639-2/T language code
	Data     []byte  `mp4:"3,size=8,string"`
}

type Url

type Url struct {
	FullBox  `mp4:"0,extend"`
	Location string `mp4:"1,string,nopt=0x000001"`
}

func (*Url) GetType

func (*Url) GetType() BoxType

type Urn

type Urn struct {
	FullBox  `mp4:"0,extend"`
	Name     string `mp4:"1,string,nopt=0x000001"`
	Location string `mp4:"2,string,nopt=0x000001"`
}

func (*Urn) GetType

func (*Urn) GetType() BoxType

type VisualRandomAccessEntry

type VisualRandomAccessEntry struct {
	NumLeadingSamplesKnown bool  `mp4:"0,size=1"`
	NumLeadingSamples      uint8 `mp4:"1,size=7"`
}

type VisualRandomAccessEntryL

type VisualRandomAccessEntryL struct {
	DescriptionLength       uint32 `mp4:"0,size=32"`
	VisualRandomAccessEntry `mp4:"1,extend"`
}

type VisualSampleEntry

type VisualSampleEntry struct {
	SampleEntry     `mp4:"0,extend"`
	PreDefined      uint16    `mp4:"1,size=16"`
	Reserved        uint16    `mp4:"2,size=16,const=0"`
	PreDefined2     [3]uint32 `mp4:"3,size=32"`
	Width           uint16    `mp4:"4,size=16"`
	Height          uint16    `mp4:"5,size=16"`
	Horizresolution uint32    `mp4:"6,size=32"`
	Vertresolution  uint32    `mp4:"7,size=32"`
	Reserved2       uint32    `mp4:"8,size=32,const=0"`
	FrameCount      uint16    `mp4:"9,size=16"`
	Compressorname  [32]byte  `mp4:"10,size=8"`
	Depth           uint16    `mp4:"11,size=16"`
	PreDefined3     int16     `mp4:"12,size=16"`
}

func (*VisualSampleEntry) StringifyField

func (vse *VisualSampleEntry) StringifyField(name string, indent string, depth int, ctx Context) (string, bool)

StringifyField returns field value as string

type Vmhd

type Vmhd struct {
	FullBox      `mp4:"0,extend"`
	Graphicsmode uint16    `mp4:"1,size=16"` // template=0
	Opcolor      [3]uint16 `mp4:"2,size=16"` // template={0, 0, 0}
}

Vmhd is ISOBMFF vmhd box type

func (*Vmhd) GetType

func (*Vmhd) GetType() BoxType

GetType returns the BoxType

type VpcC

type VpcC struct {
	FullBox                     `mp4:"0,extend"`
	Profile                     uint8   `mp4:"1,size=8"`
	Level                       uint8   `mp4:"2,size=8"`
	BitDepth                    uint8   `mp4:"3,size=4"`
	ChromaSubsampling           uint8   `mp4:"4,size=3"`
	VideoFullRangeFlag          uint8   `mp4:"5,size=1"`
	ColourPrimaries             uint8   `mp4:"6,size=8"`
	TransferCharacteristics     uint8   `mp4:"7,size=8"`
	MatrixCoefficients          uint8   `mp4:"8,size=8"`
	CodecInitializationDataSize uint16  `mp4:"9,size=16"`
	CodecInitializationData     []uint8 `mp4:"10,size=8,len=dynamic"`
}

func (VpcC) GetFieldLength

func (vpcc VpcC) GetFieldLength(name string, ctx Context) uint

func (VpcC) GetType

func (VpcC) GetType() BoxType

type Wave

type Wave struct {
	Box
}

Wave is QuickTime wave box

func (*Wave) GetType

func (*Wave) GetType() BoxType

GetType returns the BoxType

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.WriteSeeker) *Writer

func (*Writer) CopyBox

func (w *Writer) CopyBox(r io.ReadSeeker, bi *BoxInfo) error

func (*Writer) EndBox

func (w *Writer) EndBox() (*BoxInfo, error)

func (*Writer) Seek

func (w *Writer) Seek(offset int64, whence int) (int64, error)

func (*Writer) StartBox

func (w *Writer) StartBox(bi *BoxInfo) (*BoxInfo, error)

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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