Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
be565c22
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
be565c22
编写于
1月 19, 2016
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5984 from terfendail:2.4
上级
5c21ca26
389f176a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
44 deletion
+3
-44
modules/highgui/src/cap_v4l.cpp
modules/highgui/src/cap_v4l.cpp
+3
-44
未找到文件。
modules/highgui/src/cap_v4l.cpp
浏览文件 @
be565c22
...
@@ -491,8 +491,6 @@ static int try_init_v4l2(CvCaptureCAM_V4L* capture, char *deviceName)
...
@@ -491,8 +491,6 @@ static int try_init_v4l2(CvCaptureCAM_V4L* capture, char *deviceName)
// 0 then detected nothing
// 0 then detected nothing
// 1 then V4L2 device
// 1 then V4L2 device
int
deviceIndex
;
/* Open and test V4L2 device */
/* Open and test V4L2 device */
capture
->
deviceHandle
=
open
(
deviceName
,
O_RDWR
/* required */
|
O_NONBLOCK
,
0
);
capture
->
deviceHandle
=
open
(
deviceName
,
O_RDWR
/* required */
|
O_NONBLOCK
,
0
);
if
(
-
1
==
capture
->
deviceHandle
)
if
(
-
1
==
capture
->
deviceHandle
)
...
@@ -514,28 +512,6 @@ static int try_init_v4l2(CvCaptureCAM_V4L* capture, char *deviceName)
...
@@ -514,28 +512,6 @@ static int try_init_v4l2(CvCaptureCAM_V4L* capture, char *deviceName)
return
0
;
return
0
;
}
}
/* Query channels number */
if
(
-
1
==
ioctl
(
capture
->
deviceHandle
,
VIDIOC_G_INPUT
,
&
deviceIndex
))
{
#ifndef NDEBUG
fprintf
(
stderr
,
"(DEBUG) try_init_v4l2 VIDIOC_G_INPUT
\"
%s
\"
: %s
\n
"
,
deviceName
,
strerror
(
errno
));
#endif
icvCloseCAM_V4L
(
capture
);
return
0
;
}
/* Query information about current input */
CLEAR
(
capture
->
inp
);
capture
->
inp
.
index
=
deviceIndex
;
if
(
-
1
==
ioctl
(
capture
->
deviceHandle
,
VIDIOC_ENUMINPUT
,
&
capture
->
inp
))
{
#ifndef NDEBUG
fprintf
(
stderr
,
"(DEBUG) try_init_v4l2 VIDIOC_ENUMINPUT
\"
%s
\"
: %s
\n
"
,
deviceName
,
strerror
(
errno
));
#endif
icvCloseCAM_V4L
(
capture
);
return
0
;
}
return
1
;
return
1
;
}
}
...
@@ -834,26 +810,6 @@ static int _capture_V4L2 (CvCaptureCAM_V4L *capture, char *deviceName)
...
@@ -834,26 +810,6 @@ static int _capture_V4L2 (CvCaptureCAM_V4L *capture, char *deviceName)
return
-
1
;
return
-
1
;
}
}
/* The following code sets the CHANNEL_NUMBER of the video input. Some video sources
have sub "Channel Numbers". For a typical V4L TV capture card, this is usually 1.
I myself am using a simple NTSC video input capture card that uses the value of 1.
If you are not in North America or have a different video standard, you WILL have to change
the following settings and recompile/reinstall. This set of settings is based on
the most commonly encountered input video source types (like my bttv card) */
if
(
capture
->
inp
.
index
>
0
)
{
CLEAR
(
capture
->
inp
);
capture
->
inp
.
index
=
CHANNEL_NUMBER
;
/* Set only channel number to CHANNEL_NUMBER */
/* V4L2 have a status field from selected video mode */
if
(
-
1
==
ioctl
(
capture
->
deviceHandle
,
VIDIOC_ENUMINPUT
,
&
capture
->
inp
))
{
fprintf
(
stderr
,
"HIGHGUI ERROR: V4L2: Aren't able to set channel number
\n
"
);
icvCloseCAM_V4L
(
capture
);
return
-
1
;
}
}
/* End if */
/* Find Window info */
/* Find Window info */
CLEAR
(
capture
->
form
);
CLEAR
(
capture
->
form
);
capture
->
form
.
type
=
V4L2_BUF_TYPE_VIDEO_CAPTURE
;
capture
->
form
.
type
=
V4L2_BUF_TYPE_VIDEO_CAPTURE
;
...
@@ -1157,6 +1113,9 @@ static CvCaptureCAM_V4L * icvCaptureFromCAM_V4L (int index)
...
@@ -1157,6 +1113,9 @@ static CvCaptureCAM_V4L * icvCaptureFromCAM_V4L (int index)
}
}
#endif
/* HAVE_CAMV4L */
#endif
/* HAVE_CAMV4L */
#ifdef HAVE_CAMV4L2
#ifdef HAVE_CAMV4L2
#ifndef HAVE_CAMV4L
return
NULL
;
#endif
/* !HAVE_CAMV4L */
}
else
{
}
else
{
V4L2_SUPPORT
=
1
;
V4L2_SUPPORT
=
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录