changeset 10579:f25d93203a71

From: Kir Kostuchenko <kir@users.sourceforge.net> Hi, I found that command line options brightness, hue, contrast and saturation does not works, becouse mplayer apply it, before open tv (kernel says invalid ioctl). Here are simple fix. Please apply.
author gabucino
date Tue, 12 Aug 2003 11:32:51 +0000
parents b9d289fd8a57
children e4c79edf2be9
files DOCS/tech/slave.txt input/input.c input/input.h mplayer.c
diffstat 4 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/tech/slave.txt	Tue Aug 12 08:24:24 2003 +0000
+++ b/DOCS/tech/slave.txt	Tue Aug 12 11:32:51 2003 +0000
@@ -88,5 +88,13 @@
 	Set tv tuner hue.
 tv_set_saturation [-100:100]
 	Set tv tuner saturation.
+tv_set_brightness [-100:100]
+	Set tv tuner brightness.
+tv_set_contrast [-100:100]
+	Set tv tuner contrast.
+tv_set_hue [-100:100]
+	Set tv tuner hue.
+tv_set_saturation [-100:100]
+	Set tv tuner saturation.
 gui_[loadsubtitle|about|play|stop]
 	GUI actions
--- a/input/input.c	Tue Aug 12 08:24:24 2003 +0000
+++ b/input/input.c	Tue Aug 12 11:32:51 2003 +0000
@@ -91,6 +91,10 @@
   { MP_CMD_TV_SET_CONTRAST, "tv_set_contrast", 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_BRIGHTNESS, "tv_set_brightness", 1,  { { MP_CMD_ARG_INT ,{0}}, {-1,{0}} }},
+  { MP_CMD_TV_SET_CONTRAST, "tv_set_contrast", 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}} }},
 #endif
   { MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {-1,{0}} } },
   { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } },
--- a/input/input.h	Tue Aug 12 08:24:24 2003 +0000
+++ b/input/input.h	Tue Aug 12 11:32:51 2003 +0000
@@ -49,6 +49,10 @@
 #define MP_CMD_TV_SET_CONTRAST 45
 #define MP_CMD_TV_SET_HUE 46
 #define MP_CMD_TV_SET_SATURATION 47
+#define MP_CMD_TV_SET_BRIGHTNESS 44
+#define MP_CMD_TV_SET_CONTRAST 45
+#define MP_CMD_TV_SET_HUE 46
+#define MP_CMD_TV_SET_SATURATION 47
 
 #define MP_CMD_GUI_EVENTS       5000
 #define MP_CMD_GUI_LOADFILE     5001
--- a/mplayer.c	Tue Aug 12 08:24:24 2003 +0000
+++ b/mplayer.c	Tue Aug 12 11:32:51 2003 +0000
@@ -2793,6 +2793,22 @@
       if (file_format == DEMUXER_TYPE_TV)
         tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_CONTRAST, cmd->args[0].v.i);
     } break;
+    case MP_CMD_TV_SET_BRIGHTNESS :  {
+      if (file_format == DEMUXER_TYPE_TV)
+        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_BRIGHTNESS, cmd->args[0].v.i);
+    } break;
+    case MP_CMD_TV_SET_HUE :  {
+      if (file_format == DEMUXER_TYPE_TV)
+        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_HUE, cmd->args[0].v.i);
+    } break;
+    case MP_CMD_TV_SET_SATURATION :  {
+      if (file_format == DEMUXER_TYPE_TV)
+        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_SATURATION, cmd->args[0].v.i);
+    } break;
+    case MP_CMD_TV_SET_CONTRAST :  {
+      if (file_format == DEMUXER_TYPE_TV)
+        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_CONTRAST, cmd->args[0].v.i);
+    } break;
     case MP_CMD_TV_STEP_CHANNEL :  {
       if (file_format == DEMUXER_TYPE_TV) {
 	int v = cmd->args[0].v.i;