Versions in this module Expand all Collapse all v0 v0.0.8 Apr 1, 2019 Changes in this version + const ElementaryStreamTypeAdtsAAC + const ElementaryStreamTypeH264 + const MaxPESHeaderLength + const MaxTSHeaderLength + const PAT_PID + const PCR_HZ + const PMT_PID + const PSIHeaderLength + const PTS_HZ + const StreamIdAAC + const StreamIdH264 + const TableExtPAT + const TableExtPMT + const TableIdPAT + const TableIdPMT + var ErrPESHeader = fmt.Errorf("invalid PES header") + var ErrPSIHeader = fmt.Errorf("invalid PSI header") + var ErrParsePAT = fmt.Errorf("invalid PAT") + var ErrParsePMT = fmt.Errorf("invalid PMT") + 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 struct + Data []byte + Tag uint8 + type ElementaryStreamInfo struct + Descriptors []Descriptor + ElementaryPID uint16 + StreamType uint8 + type PAT struct + Entries []PATEntry + func (self *PAT) Unmarshal(b []byte) (n int, err error) + func (self PAT) Len() (n int) + func (self PAT) Marshal(b []byte) (n int) + type PATEntry struct + NetworkPID uint16 + ProgramMapPID uint16 + ProgramNumber uint16 + type PMT struct + ElementaryStreamInfos []ElementaryStreamInfo + PCRPID uint16 + ProgramDescriptors []Descriptor + func (self *PMT) Unmarshal(b []byte) (n int, err error) + func (self PMT) Len() (n int) + func (self PMT) Marshal(b []byte) (n int) + type TSWriter struct + ContinuityCounter uint + func NewTSWriter(pid uint16) *TSWriter + func (self *TSWriter) WritePackets(w io.Writer, datav [][]byte, pcr time.Duration, sync bool, paddata bool) (err error)