]> git.sesse.net Git - vlc/blobdiff - modules/access/pvr.c
DTV: read TS feed old-style from the monolithic DVR
[vlc] / modules / access / pvr.c
index 87c9bdc3a17839cc2bc21915bcfa8d360a270cb8..c45ddc6b18963cf181693d5c701084fc7bd4a6b2 100644 (file)
 #include <unistd.h>
 #include <linux/types.h>
 #include <sys/ioctl.h>
-#ifdef HAVE_NEW_LINUX_VIDEODEV2_H
-#   ifdef VIDEODEV2_H_FILE
-#   include VIDEODEV2_H_FILE
-#   else
+#if defined(HAVE_LINUX_VIDEODEV2_H)
 #   include <linux/videodev2.h>
-#   endif
+#elif defined(HAVE_SYS_VIDEOIO_H)
+#   include <sys/videoio.h>
 #else
-#include "videodev2.h"
+#   error "No Video4Linux2 headers found."
 #endif
 
 /*****************************************************************************
@@ -307,8 +305,6 @@ static int ConfigureIVTV( access_t * p_access )
     return VLC_SUCCESS;
 }
 
-#ifdef HAVE_NEW_LINUX_VIDEODEV2_H
-
 #define MAX_V4L2_CTRLS (6)
 /*****************************************************************************
  * AddV4L2Ctrl: adds a control to the v4l2 controls list
@@ -536,8 +532,6 @@ static int ConfigureV4L2( access_t * p_access )
     return VLC_SUCCESS;
 }
 
-#endif /* HAVE_NEW_LINUX_VIDEODEV2_H */
-
 /*****************************************************************************
  * Open: open the device
  *****************************************************************************/
@@ -856,17 +850,12 @@ static int Open( vlc_object_t * p_this )
     {
         if( p_sys->b_v4l2_api )
         {
-#ifdef HAVE_NEW_LINUX_VIDEODEV2_H
             result = ConfigureV4L2( p_access );
             if( result != VLC_SUCCESS )
             {
                 Close( VLC_OBJECT(p_access) );
                 return result;
             }
-#else
-            msg_Warn( p_access, "You have new ivtvdrivers, "
-                      "but this vlc was built against an old v4l2 version." );
-#endif
         }
         else
         {