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);
244 virtual bool SignalStats(
int &Valid,
double *Strength = NULL,
double *Cnr = NULL,
double *BerPre = NULL,
double *BerPost = NULL,
double *Per = NULL,
int *Status = NULL)
const;
254 virtual bool HasLock(
int TimeoutMs = 0)
const;
270 virtual bool HasCi(
void);
306 virtual bool Probe(
int Adapter,
int Frontend) = 0;
int Priority(bool IgnoreOccupied=false) const
Returns the priority of the current receiving session (-MAXPRIORITY..MAXPRIORITY),...
static uint32_t GetSubsystemId(int Adapter, int Frontend)
virtual ~cDvbDeviceProbe()
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...
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
virtual cString DeviceType(void) const
Returns a string identifying the type of this device (like "DVB-S").
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask)
Opens a file handle for the given filter data.
static void UnBondDevices(void)
Unbonds all devices.
virtual bool IsTunedToTransponder(const cChannel *Channel) const
Returns true if this device is currently tuned to the given Channel's transponder.
static void SetTransferModeForDolbyDigital(int Mode)
cDvbDevice(int Adapter, int Frontend)
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
virtual void SetPowerSaveMode(bool On)
Puts the device into power save mode, if applicable.
virtual bool HasLock(int TimeoutMs=0) const
Returns true if the device has a lock on the requested transponder.
virtual void CloseFilter(int Handle)
Closes a file handle that has previously been opened by OpenFilter().
static bool Exists(int Adapter, int Frontend)
Checks whether the given adapter/frontend exists.
virtual bool SetPid(cPidHandle *Handle, int Type, bool On)
Does the actual PID setting on this device.
static bool BondDevices(const char *Bondings)
Bonds the devices as defined in the given Bondings string.
static bool useDvbDevices
virtual int NumProvidedSystems(void) const
Returns the number of individual "delivery systems" this device provides.
virtual void DetachAllReceivers(void)
Detaches all receivers from this device.
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...
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...
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...
virtual bool OpenDvr(void)
Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver.
virtual void CloseDvr(void)
Shuts down the DVR.
static bool Initialize(void)
Initializes the DVB devices.
void UnBond(void)
Removes this device from any bonding it might have with other devices.
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView)
Sets the device to the given channel (actual physical setup).
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.
bool needsDetachBondedReceivers
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).
static int setTransferModeForDolbyDigital
virtual bool IsBonded(void) const
Returns true if this device is bonded to an other device.
virtual cString DeviceName(void) const
Returns a string identifying the name of this device.
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.
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 ProvidesChannel(const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const
Returns true if this device can provide the given channel.
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
virtual bool HasCi(void)
Returns true if this device has a Common Interface.
cDvbDevice * bondedDevice
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
static bool Probe(int Adapter, int Frontend)
Probes for existing DVB devices.
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...
cString ToString(char Type) const
const char * ParseParameter(const char *s, int &Value, const tDvbParameterMap *Map=NULL)
char Polarization(void) const
void SetSystem(int System)
void SetSisoMiso(int SisoMiso)
void SetModulation(int Modulation)
void SetInversion(int Inversion)
int T2SystemId(void) const
void SetRollOff(int RollOff)
void SetCoderateL(int CoderateL)
void SetCoderateH(int CoderateH)
void SetT2SystemId(int T2SystemId)
bool Parse(const char *s)
void SetBandwidth(int Bandwidth)
int PrintParameter(char *p, char Name, int Value) const
int CoderateL(void) const
void SetPolarization(char Polarization)
int Transmission(void) const
int Bandwidth(void) const
void SetTransmission(int Transmission)
int Inversion(void) const
cDvbTransponderParameters(const char *Parameters=NULL)
void SetHierarchy(int Hierarchy)
int Modulation(void) const
void SetStreamId(int StreamId)
int Hierarchy(void) const
int CoderateH(void) const
A steerable satellite dish generally points to the south on the northern hemisphere,...
Derived cDevice classes that can receive channels will have to provide Transport Stream (TS) packets ...
const tDvbParameterMap CoderateValues[]
const tDvbParameterMap PilotValues[]
const tDvbParameterMap GuardValues[]
const char * MapToUserString(int Value, const tDvbParameterMap *Map)
const tDvbParameterMap SystemValuesSat[]
int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false)
const tDvbParameterMap HierarchyValues[]
int DriverIndex(int Value, const tDvbParameterMap *Map)
cString DvbName(const char *Name, int Adapter, int Frontend)
const tDvbParameterMap BandwidthValues[]
int MapToUser(int Value, const tDvbParameterMap *Map, const char **String=NULL)
cList< cDvbDeviceProbe > DvbDeviceProbes
const tDvbParameterMap TransmissionValues[]
const tDvbParameterMap InversionValues[]
const tDvbParameterMap RollOffValues[]
const tDvbParameterMap ModulationValues[]
const tDvbParameterMap SystemValuesTerr[]
int UserIndex(int Value, const tDvbParameterMap *Map)
int MapToDriver(int Value, const tDvbParameterMap *Map)