Mercurial > mplayer.hg
diff libvo/video_out.c @ 22232:d0b60d14d8d7
Move common vo initialization code to video_out.c
author | reimar |
---|---|
date | Sat, 17 Feb 2007 20:58:55 +0000 |
parents | 409f808489bf |
children | 21e4a2835569 |
line wrap: on
line diff
--- a/libvo/video_out.c Sat Feb 17 17:24:07 2007 +0000 +++ b/libvo/video_out.c Sat Feb 17 20:58:55 2007 +0000 @@ -11,6 +11,8 @@ #include "config.h" #include "video_out.h" +#include "aspect.h" +#include "geometry.h" #include "mp_msg.h" #include "help_mp.h" @@ -322,6 +324,26 @@ return NULL; } +int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height, + uint32_t d_width, uint32_t d_height, uint32_t flags, + char *title, uint32_t format) { + panscan_init(); + aspect_save_orig(width,height); + aspect_save_prescale(d_width,d_height); + vo->control(VOCTRL_UPDATE_SCREENINFO, NULL); + + aspect(&d_width,&d_height,A_NOZOOM); + vo_dx = (int)(vo_screenwidth - d_width) / 2; + vo_dy = (int)(vo_screenheight - d_height) / 2; + geometry(&vo_dx, &vo_dy, &d_width, &d_height, + vo_screenwidth, vo_screenheight); + vo_dx += xinerama_x; + vo_dy += xinerama_y; + vo_dwidth = d_width; + vo_dheight = d_height; + + return vo->config(width, height, d_width, d_height, flags, title, format); +} #if defined(HAVE_FBDEV)||defined(HAVE_VESA) /* Borrowed from vo_fbdev.c