summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-01 15:58:31 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-01 15:58:31 +0000
commit813e82a7eac31680db3ea431cc6758120579ce1c (patch)
tree89b64df8fcc634c53425ed03ef722bfce2250597 /libvo
parenta47ac752e5da5b4d056ca1d8a511c660aedbae4b (diff)
downloadmpv-813e82a7eac31680db3ea431cc6758120579ce1c.tar.bz2
mpv-813e82a7eac31680db3ea431cc6758120579ce1c.tar.xz
New aspect prescale code, parses aspect value from mpeg sequence header or commandline.
Removed X11_FULLSCREEN hack from mplayer.c and moved it to libvo/vo_xv.c. Added support for nominator[:/]denominator float values in cfg-parser, thanks for the code by Steve Davies. All around thanks to Steve for helping me understanding the whole stuff :) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2032 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index fa1cdcd969..f2b5f7753f 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -158,6 +158,25 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
{
hint.width=vo_screenwidth;
hint.height=vo_screenheight;
+ /* this code replaces X11_FULLSCREEN hack in mplayer.c
+ * with libvo2 this should be unified among vo plugins
+ * besides zooming should only be done with -zoom,
+ * but I leave the old -fs behaviour so users don't get
+ * irritated for now (and send lots o' mails ;) ::atmos
+ */
+
+#ifdef X11_FULLSCREEN
+ d_height=(int)((float)vo_screenwidth/(float)dwidth*(float)dheight);
+ d_height+=d_height%2; // round
+ d_width=vo_screenwidth;
+ if(dheight>vo_screenheight){
+ d_width=(int)((float)vo_screenheight/(float)dheight*(float)dwidth);
+ d_width+=d_width%2; // round
+ d_height=vo_screenheight;
+ }
+ dwidth=d_width; dheight=d_height;
+#endif
+
}
hint.flags = PPosition | PSize;
XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs);