Documentation ¶
Index ¶
- Constants
- type AVPacket
- type AudioSampleEntry
- type BaseDescriptor
- type BasicBox
- type BoxDecoder
- type BoxEncoder
- type BoxSize
- type ChannelMappingTable
- type ChunkLargeOffsetBox
- type ChunkOffsetBox
- type CompositionOffsetBox
- type EditListBox
- type FileTypeBox
- type FreeBox
- type FullBox
- type HandlerBox
- type HandlerType
- type HintMediaHeaderBox
- type HintSampleEntry
- type MP4_CODEC_TYPE
- type MP4_FLAG
- type MediaHeaderBox
- type MovDemuxer
- type MovieFragmentHeaderBox
- type MovieFragmentRandomAccessOffsetBox
- type MovieHeaderBox
- type Movmuxer
- func (muxer *Movmuxer) AddAudioTrack(cid MP4_CODEC_TYPE, options ...TrackOption) uint32
- func (muxer *Movmuxer) AddVideoTrack(cid MP4_CODEC_TYPE, options ...TrackOption) uint32
- func (muxer *Movmuxer) FlushFragment() (err error)
- func (muxer *Movmuxer) OnNewFragment(onFragment OnFragment)
- func (muxer *Movmuxer) ReBindWriter(w io.WriteSeeker)
- func (muxer *Movmuxer) Write(track uint32, data []byte, pts uint64, dts uint64) error
- func (muxer *Movmuxer) WriteInitSegment(w io.Writer) error
- func (muxer *Movmuxer) WriteTrailer() (err error)
- type Mp4Info
- type MuxerOption
- type OnFragment
- type OpusSpecificBox
- type SampleDescriptionBox
- type SampleEntry
- type SampleEntryType
- type SampleSizeBox
- type SampleToChunkBox
- type SegmentIndexBox
- type SencBox
- type SoundMediaHeaderBox
- type SubSample
- type SubSamplePattern
- type SyncSample
- type SyncSampleBox
- type TimeToSampleBox
- type TrackExtendsBox
- type TrackFragmentBaseMediaDecodeTimeBox
- type TrackFragmentHeaderBox
- type TrackFragmentRandomAccessBox
- type TrackHeaderBox
- type TrackInfo
- type TrackOption
- func WithAudioChannelCount(channelCount uint8) TrackOption
- func WithAudioSampleBits(sampleBits uint8) TrackOption
- func WithAudioSampleRate(sampleRate uint32) TrackOption
- func WithExtraData(extraData []byte) TrackOption
- func WithVideoHeight(height uint32) TrackOption
- func WithVideoWidth(width uint32) TrackOption
- type TrackRunBox
- type VideoMediaHeaderBox
- type VisualSampleEntry
Constants ¶
View Source
const ( BasicBoxLen = 8 FullBoxLen = 12 )
View Source
const ( TF_FLAG_BASE_DATA_OFFSET uint32 = 0x000001 TF_FLAG_SAMPLE_DESCRIPTION_INDEX_PRESENT uint32 = 0x000002 TF_FLAG_DEFAULT_SAMPLE_DURATION_PRESENT uint32 = 0x000008 TF_FLAG_DEFAULT_SAMPLE_SIZE_PRESENT uint32 = 0x000010 TF_FLAG_DEAAULT_SAMPLE_FLAGS_PRESENT uint32 = 0x000020 TF_FLAG_DURATION_IS_EMPTY uint32 = 0x010000 TF_FLAG_DEAAULT_BASE_IS_MOOF uint32 = 0x020000 //ffmpeg isom.h MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK uint32 = 0x0000ffff MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC uint32 = 0x00010000 MOV_FRAG_SAMPLE_FLAG_PADDING_MASK uint32 = 0x000e0000 MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK uint32 = 0x00300000 MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK uint32 = 0x00c00000 MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK uint32 = 0x03000000 MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO uint32 = 0x02000000 MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES uint32 = 0x01000000 )
View Source
const ( TR_FLAG_DATA_OFFSET uint32 = 0x000001 TR_FLAG_DATA_FIRST_SAMPLE_FLAGS uint32 = 0x000004 TR_FLAG_DATA_SAMPLE_DURATION uint32 = 0x000100 TR_FLAG_DATA_SAMPLE_SIZE uint32 = 0x000200 TR_FLAG_DATA_SAMPLE_FLAGS uint32 = 0x000400 TR_FLAG_DATA_SAMPLE_COMPOSITION_TIME uint32 = 0x000800 )
View Source
const (
UseSubsampleEncryption uint32 = 0x000002
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AVPacket ¶ added in v1.0.7
type AVPacket struct { Cid MP4_CODEC_TYPE Data []byte TrackId int Pts uint64 Dts uint64 }
type AudioSampleEntry ¶
type AudioSampleEntry struct {
// contains filtered or unexported fields
}
func NewAudioSampleEntry ¶ added in v1.0.7
func NewAudioSampleEntry(format [4]byte) *AudioSampleEntry
func (*AudioSampleEntry) Decode ¶ added in v1.0.7
func (entry *AudioSampleEntry) Decode(r io.Reader) (offset int, err error)
func (*AudioSampleEntry) Encode ¶ added in v1.0.7
func (entry *AudioSampleEntry) Encode() (int, []byte)
func (*AudioSampleEntry) Size ¶ added in v1.0.7
func (entry *AudioSampleEntry) Size() uint64
type BaseDescriptor ¶ added in v1.0.7
type BaseDescriptor struct {
// contains filtered or unexported fields
}
func (*BaseDescriptor) Decode ¶ added in v1.0.7
func (base *BaseDescriptor) Decode(data []byte) *codec.BitStream
func (*BaseDescriptor) Encode ¶ added in v1.0.7
func (base *BaseDescriptor) Encode() []byte
type BasicBox ¶ added in v1.0.7
func NewBasicBox ¶ added in v1.0.7
type BoxDecoder ¶ added in v1.0.7
type BoxEncoder ¶ added in v1.0.7
type ChannelMappingTable ¶ added in v1.0.7
type ChunkLargeOffsetBox ¶ added in v1.0.7
type ChunkLargeOffsetBox struct {
// contains filtered or unexported fields
}
func NewChunkLargeOffsetBox ¶ added in v1.0.7
func NewChunkLargeOffsetBox() *ChunkLargeOffsetBox
func (*ChunkLargeOffsetBox) Decode ¶ added in v1.0.7
func (co64 *ChunkLargeOffsetBox) Decode(r io.Reader) (offset int, err error)
func (*ChunkLargeOffsetBox) Encode ¶ added in v1.0.7
func (co64 *ChunkLargeOffsetBox) Encode() (int, []byte)
func (*ChunkLargeOffsetBox) Size ¶ added in v1.0.7
func (co64 *ChunkLargeOffsetBox) Size() uint64
type ChunkOffsetBox ¶ added in v1.0.7
type ChunkOffsetBox struct {
// contains filtered or unexported fields
}
func NewChunkOffsetBox ¶ added in v1.0.7
func NewChunkOffsetBox() *ChunkOffsetBox
func (*ChunkOffsetBox) Decode ¶ added in v1.0.7
func (stco *ChunkOffsetBox) Decode(r io.Reader) (offset int, err error)
func (*ChunkOffsetBox) Encode ¶ added in v1.0.7
func (stco *ChunkOffsetBox) Encode() (int, []byte)
func (*ChunkOffsetBox) Size ¶ added in v1.0.7
func (stco *ChunkOffsetBox) Size() uint64
type CompositionOffsetBox ¶ added in v1.0.7
type CompositionOffsetBox struct {
// contains filtered or unexported fields
}
func NewCompositionOffsetBox ¶ added in v1.0.7
func NewCompositionOffsetBox() *CompositionOffsetBox
func (*CompositionOffsetBox) Decode ¶ added in v1.0.7
func (ctts *CompositionOffsetBox) Decode(r io.Reader) (offset int, err error)
func (*CompositionOffsetBox) Encode ¶ added in v1.0.7
func (ctts *CompositionOffsetBox) Encode() (int, []byte)
func (*CompositionOffsetBox) Size ¶ added in v1.0.7
func (ctts *CompositionOffsetBox) Size() uint64
type EditListBox ¶ added in v1.0.7
type EditListBox struct {
// contains filtered or unexported fields
}
func NewEditListBox ¶ added in v1.0.7
func NewEditListBox(version uint32) *EditListBox
func (*EditListBox) Decode ¶ added in v1.0.7
func (elst *EditListBox) Decode(r io.Reader) (offset int, err error)
func (*EditListBox) Encode ¶ added in v1.0.7
func (elst *EditListBox) Encode() (int, []byte)
type FileTypeBox ¶ added in v1.0.7
type FileTypeBox struct { Box *BasicBox Major_brand uint32 Minor_version uint32 Compatible_brands []uint32 }
func NewFileTypeBox ¶ added in v1.0.7
func NewFileTypeBox() *FileTypeBox
func NewSegmentTypeBox ¶ added in v1.0.7
func NewSegmentTypeBox() *FileTypeBox
func (*FileTypeBox) Encode ¶ added in v1.0.7
func (ftyp *FileTypeBox) Encode() (int, []byte)
func (*FileTypeBox) Size ¶ added in v1.0.7
func (ftyp *FileTypeBox) Size() uint64
type FreeBox ¶ added in v1.0.7
func NewFreeBox ¶ added in v1.0.7
func NewFreeBox() *FreeBox
type FullBox ¶
func NewFullBox ¶ added in v1.0.7
type HandlerBox ¶ added in v1.0.7
type HandlerBox struct { Box *FullBox Handler_type HandlerType Name string }
func NewHandlerBox ¶ added in v1.0.7
func NewHandlerBox(handlerType HandlerType, name string) *HandlerBox
func (*HandlerBox) Encode ¶ added in v1.0.7
func (hdlr *HandlerBox) Encode() (int, []byte)
func (*HandlerBox) Size ¶ added in v1.0.7
func (hdlr *HandlerBox) Size() uint64
type HandlerType ¶ added in v1.0.7
type HandlerType [4]byte
type HintMediaHeaderBox ¶ added in v1.0.7
type HintMediaHeaderBox struct { Box *FullBox MaxPDUsize uint16 AvgPDUsize uint16 Maxbitrate uint32 Avgbitrate uint32 }
func NewHintMediaHeaderBox ¶ added in v1.0.7
func NewHintMediaHeaderBox() *HintMediaHeaderBox
func (*HintMediaHeaderBox) Decode ¶ added in v1.0.7
func (hmhd *HintMediaHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*HintMediaHeaderBox) Encode ¶ added in v1.0.7
func (hmhd *HintMediaHeaderBox) Encode() (int, []byte)
func (*HintMediaHeaderBox) Size ¶ added in v1.0.7
func (hmhd *HintMediaHeaderBox) Size() uint64
type HintSampleEntry ¶ added in v1.0.7
type HintSampleEntry struct { Entry *SampleEntry Data byte }
type MP4_CODEC_TYPE ¶ added in v1.0.7
type MP4_CODEC_TYPE int
const ( MP4_CODEC_H264 MP4_CODEC_TYPE = iota + 1 MP4_CODEC_H265 MP4_CODEC_AAC MP4_CODEC_TYPE = iota + 100 MP4_CODEC_G711A MP4_CODEC_G711U MP4_CODEC_MP2 MP4_CODEC_MP3 MP4_CODEC_OPUS )
type MediaHeaderBox ¶ added in v1.0.7
type MediaHeaderBox struct { Box *FullBox Creation_time uint64 Modification_time uint64 Timescale uint32 Duration uint64 Pad uint8 Language [3]uint8 Pre_defined uint16 }
func NewMediaHeaderBox ¶ added in v1.0.7
func NewMediaHeaderBox() *MediaHeaderBox
func (*MediaHeaderBox) Decode ¶ added in v1.0.7
func (mdhd *MediaHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*MediaHeaderBox) Encode ¶ added in v1.0.7
func (mdhd *MediaHeaderBox) Encode() (int, []byte)
func (*MediaHeaderBox) Size ¶ added in v1.0.7
func (mdhd *MediaHeaderBox) Size() uint64
type MovDemuxer ¶ added in v1.0.7
type MovDemuxer struct { OnRawSample func(cid MP4_CODEC_TYPE, sample []byte, subSample *SubSample) error // contains filtered or unexported fields }
func CreateMp4Demuxer ¶ added in v1.0.7
func CreateMp4Demuxer(r io.ReadSeeker) *MovDemuxer
func (*MovDemuxer) GetMp4Info ¶ added in v1.0.7
func (demuxer *MovDemuxer) GetMp4Info() Mp4Info
func (*MovDemuxer) GetSyncTable ¶ added in v1.0.7
func (demuxer *MovDemuxer) GetSyncTable(trackId uint32) ([]SyncSample, error)
func (*MovDemuxer) ReadHead ¶ added in v1.0.7
func (demuxer *MovDemuxer) ReadHead() ([]TrackInfo, error)
func (*MovDemuxer) ReadPacket ¶ added in v1.0.7
func (demuxer *MovDemuxer) ReadPacket() (*AVPacket, error)
/return error == io.EOF, means read mp4 file completed
func (*MovDemuxer) SeekTime ¶ added in v1.0.7
func (demuxer *MovDemuxer) SeekTime(dts uint64) error
type MovieFragmentHeaderBox ¶ added in v1.0.7
func NewMovieFragmentHeaderBox ¶ added in v1.0.7
func NewMovieFragmentHeaderBox(sequence uint32) *MovieFragmentHeaderBox
func (*MovieFragmentHeaderBox) Decode ¶ added in v1.0.7
func (mfhd *MovieFragmentHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*MovieFragmentHeaderBox) Encode ¶ added in v1.0.7
func (mfhd *MovieFragmentHeaderBox) Encode() (int, []byte)
func (*MovieFragmentHeaderBox) Size ¶ added in v1.0.7
func (mfhd *MovieFragmentHeaderBox) Size() uint64
type MovieFragmentRandomAccessOffsetBox ¶ added in v1.0.7
func NewMovieFragmentRandomAccessOffsetBox ¶ added in v1.0.7
func NewMovieFragmentRandomAccessOffsetBox(size uint32) *MovieFragmentRandomAccessOffsetBox
func (*MovieFragmentRandomAccessOffsetBox) Decode ¶ added in v1.0.7
func (mfro *MovieFragmentRandomAccessOffsetBox) Decode(r io.Reader) (offset int, err error)
func (*MovieFragmentRandomAccessOffsetBox) Encode ¶ added in v1.0.7
func (mfro *MovieFragmentRandomAccessOffsetBox) Encode() (int, []byte)
func (*MovieFragmentRandomAccessOffsetBox) Size ¶ added in v1.0.7
func (mfro *MovieFragmentRandomAccessOffsetBox) Size() uint64
type MovieHeaderBox ¶ added in v1.0.7
type MovieHeaderBox struct { Box *FullBox Creation_time uint64 Modification_time uint64 Timescale uint32 Duration uint64 Rate uint32 Volume uint16 Matrix [9]uint32 Pre_defined [6]uint32 Next_track_ID uint32 }
func NewMovieHeaderBox ¶ added in v1.0.7
func NewMovieHeaderBox() *MovieHeaderBox
func (*MovieHeaderBox) Decode ¶ added in v1.0.7
func (mvhd *MovieHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*MovieHeaderBox) Encode ¶ added in v1.0.7
func (mvhd *MovieHeaderBox) Encode() (int, []byte)
func (*MovieHeaderBox) Size ¶ added in v1.0.7
func (mvhd *MovieHeaderBox) Size() uint64
type Movmuxer ¶ added in v1.0.7
type Movmuxer struct {
// contains filtered or unexported fields
}
func CreateMp4Muxer ¶ added in v1.0.7
func CreateMp4Muxer(w io.WriteSeeker, options ...MuxerOption) (*Movmuxer, error)
func (*Movmuxer) AddAudioTrack ¶ added in v1.0.7
func (muxer *Movmuxer) AddAudioTrack(cid MP4_CODEC_TYPE, options ...TrackOption) uint32
func (*Movmuxer) AddVideoTrack ¶ added in v1.0.7
func (muxer *Movmuxer) AddVideoTrack(cid MP4_CODEC_TYPE, options ...TrackOption) uint32
func (*Movmuxer) FlushFragment ¶ added in v1.0.7
func (*Movmuxer) OnNewFragment ¶ added in v1.0.7
func (muxer *Movmuxer) OnNewFragment(onFragment OnFragment)
func (*Movmuxer) ReBindWriter ¶ added in v1.0.7
func (muxer *Movmuxer) ReBindWriter(w io.WriteSeeker)
func (*Movmuxer) WriteInitSegment ¶ added in v1.0.7
func (*Movmuxer) WriteTrailer ¶ added in v1.0.7
type MuxerOption ¶ added in v1.0.7
type MuxerOption func(muxer *Movmuxer)
func WithMp4Flag ¶ added in v1.0.7
func WithMp4Flag(f MP4_FLAG) MuxerOption
type OnFragment ¶ added in v1.0.7
type OpusSpecificBox ¶ added in v1.0.7
type OpusSpecificBox struct { Box *BasicBox Version uint8 OutputChannelCount uint8 PreSkip uint16 InputSampleRate uint32 OutputGain int16 ChanMapTable *ChannelMappingTable }
func NewdOpsBox ¶ added in v1.0.7
func NewdOpsBox() *OpusSpecificBox
func (*OpusSpecificBox) Encode ¶ added in v1.0.7
func (dops *OpusSpecificBox) Encode() (int, []byte)
func (*OpusSpecificBox) Size ¶ added in v1.0.7
func (dops *OpusSpecificBox) Size() uint64
type SampleDescriptionBox ¶ added in v1.0.7
type SampleDescriptionBox struct {
// contains filtered or unexported fields
}
func NewSampleDescriptionBox ¶ added in v1.0.7
func NewSampleDescriptionBox() *SampleDescriptionBox
func (*SampleDescriptionBox) Decode ¶ added in v1.0.7
func (stsd *SampleDescriptionBox) Decode(r io.Reader) (offset int, err error)
func (*SampleDescriptionBox) Encode ¶ added in v1.0.7
func (entry *SampleDescriptionBox) Encode() (int, []byte)
func (*SampleDescriptionBox) Size ¶ added in v1.0.7
func (stsd *SampleDescriptionBox) Size() uint64
type SampleEntry ¶
type SampleEntry struct {
// contains filtered or unexported fields
}
func NewSampleEntry ¶ added in v1.0.7
func NewSampleEntry(format [4]byte) *SampleEntry
func (*SampleEntry) Decode ¶ added in v1.0.7
func (entry *SampleEntry) Decode(r io.Reader) (offset int, err error)
func (*SampleEntry) Encode ¶ added in v1.0.7
func (entry *SampleEntry) Encode() (int, []byte)
func (*SampleEntry) Size ¶ added in v1.0.7
func (entry *SampleEntry) Size() uint64
type SampleEntryType ¶ added in v1.0.7
type SampleEntryType uint8
const ( SAMPLE_AUDIO SampleEntryType = iota SAMPLE_VIDEO )
type SampleSizeBox ¶ added in v1.0.7
type SampleSizeBox struct {
// contains filtered or unexported fields
}
func NewSampleSizeBox ¶ added in v1.0.7
func NewSampleSizeBox() *SampleSizeBox
func (*SampleSizeBox) Decode ¶ added in v1.0.7
func (stsz *SampleSizeBox) Decode(r io.Reader) (offset int, err error)
func (*SampleSizeBox) Encode ¶ added in v1.0.7
func (stsz *SampleSizeBox) Encode() (int, []byte)
func (*SampleSizeBox) Size ¶ added in v1.0.7
func (stsz *SampleSizeBox) Size() uint64
type SampleToChunkBox ¶ added in v1.0.7
type SampleToChunkBox struct {
// contains filtered or unexported fields
}
func NewSampleToChunkBox ¶ added in v1.0.7
func NewSampleToChunkBox() *SampleToChunkBox
func (*SampleToChunkBox) Decode ¶ added in v1.0.7
func (stsc *SampleToChunkBox) Decode(r io.Reader) (offset int, err error)
func (*SampleToChunkBox) Encode ¶ added in v1.0.7
func (stsc *SampleToChunkBox) Encode() (int, []byte)
func (*SampleToChunkBox) Size ¶ added in v1.0.7
func (stsc *SampleToChunkBox) Size() uint64
type SegmentIndexBox ¶ added in v1.0.7
type SegmentIndexBox struct { Box *FullBox ReferenceID uint32 TimeScale uint32 EarliestPresentationTime uint64 FirstOffset uint64 ReferenceCount uint16 Entrys []sidxEntry }
func NewSegmentIndexBox ¶ added in v1.0.7
func NewSegmentIndexBox() *SegmentIndexBox
func (*SegmentIndexBox) Decode ¶ added in v1.0.7
func (sidx *SegmentIndexBox) Decode(r io.Reader) (offset int, err error)
func (*SegmentIndexBox) Encode ¶ added in v1.0.7
func (sidx *SegmentIndexBox) Encode() (int, []byte)
func (*SegmentIndexBox) Size ¶ added in v1.0.7
func (sidx *SegmentIndexBox) Size() uint64
type SencBox ¶ added in v1.0.7
SencBox - Sample Encryption Box (senc) (in trak or traf box) See ISO/IEC 23001-7 Section 7.2 and CMAF specification Full Box + SampleCount
type SoundMediaHeaderBox ¶ added in v1.0.7
func NewSoundMediaHeaderBox ¶ added in v1.0.7
func NewSoundMediaHeaderBox() *SoundMediaHeaderBox
func (*SoundMediaHeaderBox) Decode ¶ added in v1.0.7
func (smhd *SoundMediaHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*SoundMediaHeaderBox) Encode ¶ added in v1.0.7
func (smhd *SoundMediaHeaderBox) Encode() (int, []byte)
func (*SoundMediaHeaderBox) Size ¶ added in v1.0.7
func (smhd *SoundMediaHeaderBox) Size() uint64
type SubSamplePattern ¶ added in v1.0.7
type SyncSample ¶ added in v1.0.7
type SyncSampleBox ¶ added in v1.0.7
type SyncSampleBox struct {
// contains filtered or unexported fields
}
func NewSyncSampleBox ¶ added in v1.0.7
func NewSyncSampleBox() *SyncSampleBox
func (*SyncSampleBox) Decode ¶ added in v1.0.7
func (stss *SyncSampleBox) Decode(r io.Reader) (offset int, err error)
func (*SyncSampleBox) Encode ¶ added in v1.0.7
func (stss *SyncSampleBox) Encode() (int, []byte)
func (*SyncSampleBox) Size ¶ added in v1.0.7
func (stss *SyncSampleBox) Size() uint64
type TimeToSampleBox ¶ added in v1.0.7
type TimeToSampleBox struct {
// contains filtered or unexported fields
}
func NewTimeToSampleBox ¶ added in v1.0.7
func NewTimeToSampleBox() *TimeToSampleBox
func (*TimeToSampleBox) Decode ¶ added in v1.0.7
func (stts *TimeToSampleBox) Decode(r io.Reader) (offset int, err error)
func (*TimeToSampleBox) Encode ¶ added in v1.0.7
func (stts *TimeToSampleBox) Encode() (int, []byte)
func (*TimeToSampleBox) Size ¶ added in v1.0.7
func (stts *TimeToSampleBox) Size() uint64
type TrackExtendsBox ¶ added in v1.0.7
type TrackExtendsBox struct { Box *FullBox TrackID uint32 DefaultSampleDescriptionIndex uint32 DefaultSampleDuration uint32 DefaultSampleSize uint32 DefaultSampleFlags uint32 }
func NewTrackExtendsBox ¶ added in v1.0.7
func NewTrackExtendsBox(track uint32) *TrackExtendsBox
func (*TrackExtendsBox) Decode ¶ added in v1.0.7
func (trex *TrackExtendsBox) Decode(r io.Reader) (offset int, err error)
func (*TrackExtendsBox) Encode ¶ added in v1.0.7
func (trex *TrackExtendsBox) Encode() (int, []byte)
func (*TrackExtendsBox) Size ¶ added in v1.0.7
func (trex *TrackExtendsBox) Size() uint64
type TrackFragmentBaseMediaDecodeTimeBox ¶ added in v1.0.7
func NewTrackFragmentBaseMediaDecodeTimeBox ¶ added in v1.0.7
func NewTrackFragmentBaseMediaDecodeTimeBox(fragStart uint64) *TrackFragmentBaseMediaDecodeTimeBox
func (*TrackFragmentBaseMediaDecodeTimeBox) Encode ¶ added in v1.0.7
func (tfdt *TrackFragmentBaseMediaDecodeTimeBox) Encode() (int, []byte)
func (*TrackFragmentBaseMediaDecodeTimeBox) Size ¶ added in v1.0.7
func (tfdt *TrackFragmentBaseMediaDecodeTimeBox) Size() uint64
type TrackFragmentHeaderBox ¶ added in v1.0.7
type TrackFragmentHeaderBox struct { Box *FullBox Track_ID uint32 BaseDataOffset uint64 SampleDescriptionIndex uint32 DefaultSampleDuration uint32 DefaultSampleSize uint32 DefaultSampleFlags uint32 }
func NewTrackFragmentHeaderBox ¶ added in v1.0.7
func NewTrackFragmentHeaderBox(trackid uint32) *TrackFragmentHeaderBox
func (*TrackFragmentHeaderBox) Encode ¶ added in v1.0.7
func (tfhd *TrackFragmentHeaderBox) Encode() (int, []byte)
func (*TrackFragmentHeaderBox) Size ¶ added in v1.0.7
func (tfhd *TrackFragmentHeaderBox) Size() uint64
type TrackFragmentRandomAccessBox ¶ added in v1.0.7
type TrackFragmentRandomAccessBox struct { Box *FullBox TrackID uint32 LengthSizeOfTrafNum uint8 LengthSizeOfTrunNum uint8 LengthSizeOfSampleNum uint8 NumberOfEntry uint32 FragEntrys *movtfra }
func NewTrackFragmentRandomAccessBox ¶ added in v1.0.7
func NewTrackFragmentRandomAccessBox(trackid uint32) *TrackFragmentRandomAccessBox
func (*TrackFragmentRandomAccessBox) Decode ¶ added in v1.0.7
func (tfra *TrackFragmentRandomAccessBox) Decode(r io.Reader) (offset int, err error)
func (*TrackFragmentRandomAccessBox) Encode ¶ added in v1.0.7
func (tfra *TrackFragmentRandomAccessBox) Encode() (int, []byte)
func (*TrackFragmentRandomAccessBox) Size ¶ added in v1.0.7
func (tfra *TrackFragmentRandomAccessBox) Size() uint64
type TrackHeaderBox ¶ added in v1.0.7
type TrackHeaderBox struct { Box *FullBox Creation_time uint64 Modification_time uint64 Track_ID uint32 Duration uint64 Layer uint16 Alternate_group uint16 Volume uint16 Matrix [9]uint32 Width uint32 Height uint32 }
func NewTrackHeaderBox ¶ added in v1.0.7
func NewTrackHeaderBox() *TrackHeaderBox
func (*TrackHeaderBox) Decode ¶ added in v1.0.7
func (tkhd *TrackHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*TrackHeaderBox) Encode ¶ added in v1.0.7
func (tkhd *TrackHeaderBox) Encode() (int, []byte)
func (*TrackHeaderBox) Size ¶ added in v1.0.7
func (tkhd *TrackHeaderBox) Size() uint64
type TrackOption ¶ added in v1.0.7
type TrackOption func(track *mp4track)
func WithAudioChannelCount ¶ added in v1.0.7
func WithAudioChannelCount(channelCount uint8) TrackOption
func WithAudioSampleBits ¶ added in v1.0.7
func WithAudioSampleBits(sampleBits uint8) TrackOption
func WithAudioSampleRate ¶ added in v1.0.7
func WithAudioSampleRate(sampleRate uint32) TrackOption
func WithExtraData ¶ added in v1.0.7
func WithExtraData(extraData []byte) TrackOption
func WithVideoHeight ¶ added in v1.0.7
func WithVideoHeight(height uint32) TrackOption
func WithVideoWidth ¶ added in v1.0.7
func WithVideoWidth(width uint32) TrackOption
type TrackRunBox ¶ added in v1.0.7
type TrackRunBox struct { Box *FullBox SampleCount uint32 Dataoffset int32 FirstSampleFlags uint32 EntryList *movtrun }
func NewTrackRunBox ¶ added in v1.0.7
func NewTrackRunBox() *TrackRunBox
func (*TrackRunBox) Encode ¶ added in v1.0.7
func (trun *TrackRunBox) Encode() (int, []byte)
func (*TrackRunBox) Size ¶ added in v1.0.7
func (trun *TrackRunBox) Size() uint64
type VideoMediaHeaderBox ¶ added in v1.0.7
func NewVideoMediaHeaderBox ¶ added in v1.0.7
func NewVideoMediaHeaderBox() *VideoMediaHeaderBox
func (*VideoMediaHeaderBox) Decode ¶ added in v1.0.7
func (vmhd *VideoMediaHeaderBox) Decode(r io.Reader) (offset int, err error)
func (*VideoMediaHeaderBox) Encode ¶ added in v1.0.7
func (vmhd *VideoMediaHeaderBox) Encode() (int, []byte)
func (*VideoMediaHeaderBox) Size ¶ added in v1.0.7
func (vmhd *VideoMediaHeaderBox) Size() uint64
type VisualSampleEntry ¶
type VisualSampleEntry struct {
// contains filtered or unexported fields
}
func NewVisualSampleEntry ¶ added in v1.0.7
func NewVisualSampleEntry(format [4]byte) *VisualSampleEntry
func (*VisualSampleEntry) Decode ¶ added in v1.0.7
func (entry *VisualSampleEntry) Decode(r io.Reader) (offset int, err error)
func (*VisualSampleEntry) Encode ¶ added in v1.0.7
func (entry *VisualSampleEntry) Encode() (int, []byte)
func (*VisualSampleEntry) Size ¶ added in v1.0.7
func (entry *VisualSampleEntry) Size() uint64
Source Files ¶
- box.go
- ctts-box.go
- dinf-box.go
- dops-box.go
- edts-box.go
- esds-box.go
- free-box.go
- frma-box.go
- ftyp-box.go
- hdlr-box.go
- hmhd-box.go
- mdhd-box.go
- mdia-box.go
- mfhd-box.go
- mfro-box.go
- minf-box.go
- mp4-codec.go
- mp4demuxer.go
- mp4muxer.go
- mp4table.go
- mp4track.go
- mvex-box.go
- mvhd-box.go
- senc-box.go
- sidx-box.go
- smhd-box.go
- stbl-box.go
- stco-box.go
- stsc-box.go
- stsd-box.go
- stss-box.go
- stsz-box.go
- stts-box.go
- tenc-box.go
- tfdt-box.go
- tfhd-box.go
- tfra-box.go
- tkhd-box.go
- traf-box.go
- trak-box.go
- trex-box.go
- trun-box.go
- vmhd-box.go
Click to show internal directories.
Click to hide internal directories.