ts

package
v3.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SECTION_BUFFER_SIZE = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DRow

type DRow struct {
	// contains filtered or unexported fields
}

func (DRow) String

func (r DRow) String() string

type DTable

type DTable struct {
	Rows []DRow
}

func (*DTable) Read

func (t *DTable) Read(r io.Reader, length uint16) error

func (DTable) String

func (t DTable) String() string

type ESRow

type ESRow struct {
	DTable
	// contains filtered or unexported fields
}

func (ESRow) String

func (r ESRow) String() string

type ESTable

type ESTable struct {
	Rows []ESRow
}

func (*ESTable) Read

func (t *ESTable) Read(r io.Reader, length uint16) error

func (ESTable) String

func (t ESTable) String() string

type ESType

type ESType uint8
const (
	ES_TYPE_NONE ESType = iota
	ES_TYPE_MPEG1_VIDEO
	ES_TYPE_MPEG2_VIDEO
	ES_TYPE_MPEG1_AUDIO
	ES_TYPE_MPEG2_AUDIO
	ES_TYPE_PRIV_SECT
	ES_TYPE_PRIV_PES
	ES_TYPE_MHEG
	ES_TYPE_DSMCC
	ES_TYPE_H222_1
	ES_TYPE_DSMCC_A
	ES_TYPE_DSMCC_B
	ES_TYPE_DSMCC_C
	ES_TYPE_DSMCC_D
	ES_TYPE_MPEG2_AUX
	ES_TYPE_AAC
	ES_TYPE_MPEG4_VIDEO
	ES_TYPE_MPEG4_AUDIO
	ES_TYPE_H264_VIDEO ESType = 0x1B
	ES_TYPE_H265_VIDEO ESType = 0x24
)

func (ESType) String

func (f ESType) String() string
type Header struct {
	Id          uint16
	Version     uint8
	Section     uint8
	LastSection uint8
}

func (*Header) Read

func (h *Header) Read(r io.Reader) error

func (Header) String

func (h Header) String() string

type NITSection

type NITSection struct {
	Header
	DTable
}

func (*NITSection) Read

func (n *NITSection) Read(r io.Reader, length int) error

func (NITSection) String

func (n NITSection) String() string

type PATProgram

type PATProgram struct {
	Program uint16
	Pid     uint16
}

func (PATProgram) String

func (r PATProgram) String() string

type PATSection

type PATSection struct {
	Header
	Programs []PATProgram
}

func (*PATSection) Read

func (p *PATSection) Read(r io.Reader, length int) error

func (PATSection) String

func (p PATSection) String() string

type PMTSection

type PMTSection struct {
	Header
	ClockPid uint16 // 13 bits
	Length   uint16 // 12 bits
	DTable
	ESTable
}

func (*PMTSection) Read

func (s *PMTSection) Read(r io.Reader, length int) error

func (PMTSection) String

func (s PMTSection) String() string

type Section

type Section struct {
	SectionHeader
	PATSection
	PMTSection
	NITSection
	// contains filtered or unexported fields
}

func NewSection

func NewSection(r io.Reader, data []byte) (*Section, error)

func (*Section) String

func (this *Section) String() string

type SectionHeader

type SectionHeader struct {
	TableId TableType
	Length  uint16
}

type TableType

type TableType uint8
const (
	PAT       TableType = 0x00
	CAT       TableType = 0x01
	PMT       TableType = 0x02
	NIT       TableType = 0x40
	NIT_OTHER TableType = 0x41
	SDT       TableType = 0x42
	SDT_OTHER TableType = 0x46
	BAT       TableType = 0x4A
	EIT       TableType = 0x4E
	EIT_OTHER TableType = 0x4F
	TDT       TableType = 0x70
)

func (TableType) String

func (f TableType) String() string

type Tag

type Tag uint8

func (Tag) String

func (t Tag) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL