Added support for DVB devices with more than one frontend that all use the same dvr and demux

This commit is contained in:
Klaus Schmidinger
2018-10-29 12:16:35 +01:00
parent bcee8ad43d
commit cbc77f1f25
3 changed files with 228 additions and 94 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.h 4.4 2017/05/09 11:24:47 kls Exp $
* $Id: dvbdevice.h 4.5 2018/10/20 11:39:11 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -67,8 +67,6 @@ enum {
// --- End of definitions for older DVB API versions -------------------------
#define MAXDELIVERYSYSTEMS 8
#define DEV_VIDEO "/dev/video"
#define DEV_DVB_BASE "/dev/dvb"
#define DEV_DVB_ADAPTER "adapter"
@@ -162,12 +160,12 @@ public:
class cDvbTuner;
cString DvbName(const char *Name, int Adapter, int Frontend);
int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError = false);
/// The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
class cDvbDevice : public cDevice {
protected:
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);
private:
static bool Exists(int Adapter, int Frontend);
///< Checks whether the given adapter/frontend exists.
@@ -182,16 +180,11 @@ public:
protected:
int adapter, frontend;
private:
dvb_frontend_info frontendInfo;
int deliverySystems[MAXDELIVERYSYSTEMS];
int numDeliverySystems;
int numModulations;
int fd_dvr, fd_ca;
bool checkTsBuffer;
static cMutex bondMutex;
cDvbDevice *bondedDevice;
mutable bool needsDetachBondedReceivers;
bool QueryDeliverySystems(int fd_frontend);
public:
cDvbDevice(int Adapter, int Frontend);
virtual ~cDvbDevice();