Documentation
¶
Index ¶
- Constants
- Variables
- func FillPESHeader(h []byte, streamid uint8, datalen int, pts, dts time.Duration) (n int)
- func FillPSI(h []byte, tableid uint8, tableext uint16, datalen int) (n int)
- func PCRToTime(pcr uint64) (tm time.Duration)
- func ParsePESHeader(h []byte) (hdrlen int, streamid uint8, datalen int, pts, dts time.Duration, err error)
- func ParsePSI(h []byte) (tableid uint8, tableext uint16, hdrlen int, datalen int, err error)
- func ParseTSHeader(tshdr []byte) (pid uint16, start bool, iskeyframe bool, hdrlen int, err error)
- func TimeToPCR(tm time.Duration) (pcr uint64)
- func TimeToTs(tm time.Duration) (v uint64)
- func TsToTime(v uint64) (tm time.Duration)
- type Descriptor
- type ElementaryStreamInfo
- type PAT
- type PATEntry
- type PMT
- type TSWriter
Constants ¶
View Source
const ( StreamIdH264 = 0xe0 StreamIdAAC = 0xc0 )
View Source
const ( PAT_PID = 0 PMT_PID = 0x1000 )
View Source
const ( TableIdPMT = 2 TableExtPMT = 1 )
View Source
const ( TableIdPAT = 0 TableExtPAT = 1 )
View Source
const ( MaxPESHeaderLength = 19 MaxTSHeaderLength = 12 )
View Source
const ( ElementaryStreamTypeH264 = 0x1B ElementaryStreamTypeAdtsAAC = 0x0F )
View Source
const ( PTS_HZ = 90000 PCR_HZ = 27000000 )
View Source
const PSIHeaderLength = 9
Variables ¶
Functions ¶
func FillPESHeader ¶
func ParsePESHeader ¶
func ParseTSHeader ¶
Types ¶
type Descriptor ¶
type ElementaryStreamInfo ¶
type ElementaryStreamInfo struct { StreamType uint8 ElementaryPID uint16 Descriptors []Descriptor }
type PMT ¶
type PMT struct { PCRPID uint16 ProgramDescriptors []Descriptor ElementaryStreamInfos []ElementaryStreamInfo }
type TSWriter ¶
type TSWriter struct { ContinuityCounter uint // contains filtered or unexported fields }
func NewTSWriter ¶
Click to show internal directories.
Click to hide internal directories.