1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

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
This commit is contained in:
ivo 2005-03-01 03:51:48 +00:00
parent 311ecb1bfa
commit 91e58712df
3 changed files with 31 additions and 26 deletions

View File

@ -2058,10 +2058,6 @@ VESA framebuffer doesn't support mode changing.
Override framebuffer mode configuration file (default: /etc/\:fb.modes).
.
.TP
.B \-forcexv (\-vo sdl only)
Force using XVideo through the sdl video output driver.
.
.TP
.B \-fs (also see \-zoom)
Fullscreen playback (centers movie, and paints black bands around it).
Not supported by all video output drivers.
@ -2201,10 +2197,6 @@ Only works with the x11, xv, xmga, xvidix, directx video output drivers.
Furthermore under X11 your window manager has to honor window aspect hints.
.
.TP
.B \-noxv (\-vo sdl only)
Disables using XVideo through the sdl video output driver.
.
.TP
.B \-ontop\
Makes the player window stay on top of other windows.
Supported by video output drivers which use X11, except SDL,
@ -2418,15 +2410,19 @@ Play video through the XFree86 Direct Graphics Access extension.
Considered obsolete.
.
.TP
.B sdl (also see \-forcexv, \-noxv) (SDL only)
.B sdl (SDL only)
Highly platform independent SDL (Simple Directmedia Layer) library
video output driver.
Since SDL uses its own X11 layer, MPlayer X11 options do not have
any effect on SDL.
.PD 0
.RSs
.IPs <driver>
Explicitly choose the SDL driver to use.
.IPs driver=<driver>
Explicitly choose the SDL driver to use (default: x11).
.IPs (no)forcexv
Use XVideo through the sdl video output driver (default: forcexv).
.IPs (no)hwaccel
Use hardware accelerated scaler (default: hwaccel).
.RE
.PD 1
.

View File

@ -22,12 +22,6 @@ extern char *fb_mode_name;
extern char *dfb_params;
#endif
#endif
#ifdef HAVE_SDL
//extern char *sdl_driver;
extern int sdl_noxv;
extern int sdl_forcexv;
//extern char *sdl_adriver;
#endif
#ifdef USE_FAKE_MONO
extern int fakemono; // defined in dec_audio.c
#endif
@ -199,15 +193,13 @@ m_option_t mplayer_opts[]={
CONF_TYPE_PRINT, 0, 0, 0, NULL},
#endif
// -vo sdl only:
#ifdef HAVE_SDL
{"sdl", "Use -vo sdl:driver instead of -vo sdl -sdl driver.\n",
{"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
CONF_TYPE_PRINT, 0, 0, 0, NULL},
{"noxv", &sdl_noxv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"forcexv", &sdl_forcexv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"noxv", "-noxv is deprecated. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
{"forcexv", "-forcexv is deprecated. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
// -ao sdl only:
{"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
CONF_TYPE_PRINT, 0, 0, 0, NULL},
#endif
#if defined(HAVE_FBDEV)||defined(HAVE_VESA)
{"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},

View File

@ -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;