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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DVB_PATH_WILDCARD = "/dev/dvb/adapter"
)

Variables

View Source
var (
	DVB_DMX_START           = uintptr(C._DMX_START())
	DVB_DMX_STOP            = uintptr(C._DMX_STOP())
	DVB_DMX_SET_FILTER      = uintptr(C._DMX_SET_FILTER())
	DVB_DMX_SET_PES_FILTER  = uintptr(C._DMX_SET_PES_FILTER())
	DVB_DMX_SET_BUFFER_SIZE = uintptr(C._DMX_SET_BUFFER_SIZE())
	DVB_DMX_GET_PES_PIDS    = uintptr(C._DMX_GET_PES_PIDS())
	DVB_DMX_GET_STC         = uintptr(C._DMX_GET_STC())
	DVB_DMX_ADD_PID         = uintptr(C._DMX_ADD_PID())
	DVB_DMX_REMOVE_PID      = uintptr(C._DMX_REMOVE_PID())
)
View Source
var (
	DVB_FE_GET_INFO     = uintptr(C._FE_GET_INFO())
	DVB_FE_READ_STATUS  = uintptr(C._FE_READ_STATUS())
	DVB_FE_GET_PROPERTY = uintptr(C._FE_GET_PROPERTY())
	DVB_FE_SET_PROPERTY = uintptr(C._FE_SET_PROPERTY())
)

Functions

func DVBDevices

func DVBDevices() ([]uint, error)

func DVB_DMXAddPid

func DVB_DMXAddPid(fd uintptr, pid uint16) error

func DVB_DMXGetStreamPids

func DVB_DMXGetStreamPids(fd uintptr) (map[DMXStreamType]uint16, error)

func DVB_DMXOpen

func DVB_DMXOpen(bus, demux uint) (*os.File, error)

func DVB_DMXPath

func DVB_DMXPath(bus, demux uint) string

func DVB_DMXRemovePid

func DVB_DMXRemovePid(fd uintptr, pid uint16) error

func DVB_DMXSetBufferSize

func DVB_DMXSetBufferSize(fd uintptr, size uint32) error

func DVB_DMXSetSectionFilter

func DVB_DMXSetSectionFilter(fd uintptr, filter DMXSectionFilter) error

func DVB_DMXSetStreamFilter

func DVB_DMXSetStreamFilter(fd uintptr, filter DMXStreamFilter) error

func DVB_DMXStart

func DVB_DMXStart(fd uintptr) error

func DVB_DMXStop

func DVB_DMXStop(fd uintptr) error

func DVB_DVROpen

func DVB_DVROpen(bus, demux uint) (*os.File, error)

func DVB_DVRPath

func DVB_DVRPath(bus, demux uint) string

func DVB_FEBandwidth

func DVB_FEBandwidth(fd uintptr) (uint, error)

func DVB_FEClear

func DVB_FEClear(fd uintptr) error

func DVB_FECodeRateHP

func DVB_FECodeRateHP(fd uintptr) (mutablehome.DVBCodeRate, error)

func DVB_FECodeRateLP

func DVB_FECodeRateLP(fd uintptr) (mutablehome.DVBCodeRate, error)

func DVB_FEDeliverySystem

func DVB_FEDeliverySystem(fd uintptr) (mutablehome.DVBDeliverySystem, error)

func DVB_FEDeliverySystemEnum

func DVB_FEDeliverySystemEnum(fd uintptr) ([]mutablehome.DVBDeliverySystem, error)

func DVB_FEFrequency

func DVB_FEFrequency(fd uintptr) (uint, error)

func DVB_FEGetPropertyEnum

func DVB_FEGetPropertyEnum(fd uintptr, key DVBFrontendKey) ([]uint8, error)

func DVB_FEGetPropertyUint32

func DVB_FEGetPropertyUint32(fd uintptr, key DVBFrontendKey) (uint32, error)

func DVB_FEGuardInterval

func DVB_FEGuardInterval(fd uintptr) (mutablehome.DVBGuardInterval, error)

func DVB_FEHierarchy

func DVB_FEHierarchy(fd uintptr) (mutablehome.DVBHierarchy, error)

func DVB_FEInnerFEC

func DVB_FEInnerFEC(fd uintptr) (mutablehome.DVBCodeRate, error)

func DVB_FEInversion

func DVB_FEInversion(fd uintptr) (mutablehome.DVBInversion, error)

func DVB_FEModulation

func DVB_FEModulation(fd uintptr) (mutablehome.DVBModulation, error)

func DVB_FEOpen

func DVB_FEOpen(bus, frontend uint) (*os.File, error)

func DVB_FEPath

func DVB_FEPath(bus, frontend uint) string

func DVB_FESetBandwidth

func DVB_FESetBandwidth(fd uintptr, value uint) error

func DVB_FESetCodeRateHP

func DVB_FESetCodeRateHP(fd uintptr, value mutablehome.DVBCodeRate) error

func DVB_FESetCodeRateLP

func DVB_FESetCodeRateLP(fd uintptr, value mutablehome.DVBCodeRate) error

func DVB_FESetDeliverySystem

func DVB_FESetDeliverySystem(fd uintptr, sys mutablehome.DVBDeliverySystem) error

func DVB_FESetFrequency

func DVB_FESetFrequency(fd uintptr, value uint) error

func DVB_FESetGuardInterval

func DVB_FESetGuardInterval(fd uintptr, value mutablehome.DVBGuardInterval) error

func DVB_FESetHierarchy

func DVB_FESetHierarchy(fd uintptr, value mutablehome.DVBHierarchy) error

func DVB_FESetInnerFEC

func DVB_FESetInnerFEC(fd uintptr, value mutablehome.DVBCodeRate) error

func DVB_FESetInversion

func DVB_FESetInversion(fd uintptr, value mutablehome.DVBInversion) error

func DVB_FESetModulation

func DVB_FESetModulation(fd uintptr, value mutablehome.DVBModulation) error

func DVB_FESetPropertyUint32

func DVB_FESetPropertyUint32(fd uintptr, key DVBFrontendKey, value uint32) error

func DVB_FESetTransmitMode

func DVB_FESetTransmitMode(fd uintptr, value mutablehome.DVBTransmitMode) error

func DVB_FEStats

func DVB_FEStats(fd uintptr) (map[DVBFrontendKey]DVBFrontendStat, error)

func DVB_FETransmitMode

func DVB_FETransmitMode(fd uintptr) (mutablehome.DVBTransmitMode, error)

func DVB_FETune

func DVB_FETune(fd uintptr) error

func DVB_FEVersion

func DVB_FEVersion(fd uintptr) (uint, uint, error)

Types

type DMXFlags

type DMXFlags uint32
const (
	DVB_DMX_FLAG_NONE            DMXFlags = 0
	DVB_DMX_FLAG_CHECK_CRC       DMXFlags = 1
	DVB_DMX_FLAG_ONESHOT         DMXFlags = 2
	DVB_DMX_FLAG_IMMEDIATE_START DMXFlags = 4
)

func (DMXFlags) String

func (f DMXFlags) String() string

type DMXInput

type DMXInput uint32
const (
	DVB_DMX_IN_FRONTEND DMXInput = iota
	DVB_DMX_IN_DVR
)

func (DMXInput) String

func (f DMXInput) String() string

type DMXOutput

type DMXOutput uint32
const (
	DVB_DMX_OUT_DECODER DMXOutput = iota
	DVB_DMX_OUT_TAP
	DVB_DMX_OUT_TS_TAP
	DVB_DMX_OUT_TSDEMUX_TAP
)

func (DMXOutput) String

func (f DMXOutput) String() string

type DMXPattern

type DMXPattern struct {
	Filter [16]byte
	Mask   [16]byte
	Mode   [16]byte
}

DMXPattern specifies a section filter

type DMXSectionFilter

type DMXSectionFilter struct {
	Pid     uint16
	Pattern DMXPattern
	Timeout uint32 // Seconds, or zero for no timeout
	Flags   DMXFlags
}

func (DMXSectionFilter) String

func (f DMXSectionFilter) String() string

type DMXStreamFilter

type DMXStreamFilter struct {
	Pid   uint16
	In    DMXInput
	Out   DMXOutput
	Type  DMXStreamType
	Flags DMXFlags
}

func (DMXStreamFilter) String

func (f DMXStreamFilter) String() string

type DMXStreamType

type DMXStreamType uint32
const (
	DVB_DMX_PES_AUDIO0 DMXStreamType = iota
	DVB_DMX_PES_VIDEO0
	DVB_DMX_PES_TELETEXT0
	DVB_DMX_PES_SUBTITLE0
	DVB_DMX_PES_PCR0
	DVB_DMX_PES_AUDIO1
	DVB_DMX_PES_VIDEO1
	DVB_DMX_PES_TELETEXT1
	DVB_DMX_PES_SUBTITLE1
	DVB_DMX_PES_PCR1
	DVB_DMX_PES_AUDIO2
	DVB_DMX_PES_VIDEO2
	DVB_DMX_PES_TELETEXT2
	DVB_DMX_PES_SUBTITLE2
	DVB_DMX_PES_PCR2
	DVB_DMX_PES_AUDIO3
	DVB_DMX_PES_VIDEO3
	DVB_DMX_PES_TELETEXT3
	DVB_DMX_PES_SUBTITLE3
	DVB_DMX_PES_PCR3
	DVB_DMX_PES_OTHER
)

func (DMXStreamType) String

func (s DMXStreamType) String() string

type DVBFEPropertyEnum

type DVBFEPropertyEnum struct {
	Key DVBFrontendKey

	Data [32]uint8
	Len  uint32
	// contains filtered or unexported fields
}

type DVBFEPropertyUint32

type DVBFEPropertyUint32 struct {
	Key DVBFrontendKey

	Data uint32
	// contains filtered or unexported fields
}

type DVBFrontendCaps

type DVBFrontendCaps uint64
const (
	DVB_FE_CAN_INVERSION_AUTO DVBFrontendCaps = (1 << iota)
	DVB_FE_CAN_FEC_1_2
	DVB_FE_CAN_FEC_2_3
	DVB_FE_CAN_FEC_3_4
	DVB_FE_CAN_FEC_4_5
	DVB_FE_CAN_FEC_5_6
	DVB_FE_CAN_FEC_6_7
	DVB_FE_CAN_FEC_7_8
	DVB_FE_CAN_FEC_8_9
	DVB_FE_CAN_FEC_AUTO
	DVB_FE_CAN_QPSK
	DVB_FE_CAN_QAM_16
	DVB_FE_CAN_QAM_32
	DVB_FE_CAN_QAM_64
	DVB_FE_CAN_QAM_128
	DVB_FE_CAN_QAM_256
	DVB_FE_CAN_QAM_AUTO
	DVB_FE_CAN_TRANSMISSION_MODE_AUTO
	DVB_FE_CAN_BANDWIDTH_AUTO
	DVB_FE_CAN_GUARD_INTERVAL_AUTO
	DVB_FE_CAN_HIERARCHY_AUTO
	DVB_FE_CAN_8VSB
	DVB_FE_CAN_16VSB
	DVB_FE_HAS_EXTENDED_CAPS
	DVB_FE_CAN_MULTISTREAM   DVBFrontendCaps = 0x4000000
	DVB_FE_CAN_TURBO_FEC     DVBFrontendCaps = 0x8000000
	DVB_FE_CAN_2G_MODULATION DVBFrontendCaps = 0x10000000
	DVB_FE_NEEDS_BENDING     DVBFrontendCaps = 0x20000000
	DVB_FE_CAN_RECOVER       DVBFrontendCaps = 0x40000000
	DVB_FE_CAN_MUTE_TS       DVBFrontendCaps = 0x80000000
	DVB_FE_MIN                               = DVB_FE_CAN_INVERSION_AUTO
	DVB_FE_MAX                               = DVB_FE_CAN_MUTE_TS
	DVB_FE_NONE              DVBFrontendCaps = 0
)

func (DVBFrontendCaps) String

func (f DVBFrontendCaps) String() string

func (DVBFrontendCaps) StringFlag

func (v DVBFrontendCaps) StringFlag() string

type DVBFrontendInfo

type DVBFrontendInfo C.struct_dvb_frontend_info

func DVB_FEGetInfo

func DVB_FEGetInfo(fd uintptr) (DVBFrontendInfo, error)

func (DVBFrontendInfo) Caps

func (this DVBFrontendInfo) Caps() DVBFrontendCaps

func (DVBFrontendInfo) FrequencyMax

func (this DVBFrontendInfo) FrequencyMax() uint32

func (DVBFrontendInfo) FrequencyMin

func (this DVBFrontendInfo) FrequencyMin() uint32

func (DVBFrontendInfo) FrequencyStepSize

func (this DVBFrontendInfo) FrequencyStepSize() uint32

func (DVBFrontendInfo) FrequencyTolerance

func (this DVBFrontendInfo) FrequencyTolerance() uint32

func (DVBFrontendInfo) Name

func (this DVBFrontendInfo) Name() string

func (DVBFrontendInfo) String

func (this DVBFrontendInfo) String() string

func (DVBFrontendInfo) SymbolrateMax

func (this DVBFrontendInfo) SymbolrateMax() uint32

func (DVBFrontendInfo) SymbolrateMin

func (this DVBFrontendInfo) SymbolrateMin() uint32

func (DVBFrontendInfo) SymbolrateTolerance

func (this DVBFrontendInfo) SymbolrateTolerance() uint32

type DVBFrontendKey

type DVBFrontendKey uint32
const (
	/* DVBv5 property Commands */
	DVB_FE_KEY_NONE               DVBFrontendKey = 0
	DVB_FE_KEY_TUNE               DVBFrontendKey = 1
	DVB_FE_KEY_CLEAR              DVBFrontendKey = 2
	DVB_FE_KEY_FREQUENCY          DVBFrontendKey = 3
	DVB_FE_KEY_MODULATION         DVBFrontendKey = 4
	DVB_FE_KEY_BANDWIDTH_HZ       DVBFrontendKey = 5
	DVB_FE_KEY_INVERSION          DVBFrontendKey = 6
	DVB_FE_KEY_DISEQC_MASTER      DVBFrontendKey = 7
	DVB_FE_KEY_SYMBOL_RATE        DVBFrontendKey = 8
	DVB_FE_KEY_INNER_FEC          DVBFrontendKey = 9
	DVB_FE_KEY_VOLTAGE            DVBFrontendKey = 10
	DVB_FE_KEY_TONE               DVBFrontendKey = 11
	DVB_FE_KEY_PILOT              DVBFrontendKey = 12
	DVB_FE_KEY_ROLLOFF            DVBFrontendKey = 13
	DVB_FE_KEY_DISEQC_SLAVE_REPLY DVBFrontendKey = 14

	/* Basic enumeration set for querying unlimited capabilities */
	DVB_FE_KEY_FE_CAPABILITY_COUNT DVBFrontendKey = 15
	DVB_FE_KEY_FE_CAPABILITY       DVBFrontendKey = 16
	DVB_FE_KEY_DELIVERY_SYSTEM     DVBFrontendKey = 17

	/* ISDB-T and ISDB-Tsb */
	DVB_FE_KEY_ISDBT_PARTIAL_RECEPTION  DVBFrontendKey = 18
	DVB_FE_KEY_ISDBT_SOUND_BROADCASTING DVBFrontendKey = 19

	DVB_FE_KEY_ISDBT_SB_SUBCHANNEL_ID DVBFrontendKey = 20
	DVB_FE_KEY_ISDBT_SB_SEGMENT_IDX   DVBFrontendKey = 21
	DVB_FE_KEY_ISDBT_SB_SEGMENT_COUNT DVBFrontendKey = 22

	DVB_FE_KEY_ISDBT_LAYERA_FEC               DVBFrontendKey = 23
	DVB_FE_KEY_ISDBT_LAYERA_MODULATION        DVBFrontendKey = 24
	DVB_FE_KEY_ISDBT_LAYERA_SEGMENT_COUNT     DVBFrontendKey = 25
	DVB_FE_KEY_ISDBT_LAYERA_TIME_INTERLEAVING DVBFrontendKey = 26

	DVB_FE_KEY_ISDBT_LAYERB_FEC               DVBFrontendKey = 27
	DVB_FE_KEY_ISDBT_LAYERB_MODULATION        DVBFrontendKey = 28
	DVB_FE_KEY_ISDBT_LAYERB_SEGMENT_COUNT     DVBFrontendKey = 29
	DVB_FE_KEY_ISDBT_LAYERB_TIME_INTERLEAVING DVBFrontendKey = 30

	DVB_FE_KEY_ISDBT_LAYERC_FEC               DVBFrontendKey = 31
	DVB_FE_KEY_ISDBT_LAYERC_MODULATION        DVBFrontendKey = 32
	DVB_FE_KEY_ISDBT_LAYERC_SEGMENT_COUNT     DVBFrontendKey = 33
	DVB_FE_KEY_ISDBT_LAYERC_TIME_INTERLEAVING DVBFrontendKey = 34

	DVB_FE_KEY_API_VERSION DVBFrontendKey = 35

	DVB_FE_KEY_CODE_RATE_HP      DVBFrontendKey = 36
	DVB_FE_KEY_CODE_RATE_LP      DVBFrontendKey = 37
	DVB_FE_KEY_GUARD_INTERVAL    DVBFrontendKey = 38
	DVB_FE_KEY_TRANSMISSION_MODE DVBFrontendKey = 39
	DVB_FE_KEY_HIERARCHY         DVBFrontendKey = 40

	DVB_FE_KEY_ISDBT_LAYER_ENABLED DVBFrontendKey = 41

	DVB_FE_KEY_STREAM_ID           DVBFrontendKey = 42
	DVB_FE_KEY_DVBT2_PLP_ID_LEGACY DVBFrontendKey = 43

	DVB_FE_KEY_ENUM_DELSYS DVBFrontendKey = 44

	/* ATSC-MH */
	DVB_FE_KEY_ATSCMH_FIC_VER           DVBFrontendKey = 45
	DVB_FE_KEY_ATSCMH_PARADE_ID         DVBFrontendKey = 46
	DVB_FE_KEY_ATSCMH_NOG               DVBFrontendKey = 47
	DVB_FE_KEY_ATSCMH_TNOG              DVBFrontendKey = 48
	DVB_FE_KEY_ATSCMH_SGN               DVBFrontendKey = 49
	DVB_FE_KEY_ATSCMH_PRC               DVBFrontendKey = 50
	DVB_FE_KEY_ATSCMH_RS_FRAME_MODE     DVBFrontendKey = 51
	DVB_FE_KEY_ATSCMH_RS_FRAME_ENSEMBLE DVBFrontendKey = 52
	DVB_FE_KEY_ATSCMH_RS_CODE_MODE_PRI  DVBFrontendKey = 53
	DVB_FE_KEY_ATSCMH_RS_CODE_MODE_SEC  DVBFrontendKey = 54
	DVB_FE_KEY_ATSCMH_SCCC_BLOCK_MODE   DVBFrontendKey = 55
	DVB_FE_KEY_ATSCMH_SCCC_CODE_MODE_A  DVBFrontendKey = 56
	DVB_FE_KEY_ATSCMH_SCCC_CODE_MODE_B  DVBFrontendKey = 57
	DVB_FE_KEY_ATSCMH_SCCC_CODE_MODE_C  DVBFrontendKey = 58
	DVB_FE_KEY_ATSCMH_SCCC_CODE_MODE_D  DVBFrontendKey = 59

	DVB_FE_KEY_INTERLEAVING DVBFrontendKey = 60
	DVB_FE_KEY_LNA          DVBFrontendKey = 61

	/* Quality parameters */
	DVB_FE_STAT_SIGNAL_STRENGTH      DVBFrontendKey = 62
	DVB_FE_STAT_CNR                  DVBFrontendKey = 63
	DVB_FE_STAT_PRE_ERROR_BIT_COUNT  DVBFrontendKey = 64
	DVB_FE_STAT_PRE_TOTAL_BIT_COUNT  DVBFrontendKey = 65
	DVB_FE_STAT_POST_ERROR_BIT_COUNT DVBFrontendKey = 66
	DVB_FE_STAT_POST_TOTAL_BIT_COUNT DVBFrontendKey = 67
	DVB_FE_STAT_ERROR_BLOCK_COUNT    DVBFrontendKey = 68
	DVB_FE_STAT_TOTAL_BLOCK_COUNT    DVBFrontendKey = 69

	/* Physical layer scrambling */
	DVB_FE_KEY_SCRAMBLING_SEQUENCE_INDEX DVBFrontendKey = 70

	// Minimum and maximum
	DVB_FE_KEY_MIN = DVB_FE_KEY_TUNE
	DVB_FE_KEY_MAX = DVB_FE_KEY_SCRAMBLING_SEQUENCE_INDEX
)

func (DVBFrontendKey) String

func (k DVBFrontendKey) String() string

type DVBFrontendScale

type DVBFrontendScale uint8
const (
	DVB_FE_SCALE_NONE DVBFrontendScale = iota
	DVB_FE_SCALE_DECIBEL
	DVB_FE_SCALE_RELATIVE
	DVB_FE_SCALE_COUNTER
)

func (DVBFrontendScale) String

func (s DVBFrontendScale) String() string

type DVBFrontendStat

type DVBFrontendStat struct {
	Scale DVBFrontendScale
	Value int64
}

func (DVBFrontendStat) Counter

func (stat DVBFrontendStat) Counter() uint64

func (DVBFrontendStat) Decibel

func (stat DVBFrontendStat) Decibel() float64

func (DVBFrontendStat) Relative

func (stat DVBFrontendStat) Relative() float64

func (DVBFrontendStat) String

func (stat DVBFrontendStat) String() string

type DVBFrontendStats

type DVBFrontendStats struct {
	Key DVBFrontendKey

	Len  uint8
	Data [9 * 4]byte // Up to four stats of 9 bytes
	// contains filtered or unexported fields
}

type DVBFrontendStatus

type DVBFrontendStatus C.int
const (
	DVB_FE_STATUS_NONE        DVBFrontendStatus = 0x00
	DVB_FE_STATUS_HAS_SIGNAL  DVBFrontendStatus = 0x01
	DVB_FE_STATUS_HAS_CARRIER DVBFrontendStatus = 0x02
	DVB_FE_STATUS_HAS_VITERBI DVBFrontendStatus = 0x04
	DVB_FE_STATUS_HAS_SYNC    DVBFrontendStatus = 0x08
	DVB_FE_STATUS_HAS_LOCK    DVBFrontendStatus = 0x10
	DVB_FE_STATUS_TIMEDOUT    DVBFrontendStatus = 0x20
	DVB_FE_STATUS_REINIT      DVBFrontendStatus = 0x40
	DVB_FE_STATUS_MIN                           = DVB_FE_STATUS_HAS_SIGNAL
	DVB_FE_STATUS_MAX                           = DVB_FE_STATUS_REINIT
)

func DVB_FEReadStatus

func DVB_FEReadStatus(fd uintptr) (DVBFrontendStatus, error)

func (DVBFrontendStatus) String

func (f DVBFrontendStatus) String() string

func (DVBFrontendStatus) StringFlag

func (s DVBFrontendStatus) StringFlag() string

type DVBFrontendValue

type DVBFrontendValue C.struct_dtv_property

Jump to

Keyboard shortcuts

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