comparison 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
comparison
equal deleted inserted replaced
22231:da19b4ccb83a 22232:d0b60d14d8d7
9 #include <unistd.h> 9 #include <unistd.h>
10 //#include <sys/mman.h> 10 //#include <sys/mman.h>
11 11
12 #include "config.h" 12 #include "config.h"
13 #include "video_out.h" 13 #include "video_out.h"
14 #include "aspect.h"
15 #include "geometry.h"
14 16
15 #include "mp_msg.h" 17 #include "mp_msg.h"
16 #include "help_mp.h" 18 #include "help_mp.h"
17 19
18 #include "osdep/shmem.h" 20 #include "osdep/shmem.h"
320 return video_driver; // success! 322 return video_driver; // success!
321 } 323 }
322 return NULL; 324 return NULL;
323 } 325 }
324 326
327 int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height,
328 uint32_t d_width, uint32_t d_height, uint32_t flags,
329 char *title, uint32_t format) {
330 panscan_init();
331 aspect_save_orig(width,height);
332 aspect_save_prescale(d_width,d_height);
333 vo->control(VOCTRL_UPDATE_SCREENINFO, NULL);
334
335 aspect(&d_width,&d_height,A_NOZOOM);
336 vo_dx = (int)(vo_screenwidth - d_width) / 2;
337 vo_dy = (int)(vo_screenheight - d_height) / 2;
338 geometry(&vo_dx, &vo_dy, &d_width, &d_height,
339 vo_screenwidth, vo_screenheight);
340 vo_dx += xinerama_x;
341 vo_dy += xinerama_y;
342 vo_dwidth = d_width;
343 vo_dheight = d_height;
344
345 return vo->config(width, height, d_width, d_height, flags, title, format);
346 }
325 347
326 #if defined(HAVE_FBDEV)||defined(HAVE_VESA) 348 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
327 /* Borrowed from vo_fbdev.c 349 /* Borrowed from vo_fbdev.c
328 Monitor ranges related functions*/ 350 Monitor ranges related functions*/
329 351