[mythtv] fix build against ivtv-0.8.0 header

Ruediger Oertel ro at suse.de
Tue Nov 14 23:31:26 UTC 2006


HI,

attached is a patch to compile the svn version against the
ivtv-0.8.0 ivtv.h header file (and it shouldn't even break
compilation with older versions). Even german videotext/teletext
works ;)

tested here on 2.6.18.2 with ivtv-0.8.0 on a Hauppauge WinTV PVR-250
tested mythtv svn checkout was r11721 (still applies against r11748)

-- 
with kind regards (mit freundlichem Grinsen),
   Ruediger Oertel (ro at novell.com,ro at suse.de,bugfinder at t-online.de)
----------------------------------------------------------------------
Linux Fatou 2.6.18.2-4-default #1 SMP Tue Nov 7 16:02:06 UTC 2006 x86_64
Key fingerprint = 17DC 6553 86A7 384B 53C5  CA5C 3CE4 F2E7 23F2 B417
-------------- next part --------------
--- libs/libmythtv/avformatdecoder.cpp
+++ libs/libmythtv/avformatdecoder.cpp
@@ -38,6 +38,22 @@
 #include "ivtv_myth.h"
 }
 
+#ifndef VBI_TYPE_TELETEXT
+#define VBI_TYPE_TELETEXT (1)
+#endif
+
+#ifndef VBI_TYPE_CC
+#define VBI_TYPE_CC (4)
+#endif
+
+#ifndef VBI_TYPE_WSS
+#define VBI_TYPE_WSS (5)
+#endif
+
+#ifndef VBI_TYPE_VPS
+#define VBI_TYPE_VPS (7)
+#endif
+
 #define LOC QString("AFD: ")
 #define LOC_ERR QString("AFD Error: ")
 #define LOC_WARN QString("AFD Warning: ")
--- libs/libmythtv/mpegrecorder.cpp
+++ libs/libmythtv/mpegrecorder.cpp
@@ -392,6 +392,12 @@
 
 bool MpegRecorder::SetIVTVDeviceOptions(int chanfd)
 {
+#ifndef IVTV_IOC_G_CODEC
+        VERBOSE((22 == errno) ? VB_RECORD : VB_IMPORTANT,
+                ((22 == errno) ? LOC_WARN : LOC_ERR) +
+                "Error getting codec params using old IVTV ioctl" + ENO);
+        return false;
+#else
     struct ivtv_ioctl_codec ivtvcodec;
     bzero(&ivtvcodec, sizeof(ivtvcodec));
 
@@ -471,6 +477,7 @@
     }
 
     return true;
+#endif // IVTV_IOC_G_CODEC
 }
 
 bool MpegRecorder::SetV4L2DeviceOptions(int chanfd)


More information about the mythtv-dev mailing list