vdr
1.7.27
|
#include <dvbdevice.h>
Public Member Functions | |
cDvbDevice (int Adapter, int Frontend) | |
virtual | ~cDvbDevice () |
int | Adapter (void) const |
int | Frontend (void) const |
virtual bool | Ready (void) |
virtual cString | DeviceName (void) const |
bool | Bond (cDvbDevice *Device) |
void | UnBond (void) |
bool | BondingOk (const cChannel *Channel, bool ConsiderOccupied=false) const |
virtual bool | ProvidesDeliverySystem (int DeliverySystem) const |
virtual bool | ProvidesSource (int Source) const |
virtual bool | ProvidesTransponder (const cChannel *Channel) const |
virtual bool | ProvidesChannel (const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const |
virtual bool | ProvidesEIT (void) const |
virtual int | NumProvidedSystems (void) const |
virtual int | SignalStrength (void) const |
virtual int | SignalQuality (void) const |
virtual const cChannel * | GetCurrentlyTunedTransponder (void) const |
virtual bool | IsTunedToTransponder (const cChannel *Channel) const |
virtual bool | MaySwitchTransponder (const cChannel *Channel) const |
virtual bool | HasLock (int TimeoutMs=0) |
virtual bool | HasCi (void) |
cDvbDevice (int Adapter, int Frontend) | |
virtual | ~cDvbDevice () |
int | Adapter (void) const |
int | Frontend (void) const |
virtual bool | Ready (void) |
virtual cString | DeviceName (void) const |
bool | Bond (cDvbDevice *Device) |
void | UnBond (void) |
bool | BondingOk (const cChannel *Channel, bool ConsiderOccupied=false) const |
virtual bool | ProvidesDeliverySystem (int DeliverySystem) const |
virtual bool | ProvidesSource (int Source) const |
virtual bool | ProvidesTransponder (const cChannel *Channel) const |
virtual bool | ProvidesChannel (const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const |
virtual bool | ProvidesEIT (void) const |
virtual int | NumProvidedSystems (void) const |
virtual int | SignalStrength (void) const |
virtual int | SignalQuality (void) const |
virtual const cChannel * | GetCurrentlyTunedTransponder (void) const |
virtual bool | IsTunedToTransponder (const cChannel *Channel) const |
virtual bool | MaySwitchTransponder (const cChannel *Channel) const |
virtual bool | HasLock (int TimeoutMs=0) |
virtual bool | HasCi (void) |
Static Public Member Functions | |
static bool | Initialize (void) |
static bool | BondDevices (const char *Bondings) |
static void | UnBondDevices (void) |
static void | SetTransferModeForDolbyDigital (int Mode) |
static bool | Initialize (void) |
static bool | BondDevices (const char *Bondings) |
static void | UnBondDevices (void) |
static void | SetTransferModeForDolbyDigital (int Mode) |
Protected Member Functions | |
virtual bool | SetChannelDevice (const cChannel *Channel, bool LiveView) |
virtual bool | SetPid (cPidHandle *Handle, int Type, bool On) |
virtual int | OpenFilter (u_short Pid, u_char Tid, u_char Mask) |
virtual void | CloseFilter (int Handle) |
virtual bool | OpenDvr (void) |
virtual void | CloseDvr (void) |
virtual bool | GetTSPacket (uchar *&Data) |
virtual void | DetachAllReceivers (void) |
virtual bool | SetChannelDevice (const cChannel *Channel, bool LiveView) |
virtual bool | SetPid (cPidHandle *Handle, int Type, bool On) |
virtual int | OpenFilter (u_short Pid, u_char Tid, u_char Mask) |
virtual void | CloseFilter (int Handle) |
virtual bool | OpenDvr (void) |
virtual void | CloseDvr (void) |
virtual bool | GetTSPacket (uchar *&Data) |
virtual void | DetachAllReceivers (void) |
Static Protected Member Functions | |
static cString | DvbName (const char *Name, int Adapter, int Frontend) |
static int | DvbOpen (const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false) |
static cString | DvbName (const char *Name, int Adapter, int Frontend) |
static int | DvbOpen (const char *Name, int Adapter, int Frontend, int Mode, bool ReportError=false) |
Protected Attributes | |
int | adapter |
int | frontend |
Static Protected Attributes | |
static int | setTransferModeForDolbyDigital = 1 |
Private Member Functions | |
bool | QueryDeliverySystems (int fd_frontend) |
bool | QueryDeliverySystems (int fd_frontend) |
Static Private Member Functions | |
static bool | Exists (int Adapter, int Frontend) |
static bool | Probe (int Adapter, int Frontend) |
static bool | Exists (int Adapter, int Frontend) |
static bool | Probe (int Adapter, int Frontend) |
Private Attributes | |
dvb_frontend_info | frontendInfo |
int | deliverySystems [MAXDELIVERYSYSTEMS] |
int | numDeliverySystems |
int | numModulations |
int | fd_dvr |
int | fd_ca |
cDvbDevice * | bondedDevice |
bool | needsDetachBondedReceivers |
cCiAdapter * | ciAdapter |
cDvbTuner * | dvbTuner |
cTSBuffer * | tsBuffer |
Static Private Attributes | |
static cMutex | bondMutex |
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
Definition at line 109 of file dvbdevice.h.
cDvbDevice::cDvbDevice | ( | int | Adapter, |
int | Frontend | ||
) |
Definition at line 1001 of file dvbdevice.c.
References adapter, Adapter(), bondedDevice, ciAdapter, cDvbCiAdapter::CreateCiAdapter(), DEV_DVB_CA, DEV_DVB_FRONTEND, DvbOpen(), dvbTuner, esyslog, fd_ca, fd_dvr, frontend, Frontend(), needsDetachBondedReceivers, numDeliverySystems, numModulations, QueryDeliverySystems(), cDevice::StartSectionHandler(), and tsBuffer.
Referenced by Probe().
cDvbDevice::~cDvbDevice | ( | ) | [virtual] |
Definition at line 1039 of file dvbdevice.c.
References ciAdapter, dvbTuner, cDevice::StopSectionHandler(), and UnBond().
cDvbDevice::cDvbDevice | ( | int | Adapter, |
int | Frontend | ||
) |
virtual cDvbDevice::~cDvbDevice | ( | ) | [virtual] |
int cDvbDevice::Adapter | ( | void | ) | const [inline] |
Definition at line 138 of file dvbdevice.h.
References adapter.
Referenced by cDvbDevice(), and Initialize().
int cDvbDevice::Adapter | ( | void | ) | const [inline] |
Definition at line 138 of file include/vdr/dvbdevice.h.
References adapter.
bool cDvbDevice::Bond | ( | cDvbDevice * | Device | ) |
Bonds this device with the given Device, making both of them use the same satellite cable and LNB.
Only DVB-S(2) devices can be bonded. When this function is called, the calling device must not be bonded to any other device. The given Device, however, may already be bonded to an other device. That way several devices can be bonded together. Returns true if the bonding was successful.
Definition at line 1277 of file dvbdevice.c.
References cDvbTuner::Bond(), bondedDevice, bondMutex, cDevice::CardIndex(), dsyslog, dvbTuner, esyslog, and ProvidesDeliverySystem().
bool cDvbDevice::Bond | ( | cDvbDevice * | Device | ) |
Bonds this device with the given Device, making both of them use the same satellite cable and LNB.
Only DVB-S(2) devices can be bonded. When this function is called, the calling device must not be bonded to any other device. The given Device, however, may already be bonded to an other device. That way several devices can be bonded together. Returns true if the bonding was successful.
bool cDvbDevice::BondDevices | ( | const char * | Bondings | ) | [static] |
Bonds the devices as defined in the given Bondings string.
A bonding is a sequence of device numbers (starting at 1), separated by '+' characters. Several bondings are separated by commas, as in "1+2,3+4+5". Returns false if an error occurred.
Definition at line 1228 of file dvbdevice.c.
References esyslog, cSatCableNumbers::FirstDeviceIndex(), cDevice::GetDevice(), MAXDEVICES, cDevice::NumDevices(), and UnBondDevices().
Referenced by main(), and cMenuSetupLNB::ProcessKey().
static bool cDvbDevice::BondDevices | ( | const char * | Bondings | ) | [static] |
Bonds the devices as defined in the given Bondings string.
A bonding is a sequence of device numbers (starting at 1), separated by '+' characters. Several bondings are separated by commas, as in "1+2,3+4+5". Returns false if an error occurred.
bool cDvbDevice::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 same satellite, polarization and band as those the bonded devices are tuned to (if any).
If ConsiderOccupied is true, any bonded devices that are currently occupied but not otherwise receiving will cause this function to return false.
bool cDvbDevice::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 same satellite, polarization and band as those the bonded devices are tuned to (if any).
If ConsiderOccupied is true, any bonded devices that are currently occupied but not otherwise receiving will cause this function to return false.
Definition at line 1318 of file dvbdevice.c.
References bondedDevice, cDvbTuner::BondingOk(), bondMutex, and dvbTuner.
Referenced by MaySwitchTransponder(), and ProvidesChannel().
void cDvbDevice::CloseDvr | ( | void | ) | [protected, virtual] |
virtual void cDvbDevice::CloseDvr | ( | void | ) | [protected, virtual] |
Shuts down the DVR.
Reimplemented from cDevice.
virtual void cDvbDevice::CloseFilter | ( | int | Handle | ) | [protected, virtual] |
Closes a file handle that has previously been opened by OpenFilter().
If this is as simple as calling close(Handle), a derived class need not implement this function, because this is done by the default implementation.
Reimplemented from cDevice.
void cDvbDevice::CloseFilter | ( | int | Handle | ) | [protected, virtual] |
Closes a file handle that has previously been opened by OpenFilter().
If this is as simple as calling close(Handle), a derived class need not implement this function, because this is done by the default implementation.
Reimplemented from cDevice.
Definition at line 1395 of file dvbdevice.c.
void cDvbDevice::DetachAllReceivers | ( | void | ) | [protected, virtual] |
Detaches all receivers from this device.
Reimplemented from cDevice.
Definition at line 1570 of file dvbdevice.c.
References bondedDevice, bondMutex, and needsDetachBondedReceivers.
virtual void cDvbDevice::DetachAllReceivers | ( | void | ) | [protected, virtual] |
Detaches all receivers from this device.
Reimplemented from cDevice.
cString cDvbDevice::DeviceName | ( | void | ) | const [virtual] |
Returns a string identifying the name of this device.
The default implementation returns an empty string.
Reimplemented from cDevice.
Definition at line 1093 of file dvbdevice.c.
References frontendInfo.
virtual cString cDvbDevice::DeviceName | ( | void | ) | const [virtual] |
Returns a string identifying the name of this device.
The default implementation returns an empty string.
Reimplemented from cDevice.
static cString cDvbDevice::DvbName | ( | const char * | Name, |
int | Adapter, | ||
int | Frontend | ||
) | [static, protected] |
cString cDvbDevice::DvbName | ( | const char * | Name, |
int | Adapter, | ||
int | Frontend | ||
) | [static, protected] |
Definition at line 1049 of file dvbdevice.c.
References DEV_DVB_ADAPTER, DEV_DVB_BASE, and cString::sprintf().
Referenced by DvbOpen(), Exists(), OpenFilter(), and Probe().
static int cDvbDevice::DvbOpen | ( | const char * | Name, |
int | Adapter, | ||
int | Frontend, | ||
int | Mode, | ||
bool | ReportError = false |
||
) | [static, protected] |
int cDvbDevice::DvbOpen | ( | const char * | Name, |
int | Adapter, | ||
int | Frontend, | ||
int | Mode, | ||
bool | ReportError = false |
||
) | [static, protected] |
Definition at line 1054 of file dvbdevice.c.
References DvbName(), and LOG_ERROR_STR.
Referenced by cDvbDevice(), cDvbHdFfDevice::cDvbHdFfDevice(), cDvbSdFfDevice::cDvbSdFfDevice(), OpenDvr(), cDvbHdFfDevice::SetPid(), cDvbSdFfDevice::SetPid(), SetPid(), and cDvbSdFfDevice::SetPlayMode().
static bool cDvbDevice::Exists | ( | int | Adapter, |
int | Frontend | ||
) | [static, private] |
Checks whether the given adapter/frontend exists.
bool cDvbDevice::Exists | ( | int | Adapter, |
int | Frontend | ||
) | [static, private] |
Checks whether the given adapter/frontend exists.
Definition at line 1063 of file dvbdevice.c.
References DEV_DVB_FRONTEND, DvbName(), and LOG_ERROR_STR.
Referenced by Initialize().
int cDvbDevice::Frontend | ( | void | ) | const [inline] |
Definition at line 139 of file dvbdevice.h.
References frontend.
Referenced by cDvbDevice(), Initialize(), and QueryDeliverySystems().
int cDvbDevice::Frontend | ( | void | ) | const [inline] |
Definition at line 139 of file include/vdr/dvbdevice.h.
References frontend.
const cChannel * cDvbDevice::GetCurrentlyTunedTransponder | ( | void | ) | const [virtual] |
Returns a pointer to the currently tuned transponder.
This is not one of the channels in the global cChannels list, but rather a local copy. The result may be NULL if the device is not tuned to any transponder.
Reimplemented from cDevice.
Definition at line 1510 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::GetTransponder().
virtual const cChannel* cDvbDevice::GetCurrentlyTunedTransponder | ( | void | ) | const [virtual] |
bool cDvbDevice::GetTSPacket | ( | uchar *& | Data | ) | [protected, virtual] |
Gets exactly one TS packet from the DVR of this device and returns a pointer to it in Data.
Only the first 188 bytes (TS_SIZE) Data points to are valid and may be accessed. If there is currently no new data available, Data will be set to NULL. The function returns false in case of a non recoverable error, otherwise it returns true, even if Data is NULL.
Reimplemented from cDevice.
Definition at line 1561 of file dvbdevice.c.
References cTSBuffer::Get(), and tsBuffer.
virtual bool cDvbDevice::GetTSPacket | ( | uchar *& | Data | ) | [protected, virtual] |
Gets exactly one TS packet from the DVR of this device and returns a pointer to it in Data.
Only the first 188 bytes (TS_SIZE) Data points to are valid and may be accessed. If there is currently no new data available, Data will be set to NULL. The function returns false in case of a non recoverable error, otherwise it returns true, even if Data is NULL.
Reimplemented from cDevice.
bool cDvbDevice::HasCi | ( | void | ) | [virtual] |
Returns true if this device has a Common Interface.
Reimplemented from cDevice.
Definition at line 1326 of file dvbdevice.c.
References ciAdapter.
virtual bool cDvbDevice::HasCi | ( | void | ) | [virtual] |
Returns true if this device has a Common Interface.
Reimplemented from cDevice.
virtual bool cDvbDevice::HasLock | ( | int | TimeoutMs = 0 | ) | [virtual] |
Returns true if the device has a lock on the requested transponder.
Default is true, a specific device implementation may return false to indicate that it is not ready yet. If TimeoutMs is not zero, waits for the given number of milliseconds before returning false.
Reimplemented from cDevice.
bool cDvbDevice::HasLock | ( | int | TimeoutMs = 0 | ) | [virtual] |
Returns true if the device has a lock on the requested transponder.
Default is true, a specific device implementation may return false to indicate that it is not ready yet. If TimeoutMs is not zero, waits for the given number of milliseconds before returning false.
Reimplemented from cDevice.
Definition at line 1532 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::Locked().
bool cDvbDevice::Initialize | ( | void | ) | [static] |
Initializes the DVB devices.
Must be called before accessing any DVB functions.
Definition at line 1098 of file dvbdevice.c.
References Adapter(), AddDirectory(), cVector< T >::Append(), DEV_DVB_ADAPTER, DEV_DVB_BASE, DEV_DVB_FRONTEND, Exists(), Frontend(), isyslog, MAXDVBDEVICES, cReadDir::Next(), cDevice::NextCardIndex(), cReadDir::Ok(), Probe(), cVector< T >::Size(), cStringList::Sort(), cString::sprintf(), and cDevice::UseDevice().
Referenced by main().
static bool cDvbDevice::Initialize | ( | void | ) | [static] |
Initializes the DVB devices.
Must be called before accessing any DVB functions.
virtual bool cDvbDevice::IsTunedToTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if this device is currently tuned to the given Channel's transponder.
Reimplemented from cDevice.
bool cDvbDevice::IsTunedToTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if this device is currently tuned to the given Channel's transponder.
Reimplemented from cDevice.
Definition at line 1515 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::IsTunedTo().
Referenced by cDvbHdFfDevice::SetChannelDevice(), and cDvbSdFfDevice::SetChannelDevice().
virtual bool cDvbDevice::MaySwitchTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if it is ok to switch to the Channel's transponder on this device, without disturbing any other activities.
If an occupied timeout has been set for this device, and that timeout has not yet expired, this function returns false,
Reimplemented from cDevice.
bool cDvbDevice::MaySwitchTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if it is ok to switch to the Channel's transponder on this device, without disturbing any other activities.
If an occupied timeout has been set for this device, and that timeout has not yet expired, this function returns false,
Reimplemented from cDevice.
Definition at line 1520 of file dvbdevice.c.
References BondingOk().
int cDvbDevice::NumProvidedSystems | ( | void | ) | const [virtual] |
Returns the number of individual "delivery systems" this device provides.
The default implementation returns 0, so any derived class that can actually provide channels must implement this function. The result of this function is used when selecting a device, in order to avoid devices that provide more than one system.
Reimplemented from cDevice.
Definition at line 1495 of file dvbdevice.c.
References numDeliverySystems, and numModulations.
virtual int cDvbDevice::NumProvidedSystems | ( | void | ) | const [virtual] |
Returns the number of individual "delivery systems" this device provides.
The default implementation returns 0, so any derived class that can actually provide channels must implement this function. The result of this function is used when selecting a device, in order to avoid devices that provide more than one system.
Reimplemented from cDevice.
bool cDvbDevice::OpenDvr | ( | void | ) | [protected, virtual] |
Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver.
Reimplemented from cDevice.
Definition at line 1542 of file dvbdevice.c.
References adapter, cDevice::CardIndex(), CloseDvr(), DEV_DVB_DVR, DvbOpen(), fd_dvr, frontend, MEGABYTE, and tsBuffer.
virtual bool cDvbDevice::OpenDvr | ( | void | ) | [protected, virtual] |
virtual int cDvbDevice::OpenFilter | ( | u_short | Pid, |
u_char | Tid, | ||
u_char | Mask | ||
) | [protected, virtual] |
Opens a file handle for the given filter data.
A derived device that provides section data must implement this function.
Reimplemented from cDevice.
int cDvbDevice::OpenFilter | ( | u_short | Pid, |
u_char | Tid, | ||
u_char | Mask | ||
) | [protected, virtual] |
Opens a file handle for the given filter data.
A derived device that provides section data must implement this function.
Reimplemented from cDevice.
Definition at line 1371 of file dvbdevice.c.
References adapter, DEV_DVB_DEMUX, DvbName(), esyslog, and frontend.
bool cDvbDevice::Probe | ( | int | Adapter, |
int | Frontend | ||
) | [static, private] |
Probes for existing DVB devices.
Reimplemented in cDvbHdFfDevice.
Definition at line 1080 of file dvbdevice.c.
References cDvbDevice(), DEV_DVB_FRONTEND, dsyslog, DvbDeviceProbes, and DvbName().
Referenced by Initialize().
static bool cDvbDevice::Probe | ( | int | Adapter, |
int | Frontend | ||
) | [static, private] |
Probes for existing DVB devices.
Reimplemented in cDvbHdFfDevice.
bool cDvbDevice::ProvidesChannel | ( | const cChannel * | Channel, |
int | Priority = IDLEPRIORITY , |
||
bool * | NeedsDetachReceivers = NULL |
||
) | const [virtual] |
Returns true if this device can provide the given channel.
In case the device has cReceivers attached to it, Priority is used to decide whether the caller's request can be honored. The special Priority value IDLEPRIORITY will tell the caller whether this device is principally able to provide the given Channel, regardless of any attached cReceivers. If NeedsDetachReceivers is given, the resulting value in it will tell the caller whether or not it will have to detach any currently attached receivers from this device before calling SwitchChannel. Note that the return value in NeedsDetachReceivers is only meaningful if the function itself actually returns true. The default implementation always returns false, so a derived cDevice class that can provide channels must implement this function.
Reimplemented from cDevice.
Definition at line 1442 of file dvbdevice.c.
References cChannel::Apid(), bondedDevice, BondingOk(), cChannel::Ca(), CA_ENCRYPTED_MIN, cDevice::CamSlot(), cCamSlot::CanDecrypt(), cChannel::Dpid(), dvbTuner, cDevice::HasPid(), IDLEPRIORITY, cDvbTuner::IsTunedTo(), needsDetachBondedReceivers, cDevice::Priority(), ProvidesTransponder(), cDevice::Receiving(), and cChannel::Vpid().
virtual bool cDvbDevice::ProvidesChannel | ( | const cChannel * | Channel, |
int | Priority = IDLEPRIORITY , |
||
bool * | NeedsDetachReceivers = NULL |
||
) | const [virtual] |
Returns true if this device can provide the given channel.
In case the device has cReceivers attached to it, Priority is used to decide whether the caller's request can be honored. The special Priority value IDLEPRIORITY will tell the caller whether this device is principally able to provide the given Channel, regardless of any attached cReceivers. If NeedsDetachReceivers is given, the resulting value in it will tell the caller whether or not it will have to detach any currently attached receivers from this device before calling SwitchChannel. Note that the return value in NeedsDetachReceivers is only meaningful if the function itself actually returns true. The default implementation always returns false, so a derived cDevice class that can provide channels must implement this function.
Reimplemented from cDevice.
bool cDvbDevice::ProvidesDeliverySystem | ( | int | DeliverySystem | ) | const [virtual] |
Definition at line 1400 of file dvbdevice.c.
References deliverySystems, and numDeliverySystems.
Referenced by Bond(), ProvidesSource(), and ProvidesTransponder().
virtual bool cDvbDevice::ProvidesDeliverySystem | ( | int | DeliverySystem | ) | const [virtual] |
virtual bool cDvbDevice::ProvidesEIT | ( | void | ) | const [virtual] |
Returns true if this device provides EIT data and thus wants to be tuned to the channels it can receive regularly to update the data.
The default implementation returns false.
Reimplemented from cDevice.
bool cDvbDevice::ProvidesEIT | ( | void | ) | const [virtual] |
Returns true if this device provides EIT data and thus wants to be tuned to the channels it can receive regularly to update the data.
The default implementation returns false.
Reimplemented from cDevice.
Definition at line 1490 of file dvbdevice.c.
References dvbTuner.
bool cDvbDevice::ProvidesSource | ( | int | Source | ) | const [virtual] |
Returns true if this device can provide the given source.
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice.
Definition at line 1409 of file dvbdevice.c.
References ProvidesDeliverySystem(), cSource::st_Mask, cSource::stAtsc, cSource::stCable, cSource::stNone, cSource::stSat, and cSource::stTerr.
Referenced by ProvidesTransponder().
virtual bool cDvbDevice::ProvidesSource | ( | int | Source | ) | const [virtual] |
Returns true if this device can provide the given source.
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice.
virtual bool cDvbDevice::ProvidesTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if this device can provide the transponder of the given Channel (which implies that it can provide the Channel's source).
Reimplemented from cDevice.
bool cDvbDevice::ProvidesTransponder | ( | const cChannel * | Channel | ) | const [virtual] |
Returns true if this device can provide the transponder of the given Channel (which implies that it can provide the Channel's source).
Reimplemented from cDevice.
Definition at line 1419 of file dvbdevice.c.
References cDevice::CardIndex(), cDevice::DeviceHooksProvidesTransponder(), cSetup::DiSEqC, Diseqcs, FE_CAN_TURBO_FEC, cChannel::Frequency(), frontendInfo, cDiseqcs::Get(), GetRequiredDeliverySystem(), cSource::IsSat(), cChannel::Parameters(), ProvidesDeliverySystem(), ProvidesSource(), Setup, and cChannel::Source().
Referenced by ProvidesChannel().
bool cDvbDevice::QueryDeliverySystems | ( | int | fd_frontend | ) | [private] |
Definition at line 1153 of file dvbdevice.c.
References adapter, DeliverySystemNames, deliverySystems, esyslog, FE_CAN_TURBO_FEC, frontend, Frontend(), frontendInfo, isyslog, LOG_ERROR, MapToUserString(), MAXDELIVERYSYSTEMS, numDeliverySystems, numModulations, SETCMD, and cString::sprintf().
Referenced by cDvbDevice().
bool cDvbDevice::QueryDeliverySystems | ( | int | fd_frontend | ) | [private] |
virtual bool cDvbDevice::Ready | ( | void | ) | [virtual] |
Returns true if this device is ready.
Devices with conditional access hardware may need some time until they are up and running. This function is called in a loop at startup until all devices are ready (see WaitForAllDevicesReady()).
Reimplemented from cDevice.
bool cDvbDevice::Ready | ( | void | ) | [virtual] |
Returns true if this device is ready.
Devices with conditional access hardware may need some time until they are up and running. This function is called in a loop at startup until all devices are ready (see WaitForAllDevicesReady()).
Reimplemented from cDevice.
Definition at line 1221 of file dvbdevice.c.
References ciAdapter, and cCiAdapter::Ready().
bool cDvbDevice::SetChannelDevice | ( | const cChannel * | Channel, |
bool | LiveView | ||
) | [protected, virtual] |
Sets the device to the given channel (actual physical setup).
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice, and cDvbHdFfDevice.
Definition at line 1525 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::SetChannel().
Referenced by cDvbHdFfDevice::SetChannelDevice(), and cDvbSdFfDevice::SetChannelDevice().
virtual bool cDvbDevice::SetChannelDevice | ( | const cChannel * | Channel, |
bool | LiveView | ||
) | [protected, virtual] |
Sets the device to the given channel (actual physical setup).
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice, and cDvbHdFfDevice.
virtual bool cDvbDevice::SetPid | ( | cPidHandle * | Handle, |
int | Type, | ||
bool | On | ||
) | [protected, virtual] |
Does the actual PID setting on this device.
On indicates whether the PID shall be added or deleted. Handle->handle can be used by the device to store information it needs to receive this PID (for instance a file handle). Handle->used indicates how many receivers are using this PID. Type indicates some special types of PIDs, which the device may need to set in a specific way.
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice, and cDvbHdFfDevice.
bool cDvbDevice::SetPid | ( | cPidHandle * | Handle, |
int | Type, | ||
bool | On | ||
) | [protected, virtual] |
Does the actual PID setting on this device.
On indicates whether the PID shall be added or deleted. Handle->handle can be used by the device to store information it needs to receive this PID (for instance a file handle). Handle->used indicates how many receivers are using this PID. Type indicates some special types of PIDs, which the device may need to set in a specific way.
Reimplemented from cDevice.
Reimplemented in cDvbSdFfDevice, and cDvbHdFfDevice.
Definition at line 1331 of file dvbdevice.c.
References adapter, CHECK, DEV_DVB_DEMUX, DvbOpen(), frontend, cDevice::cPidHandle::handle, LOG_ERROR, cDevice::cPidHandle::pid, cDevice::ptTeletext, and cDevice::cPidHandle::used.
static void cDvbDevice::SetTransferModeForDolbyDigital | ( | int | Mode | ) | [static] |
void cDvbDevice::SetTransferModeForDolbyDigital | ( | int | Mode | ) | [static] |
Definition at line 1537 of file dvbdevice.c.
References setTransferModeForDolbyDigital.
Referenced by cExternalAudio::cExternalAudio().
int cDvbDevice::SignalQuality | ( | void | ) | const [virtual] |
Returns the "quality" of the currently received signal.
This is a value in the range 0 (worst quality) through 100 (best possible quality). A value of -1 indicates that this device has no concept of a "signal quality".
Reimplemented from cDevice.
Definition at line 1505 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::GetSignalQuality().
virtual int cDvbDevice::SignalQuality | ( | void | ) | const [virtual] |
Returns the "quality" of the currently received signal.
This is a value in the range 0 (worst quality) through 100 (best possible quality). A value of -1 indicates that this device has no concept of a "signal quality".
Reimplemented from cDevice.
virtual int cDvbDevice::SignalStrength | ( | void | ) | const [virtual] |
Returns the "strength" of the currently received signal.
This is a value in the range 0 (no signal at all) through 100 (best possible signal). A value of -1 indicates that this device has no concept of a "signal strength".
Reimplemented from cDevice.
int cDvbDevice::SignalStrength | ( | void | ) | const [virtual] |
Returns the "strength" of the currently received signal.
This is a value in the range 0 (no signal at all) through 100 (best possible signal). A value of -1 indicates that this device has no concept of a "signal strength".
Reimplemented from cDevice.
Definition at line 1500 of file dvbdevice.c.
References dvbTuner, and cDvbTuner::GetSignalStrength().
void cDvbDevice::UnBond | ( | void | ) |
Removes this device from any bonding it might have with other devices.
If this device is not bonded with any other device, nothing happens.
Definition at line 1301 of file dvbdevice.c.
References bondedDevice, bondMutex, cDevice::CardIndex(), dsyslog, dvbTuner, and cDvbTuner::UnBond().
Referenced by ~cDvbDevice().
void cDvbDevice::UnBond | ( | void | ) |
Removes this device from any bonding it might have with other devices.
If this device is not bonded with any other device, nothing happens.
static void cDvbDevice::UnBondDevices | ( | void | ) | [static] |
Unbonds all devices.
void cDvbDevice::UnBondDevices | ( | void | ) | [static] |
Unbonds all devices.
Definition at line 1269 of file dvbdevice.c.
References cDevice::GetDevice(), and cDevice::NumDevices().
Referenced by BondDevices().
int cDvbDevice::adapter [protected] |
Definition at line 124 of file dvbdevice.h.
Referenced by Adapter(), cDvbDevice(), cDvbHdFfDevice::cDvbHdFfDevice(), cDvbSdFfDevice::cDvbSdFfDevice(), OpenDvr(), OpenFilter(), QueryDeliverySystems(), cDvbHdFfDevice::SetPid(), cDvbSdFfDevice::SetPid(), SetPid(), and cDvbSdFfDevice::SetPlayMode().
cDvbDevice * cDvbDevice::bondedDevice [private] |
Definition at line 132 of file dvbdevice.h.
Referenced by Bond(), BondingOk(), cDvbDevice(), DetachAllReceivers(), ProvidesChannel(), and UnBond().
static cMutex cDvbDevice::bondMutex [static, private] |
Definition at line 131 of file dvbdevice.h.
Referenced by Bond(), BondingOk(), DetachAllReceivers(), and UnBond().
cCiAdapter * cDvbDevice::ciAdapter [private] |
Definition at line 173 of file dvbdevice.h.
Referenced by cDvbDevice(), HasCi(), Ready(), and ~cDvbDevice().
int cDvbDevice::deliverySystems [private] |
Definition at line 127 of file dvbdevice.h.
Referenced by ProvidesDeliverySystem(), and QueryDeliverySystems().
cDvbTuner * cDvbDevice::dvbTuner [private] |
Definition at line 178 of file dvbdevice.h.
Referenced by Bond(), BondingOk(), cDvbDevice(), GetCurrentlyTunedTransponder(), HasLock(), IsTunedToTransponder(), ProvidesChannel(), ProvidesEIT(), SetChannelDevice(), SignalQuality(), SignalStrength(), UnBond(), and ~cDvbDevice().
int cDvbDevice::fd_ca [private] |
Definition at line 130 of file dvbdevice.h.
Referenced by cDvbDevice().
int cDvbDevice::fd_dvr [private] |
Definition at line 130 of file dvbdevice.h.
Referenced by cDvbDevice(), CloseDvr(), and OpenDvr().
int cDvbDevice::frontend [protected] |
Definition at line 124 of file dvbdevice.h.
Referenced by cDvbDevice(), cDvbHdFfDevice::cDvbHdFfDevice(), cDvbSdFfDevice::cDvbSdFfDevice(), Frontend(), OpenDvr(), OpenFilter(), QueryDeliverySystems(), cDvbHdFfDevice::SetPid(), cDvbSdFfDevice::SetPid(), SetPid(), and cDvbSdFfDevice::SetPlayMode().
dvb_frontend_info cDvbDevice::frontendInfo [private] |
Definition at line 126 of file dvbdevice.h.
Referenced by DeviceName(), ProvidesTransponder(), and QueryDeliverySystems().
bool cDvbDevice::needsDetachBondedReceivers [mutable, private] |
Definition at line 133 of file dvbdevice.h.
Referenced by cDvbDevice(), DetachAllReceivers(), and ProvidesChannel().
int cDvbDevice::numDeliverySystems [private] |
Definition at line 128 of file dvbdevice.h.
Referenced by cDvbDevice(), NumProvidedSystems(), ProvidesDeliverySystem(), and QueryDeliverySystems().
int cDvbDevice::numModulations [private] |
Definition at line 129 of file dvbdevice.h.
Referenced by cDvbDevice(), NumProvidedSystems(), and QueryDeliverySystems().
static int cDvbDevice::setTransferModeForDolbyDigital = 1 [static, protected] |
Definition at line 215 of file dvbdevice.h.
Referenced by cDvbSdFfDevice::SetAudioBypass(), cDvbSdFfDevice::SetAudioTrackDevice(), and SetTransferModeForDolbyDigital().
cTSBuffer * cDvbDevice::tsBuffer [private] |
< Controls how the DVB device handles Transfer Mode when replaying Dolby Digital audio.
0 = don't set "audio bypass" in driver/firmware, don't force Transfer Mode 1 = set "audio bypass" in driver/firmware, force Transfer Mode (default) 2 = don't set "audio bypass" in driver/firmware, force Transfer Mode
Definition at line 227 of file dvbdevice.h.
Referenced by cDvbDevice(), CloseDvr(), GetTSPacket(), OpenDvr(), cDvbHdFfDevice::PlayAudio(), and cDvbHdFfDevice::PlayVideo().