changeset 12371:c000f4c23efd

keepaspect and nokeepaspect are now useable by all vos
author faust3
date Sat, 01 May 2004 14:52:15 +0000
parents 5ef72513348f
children 31c2bf041150
files cfg-mplayer.h libvo/video_out.c libvo/video_out.h libvo/x11_common.c
diffstat 4 files changed, 6 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Sat May 01 12:09:26 2004 +0000
+++ b/cfg-mplayer.h	Sat May 01 14:52:15 2004 +0000
@@ -64,6 +64,7 @@
 extern int vo_gamma_hue;
 extern char *vo_geometry;
 extern int vo_ontop;
+extern int vo_keepaspect;
 
 extern int opt_screen_size_x;
 extern int opt_screen_size_y;
@@ -77,17 +78,11 @@
 extern char *ao_outputfilename;
 extern int ao_pcm_waveheader;
 
-#ifdef HAVE_DIRECTX
-extern int adapter_num;
-extern int refresh_rate;
-#endif
-
 #ifdef HAVE_X11
 extern char *mDisplayName;
 extern int WinID;
 extern int fs_layer;
 extern int stop_xscreensaver;
-extern int vo_x11_keepaspect;
 extern char **vo_fstype_list;
 extern int vo_nomouse_input;
 #endif
@@ -302,8 +297,6 @@
 	{"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"nostop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"keepaspect", &vo_x11_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nokeepaspect", &vo_x11_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 	{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0,0,-1,NULL},
 #endif
@@ -316,6 +309,8 @@
 	{"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
 	{"contrast",&vo_gamma_contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
 	{"hue",&vo_gamma_hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+	{"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
 	// direct rendering (decoding to video out buffer)
 	{"dr", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
--- a/libvo/video_out.c	Sat May 01 12:09:26 2004 +0000
+++ b/libvo/video_out.c	Sat May 01 14:52:15 2004 +0000
@@ -43,6 +43,7 @@
 int vo_ontop = 0;
 int vo_adapter_num=0;
 int vo_refresh_rate=0;
+int vo_keepaspect=1;
 
 int vo_pts=0; // for hw decoding
 float vo_fps=0; // for mp1e rte
--- a/libvo/video_out.h	Sat May 01 12:09:26 2004 +0000
+++ b/libvo/video_out.h	Sat May 01 14:52:15 2004 +0000
@@ -198,6 +198,7 @@
 extern float vo_panscan;
 extern int vo_adapter_num;
 extern int vo_refresh_rate;
+extern int vo_keepaspect;
 
 extern int vo_gamma_brightness;
 extern int vo_gamma_saturation;
--- a/libvo/x11_common.c	Sat May 01 12:09:26 2004 +0000
+++ b/libvo/x11_common.c	Sat May 01 14:52:15 2004 +0000
@@ -103,8 +103,6 @@
 static int vo_old_width = 0;
 static int vo_old_height = 0;
 
-int vo_x11_keepaspect = 1;
-
 #ifdef HAVE_XINERAMA
 int xinerama_screen = 0;
 int xinerama_x = 0;
@@ -825,7 +823,7 @@
 void vo_x11_sizehint( int x, int y, int width, int height, int max )
 {
  vo_hint.flags=PPosition | PSize | PWinGravity;
- if(vo_x11_keepaspect)
+ if(vo_keepaspect)
  {
  	vo_hint.flags |= PAspect;
 	vo_hint.min_aspect.x = width;