[MPlayer-cvslog] CVS: main/libmpdemux tv.c, 1.79, 1.80 tv.h, 1.32, 1.33

Alban Bedel CVS syncmail at mplayerhq.hu
Fri Apr 21 14:45:21 CEST 2006


CVS change done by Alban Bedel CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv12802/libmpdemux

Modified Files:
	tv.c tv.h 
Log Message:
Implement tv_get_color_options() and make tv_set_color_options() return
mainfull values.


Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- tv.c	11 Apr 2006 10:19:53 -0000	1.79
+++ tv.c	21 Apr 2006 12:45:18 -0000	1.80
@@ -679,22 +679,39 @@
     switch(opt)
     {
 	case TV_COLOR_BRIGHTNESS:
-	    funcs->control(tvh->priv, TVI_CONTROL_VID_SET_BRIGHTNESS, &value);
-	    break;
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_BRIGHTNESS, &value);
 	case TV_COLOR_HUE:
-	    funcs->control(tvh->priv, TVI_CONTROL_VID_SET_HUE, &value);
-	    break;
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_HUE, &value);
 	case TV_COLOR_SATURATION:
-	    funcs->control(tvh->priv, TVI_CONTROL_VID_SET_SATURATION, &value);
-	    break;
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_SATURATION, &value);
 	case TV_COLOR_CONTRAST:
-	    funcs->control(tvh->priv, TVI_CONTROL_VID_SET_CONTRAST, &value);
-	    break;
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_CONTRAST, &value);
 	default:
 	    mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
     }
     
-    return(1);
+    return(TVI_CONTROL_UNKNOWN);
+}
+
+int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value)
+{
+    tvi_functions_t *funcs = tvh->functions;
+
+    switch(opt)
+    {
+	case TV_COLOR_BRIGHTNESS:
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_BRIGHTNESS, value);
+	case TV_COLOR_HUE:
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_HUE, value);
+	case TV_COLOR_SATURATION:
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_SATURATION, value);
+	case TV_COLOR_CONTRAST:
+	    return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_CONTRAST, value);
+	default:
+	    mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
+    }
+    
+    return(TVI_CONTROL_UNKNOWN);
 }
 
 int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)

Index: tv.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- tv.h	3 Apr 2006 06:38:55 -0000	1.32
+++ tv.h	21 Apr 2006 12:45:18 -0000	1.33
@@ -163,6 +163,7 @@
 extern int tv_uninit(tvi_handle_t *tvh);
 
 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val);
+int tv_get_color_options(tvi_handle_t *tvh, int opt, int* val);
 #define TV_COLOR_BRIGHTNESS	1
 #define TV_COLOR_HUE		2
 #define TV_COLOR_SATURATION	3




More information about the MPlayer-cvslog mailing list