diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-20 07:36:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:41:07 +0300 |
commit | acf319b3edea4d8dd0fe338778e08e0d99dc49bb (patch) | |
tree | 8beb60e04061fd392637dfa9859a379e2c96f5c8 /mplayer.c | |
parent | d283d5236ab36bc55c73de4e152dabea7098f850 (diff) | |
download | mpv-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 'mplayer.c')
-rw-r--r-- | mplayer.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -5,6 +5,7 @@ #include <stdio.h> #include <stdlib.h> #include "config.h" +#include "talloc.h" #ifdef WIN32 #define _UWIN 1 /*disable Non-underscored versions of non-ANSI functions as otherwise int eof would conflict with eof()*/ @@ -2143,7 +2144,7 @@ int reinit_video_chain(void) { //shouldn't we set dvideo->id=-2 when we fail? vo_config_count=0; //if((mpctx->video_out->preinit(vo_subdevice))!=0){ - if(!(mpctx->video_out=init_best_video_out(opts))){ + if(!(mpctx->video_out=init_best_video_out(opts, mpctx->x11_state))){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_ErrorInitializingVODevice); goto err_out; } @@ -2562,6 +2563,10 @@ int gui_no_filename=0; mp_msg_init(); +#ifdef HAVE_X11 + mpctx->x11_state = talloc_ptrtype(NULL, mpctx->x11_state); + vo_x11_init_state(mpctx->x11_state); +#endif struct MPOpts *opts = &mpctx->opts; set_default_mplayer_options(opts); // Create the config context and register the options |