Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
dc6c106f
Commit
dc6c106f
authored
Dec 02, 2007
by
Richard Hosking
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2: Fixed dynamic video metric updates. Better handling of defaults.
parent
91f7205b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/access/v4l2.c
modules/access/v4l2.c
+10
-8
No files found.
modules/access/v4l2.c
View file @
dc6c106f
...
...
@@ -2375,12 +2375,15 @@ static int VideoControl( demux_t *p_demux, int i_fd,
struct
v4l2_control
control
;
memset
(
&
queryctrl
,
0
,
sizeof
(
queryctrl
)
);
if
(
i_value
==
-
1
)
return
VLC_SUCCESS
;
queryctrl
.
id
=
i_cid
;
if
(
ioctl
(
i_fd
,
VIDIOC_QUERYCTRL
,
&
queryctrl
)
<
0
||
queryctrl
.
flags
&
V4L2_CTRL_FLAG_DISABLED
)
{
msg_
Warn
(
p_demux
,
"%s (%x) control is not supported."
,
psz_label
,
msg_
Err
(
p_demux
,
"%s (%x) control is not supported."
,
psz_label
,
i_value
);
return
VLC_EGENERIC
;
}
...
...
@@ -2420,31 +2423,30 @@ static int VideoControlCallback( vlc_object_t *p_this,
if
(
i_fd
<
0
)
return
VLC_EGENERIC
;
if
(
!
strcmp
(
psz_var
,
"brightness"
)
)
if
(
!
strcmp
(
psz_var
,
"
v4l2-
brightness"
)
)
{
p_sys
->
i_brightness
=
newval
.
i_int
;
return
VideoControl
(
p_demux
,
i_fd
,
"brightness"
,
V4L2_CID_BRIGHTNESS
,
p_sys
->
i_brightness
);
}
else
if
(
!
strcmp
(
psz_var
,
"contrast"
)
)
else
if
(
!
strcmp
(
psz_var
,
"
v4l2-
contrast"
)
)
{
p_sys
->
i_contrast
=
newval
.
i_int
;
return
VideoControl
(
p_demux
,
i_fd
,
"contrast"
,
V4L2_CID_CONTRAST
,
p_sys
->
i_contrast
);
}
else
if
(
!
strcmp
(
psz_var
,
"saturation"
)
)
else
if
(
!
strcmp
(
psz_var
,
"
v4l2-
saturation"
)
)
{
p_sys
->
i_saturation
=
newval
.
i_int
;
return
VideoControl
(
p_demux
,
i_fd
,
"saturation"
,
V4L2_CID_SATURATION
,
p_sys
->
i_saturation
);
}
else
if
(
!
strcmp
(
psz_var
,
"hue"
)
)
else
if
(
!
strcmp
(
psz_var
,
"
v4l2-
hue"
)
)
{
p_sys
->
i_hue
=
newval
.
i_int
;
return
VideoControl
(
p_demux
,
i_fd
,
"hue"
,
V4L2_CID_HUE
,
p_sys
->
i_hue
);
}
else
return
VLC_EGENERIC
;
return
VLC_SUCCESS
;
return
VLC_EGENERIC
;
}
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