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
b117302b
Commit
b117302b
authored
Jul 21, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12016 from tyl12:fix_videoio_static_para
parents
e1205d04
dadde75e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
cap_v4l.cpp
modules/videoio/src/cap_v4l.cpp
+12
-3
No files found.
modules/videoio/src/cap_v4l.cpp
View file @
b117302b
...
...
@@ -277,6 +277,7 @@ struct CvCaptureCAM_V4L CV_FINAL : public CvCapture
__u32
palette
;
int
width
,
height
;
int
width_set
,
height_set
;
int
bufferSize
;
__u32
fps
;
bool
convert_rgb
;
...
...
@@ -795,6 +796,7 @@ bool CvCaptureCAM_V4L::open(const char* _deviceName)
FirstCapture
=
1
;
width
=
DEFAULT_V4L_WIDTH
;
height
=
DEFAULT_V4L_HEIGHT
;
width_set
=
height_set
=
0
;
bufferSize
=
DEFAULT_V4L_BUFFERS
;
fps
=
DEFAULT_V4L_FPS
;
convert_rgb
=
true
;
...
...
@@ -1748,7 +1750,6 @@ static bool icvSetControl (CvCaptureCAM_V4L* capture,
static
int
icvSetPropertyCAM_V4L
(
CvCaptureCAM_V4L
*
capture
,
int
property_id
,
double
value
){
static
int
width
=
0
,
height
=
0
;
bool
retval
=
false
;
bool
possible
;
...
...
@@ -1757,6 +1758,9 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
switch
(
property_id
)
{
case
CV_CAP_PROP_FRAME_WIDTH
:
{
int
&
width
=
capture
->
width_set
;
int
&
height
=
capture
->
height_set
;
width
=
cvRound
(
value
);
retval
=
width
!=
0
;
if
(
width
!=
0
&&
height
!=
0
)
{
...
...
@@ -1765,8 +1769,12 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
retval
=
v4l2_reset
(
capture
);
width
=
height
=
0
;
}
break
;
}
break
;
case
CV_CAP_PROP_FRAME_HEIGHT
:
{
int
&
width
=
capture
->
width_set
;
int
&
height
=
capture
->
height_set
;
height
=
cvRound
(
value
);
retval
=
height
!=
0
;
if
(
width
!=
0
&&
height
!=
0
)
{
...
...
@@ -1775,7 +1783,8 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
retval
=
v4l2_reset
(
capture
);
width
=
height
=
0
;
}
break
;
}
break
;
case
CV_CAP_PROP_FPS
:
capture
->
fps
=
value
;
retval
=
v4l2_reset
(
capture
);
...
...
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