summaryrefslogtreecommitdiff
path: root/dvbapi.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-05-01 16:29:46 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-05-01 16:29:46 +0200
commiteff7aa4a3d2247ee3c44031e6bf5d745723cc5ce (patch)
tree398ba3859a89204ba24fe1e47ca5eab815745ed1 /dvbapi.h
parentf7ac74ede445b099e8fa97a15674f2b4ecde279a (diff)
downloadvdr-eff7aa4a3d2247ee3c44031e6bf5d745723cc5ce.tar.gz
vdr-eff7aa4a3d2247ee3c44031e6bf5d745723cc5ce.tar.bz2
Prepared for more than one DVB card
Diffstat (limited to 'dvbapi.h')
-rw-r--r--dvbapi.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/dvbapi.h b/dvbapi.h
index 91e554e9..6a9e3aa6 100644
--- a/dvbapi.h
+++ b/dvbapi.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.h 1.8 2000/04/24 15:31:07 kls Exp $
+ * $Id: dvbapi.h 1.9 2000/05/01 12:46:25 kls Exp $
*/
#ifndef __DVBAPI_H
@@ -43,10 +43,29 @@ enum eDvbColor { clrBackground,
class cDvbApi {
private:
int videoDev;
+ cDvbApi(const char *FileName);
public:
- cDvbApi(void);
~cDvbApi();
+#define MAXDVBAPI 2
+ static int NumDvbApis;
+private:
+ static cDvbApi *dvbApi[MAXDVBAPI];
+public:
+ static cDvbApi *PrimaryDvbApi;
+ static cDvbApi *GetDvbApi(int Ca = 0);
+ // Selects a free DVB device, starting with the highest device number.
+ // If Ca is nor 0, the device with the given number will be returned
+ // if it is not currently recording.
+ int Index(void);
+ // Returns the index of this DvbApi.
+ static bool Init(void);
+ // Initializes the DVB API and probes for existing DVB devices.
+ // Must be called before accessing any DVB functions.
+ static void Cleanup(void);
+ // Closes down all DVB devices.
+ // Must be called at the end of the program.
+
// On Screen Display facilities
private:
@@ -91,7 +110,6 @@ private:
dvbSkip,
dvbGetIndex,
};
- bool isMainProcess;
pid_t pidRecord, pidReplay;
int fromRecord, toRecord;
int fromReplay, toReplay;
@@ -133,5 +151,5 @@ public:
// beginning of the recording.
bool GetIndex(int *Current, int *Total = NULL);
};
-
+
#endif //__DVBAPI_H