Paul Sijben wrote:
> All,
>
> I am trying to adjust the saturation of my TV image. However the mplayer
> picture controls seem to have no effect when TV viewing (maybe it
> doesn't in any mode but I haven't checked).
Nope, everything is controlled through Freevo.
> I saw that image controls are in the mid-term roadmap. Does anyone have
> an idea on how to do it? Any suggestions on how I can help?
Mplayer must have a patch for pic controls, I've done one that has not
been submitted to them yet. It is included, feel free to do submit it in
your name. It most likely won't apply cleanly anymore since it is 6-8
weeks old.
Freevo needs to have at least a number of extra commands to control the
settings. Or the settings could be stored somewhere on a channel by
channel basis, or something...
/ Krister
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.647
diff -u -u -r1.647 mplayer.c
--- mplayer.c 6 Jan 2003 12:27:39 -0000 1.647
+++ mplayer.c 8 Jan 2003 07:29:10 -0000
@@ -2535,6 +2550,30 @@
if (tv_param_on == 1)
tv_step_chanlist((tvi_handle_t*)(demuxer->priv));
} break;
+ case MP_CMD_TV_SET_BRIGHTNESS : {
+ if (tv_param_on == 1) {
+ int val = (cmd->args[0].v.i * 65535) / 100;
+ tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_BRIGHTNESS, val);
+ }
+ } break;
+ case MP_CMD_TV_SET_HUE : {
+ if (tv_param_on == 1) {
+ int val = (cmd->args[0].v.i * 65535) / 100;
+ tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_HUE, val);
+ }
+ } break;
+ case MP_CMD_TV_SET_SATURATION : {
+ if (tv_param_on == 1) {
+ int val = (cmd->args[0].v.i * 65535) / 100;
+ tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_SATURATION, val);
+ }
+ } break;
+ case MP_CMD_TV_SET_CONTRAST : {
+ if (tv_param_on == 1) {
+ int val = (cmd->args[0].v.i * 65535) / 100;
+ tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_CONTRAST, val);
+ }
+ } break;
#endif
case MP_CMD_VO_FULLSCREEN:
{
Index: input/input.c
--- input/input.c 28 Dec 2002 22:57:38 -0000 1.66
+++ input/input.c 8 Jan 2003 07:29:10 -0000
@@ -74,12 +74,16 @@
{ MP_CMD_VOBSUB_LANG, "vobsub_lang", 0, { {-1,{0}} } },
{ MP_CMD_GET_PERCENT_POS, "get_percent_pos", 0, { {-1,{0}} } },
{ MP_CMD_GET_TIME_LENGTH, "get_time_length", 0, { {-1,{0}} } },
#ifdef USE_TV
{ MP_CMD_TV_STEP_CHANNEL, "tv_step_channel", 1, { { MP_CMD_ARG_INT ,{0}}, {-1,{0}}
}},
{ MP_CMD_TV_STEP_NORM, "tv_step_norm",0, { {-1,{0}} } },
{ MP_CMD_TV_STEP_CHANNEL_LIST, "tv_step_chanlist", 0, { {-1,{0}} } },
{ MP_CMD_TV_SET_CHANNEL, "tv_set_channel", 1, { { MP_CMD_ARG_STRING, {0}}, {-1,{0}}
}},
{ MP_CMD_TV_LAST_CHANNEL, "tv_last_channel", 0, { {-1,{0}} } },
+ { MP_CMD_TV_SET_BRIGHTNESS, "tv_set_brightness", 1, { { MP_CMD_ARG_INT ,{0}},
{-1,{0}} }},
+ { MP_CMD_TV_SET_HUE, "tv_set_hue", 1, { { MP_CMD_ARG_INT ,{0}}, {-1,{0}} }},
+ { MP_CMD_TV_SET_SATURATION, "tv_set_saturation", 1, { { MP_CMD_ARG_INT ,{0}},
{-1,{0}} }},
+ { MP_CMD_TV_SET_CONTRAST, "tv_set_contrast", 1, { { MP_CMD_ARG_INT ,{0}}, {-1,{0}}
}},
#endif
{ MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {-1,{0}} } },
{ MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } },
Index: input/input.h
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.h,v
retrieving revision 1.30
diff -u -u -r1.30 input/input.h
--- input/input.h 28 Dec 2002 22:57:38 -0000 1.30
+++ input/input.h 8 Jan 2003 07:29:11 -0000
@@ -42,6 +42,10 @@
#endif
#define MP_CMD_SUB_ALIGNMENT 39
#define MP_CMD_TV_LAST_CHANNEL 40
+#define MP_CMD_TV_SET_BRIGHTNESS 41
+#define MP_CMD_TV_SET_HUE 42
+#define MP_CMD_TV_SET_SATURATION 43
+#define MP_CMD_TV_SET_CONTRAST 44
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001