V4l1 is no longer available in 2.6.38 kernel

字体大小: 中小 标准 ->行高大小: 标准

Reported by: mkottman Owned by: 
Priority:  major  Component:  highgui 
Version:   Keywords:  v4l 
Cc:    

Description
In the 2.6.38 kernel (used in Ubuntu Natty), the 'linux/videoinput.h' header file is no longer available. This breaks the compilation of 'opencv/modules/highui/src/cap_libv4l.cpp'.


A temporary patch which fixes the problem in Ubuntu is provided. It requires the installation of the 'libv4l-dev' package, which provides a replacement 'libv4l1-videodev.h' header.


Attachments
v4l_2.6.38.patch  (0.9 KB) - added by mkottman 8 weeks ago.

v4l_2.6.38.patch File v4l_2.6.38.patch, 0.9 KB (added by mkottman, 8 weeks ago)

  • cap_v4l.cpp   214 214 #include <sys/types.h>  215 215 #include <sys/mman.h>  216 216   217   #include <linux/videodev.h>    217 #include <libv4l1-videodev.h>  218 218   219 219 #include <string.h>  220 220 #include <stdlib.h> 
  • cap_libv4l.cpp   224 224 #include "highgui.h"  225 225 #include "precomp.hpp"  226 226   227   #if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L2    227 #if !defined WIN32 && defined HAVE_CAMV4L2  228 228   229 229 #define CLEAR(x) memset (&(x), 0, sizeof (x))  230 230   … …   241 241 #include <sys/stat.h>  242 242 #include <sys/ioctl.h>  243 243   244   #include <linux/videodev.h>    244 #include <libv4l1-videodev.h>  245 245 #include <linux/videodev2.h>  246 246   247 247 #include <libv4l1.h> 

    此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/60459.html