1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

don't use xlib in ffplay, and bump required sdl version

Originally committed as revision 5463 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-06-09 22:43:21 +00:00
parent 87318d6988
commit 3ef17d626f
2 changed files with 16 additions and 42 deletions

2
configure vendored
View File

@ -1184,7 +1184,7 @@ EOF
restore_flags restore_flags
if test $? = 0; then if test $? = 0; then
_sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'` _sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'`
if test "$_sdlversion" -lt 121 ; then if test "$_sdlversion" -lt 130 ; then
sdl_too_old=yes sdl_too_old=yes
else else
sdl=yes sdl=yes

View File

@ -45,14 +45,6 @@
} }
#endif #endif
#if defined(__linux__)
#define HAVE_X11
#endif
#ifdef HAVE_X11
#include <X11/Xlib.h>
#endif
//#define DEBUG_SYNC //#define DEBUG_SYNC
#define MAX_VIDEOQ_SIZE (5 * 256 * 1024) #define MAX_VIDEOQ_SIZE (5 * 256 * 1024)
@ -2104,11 +2096,6 @@ void toggle_full_screen(void)
{ {
int w, h, flags; int w, h, flags;
is_full_screen = !is_full_screen; is_full_screen = !is_full_screen;
if (!fs_screen_width) {
/* use default SDL method */
SDL_WM_ToggleFullScreen(screen);
} else {
/* use the recorded resolution */
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
if (is_full_screen) { if (is_full_screen) {
w = fs_screen_width; w = fs_screen_width;
@ -2123,7 +2110,6 @@ void toggle_full_screen(void)
cur_stream->width = w; cur_stream->width = w;
cur_stream->height = h; cur_stream->height = h;
} }
}
void toggle_pause(void) void toggle_pause(void)
{ {
@ -2346,10 +2332,7 @@ const OptionDef options[] = {
{ "h", 0, {(void*)show_help}, "show help" }, { "h", 0, {(void*)show_help}, "show help" },
{ "x", HAS_ARG, {(void*)opt_width}, "force displayed width", "width" }, { "x", HAS_ARG, {(void*)opt_width}, "force displayed width", "width" },
{ "y", HAS_ARG, {(void*)opt_height}, "force displayed height", "height" }, { "y", HAS_ARG, {(void*)opt_height}, "force displayed height", "height" },
#if 0
/* disabled as SDL/X11 does not support it correctly on application launch */
{ "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" },
#endif
{ "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" },
{ "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" },
{ "ss", HAS_ARG, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, { "ss", HAS_ARG, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" },
@ -2443,19 +2426,10 @@ int main(int argc, char **argv)
} }
if (!display_disable) { if (!display_disable) {
#ifdef HAVE_X11 const SDL_VideoInfo *vi = SDL_GetVideoInfo();
/* save the screen resolution... SDL should allow full screen fs_screen_width = vi->current_w;
by resizing the window */ fs_screen_height = vi->current_h;
{
Display *dpy;
dpy = XOpenDisplay(NULL);
if (dpy) {
fs_screen_width = DisplayWidth(dpy, DefaultScreen(dpy));
fs_screen_height = DisplayHeight(dpy, DefaultScreen(dpy));
XCloseDisplay(dpy);
}
}
#endif
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
if (is_full_screen && fs_screen_width) { if (is_full_screen && fs_screen_width) {
w = fs_screen_width; w = fs_screen_width;