summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-26 22:37:47 +0100
committerwm4 <wm4@nowhere>2013-01-27 13:30:53 +0100
commita243acb1deccd9526f3867d9a6500743dc190f95 (patch)
treeb33cac6a373bc42f6c685d6f9a0281acffcd5007 /core
parent9747227e47326851c41fceb386d72f498fba7f87 (diff)
downloadmpv-a243acb1deccd9526f3867d9a6500743dc190f95.tar.bz2
mpv-a243acb1deccd9526f3867d9a6500743dc190f95.tar.xz
x11: cleanup, refactor
Move things that are used by vo_xv only into vo_xv, same for vo_x11. Rename some functions exported by x11_common, like vo_init to vo_x11_common. Make functions not used outsode of x11_common.c private to that file. Eliminate all global variables defined by x11_common (except error handler and colormap stuff). There shouldn't be any functional changes, and only code is moved around. There are some minor simplifications in the X11 init code, as we completely remove the ability to initialize X11 and X11+VO separately (see commit b4d9647 "mplayer: do not create X11 state in player frontend"), and the respective functions are conflated into vo_x11_init() and vo_x11_uninit().
Diffstat (limited to 'core')
-rw-r--r--core/cfg-mplayer.h7
-rw-r--r--core/defaultopts.c1
-rw-r--r--core/mplayer.c4
-rw-r--r--core/options.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index eb3b805622..9bf6d53d6d 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -36,9 +36,6 @@
extern char *lirc_configfile;
-/* only used at startup (setting these values from configfile) */
-extern int stop_xscreensaver;
-
extern int mp_msg_color;
extern int mp_msg_module;
@@ -615,8 +612,8 @@ const m_option_t mplayer_opts[]={
{"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL},
{"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL},
#ifdef CONFIG_X11
- {"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
- {"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+ OPT_MAKE_FLAGS("stop-xscreensaver", vo_stop_screensaver, 0),
+ OPT_STRINGLIST("fstype", vo_fstype_list, 0),
#endif
{"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
diff --git a/core/defaultopts.c b/core/defaultopts.c
index a7da8bb4e3..d0205cb3d3 100644
--- a/core/defaultopts.c
+++ b/core/defaultopts.c
@@ -25,6 +25,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
.vo_gamma_contrast = 1000,
.vo_gamma_saturation = 1000,
.vo_gamma_hue = 1000,
+ .vo_stop_screensaver = 1,
.osd_level = 1,
.osd_duration = 1000,
.loop_times = -1,
diff --git a/core/mplayer.c b/core/mplayer.c
index bdebd3bab2..8aba5517fd 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -3284,7 +3284,7 @@ static void run_playloop(struct MPContext *mpctx)
vo_check_events(vo);
#ifdef CONFIG_X11
- if (stop_xscreensaver && vo->x11) {
+ if (vo->x11) {
xscreensaver_heartbeat(vo->x11);
}
#endif
@@ -4299,7 +4299,7 @@ static bool handle_help_options(struct MPContext *mpctx)
opt_exit = 1;
}
#ifdef CONFIG_X11
- if (vo_fstype_list && strcmp(vo_fstype_list[0], "help") == 0) {
+ if (opts->vo_fstype_list && strcmp(opts->vo_fstype_list[0], "help") == 0) {
fstype_help();
mp_msg(MSGT_FIXME, MSGL_FIXME, "\n");
opt_exit = 1;
diff --git a/core/options.h b/core/options.h
index d1c58fdda9..10eb7135fd 100644
--- a/core/options.h
+++ b/core/options.h
@@ -35,6 +35,8 @@ typedef struct MPOpts {
int requested_input_range;
int requested_output_range;
int cursor_autohide_delay;
+ char** vo_fstype_list;
+ int vo_stop_screensaver;
// ranges -100 - 100, 1000 if the vo default should be used
int vo_gamma_gamma;