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 const StreamIDH264 = 0xe0 // StreamIDAAC const StreamIDAAC = 0xc0 )
View Source
const ( // PatPID const PatPID = 0 // PmtPID const PmtPID = 0x1000 )
View Source
const ( // ElementaryStreamTypeH264 const ElementaryStreamTypeH264 = 0x1B // ElementaryStreamTypeAdtsAAC const ElementaryStreamTypeAdtsAAC = 0x0F )
View Source
const ( // PtsHZ const PtsHZ = 90000 // PcrHZ const PcrHZ = 27000000 )
View Source
const MaxPESHeaderLength = 19
MaxPESHeaderLength var
View Source
const MaxTSHeaderLength = 12
MaxTSHeaderLength var
View Source
const PSIHeaderLength = 9
PSIHeaderLength var
View Source
const TableExtPAT = 1
TableExtPAT var
View Source
const TableExtPMT = 1
TableExtPMT var
View Source
const TableIDPAT = 0
TableIDPAT var
View Source
const TableIDPMT = 2
TableIDPMT var
Variables ¶
View Source
var ErrPESHeader = fmt.Errorf("invalid PES header")
ErrPESHeader func
View Source
var ErrPSIHeader = fmt.Errorf("invalid PSI header")
ErrPSIHeader func
View Source
var ErrParsePAT = fmt.Errorf("invalid PAT")
ErrParsePAT func
View Source
var ErrParsePMT = fmt.Errorf("invalid PMT")
ErrParsePMT func
Functions ¶
func FillPESHeader ¶
FillPESHeader func
func ParsePESHeader ¶
func ParsePESHeader(h []byte) (hdrlen int, streamid uint8, datalen int, pts, dts time.Duration, err error)
ParsePESHeader func
func ParseTSHeader ¶
ParseTSHeader func
Types ¶
type ElementaryStreamInfo ¶
type ElementaryStreamInfo struct { StreamType uint8 ElementaryPID uint16 Descriptors []Descriptor }
ElementaryStreamInfo func
type PMT ¶
type PMT struct { PCRPID uint16 ProgramDescriptors []Descriptor ElementaryStreamInfos []ElementaryStreamInfo }
PMT func
Click to show internal directories.
Click to hide internal directories.