Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0a886d02
Commit
0a886d02
authored
Oct 02, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the list of standard user-class V4L2 controls
parent
9c56e429
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
2 deletions
+87
-2
modules/access/v4l2/controls.c
modules/access/v4l2/controls.c
+15
-2
modules/access/v4l2/video.c
modules/access/v4l2/video.c
+72
-0
No files found.
modules/access/v4l2/controls.c
View file @
0a886d02
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
typedef
struct
vlc_v4l2_ctrl_name
typedef
struct
vlc_v4l2_ctrl_name
{
{
const
char
name
[
2
0
];
const
char
name
[
2
8
];
uint32_t
cid
;
uint32_t
cid
;
}
vlc_v4l2_ctrl_name_t
;
}
vlc_v4l2_ctrl_name_t
;
...
@@ -61,7 +61,20 @@ static const vlc_v4l2_ctrl_name_t controls[] =
...
@@ -61,7 +61,20 @@ static const vlc_v4l2_ctrl_name_t controls[] =
{
"gain"
,
V4L2_CID_GAIN
},
{
"gain"
,
V4L2_CID_GAIN
},
{
"hflip"
,
V4L2_CID_HFLIP
},
{
"hflip"
,
V4L2_CID_HFLIP
},
{
"vflip"
,
V4L2_CID_VFLIP
},
{
"vflip"
,
V4L2_CID_VFLIP
},
/* TODO: add more standardized controls */
{
"power-line-frequency"
,
V4L2_CID_POWER_LINE_FREQUENCY
},
{
"hue-auto"
,
V4L2_CID_HUE_AUTO
},
{
"white-balance-temperature"
,
V4L2_CID_WHITE_BALANCE_TEMPERATURE
},
{
"sharpness"
,
V4L2_CID_SHARPNESS
},
{
"backlight-compensation"
,
V4L2_CID_BACKLIGHT_COMPENSATION
},
{
"chroma-gain-auto"
,
V4L2_CID_CHROMA_AGC
},
{
"color-killer"
,
V4L2_CID_COLOR_KILLER
},
{
"color-effect"
,
V4L2_CID_COLORFX
},
{
"rotate"
,
V4L2_CID_ROTATE
},
{
"bg-color"
,
V4L2_CID_BG_COLOR
},
// NOTE: output only
{
"chroma-gain"
,
V4L2_CID_CHROMA_GAIN
},
{
"illuminators-1"
,
V4L2_CID_ILLUMINATORS_1
},
// NOTE: don't care?
{
"illuminators-2"
,
V4L2_CID_ILLUMINATORS_2
},
#define CTRL_CID_KNOWN(cid) \
#define CTRL_CID_KNOWN(cid) \
((((uint32_t)cid) - V4L2_CID_BRIGHTNESS) \
((((uint32_t)cid) - V4L2_CID_BRIGHTNESS) \
<= (V4L2_CID_VCENTER - V4L2_CID_BRIGHTNESS))
<= (V4L2_CID_VCENTER - V4L2_CID_BRIGHTNESS))
...
...
modules/access/v4l2/video.c
View file @
0a886d02
...
@@ -98,6 +98,13 @@
...
@@ -98,6 +98,13 @@
#define SATURATION_LONGTEXT N_( "Picture saturation or chroma gain." )
#define SATURATION_LONGTEXT N_( "Picture saturation or chroma gain." )
#define HUE_TEXT N_( "Hue" )
#define HUE_TEXT N_( "Hue" )
#define HUE_LONGTEXT N_( "Hue or color balance." )
#define HUE_LONGTEXT N_( "Hue or color balance." )
#define HUE_AUTO_TEXT N_( "Automatic hue" )
#define HUE_AUTO_LONGTEXT N_( \
"Automatically adjust the picture hue." )
#define WHITE_BALANCE_TEMP_TEXT N_( "White balance temperature (K)" )
#define WHITE_BALANCE_TEMP_LONGTEXT N_( \
"White balance temperature as a color temperation in Kelvin " \
"(2800 is minimum incandescence, 6500 is maximum daylight)." )
#define AUTOWHITEBALANCE_TEXT N_( "Automatic white balance" )
#define AUTOWHITEBALANCE_TEXT N_( "Automatic white balance" )
#define AUTOWHITEBALANCE_LONGTEXT N_( \
#define AUTOWHITEBALANCE_LONGTEXT N_( \
"Automatically adjust the picture white balance." )
"Automatically adjust the picture white balance." )
...
@@ -119,12 +126,50 @@
...
@@ -119,12 +126,50 @@
#define GAIN_TEXT N_( "Gain" )
#define GAIN_TEXT N_( "Gain" )
#define GAIN_LONGTEXT N_( \
#define GAIN_LONGTEXT N_( \
"Picture gain." )
"Picture gain." )
#define SHARPNESS_TEXT N_( "Sharpness" )
#define SHARPNESS_LONGTEXT N_( "Sharpness filter adjust." )
#define CHROMA_GAIN_TEXT N_( "Chroma gain" )
#define CHROMA_GAIN_LONGTEXT N_( "Chroma gain control." )
#define CHROMA_GAIN_AUTO_TEXT N_( "Automatic chroma gain" )
#define CHROMA_GAIN_AUTO_LONGTEXT N_( \
"Automatically control the chroma gain." )
#define POWER_FREQ_TEXT N_( "Power line frequency" )
#define POWER_FREQ_LONGTEXT N_( \
"Power line frequency anti-flicker filter." )
static
const
int
power_freq_vlc
[]
=
{
-
1
,
V4L2_CID_POWER_LINE_FREQUENCY_DISABLED
,
V4L2_CID_POWER_LINE_FREQUENCY_50HZ
,
V4L2_CID_POWER_LINE_FREQUENCY_60HZ
,
};
static
const
char
*
const
power_freq_user
[]
=
{
N_
(
"Unspecified"
),
N_
(
"Off"
),
N_
(
"50 Hz"
),
N_
(
"60 Hz"
),
};
#define BKLT_COMPENSATE_TEXT N_( "Backlight compensation" )
#define BKLT_COMPENSATE_LONGTEXT N_( "Backlight compensation." )
#define HFLIP_TEXT N_( "Horizontal flip" )
#define HFLIP_TEXT N_( "Horizontal flip" )
#define HFLIP_LONGTEXT N_( \
#define HFLIP_LONGTEXT N_( \
"Flip the picture horizontally." )
"Flip the picture horizontally." )
#define VFLIP_TEXT N_( "Vertical flip" )
#define VFLIP_TEXT N_( "Vertical flip" )
#define VFLIP_LONGTEXT N_( \
#define VFLIP_LONGTEXT N_( \
"Flip the picture vertically." )
"Flip the picture vertically." )
#define ROTATE_TEXT N_( "Rotate (degrees)" )
#define ROTATE_LONGTEXT N_( "Picture rotation angle (in degrees)." )
#define COLOR_KILLER_TEXT N_( "Color killer" )
#define COLOR_KILLER_LONGTEXT N_( \
"Enable the color killer, i.e. switch to black & white picture " \
"whenever the signal is weak." )
#define COLOR_EFFECT_TEXT N_( "Color effect" )
#define COLOR_EFFECT_LONGTEXT N_( "Select a color effect." )
static
const
int
colorfx_vlc
[]
=
{
-
1
,
V4L2_COLORFX_NONE
,
V4L2_COLORFX_BW
,
V4L2_COLORFX_SEPIA
,
V4L2_COLORFX_NEGATIVE
,
V4L2_COLORFX_EMBOSS
,
V4L2_COLORFX_SKETCH
,
V4L2_COLORFX_SKY_BLUE
,
V4L2_COLORFX_GRASS_GREEN
,
V4L2_COLORFX_SKIN_WHITEN
,
V4L2_COLORFX_VIVID
,
};
static
const
char
*
const
colorfx_user
[]
=
{
N_
(
"Unspecified"
),
N_
(
"None"
),
N_
(
"Black & white"
),
N_
(
"Sepia"
),
N_
(
"Negative"
),
N_
(
"Emboss"
),
N_
(
"Sketch"
),
N_
(
"Sky blue"
),
N_
(
"Grass green"
),
N_
(
"Skin whithen"
),
N_
(
"Vivid"
),
};
#define AUDIO_VOLUME_TEXT N_( "Audio volume" )
#define AUDIO_VOLUME_TEXT N_( "Audio volume" )
#define AUDIO_VOLUME_LONGTEXT N_( \
#define AUDIO_VOLUME_LONGTEXT N_( \
...
@@ -320,7 +365,14 @@ vlc_module_begin ()
...
@@ -320,7 +365,14 @@ vlc_module_begin ()
SATURATION_LONGTEXT
,
true
)
SATURATION_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"hue"
,
-
1
,
HUE_TEXT
,
add_integer
(
CFG_PREFIX
"hue"
,
-
1
,
HUE_TEXT
,
HUE_LONGTEXT
,
true
)
HUE_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"auto-hue"
,
-
1
,
HUE_AUTO_TEXT
,
HUE_AUTO_LONGTEXT
,
true
)
change_integer_list
(
tristate_vlc
,
tristate_user
)
add_obsolete_integer
(
CFG_PREFIX
"black-level"
)
/* since Linux 2.6.26 */
add_obsolete_integer
(
CFG_PREFIX
"black-level"
)
/* since Linux 2.6.26 */
add_integer
(
CFG_PREFIX
"white-balance-temperature"
,
-
1
,
WHITE_BALANCE_TEMP_TEXT
,
WHITE_BALANCE_TEMP_LONGTEXT
,
true
)
/* Ideally, the range should be 2800-6500 */
change_integer_range
(
-
1
,
6500
)
add_integer
(
CFG_PREFIX
"auto-white-balance"
,
-
1
,
add_integer
(
CFG_PREFIX
"auto-white-balance"
,
-
1
,
AUTOWHITEBALANCE_TEXT
,
AUTOWHITEBALANCE_LONGTEXT
,
true
)
AUTOWHITEBALANCE_TEXT
,
AUTOWHITEBALANCE_LONGTEXT
,
true
)
change_integer_list
(
tristate_vlc
,
tristate_user
)
change_integer_list
(
tristate_vlc
,
tristate_user
)
...
@@ -338,10 +390,30 @@ vlc_module_begin ()
...
@@ -338,10 +390,30 @@ vlc_module_begin ()
change_integer_list
(
tristate_vlc
,
tristate_user
)
change_integer_list
(
tristate_vlc
,
tristate_user
)
add_integer
(
CFG_PREFIX
"gain"
,
-
1
,
GAIN_TEXT
,
add_integer
(
CFG_PREFIX
"gain"
,
-
1
,
GAIN_TEXT
,
GAIN_LONGTEXT
,
true
)
GAIN_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"sharpness"
,
-
1
,
SHARPNESS_TEXT
,
SHARPNESS_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"chroma-gain"
,
-
1
,
CHROMA_GAIN_TEXT
,
CHROMA_GAIN_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"chroma-gain-auto"
,
-
1
,
CHROMA_GAIN_AUTO_TEXT
,
CHROMA_GAIN_AUTO_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"power-line-frequency"
,
-
1
,
POWER_FREQ_TEXT
,
POWER_FREQ_LONGTEXT
,
true
)
change_integer_list
(
power_freq_vlc
,
power_freq_user
)
add_integer
(
CFG_PREFIX
"backlight-compensation"
,
-
1
,
BKLT_COMPENSATE_TEXT
,
BKLT_COMPENSATE_LONGTEXT
,
true
)
add_bool
(
CFG_PREFIX
"hflip"
,
false
,
HFLIP_TEXT
,
HFLIP_LONGTEXT
,
true
)
add_bool
(
CFG_PREFIX
"hflip"
,
false
,
HFLIP_TEXT
,
HFLIP_LONGTEXT
,
true
)
add_bool
(
CFG_PREFIX
"vflip"
,
false
,
VFLIP_TEXT
,
VFLIP_LONGTEXT
,
true
)
add_bool
(
CFG_PREFIX
"vflip"
,
false
,
VFLIP_TEXT
,
VFLIP_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"rotate"
,
-
1
,
ROTATE_TEXT
,
ROTATE_LONGTEXT
,
true
)
change_integer_range
(
-
1
,
359
)
add_obsolete_integer
(
CFG_PREFIX
"hcenter"
)
/* since Linux 2.6.26 */
add_obsolete_integer
(
CFG_PREFIX
"hcenter"
)
/* since Linux 2.6.26 */
add_obsolete_integer
(
CFG_PREFIX
"vcenter"
)
/* since Linux 2.6.26 */
add_obsolete_integer
(
CFG_PREFIX
"vcenter"
)
/* since Linux 2.6.26 */
add_integer
(
CFG_PREFIX
"color-killer"
,
-
1
,
COLOR_KILLER_TEXT
,
COLOR_KILLER_LONGTEXT
,
true
)
change_integer_list
(
tristate_vlc
,
tristate_user
)
add_integer
(
CFG_PREFIX
"color-effect"
,
-
1
,
COLOR_EFFECT_TEXT
,
COLOR_EFFECT_LONGTEXT
,
true
)
change_integer_list
(
colorfx_vlc
,
colorfx_user
)
add_integer
(
CFG_PREFIX
"audio-volume"
,
-
1
,
AUDIO_VOLUME_TEXT
,
add_integer
(
CFG_PREFIX
"audio-volume"
,
-
1
,
AUDIO_VOLUME_TEXT
,
AUDIO_VOLUME_LONGTEXT
,
true
)
AUDIO_VOLUME_LONGTEXT
,
true
)
add_integer
(
CFG_PREFIX
"audio-balance"
,
-
1
,
AUDIO_BALANCE_TEXT
,
add_integer
(
CFG_PREFIX
"audio-balance"
,
-
1
,
AUDIO_BALANCE_TEXT
,
...
...
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