Welcome 微信登录

首页 / 操作系统 / Linux / 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

     
    214214#include <sys/types.h> 
    215215#include <sys/mman.h> 
    216216 
    217 #include <linux/videodev.h> 
     217#include <libv4l1-videodev.h> 
    218218 
    219219#include <string.h> 
    220220#include <stdlib.h> 
  • cap_libv4l.cpp

     
    224224#include "highgui.h" 
    225225#include "precomp.hpp" 
    226226 
    227 #if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L
     227#if !defined WIN32 && defined HAVE_CAMV4L
    228228 
    229229#define CLEAR(x) memset (&(x), 0, sizeof (x)) 
    230230 
     
    241241#include <sys/stat.h> 
    242242#include <sys/ioctl.h> 
    243243 
    244 #include <linux/videodev.h> 
     244#include <libv4l1-videodev.h> 
    245245#include <linux/videodev2.h> 
    246246 
    247247#include <libv4l1.h> 
videodev.h and linus-headers-2.6.38 - package failsinstall Ant 1.8.0 or later in Ubuntu 10.04相关资讯      本文评论 查看全部评论 (0)
表情: 姓名: 字数