dvb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TS_PACKET_LENGTH   = 188
	TS_SECTION_BUFSIZE = 4096
)

Variables

This section is empty.

Functions

func MangleValue

func MangleValue(value string) string

func MatchesValue

func MatchesValue(input string, value interface{}, prefix string) bool

func NewEIT

func NewEIT(tid mutablehome.DVBTableType, r *TSReader) (section mutablehome.DVBSection, err error)

func NewNIT

func NewNIT(tid mutablehome.DVBTableType, r *TSReader) (section mutablehome.DVBSection, err error)

func NewPAT

func NewPAT(tid mutablehome.DVBTableType, r *TSReader) (section mutablehome.DVBSection, err error)

func NewPMT

func NewPMT(tid mutablehome.DVBTableType, r *TSReader) (section mutablehome.DVBSection, err error)

func NewSDT

func NewSDT(tid mutablehome.DVBTableType, r *TSReader) (section mutablehome.DVBSection, err error)

func NewSectionEvent

func NewSectionEvent(source gopi.Unit, filter mutablehome.DVBFilter, section mutablehome.DVBSection) mutablehome.DVBSectionEvent

func TSRead

func TSRead(fd uintptr) (mutablehome.DVBSection, error)

Types

type Demux

type Demux struct {
	Adapter  uint
	Demux    uint
	Frontend mutablehome.DVBFrontend
	FilePoll gopi.FilePoll
	Bus      gopi.Bus
}

func (Demux) Name

func (Demux) Name() string

func (Demux) New

func (config Demux) New(log gopi.Logger) (gopi.Unit, error)

type Event

type Event struct {
	Id          uint16
	Start       time.Time
	Duration    time.Duration
	Status      uint8
	Scrambled   bool
	Descriptors []*RowDescriptor
}

func (*Event) String

func (this *Event) String() string

type Filter

type Filter struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Filter) AddPid

func (this *Filter) AddPid(pid uint16) error

func (*Filter) AddPids

func (this *Filter) AddPids(pids []uint16) error

func (*Filter) Close

func (this *Filter) Close() error

func (*Filter) Fd

func (this *Filter) Fd() uintptr

func (*Filter) RemovePid

func (this *Filter) RemovePid(pid uint16) error

func (*Filter) SetBufferSize

func (this *Filter) SetBufferSize(size uint32) error

func (*Filter) Start

func (this *Filter) Start() error

func (*Filter) Stop

func (this *Filter) Stop() error

type Frontend

type Frontend struct {
	Adapter  uint
	Frontend uint
}

func (Frontend) Name

func (Frontend) Name() string

func (Frontend) New

func (config Frontend) New(log gopi.Logger) (gopi.Unit, error)

type NITStream

type NITStream struct {
	Pid         uint16
	NetworkId   uint16
	Descriptors []*RowDescriptor
}

func (*NITStream) String

func (this *NITStream) String() string

type PMTStream

type PMTStream struct {
	Type        mutablehome.DVBStreamType
	Pid         uint16
	Length      uint16
	Descriptors []*RowDescriptor
}

func (*PMTStream) String

func (this *PMTStream) String() string

type Program

type Program struct {
	Program uint16
	Pid     uint16
}

func (*Program) String

func (this *Program) String() string

type RowDescriptor

type RowDescriptor struct {
	Tag    uint8
	Length uint8
	Data   []byte
}

func NewDescriptors

func NewDescriptors(r *TSReader) []*RowDescriptor

func (*RowDescriptor) String

func (this *RowDescriptor) String() string

type SectionEIT

type SectionEIT struct {
	SectionHeader
	StreamId    uint16
	NetworkId   uint16
	LastSection uint8
	LastTable   uint8
	Events      []*Event
	CRC         []byte
}

func (*SectionEIT) String

func (this *SectionEIT) String() string

type SectionFilter

type SectionFilter struct {
	Filter
	dvb.DMXSectionFilter
}

func NewSectionFilter

func NewSectionFilter(adapter, demux uint, pid uint16, tid home.DVBTableType) (*SectionFilter, error)

type SectionHeader

type SectionHeader struct {
	TableId     mutablehome.DVBTableType
	ServiceId   uint16
	Version     uint8
	Current     bool
	Section     uint8
	LastSection uint8
}

func NewHeader

func NewHeader(tableId mutablehome.DVBTableType, r *TSReader) SectionHeader

func (*SectionHeader) String

func (this *SectionHeader) String() string

func (*SectionHeader) Type

func (this *SectionHeader) Type() mutablehome.DVBTableType

type SectionNIT

type SectionNIT struct {
	SectionHeader
	Descriptors []*RowDescriptor
	Streams     []*NITStream
	CRC         []byte
}

func (*SectionNIT) String

func (this *SectionNIT) String() string

type SectionPAT

type SectionPAT struct {
	SectionHeader
	Programs []*Program
	CRC      []byte
}

func (*SectionPAT) String

func (this *SectionPAT) String() string

type SectionPMT

type SectionPMT struct {
	SectionHeader
	ClockPid    uint16
	Descriptors []*RowDescriptor
	Streams     []*PMTStream
	CRC         []byte
}

func (*SectionPMT) String

func (this *SectionPMT) String() string

type SectionSDT

type SectionSDT struct {
	SectionHeader
	NetworkId uint16
	Services  []*Service
	CRC       []byte
}

func (*SectionSDT) String

func (this *SectionSDT) String() string

type Service

type Service struct {
	Id           uint16
	EITSchedule  bool
	EITFollowing bool
	Status       uint8
	Scrambled    bool
	Descriptors  []*RowDescriptor
}

func (*Service) String

func (this *Service) String() string

type StreamFilter

type StreamFilter struct {
	Filter
	dvb.DMXStreamFilter
}

func NewStreamFilter

func NewStreamFilter(adapter, demux uint, pid uint16, in dvb.DMXInput, out dvb.DMXOutput, streamType dvb.DMXStreamType) (*StreamFilter, error)

type TSReader

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

func NewTSReader

func NewTSReader(buf []byte) *TSReader

func NewTSReaderRead

func NewTSReaderRead(fd uintptr, capacity int) (*TSReader, error)

func (*TSReader) Bytes

func (this *TSReader) Bytes(sz int) (v []byte)

Bytes returns a byte array

func (*TSReader) DateTime

func (this *TSReader) DateTime() time.Time

DateTime returns a time.Date (UTC) (5 bytes)

func (*TSReader) Duration

func (this *TSReader) Duration() time.Duration

Duration returns a time.Duration (3 bytes)

func (*TSReader) IsEOF

func (this *TSReader) IsEOF() bool

IsEOF is true if index is equal the length of buffer

func (*TSReader) SetLength

func (this *TSReader) SetLength(len int)

func (*TSReader) Size

func (this *TSReader) Size() int

Size returns the remaining bytes to be read

func (*TSReader) String

func (this *TSReader) String() string

String returns the stringified version

func (*TSReader) Uint16

func (this *TSReader) Uint16() (v uint16)

Uint16 returns a word

func (*TSReader) Uint8

func (this *TSReader) Uint8() (v uint8)

Uint8 returns a byte

type Table

type Table struct {
	Path string
}

func (Table) Name

func (Table) Name() string

func (Table) New

func (config Table) New(log gopi.Logger) (gopi.Unit, error)

Jump to

Keyboard shortcuts

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