Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPackStartCodeNotFound = errors.New("pack start code not found") ErrProgramEndCodeNotFound = errors.New("program end code not found") ErrMarkerNotFound = errors.New("marker not found") )
View Source
var ErrUnexpectedStartCode = errors.New("unexpected start code")
ErrUnexpectedStartCode indicates that a start code was read from the bitstream that was unexpected.
Functions ¶
Types ¶
type Decoder ¶
func NewDecoder ¶
type Pack ¶
type Pack struct {
*PackHeader
// contains filtered or unexported fields
}
func (*Pack) Packets ¶
func (p *Pack) Packets() pes.PacketChannel
type PackHeader ¶
type PackHeader struct {
SystemClockReferenceBase uint32
SystemClockReferenceExtension uint32
ProgramMuxRate uint32
*SystemHeader
}
func NewPackHeader ¶
func NewPackHeader(r bitreader.BitReader) (*PackHeader, error)
type StartCode ¶
type StartCode uint32
const ( StartCodePrefix = 0x000001 PackStartCode StartCode = (StartCodePrefix << 8) | 0xBA ProgramEndCode StartCode = (StartCodePrefix << 8) | 0xB9 SystemHeaderStartCode StartCode = (StartCodePrefix << 8) | 0xBB )
func (StartCode) Assert ¶
Assert() returns an ErrUnexpectedStartCode if the next bits in the bitstream do not match the expected code. If the expected code is present, the the bits are consumed from the bitstream.
type SystemHeader ¶
type SystemHeaderStream ¶
Click to show internal directories.
Click to hide internal directories.