summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-05-01 14:52:15 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-05-01 14:52:15 +0000
commita011baa532a11a0f4327325e55a831047d2947bb (patch)
tree4450d050cf2a3913acdf6586501fe4103300a2f7
parent7dee0c9d8d10f0184ce2262bebf54cbc62fd8482 (diff)
downloadmpv-a011baa532a11a0f4327325e55a831047d2947bb.tar.bz2
mpv-a011baa532a11a0f4327325e55a831047d2947bb.tar.xz
keepaspect and nokeepaspect are now useable by all vos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12372 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--cfg-mplayer.h11
-rw-r--r--libvo/video_out.c1
-rw-r--r--libvo/video_out.h1
-rw-r--r--libvo/x11_common.c4
4 files changed, 6 insertions, 11 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 2f441482ac..09545ed7a3 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -64,6 +64,7 @@ extern int vo_gamma_contrast;
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 int osd_level;
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 @@ m_option_t mplayer_opts[]={
{"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 @@ m_option_t mplayer_opts[]={
{"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},
diff --git a/libvo/video_out.c b/libvo/video_out.c
index d4ed70ce68..6f7dec839d 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -43,6 +43,7 @@ float vo_panscan = 0.0f;
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
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 3f5dbc9124..7d83b2c97f 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -198,6 +198,7 @@ extern int vo_fsmode;
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;
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index c667bf7b8f..e70cebf185 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -103,8 +103,6 @@ static int vo_old_y = 0;
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 @@ int vo_x11_check_events(Display *mydisplay){
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;