summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-08-06 12:02:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-08-06 12:02:34 +0200
commitdd6bc9feea50553926a7d7f1b2fc1870dcba4f47 (patch)
tree831d190da8924942a620c35e4fb397225b8bd298
parent3e366d1ec4d11de00ebf596ab2d5cbe5e05540b1 (diff)
downloadvdr-dd6bc9feea50553926a7d7f1b2fc1870dcba4f47.tar.gz
vdr-dd6bc9feea50553926a7d7f1b2fc1870dcba4f47.tar.bz2
Checking if the video card is really a DVB card
-rw-r--r--HISTORY1
-rw-r--r--dvbapi.c10
2 files changed, 8 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index 31757b8b..8e917f19 100644
--- a/HISTORY
+++ b/HISTORY
@@ -118,3 +118,4 @@ Video Disk Recorder Revision History
of the recording.
- Improved reaction on user input in fast/slow forward/back modes.
- No more upper limit for the value of 'Pnr'.
+- Checking if the video card is really a DVB card.
diff --git a/dvbapi.c b/dvbapi.c
index 0e2ef7fc..91fe3cf7 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.20 2000/08/01 18:06:39 kls Exp $
+ * $Id: dvbapi.c 1.21 2000/08/06 12:00:13 kls Exp $
*/
#include "dvbapi.h"
@@ -1130,9 +1130,13 @@ bool cDvbApi::Init(void)
dsyslog(LOG_INFO, "probing %s", fileName);
int f = open(fileName, O_RDWR);
if (f >= 0) {
+ struct video_capability cap;
+ int r = ioctl(f, VIDIOCGCAP, &cap);
close(f);
- dvbApi[i] = new cDvbApi(fileName);
- NumDvbApis++;
+ if (r == 0 && (cap.type & VID_TYPE_DVB)) {
+ dvbApi[i] = new cDvbApi(fileName);
+ NumDvbApis++;
+ }
}
else {
if (errno != ENODEV)