Go to the documentation of this file.
13 #include <linux/dvb/frontend.h>
14 #include <linux/dvb/version.h>
17 #define DVBAPIVERSION (DVB_API_VERSION << 8 | DVB_API_VERSION_MINOR)
19 #if DVBAPIVERSION < 0x0500
20 #error VDR requires Linux DVB driver API version 5.0 or higher!
25 #if DVBAPIVERSION < 0x0501
34 #if DVBAPIVERSION < 0x0502
40 #if DVBAPIVERSION < 0x0503
56 #if DVBAPIVERSION < 0x0505
57 #define DTV_ENUM_DELSYS 44
60 #if DVBAPIVERSION < 0x0508
64 #define DTV_STREAM_ID 42
65 #define DTV_DVBT2_PLP_ID_LEGACY 43
70 #define DEV_VIDEO "/dev/video"
71 #define DEV_DVB_BASE "/dev/dvb"
72 #define DEV_DVB_ADAPTER "adapter"
73 #define DEV_DVB_OSD "osd"
74 #define DEV_DVB_FRONTEND "frontend"
75 #define DEV_DVB_DVR "dvr"
76 #define DEV_DVB_DEMUX "demux"
77 #define DEV_DVB_VIDEO "video"
78 #define DEV_DVB_AUDIO "audio"
79 #define DEV_DVB_CA "ca"
161 bool Parse(
const char *s);
167 int DvbOpen(
const char *Name,
int Adapter,
int Frontend,
int Mode,
bool ReportError =
false);
243 virtual bool SignalStats(
int &Valid,
double *Strength = NULL,
double *Cnr = NULL,
double *BerPre = NULL,
double *BerPost = NULL,
double *Per = NULL,
int *Status = NULL)
const;
252 virtual bool HasLock(
int TimeoutMs = 0)
const;
268 virtual bool HasCi(
void);
304 virtual bool Probe(
int Adapter,
int Frontend) = 0;
312 #endif //__DVBDEVICE_H
int Inversion(void) const
int PrintParameter(char *p, char Name, int Value) const
int DriverIndex(int Value, const tDvbParameterMap *Map)
static uint32_t GetSubsystemId(int Adapter, int Frontend)
const char * ParseParameter(const char *s, int &Value, const tDvbParameterMap *Map=NULL)
int Hierarchy(void) const
bool BondingOk(const cChannel *Channel, bool ConsiderOccupied=false) const
Returns true if this device is either not bonded to any other device, or the given Channel is on the ...
cTSBuffer * tsBuffer
< Controls how the DVB device handles Transfer Mode when replaying Dolby Digital audio.
static bool useDvbDevices
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask)
Opens a file handle for the given filter data.
const tDvbParameterMap BandwidthValues[]
void SetModulation(int Modulation)
static void SetTransferModeForDolbyDigital(int Mode)
const tDvbParameterMap PilotValues[]
virtual bool ProvidesEIT(void) const
Returns true if this device provides EIT data and thus wants to be tuned to the channels it can recei...
int Priority(void) const
Returns the priority of the current receiving session (-MAXPRIORITY..MAXPRIORITY),...
bool Bond(cDvbDevice *Device)
Bonds this device with the given Device, making both of them use the same satellite cable and LNB.
virtual bool ProvidesDeliverySystem(int DeliverySystem) const
virtual bool HasLock(int TimeoutMs=0) const
Returns true if the device has a lock on the requested transponder.
cList< cDvbDeviceProbe > DvbDeviceProbes
bool Parse(const char *s)
void SetTransmission(int Transmission)
void SetT2SystemId(int T2SystemId)
virtual void CloseFilter(int Handle)
Closes a file handle that has previously been opened by OpenFilter().
static bool Probe(int Adapter, int Frontend)
Probes for existing DVB devices.
virtual bool GetTSPacket(uchar *&Data)
Gets exactly one TS packet from the DVR of this device and returns a pointer to it in Data.
virtual const cChannel * GetCurrentlyTunedTransponder(void) const
Returns a pointer to the currently tuned transponder.
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
cString ToString(char Type) const
virtual cString DeviceType(void) const
Returns a string identifying the type of this device (like "DVB-S").
bool needsDetachBondedReceivers
const tDvbParameterMap InversionValues[]
cDvbDevice(int Adapter, int Frontend)
void UnBond(void)
Removes this device from any bonding it might have with other devices.
int T2SystemId(void) const
const tDvbParameterMap CoderateValues[]
A steerable satellite dish generally points to the south on the northern hemisphere,...
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView)
Sets the device to the given channel (actual physical setup).
void SetInversion(int Inversion)
int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false)
static int setTransferModeForDolbyDigital
virtual bool Probe(int Adapter, int Frontend)=0
Probes for a DVB device at the given Adapter and creates the appropriate object derived from cDvbDevi...
void SetSisoMiso(int SisoMiso)
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
int Bandwidth(void) const
static bool Initialize(void)
Initializes the DVB devices.
static void UnBondDevices(void)
Unbonds all devices.
virtual bool SetPid(cPidHandle *Handle, int Type, bool On)
Does the actual PID setting on this device.
void SetHierarchy(int Hierarchy)
const tDvbParameterMap SystemValuesTerr[]
cDvbDevice * bondedDevice
cDvbTransponderParameters(const char *Parameters=NULL)
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
void SetStreamId(int StreamId)
virtual void CloseDvr(void)
Shuts down the DVR.
int CoderateH(void) const
virtual cString DeviceName(void) const
Returns a string identifying the name of this device.
void SetSystem(int System)
virtual bool IsTunedToTransponder(const cChannel *Channel) const
Returns true if this device is currently tuned to the given Channel's transponder.
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
int MapToUser(int Value, const tDvbParameterMap *Map, const char **String=NULL)
int CoderateL(void) const
virtual bool MaySwitchTransponder(const cChannel *Channel) const
Returns true if it is ok to switch to the Channel's transponder on this device, without disturbing an...
static bool BondDevices(const char *Bondings)
Bonds the devices as defined in the given Bondings string.
const tDvbParameterMap GuardValues[]
const tDvbParameterMap TransmissionValues[]
void SetCoderateH(int CoderateH)
Derived cDevice classes that can receive channels will have to provide Transport Stream (TS) packets ...
virtual bool ProvidesTransponder(const cChannel *Channel) const
Returns true if this device can provide the transponder of the given Channel (which implies that it c...
int Transmission(void) const
virtual int NumProvidedSystems(void) const
Returns the number of individual "delivery systems" this device provides.
int MapToDriver(int Value, const tDvbParameterMap *Map)
virtual bool OpenDvr(void)
Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver.
const tDvbParameterMap ModulationValues[]
virtual bool SignalStats(int &Valid, double *Strength=NULL, double *Cnr=NULL, double *BerPre=NULL, double *BerPost=NULL, double *Per=NULL, int *Status=NULL) const
Returns statistics about the currently received signal (if available).
void SetBandwidth(int Bandwidth)
int Modulation(void) const
int UserIndex(int Value, const tDvbParameterMap *Map)
virtual bool ProvidesChannel(const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const
Returns true if this device can provide the given channel.
static bool Exists(int Adapter, int Frontend)
Checks whether the given adapter/frontend exists.
void SetCoderateL(int CoderateL)
virtual ~cDvbDeviceProbe()
cString DvbName(const char *Name, int Adapter, int Frontend)
const char * MapToUserString(int Value, const tDvbParameterMap *Map)
virtual bool HasCi(void)
Returns true if this device has a Common Interface.
const tDvbParameterMap SystemValuesSat[]
void SetPolarization(char Polarization)
virtual const cPositioner * Positioner(void) const
Returns a pointer to the positioner (if any) this device has used to move the satellite dish to the r...
const tDvbParameterMap HierarchyValues[]
char Polarization(void) const
void SetRollOff(int RollOff)
virtual void DetachAllReceivers(void)
Detaches all receivers from this device.
const tDvbParameterMap RollOffValues[]