Documentation
¶
Overview ¶
config.go
core.go
encryption.go
fragment.go
movie.go
remuxer.go
tables.go
track.go
Index ¶
- func Decrypt(data []byte, sample *SencSample, block cipher.Block)
- type Box
- type BoxHeader
- type Co64Box
- type CttsBox
- type CttsEntry
- type EncBox
- type FrmaBox
- type MdatBox
- type MdhdBox
- type MdiaBox
- type MinfBox
- type MoofBox
- type MoovBox
- type MvhdBox
- type PsshBox
- type RemuxSample
- type Remuxer
- type SchiBox
- type SencBox
- type SencSample
- type SidxBox
- type SidxReference
- type SinfBox
- type StblBox
- type StcoBox
- type StscBox
- type StscEntry
- type StsdBox
- type StssBox
- type StszBox
- type SttsBox
- type SttsEntry
- type Subsample
- type TencBox
- type TfhdBox
- type TrafBox
- type TrakBox
- type TrunBox
- type TrunSample
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
type Box struct {
Moov *MoovBox
Moof *MoofBox
Mdat *MdatBox
Sidx *SidxBox
Pssh *PsshBox
Raw []byte
}
--- Box ---
func DecodeBoxes ¶ added in v1.13.9
type EncBox ¶ added in v1.11.2
--- ENC (Encrypted Sample Entry) ---
func DecodeEncBox ¶ added in v1.13.9
type MdhdBox ¶ added in v1.8.4
type MdhdBox struct {
Header *BoxHeader
Version byte
Flags [3]byte
CreationTime uint64
ModificationTime uint64
Timescale uint32
Duration uint64
Language [2]byte
Quality [2]byte
}
--- MDHD ---
func DecodeMdhdBox ¶ added in v1.13.9
func (*MdhdBox) SetDuration ¶ added in v1.11.2
type MoovBox ¶ added in v1.8.4
type MoovBox struct {
Header *BoxHeader
Mvhd *MvhdBox
Trak []*TrakBox
Pssh []*PsshBox
RawChildren [][]byte
}
--- MOOV ---
func DecodeMoovBox ¶ added in v1.13.9
func (*MoovBox) RemoveMvex ¶ added in v1.11.2
func (b *MoovBox) RemoveMvex()
func (*MoovBox) RemovePssh ¶ added in v1.11.2
func (b *MoovBox) RemovePssh()
type MvhdBox ¶ added in v1.12.5
type MvhdBox struct {
Header *BoxHeader
Version byte
Flags [3]byte
CreationTime uint64
ModificationTime uint64
Timescale uint32
Duration uint64
RemainingData []byte
}
--- MVHD ---
func DecodeMvhdBox ¶ added in v1.13.9
func (*MvhdBox) SetDuration ¶ added in v1.12.5
type PsshBox ¶ added in v1.8.4
type PsshBox struct {
Header *BoxHeader
Version byte
Flags [3]byte
SystemID [16]byte
KIDs [][16]byte
Data []byte
}
--- PSSH ---
func DecodePsshBox ¶ added in v1.13.9
type RemuxSample ¶ added in v1.12.9
type Remuxer ¶ added in v1.12.9
type Remuxer struct {
Writer io.WriteSeeker
Moov *MoovBox
OnSample func(data []byte, sample *SencSample)
// contains filtered or unexported fields
}
func (*Remuxer) AddSegment ¶ added in v1.12.9
func (*Remuxer) Initialize ¶ added in v1.12.9
type SchiBox ¶ added in v1.8.4
--- SCHI (Scheme Information) ---
func DecodeSchiBox ¶ added in v1.13.9
type SencBox ¶ added in v1.8.4
type SencBox struct {
Header *BoxHeader
Flags uint32
Samples []SencSample
}
func DecodeSencBox ¶ added in v1.13.9
type SencSample ¶ added in v1.13.9
type SidxBox ¶ added in v1.8.4
type SidxBox struct {
Header *BoxHeader
Version byte
Flags uint32
ReferenceID uint32
Timescale uint32
EarliestPresentationTime uint64
FirstOffset uint64
References []SidxReference
}
func DecodeSidxBox ¶ added in v1.13.9
type SidxReference ¶ added in v1.8.4
type SidxReference struct {
ReferenceType bool
ReferencedSize uint32
SubsegmentDuration uint32
StartsWithSAP bool
SAPType uint8
SAPDeltaTime uint32
}
--- SIDX ---
type StsdBox ¶ added in v1.8.4
type StsdBox struct {
Header *BoxHeader
HeaderFields [8]byte // Ver(1)+Flags(3)+EntryCount(4)
EncChildren []*EncBox
RawChildren [][]byte
}
--- STSD ---
func DecodeStsdBox ¶ added in v1.13.9
func (*StsdBox) RemoveSinf ¶ added in v1.13.9
type TencBox ¶ added in v1.8.4
type TencBox struct {
Header *BoxHeader
Version byte
Flags uint32
DefaultIsProtected byte
DefaultPerSampleIVSize byte
DefaultKID [16]byte
DefaultConstantIVSize byte // Present if DefaultIsProtected=1 and DefaultPerSampleIVSize=0
DefaultConstantIV []byte // Present if DefaultIsProtected=1 and DefaultPerSampleIVSize=0
}
--- TENC --- TencBox defines the Track Encryption Box ('tenc'), which contains default encryption parameters for a track. Specification: ISO/IEC 23001-7
func DecodeTencBox ¶ added in v1.13.9
type TfhdBox ¶ added in v1.8.4
type TfhdBox struct {
Header *BoxHeader
Flags uint32
TrackID uint32
BaseDataOffset uint64
SampleDescriptionIndex uint32
DefaultSampleDuration uint32
DefaultSampleSize uint32
DefaultSampleFlags uint32
}
--- TFHD ---
func DecodeTfhdBox ¶ added in v1.13.9
type TrafBox ¶ added in v1.8.4
type TrafBox struct {
Header *BoxHeader
Tfhd *TfhdBox
Trun []*TrunBox
Senc *SencBox
Tenc *TencBox
RawChildren [][]byte
}
--- TRAF ---
func DecodeTrafBox ¶ added in v1.13.9
type TrakBox ¶ added in v1.8.4
--- TRAK ---
func DecodeTrakBox ¶ added in v1.13.9
func (*TrakBox) RemoveEdts ¶ added in v1.8.4
func (b *TrakBox) RemoveEdts()
type TrunBox ¶ added in v1.8.4
type TrunBox struct {
Header *BoxHeader
Flags uint32
SampleCount uint32
DataOffset int32
FirstSampleFlags uint32
Samples []TrunSample
}
func DecodeTrunBox ¶ added in v1.13.9
Click to show internal directories.
Click to hide internal directories.