summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-03-01 03:51:48 +0000
committerivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-03-01 03:51:48 +0000
commit91e58712dff4d0796c19792bf1e25337c7c6c277 (patch)
tree49d83c849e3ded9b33728b976adbd7ac9271bdf9 /libvo
parent311ecb1bfad6ef8b7d25513339657e638eb2da4b (diff)
downloadmpv-91e58712dff4d0796c19792bf1e25337c7c6c277.tar.bz2
mpv-91e58712dff4d0796c19792bf1e25337c7c6c277.tar.xz
Remove -noxv and -forcexv command line options and replace them by
suboptions to -vo sdl. Renamed noxv to nohwaccel to better reflect the meaning of the option. Updated manual page. Original patch by < ods15 at ods15 dot dyndns dot org> Modified by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14858 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_sdl.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 2fd4a8f10f..59e32ed84f 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -121,10 +121,9 @@
#include "input/input.h"
#include "input/mouse.h"
+#include "subopt-helper.h"
extern int verbose;
-int sdl_noxv;
-int sdl_forcexv;
static vo_info_t info =
{
@@ -1594,6 +1593,21 @@ uninit(void)
static uint32_t preinit(const char *arg)
{
struct sdl_priv_s *priv = &sdl_priv;
+ char * sdl_driver;
+ int sdl_hwaccel;
+ int sdl_forcexv;
+ opt_t subopts[] = {
+ {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0},
+ {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0},
+ {"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0},
+ {NULL, 0, NULL, NULL, 0}
+ };
+
+ sdl_forcexv = 1;
+ sdl_hwaccel = 1;
+ sdl_driver = strdup("x11");
+
+ if (subopt_parse(arg, subopts) != 0) return -1;
priv->rgbsurface = NULL;
priv->overlay = NULL;
@@ -1601,13 +1615,16 @@ static uint32_t preinit(const char *arg)
if(verbose > 2) printf("SDL: Opening Plugin\n");
- if(arg) setenv("SDL_VIDEODRIVER", arg, 1);
+ if(sdl_driver) setenv("SDL_VIDEODRIVER", sdl_driver, 1);
+ free(sdl_driver);
/* does the user want SDL to try and force Xv */
if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1);
+ else setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "0", 1);
/* does the user want to disable Xv and use software scaling instead */
- if(sdl_noxv) setenv("SDL_VIDEO_YUV_HWACCEL", "0", 1);
+ if(sdl_hwaccel) setenv("SDL_VIDEO_YUV_HWACCEL", "1", 1);
+ else setenv("SDL_VIDEO_YUV_HWACCEL", "0", 1);
/* default to no fullscreen mode, we'll set this as soon we have the avail. modes */
priv->fullmode = -2;