joy4: github.com/nareix/joy4/format/mp4/mp4io Index | Files | Directories

package mp4io

import "github.com/nareix/joy4/format/mp4/mp4io"

Index

Package Files

atoms.go mp4io.go

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)
const AVCC = Tag(0x61766343)
const CTTS = Tag(0x63747473)
const DINF = Tag(0x64696e66)
const DREF = Tag(0x64726566)
const ESDS = Tag(0x65736473)
const HDLR = Tag(0x68646c72)
const LenCompositionOffsetEntry = 8
const LenSampleToChunkEntry = 12
const LenTimeToSampleEntry = 8
const LenTrackFragRunEntry = 16
const MDAT = Tag(0x6d646174)
const MDHD = Tag(0x6d646864)
const MDIA = Tag(0x6d646961)
const MFHD = Tag(0x6d666864)
const MINF = Tag(0x6d696e66)
const MOOF = Tag(0x6d6f6f66)
const MOOV = Tag(0x6d6f6f76)
const MP4A = Tag(0x6d703461)
const MVEX = Tag(0x6d766578)
const MVHD = Tag(0x6d766864)
const SMHD = Tag(0x736d6864)
const STBL = Tag(0x7374626c)
const STCO = Tag(0x7374636f)
const STSC = Tag(0x73747363)
const STSD = Tag(0x73747364)
const STSS = Tag(0x73747373)
const STSZ = Tag(0x7374737a)
const STTS = Tag(0x73747473)
const TFDT = Tag(0x74666474)
const TFHD = Tag(0x74666864)
const TKHD = Tag(0x746b6864)
const TRAF = Tag(0x74726166)
const TRAK = Tag(0x7472616b)
const TREX = Tag(0x74726578)
const TRUN = Tag(0x7472756e)
const URL = Tag(0x75726c20)
const VMHD = Tag(0x766d6864)

func FprintAtom Uses

func FprintAtom(out io.Writer, root Atom)

func GetFixed16 Uses

func GetFixed16(b []byte) float64

func GetFixed32 Uses

func GetFixed32(b []byte) float64

func GetTime32 Uses

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

func GetTime64 Uses

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

func PrintAtom Uses

func PrintAtom(root Atom)

func PutCompositionOffsetEntry Uses

func PutCompositionOffsetEntry(b []byte, self CompositionOffsetEntry)

func PutFixed16 Uses

func PutFixed16(b []byte, f float64)

func PutFixed32 Uses

func PutFixed32(b []byte, f float64)

func PutSampleToChunkEntry Uses

func PutSampleToChunkEntry(b []byte, self SampleToChunkEntry)

func PutTime32 Uses

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

func PutTime64 Uses

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

func PutTimeToSampleEntry Uses

func PutTimeToSampleEntry(b []byte, self TimeToSampleEntry)

func PutTrackFragRunEntry Uses

func PutTrackFragRunEntry(b []byte, self TrackFragRunEntry)

type AVC1Conf Uses

type AVC1Conf struct {
    Data []byte
    AtomPos
}

func (AVC1Conf) Children Uses

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

func (AVC1Conf) Len Uses

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

func (AVC1Conf) Marshal Uses

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

func (AVC1Conf) Tag Uses

func (self AVC1Conf) Tag() Tag

func (*AVC1Conf) Unmarshal Uses

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

type AVC1Desc Uses

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 Uses

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

func (AVC1Desc) Len Uses

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

func (AVC1Desc) Marshal Uses

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

func (AVC1Desc) Tag Uses

func (self AVC1Desc) Tag() Tag

func (*AVC1Desc) Unmarshal Uses

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

type Atom Uses

type Atom interface {
    Pos() (int, int)
    Tag() Tag
    Marshal([]byte) int
    Unmarshal([]byte, int) (int, error)
    Len() int
    Children() []Atom
}

func FindChildren Uses

func FindChildren(root Atom, tag Tag) Atom

func FindChildrenByName Uses

func FindChildrenByName(root Atom, tag string) Atom

func ReadFileAtoms Uses

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

type AtomPos Uses

type AtomPos struct {
    Offset int
    Size   int
}

func (AtomPos) Pos Uses

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

type ChunkOffset Uses

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

func (ChunkOffset) Children Uses

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

func (ChunkOffset) Len Uses

func (self ChunkOffset) Len() (n int)

func (ChunkOffset) Marshal Uses

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

func (ChunkOffset) String Uses

func (self ChunkOffset) String() string

func (ChunkOffset) Tag Uses

func (self ChunkOffset) Tag() Tag

func (*ChunkOffset) Unmarshal Uses

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

type CompositionOffset Uses

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

func (CompositionOffset) Children Uses

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

func (CompositionOffset) Len Uses

func (self CompositionOffset) Len() (n int)

func (CompositionOffset) Marshal Uses

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

func (CompositionOffset) String Uses

func (self CompositionOffset) String() string

func (CompositionOffset) Tag Uses

func (self CompositionOffset) Tag() Tag

func (*CompositionOffset) Unmarshal Uses

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

type CompositionOffsetEntry Uses

type CompositionOffsetEntry struct {
    Count  uint32
    Offset uint32
}

func GetCompositionOffsetEntry Uses

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

type DataInfo Uses

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

func (DataInfo) Children Uses

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

func (DataInfo) Len Uses

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

func (DataInfo) Marshal Uses

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

func (DataInfo) Tag Uses

func (self DataInfo) Tag() Tag

func (*DataInfo) Unmarshal Uses

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

type DataRefer Uses

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

func (DataRefer) Children Uses

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

func (DataRefer) Len Uses

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

func (DataRefer) Marshal Uses

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

func (DataRefer) Tag Uses

func (self DataRefer) Tag() Tag

func (*DataRefer) Unmarshal Uses

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

type DataReferUrl Uses

type DataReferUrl struct {
    Version uint8
    Flags   uint32
    AtomPos
}

func (DataReferUrl) Children Uses

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

func (DataReferUrl) Len Uses

func (self DataReferUrl) Len() (n int)

func (DataReferUrl) Marshal Uses

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

func (DataReferUrl) Tag Uses

func (self DataReferUrl) Tag() Tag

func (*DataReferUrl) Unmarshal Uses

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

type Dummy Uses

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

func (Dummy) Children Uses

func (self Dummy) Children() []Atom

func (Dummy) Len Uses

func (self Dummy) Len() int

func (Dummy) Marshal Uses

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

func (Dummy) Tag Uses

func (self Dummy) Tag() Tag

func (*Dummy) Unmarshal Uses

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

type ElemStreamDesc Uses

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

func (ElemStreamDesc) Children Uses

func (self ElemStreamDesc) Children() []Atom

func (ElemStreamDesc) Len Uses

func (self ElemStreamDesc) Len() (n int)

func (ElemStreamDesc) Marshal Uses

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

func (ElemStreamDesc) String Uses

func (self ElemStreamDesc) String() string

func (ElemStreamDesc) Tag Uses

func (self ElemStreamDesc) Tag() Tag

func (*ElemStreamDesc) Unmarshal Uses

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

type HandlerRefer Uses

type HandlerRefer struct {
    Version uint8
    Flags   uint32
    Type    [4]byte
    SubType [4]byte
    Name    []byte
    AtomPos
}

func (HandlerRefer) Children Uses

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

func (HandlerRefer) Len Uses

func (self HandlerRefer) Len() (n int)

func (HandlerRefer) Marshal Uses

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

func (HandlerRefer) Tag Uses

func (self HandlerRefer) Tag() Tag

func (*HandlerRefer) Unmarshal Uses

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

type MP4ADesc Uses

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 Uses

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

func (MP4ADesc) Len Uses

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

func (MP4ADesc) Marshal Uses

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

func (MP4ADesc) Tag Uses

func (self MP4ADesc) Tag() Tag

func (*MP4ADesc) Unmarshal Uses

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

type Media Uses

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

func (Media) Children Uses

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

func (Media) Len Uses

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

func (Media) Marshal Uses

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

func (Media) Tag Uses

func (self Media) Tag() Tag

func (*Media) Unmarshal Uses

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

type MediaHeader Uses

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 Uses

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

func (MediaHeader) Len Uses

func (self MediaHeader) Len() (n int)

func (MediaHeader) Marshal Uses

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

func (MediaHeader) Tag Uses

func (self MediaHeader) Tag() Tag

func (*MediaHeader) Unmarshal Uses

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

type MediaInfo Uses

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

func (MediaInfo) Children Uses

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

func (MediaInfo) Len Uses

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

func (MediaInfo) Marshal Uses

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

func (MediaInfo) Tag Uses

func (self MediaInfo) Tag() Tag

func (*MediaInfo) Unmarshal Uses

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

type Movie Uses

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

func (Movie) Children Uses

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

func (Movie) Len Uses

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

func (Movie) Marshal Uses

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

func (Movie) Tag Uses

func (self Movie) Tag() Tag

func (*Movie) Unmarshal Uses

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

type MovieExtend Uses

type MovieExtend struct {
    Tracks   []*TrackExtend
    Unknowns []Atom
    AtomPos
}

func (MovieExtend) Children Uses

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

func (MovieExtend) Len Uses

func (self MovieExtend) Len() (n int)

func (MovieExtend) Marshal Uses

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

func (MovieExtend) Tag Uses

func (self MovieExtend) Tag() Tag

func (*MovieExtend) Unmarshal Uses

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

type MovieFrag Uses

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

func (MovieFrag) Children Uses

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

func (MovieFrag) Len Uses

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

func (MovieFrag) Marshal Uses

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

func (MovieFrag) Tag Uses

func (self MovieFrag) Tag() Tag

func (*MovieFrag) Unmarshal Uses

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

type MovieFragHeader Uses

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

func (MovieFragHeader) Children Uses

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

func (MovieFragHeader) Len Uses

func (self MovieFragHeader) Len() (n int)

func (MovieFragHeader) Marshal Uses

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

func (MovieFragHeader) Tag Uses

func (self MovieFragHeader) Tag() Tag

func (*MovieFragHeader) Unmarshal Uses

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

type MovieHeader Uses

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 Uses

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

func (MovieHeader) Len Uses

func (self MovieHeader) Len() (n int)

func (MovieHeader) Marshal Uses

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

func (MovieHeader) String Uses

func (self MovieHeader) String() string

func (MovieHeader) Tag Uses

func (self MovieHeader) Tag() Tag

func (*MovieHeader) Unmarshal Uses

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

type ParseError Uses

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

func (*ParseError) Error Uses

func (self *ParseError) Error() string

type SampleDesc Uses

type SampleDesc struct {
    Version  uint8
    AVC1Desc *AVC1Desc
    MP4ADesc *MP4ADesc
    Unknowns []Atom
    AtomPos
}

func (SampleDesc) Children Uses

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

func (SampleDesc) Len Uses

func (self SampleDesc) Len() (n int)

func (SampleDesc) Marshal Uses

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

func (SampleDesc) Tag Uses

func (self SampleDesc) Tag() Tag

func (*SampleDesc) Unmarshal Uses

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

type SampleSize Uses

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

func (SampleSize) Children Uses

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

func (SampleSize) Len Uses

func (self SampleSize) Len() (n int)

func (SampleSize) Marshal Uses

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

func (SampleSize) String Uses

func (self SampleSize) String() string

func (SampleSize) Tag Uses

func (self SampleSize) Tag() Tag

func (*SampleSize) Unmarshal Uses

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

type SampleTable Uses

type SampleTable struct {
    SampleDesc        *SampleDesc
    TimeToSample      *TimeToSample
    CompositionOffset *CompositionOffset
    SampleToChunk     *SampleToChunk
    SyncSample        *SyncSample
    ChunkOffset       *ChunkOffset
    SampleSize        *SampleSize
    AtomPos
}

func (SampleTable) Children Uses

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

func (SampleTable) Len Uses

func (self SampleTable) Len() (n int)

func (SampleTable) Marshal Uses

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

func (SampleTable) Tag Uses

func (self SampleTable) Tag() Tag

func (*SampleTable) Unmarshal Uses

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

type SampleToChunk Uses

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

func (SampleToChunk) Children Uses

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

func (SampleToChunk) Len Uses

func (self SampleToChunk) Len() (n int)

func (SampleToChunk) Marshal Uses

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

func (SampleToChunk) String Uses

func (self SampleToChunk) String() string

func (SampleToChunk) Tag Uses

func (self SampleToChunk) Tag() Tag

func (*SampleToChunk) Unmarshal Uses

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

type SampleToChunkEntry Uses

type SampleToChunkEntry struct {
    FirstChunk      uint32
    SamplesPerChunk uint32
    SampleDescId    uint32
}

func GetSampleToChunkEntry Uses

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

type SoundMediaInfo Uses

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

func (SoundMediaInfo) Children Uses

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

func (SoundMediaInfo) Len Uses

func (self SoundMediaInfo) Len() (n int)

func (SoundMediaInfo) Marshal Uses

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

func (SoundMediaInfo) Tag Uses

func (self SoundMediaInfo) Tag() Tag

func (*SoundMediaInfo) Unmarshal Uses

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

type SyncSample Uses

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

func (SyncSample) Children Uses

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

func (SyncSample) Len Uses

func (self SyncSample) Len() (n int)

func (SyncSample) Marshal Uses

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

func (SyncSample) String Uses

func (self SyncSample) String() string

func (SyncSample) Tag Uses

func (self SyncSample) Tag() Tag

func (*SyncSample) Unmarshal Uses

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

type Tag Uses

type Tag uint32

func StringToTag Uses

func StringToTag(tag string) Tag

func (Tag) String Uses

func (self Tag) String() string

type TimeToSample Uses

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

func (TimeToSample) Children Uses

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

func (TimeToSample) Len Uses

func (self TimeToSample) Len() (n int)

func (TimeToSample) Marshal Uses

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

func (TimeToSample) String Uses

func (self TimeToSample) String() string

func (TimeToSample) Tag Uses

func (self TimeToSample) Tag() Tag

func (*TimeToSample) Unmarshal Uses

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

type TimeToSampleEntry Uses

type TimeToSampleEntry struct {
    Count    uint32
    Duration uint32
}

func GetTimeToSampleEntry Uses

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

type Track Uses

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

func (Track) Children Uses

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

func (*Track) GetAVC1Conf Uses

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

func (*Track) GetElemStreamDesc Uses

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

func (Track) Len Uses

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

func (Track) Marshal Uses

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

func (Track) Tag Uses

func (self Track) Tag() Tag

func (*Track) Unmarshal Uses

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

type TrackExtend Uses

type TrackExtend struct {
    Version               uint8
    Flags                 uint32
    TrackId               uint32
    DefaultSampleDescIdx  uint32
    DefaultSampleDuration uint32
    DefaultSampleSize     uint32
    DefaultSampleFlags    uint32
    AtomPos
}

func (TrackExtend) Children Uses

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

func (TrackExtend) Len Uses

func (self TrackExtend) Len() (n int)

func (TrackExtend) Marshal Uses

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

func (TrackExtend) Tag Uses

func (self TrackExtend) Tag() Tag

func (*TrackExtend) Unmarshal Uses

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

type TrackFrag Uses

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

func (TrackFrag) Children Uses

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

func (TrackFrag) Len Uses

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

func (TrackFrag) Marshal Uses

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

func (TrackFrag) Tag Uses

func (self TrackFrag) Tag() Tag

func (*TrackFrag) Unmarshal Uses

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

type TrackFragDecodeTime Uses

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

func (TrackFragDecodeTime) Children Uses

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

func (TrackFragDecodeTime) Len Uses

func (self TrackFragDecodeTime) Len() (n int)

func (TrackFragDecodeTime) Marshal Uses

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

func (TrackFragDecodeTime) Tag Uses

func (self TrackFragDecodeTime) Tag() Tag

func (*TrackFragDecodeTime) Unmarshal Uses

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

type TrackFragHeader Uses

type TrackFragHeader struct {
    Version         uint8
    Flags           uint32
    BaseDataOffset  uint64
    StsdId          uint32
    DefaultDuration uint32
    DefaultSize     uint32
    DefaultFlags    uint32
    AtomPos
}

func (TrackFragHeader) Children Uses

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

func (TrackFragHeader) Len Uses

func (self TrackFragHeader) Len() (n int)

func (TrackFragHeader) Marshal Uses

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

func (TrackFragHeader) String Uses

func (self TrackFragHeader) String() string

func (TrackFragHeader) Tag Uses

func (self TrackFragHeader) Tag() Tag

func (*TrackFragHeader) Unmarshal Uses

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

type TrackFragRun Uses

type TrackFragRun struct {
    Version          uint8
    Flags            uint32
    DataOffset       uint32
    FirstSampleFlags uint32
    Entries          []TrackFragRunEntry
    AtomPos
}

func (TrackFragRun) Children Uses

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

func (TrackFragRun) Len Uses

func (self TrackFragRun) Len() (n int)

func (TrackFragRun) Marshal Uses

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

func (TrackFragRun) String Uses

func (self TrackFragRun) String() string

func (TrackFragRun) Tag Uses

func (self TrackFragRun) Tag() Tag

func (*TrackFragRun) Unmarshal Uses

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

type TrackFragRunEntry Uses

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

func GetTrackFragRunEntry Uses

func GetTrackFragRunEntry(b []byte) (self TrackFragRunEntry)

type TrackHeader Uses

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 Uses

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

func (TrackHeader) Len Uses

func (self TrackHeader) Len() (n int)

func (TrackHeader) Marshal Uses

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

func (TrackHeader) Tag Uses

func (self TrackHeader) Tag() Tag

func (*TrackHeader) Unmarshal Uses

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

type VideoMediaInfo Uses

type VideoMediaInfo struct {
    Version      uint8
    Flags        uint32
    GraphicsMode int16
    Opcolor      [3]int16
    AtomPos
}

func (VideoMediaInfo) Children Uses

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

func (VideoMediaInfo) Len Uses

func (self VideoMediaInfo) Len() (n int)

func (VideoMediaInfo) Marshal Uses

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

func (VideoMediaInfo) Tag Uses

func (self VideoMediaInfo) Tag() Tag

func (*VideoMediaInfo) Unmarshal Uses

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

Directories

PathSynopsis
gen

Package mp4io imports 7 packages (graph) and is imported by 5 packages. Updated 2018-07-30. Refresh now. Tools for package owners.