mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now checking the driver's DVB_API_VERSION
This commit is contained in:
parent
7c40984f1b
commit
35a69ee743
5
HISTORY
5
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.
|
||||
|
19
dvbdevice.c
19
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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user