mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Now checking the driver's DVB_API_VERSION
This commit is contained in:
		
							
								
								
									
										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 |   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 |   nothing that could be reasonably done in case an error occurs in one of the | ||||||
|   cAudio objects. |   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 |  * See the main source file 'vdr.c' for copyright information and | ||||||
|  * how to reach the author. |  * 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" | #include "dvbdevice.h" | ||||||
| @@ -32,6 +32,8 @@ extern "C" { | |||||||
| #include "status.h" | #include "status.h" | ||||||
| #include "transfer.h" | #include "transfer.h" | ||||||
|  |  | ||||||
|  | #define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1 | ||||||
|  |  | ||||||
| #define DEV_VIDEO         "/dev/video" | #define DEV_VIDEO         "/dev/video" | ||||||
| #define DEV_DVB_ADAPTER   "/dev/dvb/adapter" | #define DEV_DVB_ADAPTER   "/dev/dvb/adapter" | ||||||
| #define DEV_DVB_OSD       "osd" | #define DEV_DVB_OSD       "osd" | ||||||
| @@ -351,17 +353,10 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne | |||||||
|                  } |                  } | ||||||
|               else if (!IsPrimaryDevice()) |               else if (!IsPrimaryDevice()) | ||||||
|                  result = true; |                  result = true; | ||||||
|               else { | #ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE | ||||||
| #define DVB_DRIVER_VERSION 2002090101 //XXX+ |               else | ||||||
| #define MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT 2002090101 |                  result = Priority >= Setup.PrimaryLimit; | ||||||
| #ifdef DVB_DRIVER_VERSION |  | ||||||
| #if (DVB_DRIVER_VERSION >= MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT) |  | ||||||
|                  result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit; |  | ||||||
| #endif | #endif | ||||||
| #else |  | ||||||
| #warning "DVB_DRIVER_VERSION not defined - time shift with only one DVB device disabled!" |  | ||||||
| #endif |  | ||||||
|                  } |  | ||||||
|               } |               } | ||||||
|            else |            else | ||||||
|               result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit; |               result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit; | ||||||
| @@ -386,7 +381,7 @@ static unsigned int FrequencyToHz(unsigned int f) | |||||||
|  |  | ||||||
| bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) | 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()) |   if (HasDecoder()) | ||||||
|      LiveView = true; |      LiveView = true; | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -4,17 +4,22 @@ | |||||||
|  * See the main source file 'vdr.c' for copyright information and |  * See the main source file 'vdr.c' for copyright information and | ||||||
|  * how to reach the author. |  * 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 | #ifndef __DVBDEVICE_H | ||||||
| #define __DVBDEVICE_H | #define __DVBDEVICE_H | ||||||
|  |  | ||||||
| #include <linux/dvb/frontend.h> | #include <linux/dvb/frontend.h> | ||||||
|  | #include <linux/dvb/version.h> | ||||||
| #include "device.h" | #include "device.h" | ||||||
| #include "dvbspu.h" | #include "dvbspu.h" | ||||||
| #include "eit.h" | #include "eit.h" | ||||||
|  |  | ||||||
|  | #if DVB_API_VERSION != 3 | ||||||
|  | #error VDR requires Linux DVB driver API version 3! | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #define MAXDVBDEVICES  4 | #define MAXDVBDEVICES  4 | ||||||
|  |  | ||||||
| class cDvbDevice : public cDevice { | class cDvbDevice : public cDevice { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user