Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
41b8479d
Commit
41b8479d
authored
Sep 09, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Sep 09, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1376 from StevenPuttemans:bugfix_3186
parents
531471b0
e7921c3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
cap_v4l.cpp
modules/highgui/src/cap_v4l.cpp
+17
-8
No files found.
modules/highgui/src/cap_v4l.cpp
View file @
41b8479d
...
...
@@ -1236,10 +1236,10 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) {
//set timestamp in capture struct to be timestamp of most recent frame
capture
->
timestamp
=
buf
.
timestamp
;
return
1
;
return
2
;
}
static
void
mainloop_v4l2
(
CvCaptureCAM_V4L
*
capture
)
{
static
int
mainloop_v4l2
(
CvCaptureCAM_V4L
*
capture
)
{
unsigned
int
count
;
count
=
1
;
...
...
@@ -1273,8 +1273,13 @@ static void mainloop_v4l2(CvCaptureCAM_V4L* capture) {
break
;
}
if
(
read_frame_v4l2
(
capture
))
break
;
int
readresult
=
read_frame_v412
(
capture
);
if
(
readresult
==
2
){
return
0
;
}
if
(
readresult
){
return
1
;
}
}
}
}
...
...
@@ -1354,7 +1359,10 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) {
{
// skip first frame. it is often bad -- this is unnotied in traditional apps,
// but could be fatal if bad jpeg is enabled
mainloop_v4l2
(
capture
);
if
(
!
mainloop_v4l2
(
capture
)){
fprintf
(
stderr
,
"HIGHGUI ERROR: V4L: Could not capture image.
\n
"
);
return
0
;
}
}
#endif
...
...
@@ -1366,9 +1374,10 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) {
if
(
V4L2_SUPPORT
==
1
)
{
mainloop_v4l2
(
capture
);
if
(
!
mainloop_v4l2
(
capture
)){
fprintf
(
stderr
,
"HIGHGUI ERROR: V4L: Could not capture image.
\n
"
);
return
0
;
}
}
#endif
/* HAVE_CAMV4L2 */
#if defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment