summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-11-03 12:31:51 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-11-03 12:31:51 +0100
commit35a69ee74322043c5b0d853e7f864a8cf5d2da55 (patch)
tree1f49af51c6e73b17d0e1705e038f3151ccf4bf18
parent7c40984f1b949ac1dfbf711d184b84381bc69b88 (diff)
downloadvdr-35a69ee74322043c5b0d853e7f864a8cf5d2da55.tar.gz
vdr-35a69ee74322043c5b0d853e7f864a8cf5d2da55.tar.bz2
Now checking the driver's DVB_API_VERSION1.1.15
-rw-r--r--HISTORY5
-rw-r--r--dvbdevice.c19
-rw-r--r--dvbdevice.h7
3 files changed, 18 insertions, 13 deletions
diff --git a/HISTORY b/HISTORY
index 96eb0706..dc276f51 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1716,3 +1716,8 @@ Video Disk Recorder Revision History
function always has to accept the entire data block immediately and there is
nothing that could be reasonably done in case an error occurs in one of the
cAudio objects.
+- Now checking the driver's DVB_API_VERSION in dvbdevice.h. Since VDR now requires
+ a driver dated 2002-11-01 or later the MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT and
+ DVB_DRIVER_VERSION stuff has been replaced with DO_REC_AND_PLAY_ON_PRIMARY_DEVICE,
+ which can be used to disable simultaneous recording and replaying on the primary
+ DVB device in case there are problems with this.
diff --git a/dvbdevice.c b/dvbdevice.c
index b8f0f27a..30d56586 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.33 2002/11/03 11:51:29 kls Exp $
+ * $Id: dvbdevice.c 1.34 2002/11/03 12:31:11 kls Exp $
*/
#include "dvbdevice.h"
@@ -32,6 +32,8 @@ extern "C" {
#include "status.h"
#include "transfer.h"
+#define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
+
#define DEV_VIDEO "/dev/video"
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
#define DEV_DVB_OSD "osd"
@@ -351,17 +353,10 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
}
else if (!IsPrimaryDevice())
result = true;
- else {
-#define DVB_DRIVER_VERSION 2002090101 //XXX+
-#define MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT 2002090101
-#ifdef DVB_DRIVER_VERSION
-#if (DVB_DRIVER_VERSION >= MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT)
- result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
+#ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
+ else
+ result = Priority >= Setup.PrimaryLimit;
#endif
-#else
-#warning "DVB_DRIVER_VERSION not defined - time shift with only one DVB device disabled!"
-#endif
- }
}
else
result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
@@ -386,7 +381,7 @@ static unsigned int FrequencyToHz(unsigned int f)
bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
{
-#if (DVB_DRIVER_VERSION < MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT)
+#ifndef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
if (HasDecoder())
LiveView = true;
#endif
diff --git a/dvbdevice.h b/dvbdevice.h
index 67b11950..709790cd 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,17 +4,22 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 1.17 2002/11/02 14:32:25 kls Exp $
+ * $Id: dvbdevice.h 1.18 2002/11/03 12:31:15 kls Exp $
*/
#ifndef __DVBDEVICE_H
#define __DVBDEVICE_H
#include <linux/dvb/frontend.h>
+#include <linux/dvb/version.h>
#include "device.h"
#include "dvbspu.h"
#include "eit.h"
+#if DVB_API_VERSION != 3
+#error VDR requires Linux DVB driver API version 3!
+#endif
+
#define MAXDVBDEVICES 4
class cDvbDevice : public cDevice {