demux

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Overview

Package demux provides interface to Linux DVB demux device

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DVR

type DVR struct {
	*os.File
}

func (DVR) SetBufferSize

func (dvr DVR) SetBufferSize(n int) error

type Device

type Device string

Dev represents Linux DVB demux device

func (Device) NewSectionFilter

func (d Device) NewSectionFilter(p *SectionFilterParam) (SectionFilter, error)

Returns a handler to section filter.

func (Device) NewStreamFilter

func (d Device) NewStreamFilter(p *StreamFilterParam) (StreamFilter, error)

Returns a handler to elementary stream filter.

type Filter

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

Filter implements common functionality for all demux filters.

func (*Filter) AddPid

func (f *Filter) AddPid(pid int16) error

func (*Filter) Close

func (f *Filter) Close() error

func (*Filter) DelPid

func (f *Filter) DelPid(pid int16) error

func (*Filter) Read

func (f *Filter) Read(buf []byte) (int, error)

func (*Filter) SetBufferSize

func (f *Filter) SetBufferSize(n int) error

func (*Filter) Start

func (f *Filter) Start() error

func (*Filter) Stop

func (f *Filter) Stop() error

type Flags

type Flags uint32
const (
	CheckCRC Flags = 1 << iota
	Oneshot
	ImmediateStart

	KernelClient Flags = 0x8000
)

type Input

type Input uint32
const (
	InFrontend Input = iota
	InDvr
)

type Output

type Output uint32
const (
	OutDecoder Output = iota
	OutTap
	OutTSTap
	OutTSDemuxTap
)

type Pattern

type Pattern struct {
	Bits [16]byte
	Mask [16]byte
	Mode [16]byte
}

type SectionFilter

type SectionFilter struct {
	*Filter
}

SectionFilter represents filter configured in Linux kernel

type SectionFilterParam

type SectionFilterParam struct {
	Pid     int16
	Pattern Pattern
	Timeout uint32
	Flags   Flags
}

type StreamFilter

type StreamFilter struct {
	*Filter
}

StreamFilter represents PES filter configured in Linux kernel

func (StreamFilter) AddPid

func (f StreamFilter) AddPid(pid int16) error

func (StreamFilter) DelPid

func (f StreamFilter) DelPid(pid int16) error

type StreamFilterParam

type StreamFilterParam struct {
	Pid   int16
	In    Input
	Out   Output
	Type  StreamType
	Flags Flags
}

type StreamType

type StreamType uint32
const (
	Audi StreamType = iota
	Video
	Teletext
	Subtitle
	PCR
)
const (
	Audio0 StreamType = iota
	Video0
	Teletext0
	Subtitle0
	PCR0

	Audio1
	Video1
	Teletext1
	Subtitle1
	PCR1

	Audio2
	Video2
	Teletext2
	Subtitle2
	PCR2

	Audio3
	Video3
	Teletext3
	Subtitle3
	PCR3

	Other
)

Jump to

Keyboard shortcuts

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