psip

package
v0.0.0-...-ce18db6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 4 Imported by: 1

README

TVCT

Property Number of Bits Format Byte Offset
table_id 8 0xC8 0
section_syntax_indicator 1 '1' 1
private_indicator 1 '1' 1
reserved 2 '11' 1
section_length 12 uimsbf 1-2
transport_stream_id 16 uimsbf 3-4
reserved 2 '11' 5
version_number 5 uimsbf 5
current_next_indicator 1 bslbf 5
section_number 8 uimsbf 6
last_section_number 8 uimsbf 7
protocol_version 8 uimsbf 8
num_channels_in_section 8 uimsbf 9
channels N * sizeof(channel) []channel 10
reserved 6 '111111' 10 + sizeof(channels)
additional_descriptors_length 10 uimsbf 10 + sizeof(channels)
additional_descriptors N * sizeof(descriptor) []descriptor 12 + sizeof(channels)
CRC_32 32 rpchof section_length - 4

Channel

Property Number of Bits Format Byte Offset
short_name 112 uimsbf 0-13
reserved 4 '1111' 14
major_channel_number 10 uimsbf 14-15
minor_channel_number 10 uimsbf 15-16
modulation_mode 8 uimsbf 17
carrier_frequency 32 uimsbf 18-21
channel_TSID 16 uimsbf 22-23
program_number 16 uimsbf 24-25
ETM_location 2 uimsbf 26
access_controlled 1 bslbf 26
hidden 1 bslbf 26
reserved 2 '11' 26
hide_guide 1 bslbf 26
reserved 3 '111' 26-27
service_type 6 uimsbf 27
source_id 16 uimsbf 28-29
reserved 6 '111111' 30
descriptors_length 10 uimsbf 30-31
descriptors N * sizeof(descriptor) []descriptor 32

Documentation

Index

Constants

View Source
const (
	// BasePID is the PID for all ATSC PSIP tables
	BasePID     = uint16(0x1FFB)
	MGTTableID  = uint8(0xC7)
	TVCTTableID = uint8(0xC8)
	CVCTTableID = uint8(0xC9)
	SVCTTableID = uint8(0xDA)
)
View Source
const (
	MODULATION_8VSB = 0x04
)

Variables

View Source
var (
	// returned when expected T-VCT packet is not found when
	// reading TS packets.
	ErrVCTNotFound = errors.New("No T-VCT was found while reading TS")

	// returned when a Terrerstrial VCT cannot be parsed because there are not enough bytes
	ErrInvalidTVCTLength = errors.New("too few bytes to parse T-VCT")

	// returned when the table ID of the VCT is unknown
	ErrInvalidTableID = errors.New("invalid VCT table ID (unknown VCT table type)")

	// returned when updating PSIP tables and a Continuity Error occurs.  Continuity errors happen
	// when a packet does not contain a Payload Unit Start and the last packet received was not
	// the previous packet as indicated by the MPEG header continuity counter
	ErrContinuity = errors.New("continuity error")

	ErrShortBuffer = errors.New("Buffer too short to parse")
)

Functions

This section is empty.

Types

type CVCT

type CVCT struct {
	*TVCT
}

type Channel

type Channel interface {
	ShortName() string
	MajorNumber() uint16
	MinorNumber() uint16
	ModulationMode() uint8
	CarrierFrequency() uint32
	TSID() uint16
	Program() uint16
	ETMLocation() uint8
	AccessControlled() bool
	Hidden() bool
	HideGuide() bool
	ServiceType() uint8
	SourceID() uint16
	DescriptorsLength() int
	Descriptors() []psi.Descriptor
	Length() int
	CRC() []byte
}

type DSControl

type DSControl []byte

func (DSControl) DayOfMonth

func (dsc DSControl) DayOfMonth() int

func (DSControl) Hour

func (dsc DSControl) Hour() int

func (DSControl) Status

func (dsc DSControl) Status() bool

type MGT

type MGT interface {
	NumTables() int
	Tables() []TableInfo
	Descriptors() []psi.Descriptor
}

Master Guide Table

type PSIPHandler

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

type STT

type STT struct {
	*Table
}

func (*STT) DaylightSaving

func (s *STT) DaylightSaving() DSControl

func (*STT) GPSOffset

func (s *STT) GPSOffset() uint8

func (*STT) SystemTime

func (s *STT) SystemTime() time.Time

type TVCT

type TVCT struct {
	*Table
}

func (*TVCT) AdditionalDescriptorsLength

func (vct *TVCT) AdditionalDescriptorsLength() uint16

func (*TVCT) Channels

func (vct *TVCT) Channels() []Channel

func (*TVCT) NumChannelsInSection

func (vct *TVCT) NumChannelsInSection() int

type Table

type Table struct {
	psi.Table
}

func (*Table) Data

func (t *Table) Data() []byte

func (*Table) ProtocolVersion

func (t *Table) ProtocolVersion() uint8

type TableInfo

type TableInfo []byte

func (TableInfo) Descriptors

func (t TableInfo) Descriptors() []psi.Descriptor

func (TableInfo) DescriptorsLength

func (t TableInfo) DescriptorsLength() int

func (TableInfo) Length

func (t TableInfo) Length() int

func (TableInfo) PID

func (t TableInfo) PID() uint16

func (TableInfo) TableLength

func (t TableInfo) TableLength() int

func (TableInfo) Type

func (t TableInfo) Type() uint16

func (TableInfo) Version

func (t TableInfo) Version() uint8

type Tables

type Tables interface {
	Update(ts.Packet) error
	VCT() VCT
}

Tables are the collection of all ATSC PSIP tables

type VCT

type VCT interface {
	NumChannelsInSection() int
	Channels() []Channel
	AdditionalDescriptorsLength() uint16
}

VCT represents operations on a Terrestrial Virtual Channel Table

Jump to

Keyboard shortcuts

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