Documentation ¶
Index ¶
- Constants
- type Audio
- type AudioDecoder
- type BlockGroup
- type Cluster
- type CuePoint
- type CueTrackPositions
- type Cues
- type Decoder
- type Frame
- type Header
- type Packet
- type Reader
- type Samples
- type Seek
- type SeekHead
- type Segment
- type SegmentInformation
- type Slices
- type Splitter
- type Stream
- type TimeSlice
- type TrackEntry
- type Tracks
- type Video
- type VideoDecoder
- type WebM
Constants ¶
View Source
const (
BadTC = time.Duration(-1000000000000000)
)
View Source
const (
MAXSTREAMS = 16
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioDecoder ¶
type AudioDecoder struct { Chan chan Samples // contains filtered or unexported fields }
func NewAudioDecoder ¶
func NewAudioDecoder(track *TrackEntry) *AudioDecoder
func (*AudioDecoder) Close ¶
func (d *AudioDecoder) Close()
func (*AudioDecoder) Decode ¶
func (d *AudioDecoder) Decode(pkt *Packet) bool
type BlockGroup ¶
type Cluster ¶
type Cluster struct { Timecode uint `ebml:"E7"` PrevSize uint `ebml:"AB"` Position uint `ebml:"A7"` BlockGroup BlockGroup `ebml:"A0" ebmlstop:"1"` // contains filtered or unexported fields }
type CuePoint ¶
type CuePoint struct { CueTime int64 `ebml:"B3"` CueTrackPositions []CueTrackPositions `ebml:"B7"` }
type CueTrackPositions ¶
type Header ¶
type Header struct { EBMLVersion uint `ebml:"4286" ebmldef:"1"` EBMLReadVersion uint `ebml:"42f7" ebmldef:"1"` EBMLMaxIDLength uint `ebml:"42f2" ebmldef:"4"` EBMLMaxSizeLength uint `ebml:"42f3" ebmldef:"8"` DocType string `ebml:"4282"` DocTypeVersion uint `ebml:"4287" ebmldef:"1"` DocTypeReadVersion uint `ebml:"4285" ebmldef:"1"` }
type Segment ¶
type Segment struct { SeekHead `ebml:"114D9B74" ebmlstop:"1"` SegmentInformation `ebml:"1549A966"` Tracks `ebml:"1654AE6B"` Cues `ebml:"1C53BB6B"` // contains filtered or unexported fields }
type SegmentInformation ¶
type SegmentInformation struct { TimecodeScale uint `ebml:"2AD7B1" ebmldef:"1000000"` Duration float64 `ebml:"4489"` DateUTC []byte `ebml:"4461"` MuxingApp string `ebml:"4D80"` WritingApp string `ebml:"5741"` }
func (*SegmentInformation) GetDuration ¶
func (s *SegmentInformation) GetDuration() time.Duration
type Splitter ¶
type Splitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶
type Stream ¶
type Stream struct { Track *TrackEntry Decoder Decoder }
func NewStream ¶
func NewStream(track *TrackEntry) *Stream
func (*Stream) AudioChannel ¶
func (*Stream) VideoChannel ¶
type TrackEntry ¶
type TrackEntry struct { TrackNumber uint `ebml:"D7"` TrackUID uint64 `ebml:"73C5"` TrackType uint `ebml:"83"` FlagEnabled uint `ebml:"B9" ebmldef:"1"` FlagDefault uint `ebml:"88" ebmldef:"1"` FlagForced uint `ebml:"55AA" ebmldef:"0"` FlagLacing uint `ebml:"9C" ebmldef:"1"` DefaultDuration uint64 `ebml:"23E383"` Name string `ebml:"536E"` Language string `ebml:"22B59C" ebmldef:"eng"` CodecID string `ebml:"86"` CodecPrivate []byte `ebml:"63A2"` CodecName string `ebml:"258688"` Video `ebml:"E0"` Audio `ebml:"E1"` }
func (*TrackEntry) GetDefaultDuration ¶
func (t *TrackEntry) GetDefaultDuration() time.Duration
func (*TrackEntry) IsAudio ¶
func (t *TrackEntry) IsAudio() bool
func (*TrackEntry) IsVideo ¶
func (t *TrackEntry) IsVideo() bool
type Tracks ¶
type Tracks struct {
TrackEntry []TrackEntry `ebml:"AE"`
}
type Video ¶
type Video struct { FlagInterlaced uint `ebml:"9A" ebmldef:"0"` StereoMode uint `ebml:"53B8" ebmldef:"0"` PixelWidth uint `ebml:"B0"` PixelHeight uint `ebml:"BA"` PixelCropBottom uint `ebml:"54AA" ebmldef:"0"` PixelCropTop uint `ebml:"54BB" ebmldef:"0"` PixelCropLeft uint `ebml:"54CC" ebmldef:"0"` PixelCropRight uint `ebml:"54DD" ebmldef:"0"` DisplayWidth uint `ebml:"54B0" ebmldeflink:"PixelWidth"` DisplayHeight uint `ebml:"54BA" ebmldeflink:"PixelHeight"` DisplayUnit uint `ebml:"54B2" ebmldef:"0"` AspectRatioType uint `ebml:"54B3" ebmldef:"0"` }
type VideoDecoder ¶
type VideoDecoder struct { Chan chan Frame // contains filtered or unexported fields }
func NewVideoDecoder ¶
func NewVideoDecoder(track *TrackEntry) *VideoDecoder
func (*VideoDecoder) Close ¶
func (d *VideoDecoder) Close()
func (*VideoDecoder) Decode ¶
func (d *VideoDecoder) Decode(pkt *Packet) bool
type WebM ¶
func (*WebM) FindFirstAudioTrack ¶
func (w *WebM) FindFirstAudioTrack() *TrackEntry
func (*WebM) FindFirstVideoTrack ¶
func (w *WebM) FindFirstVideoTrack() *TrackEntry
Click to show internal directories.
Click to hide internal directories.