summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-20 07:36:34 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:07 +0300
commitacf319b3edea4d8dd0fe338778e08e0d99dc49bb (patch)
tree8beb60e04061fd392637dfa9859a379e2c96f5c8 /libvo/video_out.c
parentd283d5236ab36bc55c73de4e152dabea7098f850 (diff)
downloadmpv-acf319b3edea4d8dd0fe338778e08e0d99dc49bb.tar.bz2
mpv-acf319b3edea4d8dd0fe338778e08e0d99dc49bb.tar.xz
Create a struct for X11 state
Will be used for common data between X11 VOs. The main reasons for making it a separate struct rather than extra fields in the main VO struct are that some field definitions need X headers and that the code keeps basic X state such as the display connection over opening and closing of individual VOs.
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index abbaaae7ef..3a6b57347a 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -20,6 +20,9 @@
#include "help_mp.h"
#include "osdep/shmem.h"
+#ifdef HAVE_X11
+#include "x11_common.h"
+#endif
//int vo_flags=0;
@@ -298,7 +301,7 @@ void list_video_out(void)
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n");
}
-struct vo *init_best_video_out(struct MPOpts *opts)
+struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11)
{
char **vo_list = opts->video_driver_list;
int i;
@@ -321,7 +324,7 @@ struct vo *init_best_video_out(struct MPOpts *opts)
const vo_info_t *info = video_driver->info;
if (!strcmp(info->short_name, name)) {
// name matches, try it
- *vo = (struct vo){.opts = opts};
+ *vo = (struct vo){.opts = opts, .x11 = x11};
vo->driver = video_driver;
if (!vo_preinit(vo, vo_subdevice)) {
free(name);
@@ -339,7 +342,7 @@ struct vo *init_best_video_out(struct MPOpts *opts)
vo_subdevice = NULL;
for (i = 0; video_out_drivers[i]; i++) {
const struct vo_driver *video_driver = video_out_drivers[i];
- *vo = (struct vo){.opts = opts};
+ *vo = (struct vo){.opts = opts, .x11 = x11};
vo->driver = video_driver;
if (!vo_preinit(vo, vo_subdevice))
return vo; // success!