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 MAXDELIVERYSYSTEMS 8
72 #define DEV_VIDEO "/dev/video"
73 #define DEV_DVB_BASE "/dev/dvb"
74 #define DEV_DVB_ADAPTER "adapter"
75 #define DEV_DVB_OSD "osd"
76 #define DEV_DVB_FRONTEND "frontend"
77 #define DEV_DVB_DVR "dvr"
78 #define DEV_DVB_DEMUX "demux"
79 #define DEV_DVB_VIDEO "video"
80 #define DEV_DVB_AUDIO "audio"
81 #define DEV_DVB_CA "ca"
160 bool Parse(
const char *s);
170 static int DvbOpen(
const char *Name,
int Adapter,
int Frontend,
int Mode,
bool ReportError =
false);
172 static bool Exists(
int Adapter,
int Frontend);
174 static bool Probe(
int Adapter,
int Frontend);
255 virtual bool HasLock(
int TimeoutMs = 0)
const;
271 virtual bool HasCi(
void);
307 virtual bool Probe(
int Adapter,
int Frontend) = 0;
315 #endif //__DVBDEVICE_H
virtual ~cDvbDeviceProbe()
cDvbTransponderParameters(const char *Parameters=NULL)
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
int PrintParameter(char *p, char Name, int Value) const
virtual cString DeviceType(void) const
Returns a string identifying the type of this device (like "DVB-S").
static bool Exists(int Adapter, int Frontend)
Checks whether the given adapter/frontend exists.
void SetTransmission(int Transmission)
void SetPolarization(char Polarization)
const char * ParseParameter(const char *s, int &Value, const tDvbParameterMap *Map=NULL)
virtual bool IsTunedToTransponder(const cChannel *Channel) const
Returns true if this device is currently tuned to the given Channel's transponder.
static bool Initialize(void)
Initializes the 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...
int UserIndex(int Value, const tDvbParameterMap *Map)
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...
void UnBond(void)
Removes this device from any bonding it might have with other devices.
cTSBuffer * tsBuffer
< Controls how the DVB device handles Transfer Mode when replaying Dolby Digital audio.
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
const tDvbParameterMap SystemValuesSat[]
static uint32_t GetSubsystemId(int Adapter, int Frontend)
const tDvbParameterMap InversionValues[]
bool Parse(const char *s)
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView)
Sets the device to the given channel (actual physical setup).
void SetSisoMiso(int SisoMiso)
int Bandwidth(void) const
cString ToString(char Type) const
int MapToDriver(int Value, const tDvbParameterMap *Map)
bool QueryDeliverySystems(int fd_frontend)
void SetCoderateH(int CoderateH)
bool needsDetachBondedReceivers
void SetRollOff(int RollOff)
A steerable satellite dish generally points to the south on the northern hemisphere, and to the north on the southern hemisphere (unless you're located directly on the equator, in which case the general direction is "up").
int Modulation(void) const
cDvbDevice(int Adapter, int Frontend, cDevice *ParentDevice=NULL)
const tDvbParameterMap HierarchyValues[]
void SetT2SystemId(int T2SystemId)
char Polarization(void) const
static bool BondDevices(const char *Bondings)
Bonds the devices as defined in the given Bondings string.
static bool Probe(int Adapter, int Frontend)
Probes for existing DVB devices.
virtual bool SetPid(cPidHandle *Handle, int Type, bool On)
Does the actual PID setting on this device.
void SetSystem(int System)
#define MAXDELIVERYSYSTEMS
cDvbDevice * bondedDevice
int MapToUser(int Value, const tDvbParameterMap *Map, const char **String)
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...
cList< cDvbDeviceProbe > DvbDeviceProbes
virtual cString DeviceName(void) const
Returns a string identifying the name of this device.
virtual void CloseDvr(void)
Shuts down the DVR.
virtual void CloseFilter(int Handle)
Closes a file handle that has previously been opened by OpenFilter().
int DriverIndex(int Value, const tDvbParameterMap *Map)
const tDvbParameterMap ModulationValues[]
int deliverySystems[MAXDELIVERYSYSTEMS]
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 DetachAllReceivers(void)
Detaches all receivers from this device.
static void UnBondDevices(void)
Unbonds all devices.
const char * MapToUserString(int Value, const tDvbParameterMap *Map)
virtual const cChannel * GetCurrentlyTunedTransponder(void) const
Returns a pointer to the currently tuned transponder.
virtual bool HasCi(void)
Returns true if this device has a Common Interface.
const tDvbParameterMap PilotValues[]
int Priority(void) const
Returns the priority of the current receiving session (-MAXPRIORITY..MAXPRIORITY), or IDLEPRIORITY if no receiver is currently active.
virtual bool HasLock(int TimeoutMs=0) const
Returns true if the device has a lock on the requested transponder.
virtual int NumProvidedSystems(void) const
Returns the number of individual "delivery systems" this device provides.
dvb_frontend_info frontendInfo
int Transmission(void) const
virtual bool ProvidesDeliverySystem(int DeliverySystem) const
const tDvbParameterMap RollOffValues[]
static int setTransferModeForDolbyDigital
const tDvbParameterMap CoderateValues[]
bool Bond(cDvbDevice *Device)
Bonds this device with the given Device, making both of them use the same satellite cable and LNB...
int Inversion(void) const
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...
void SetStreamId(int StreamId)
void SetHierarchy(int Hierarchy)
virtual bool ProvidesChannel(const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const
Returns true if this device can provide the given channel.
int CoderateH(void) const
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API...
virtual bool SetIdleDevice(bool Idle, bool TestOnly)
Called by SetIdle if TestOnly, don't do anything, just return, if the device can be set to the new id...
const tDvbParameterMap SystemValuesTerr[]
void SetCoderateL(int CoderateL)
const tDvbParameterMap BandwidthValues[]
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 ...
Derived cDevice classes that can receive channels will have to provide Transport Stream (TS) packets ...
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask)
Opens a file handle for the given filter data.
void SetInversion(int Inversion)
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
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 cString DvbName(const char *Name, int Adapter, int Frontend)
The cDevice class is the base from which actual devices can be derived.
static int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false)
int T2SystemId(void) const
const tDvbParameterMap GuardValues[]
const tDvbParameterMap TransmissionValues[]
static void SetTransferModeForDolbyDigital(int Mode)
int Hierarchy(void) const
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...
void SetBandwidth(int Bandwidth)
void SetModulation(int Modulation)