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 virtual ~cDvbDeviceProbe()
cDvbTransponderParameters(const char *Parameters=NULL)
const tDvbParameterMap GuardValues[]
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
cString DvbName(const char *Name, int Adapter, int Frontend)
static bool Exists(int Adapter, int Frontend)
Checks whether the given adapter/frontend exists.
int CoderateH(void) const
void SetTransmission(int Transmission)
void SetPolarization(char Polarization)
const tDvbParameterMap HierarchyValues[]
const char * ParseParameter(const char *s, int &Value, const tDvbParameterMap *Map=NULL)
int Modulation(void) const
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...
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.
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 ...
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
cString ToString(char Type) const
static uint32_t GetSubsystemId(int Adapter, int Frontend)
virtual cString DeviceName(void) const
Returns a string identifying the name of this device.
bool Parse(const char *s)
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView)
Sets the device to the given channel (actual physical setup).
int DriverIndex(int Value, const tDvbParameterMap *Map)
const tDvbParameterMap InversionValues[]
int UserIndex(int Value, const tDvbParameterMap *Map)
const tDvbParameterMap ModulationValues[]
int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false)
int MapToDriver(int Value, const tDvbParameterMap *Map)
void SetSisoMiso(int SisoMiso)
virtual int NumProvidedSystems(void) const
Returns the number of individual "delivery systems" this device provides.
void SetCoderateH(int CoderateH)
bool needsDetachBondedReceivers
void SetRollOff(int RollOff)
const tDvbParameterMap BandwidthValues[]
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").
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 RollOffValues[]
virtual cString DeviceType(void) const
Returns a string identifying the type of this device (like "DVB-S").
int Bandwidth(void) const
void SetT2SystemId(int T2SystemId)
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...
const tDvbParameterMap CoderateValues[]
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.
int Hierarchy(void) const
void SetSystem(int System)
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...
const tDvbParameterMap TransmissionValues[]
cDvbDevice * bondedDevice
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).
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 Probe(int Adapter, int Frontend)=0
Probes for a DVB device at the given Adapter and creates the appropriate object derived from cDvbDevi...
virtual bool IsTunedToTransponder(const cChannel *Channel) const
Returns true if this device is currently tuned to the given Channel's transponder.
const tDvbParameterMap PilotValues[]
virtual void CloseDvr(void)
Shuts down the DVR.
char Polarization(void) const
virtual void CloseFilter(int Handle)
Closes a file handle that has previously been opened by OpenFilter().
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...
cList< cDvbDeviceProbe > DvbDeviceProbes
virtual const cChannel * GetCurrentlyTunedTransponder(void) const
Returns a pointer to the currently tuned transponder.
virtual bool ProvidesDeliverySystem(int DeliverySystem) const
virtual bool OpenDvr(void)
Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver...
int PrintParameter(char *p, char Name, int Value) const
virtual void DetachAllReceivers(void)
Detaches all receivers from this device.
static void UnBondDevices(void)
Unbonds all devices.
static bool useDvbDevices
virtual bool HasCi(void)
Returns true if this device has a Common Interface.
int CoderateL(void) const
const tDvbParameterMap SystemValuesSat[]
const char * MapToUserString(int Value, const tDvbParameterMap *Map)
virtual bool HasLock(int TimeoutMs=0) const
Returns true if the device has a lock on the requested transponder.
int T2SystemId(void) const
static int setTransferModeForDolbyDigital
int MapToUser(int Value, const tDvbParameterMap *Map, const char **String=NULL)
bool Bond(cDvbDevice *Device)
Bonds this device with the given Device, making both of them use the same satellite cable and LNB...
void SetStreamId(int StreamId)
void SetHierarchy(int Hierarchy)
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API...
int Transmission(void) const
void SetCoderateL(int CoderateL)
int Inversion(void) const
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)
cDvbDevice(int Adapter, int Frontend)
int Priority(void) const
Returns the priority of the current receiving session (-MAXPRIORITY..MAXPRIORITY), or IDLEPRIORITY if no receiver is currently active.
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
static void SetTransferModeForDolbyDigital(int Mode)
const tDvbParameterMap SystemValuesTerr[]
void SetBandwidth(int Bandwidth)
void SetModulation(int Modulation)