Mercurial > mplayer.hg
comparison libvo/vo_sdl.c @ 14857:29a09f111b41
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.
author | ivo |
---|---|
date | Tue, 01 Mar 2005 03:51:48 +0000 |
parents | 36fda489ed86 |
children | 2b14e57570a8 |
comparison
equal
deleted
inserted
replaced
14856:7b1198123519 | 14857:29a09f111b41 |
---|---|
119 #include "x11_common.h" | 119 #include "x11_common.h" |
120 #endif | 120 #endif |
121 | 121 |
122 #include "input/input.h" | 122 #include "input/input.h" |
123 #include "input/mouse.h" | 123 #include "input/mouse.h" |
124 #include "subopt-helper.h" | |
124 | 125 |
125 extern int verbose; | 126 extern int verbose; |
126 int sdl_noxv; | |
127 int sdl_forcexv; | |
128 | 127 |
129 static vo_info_t info = | 128 static vo_info_t info = |
130 { | 129 { |
131 "SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)", | 130 "SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)", |
132 "sdl", | 131 "sdl", |
1592 } | 1591 } |
1593 | 1592 |
1594 static uint32_t preinit(const char *arg) | 1593 static uint32_t preinit(const char *arg) |
1595 { | 1594 { |
1596 struct sdl_priv_s *priv = &sdl_priv; | 1595 struct sdl_priv_s *priv = &sdl_priv; |
1596 char * sdl_driver; | |
1597 int sdl_hwaccel; | |
1598 int sdl_forcexv; | |
1599 opt_t subopts[] = { | |
1600 {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0}, | |
1601 {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0}, | |
1602 {"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0}, | |
1603 {NULL, 0, NULL, NULL, 0} | |
1604 }; | |
1605 | |
1606 sdl_forcexv = 1; | |
1607 sdl_hwaccel = 1; | |
1608 sdl_driver = strdup("x11"); | |
1609 | |
1610 if (subopt_parse(arg, subopts) != 0) return -1; | |
1597 | 1611 |
1598 priv->rgbsurface = NULL; | 1612 priv->rgbsurface = NULL; |
1599 priv->overlay = NULL; | 1613 priv->overlay = NULL; |
1600 priv->surface = NULL; | 1614 priv->surface = NULL; |
1601 | 1615 |
1602 if(verbose > 2) printf("SDL: Opening Plugin\n"); | 1616 if(verbose > 2) printf("SDL: Opening Plugin\n"); |
1603 | 1617 |
1604 if(arg) setenv("SDL_VIDEODRIVER", arg, 1); | 1618 if(sdl_driver) setenv("SDL_VIDEODRIVER", sdl_driver, 1); |
1619 free(sdl_driver); | |
1605 | 1620 |
1606 /* does the user want SDL to try and force Xv */ | 1621 /* does the user want SDL to try and force Xv */ |
1607 if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1); | 1622 if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1); |
1623 else setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "0", 1); | |
1608 | 1624 |
1609 /* does the user want to disable Xv and use software scaling instead */ | 1625 /* does the user want to disable Xv and use software scaling instead */ |
1610 if(sdl_noxv) setenv("SDL_VIDEO_YUV_HWACCEL", "0", 1); | 1626 if(sdl_hwaccel) setenv("SDL_VIDEO_YUV_HWACCEL", "1", 1); |
1627 else setenv("SDL_VIDEO_YUV_HWACCEL", "0", 1); | |
1611 | 1628 |
1612 /* default to no fullscreen mode, we'll set this as soon we have the avail. modes */ | 1629 /* default to no fullscreen mode, we'll set this as soon we have the avail. modes */ |
1613 priv->fullmode = -2; | 1630 priv->fullmode = -2; |
1614 | 1631 |
1615 priv->fullmodes = NULL; | 1632 priv->fullmodes = NULL; |