From c7407f83b9420e58369ed92ceb12299457cb76f4 Mon Sep 17 00:00:00 2001 From: phintuka Date: Mon, 17 Jan 2011 12:54:22 +0000 Subject: Changed command-line arguments: --opengl-always ==> --opengl --opengl-hud ==> --hud=opengl Added xshape HUD option --- config.c | 25 ++++++++++++++++--------- xine_frontend_main.c | 40 +++++++++++++++++++++++++--------------- xineliboutput.c | 15 +++++++++++++-- 3 files changed, 54 insertions(+), 26 deletions(-) diff --git a/config.c b/config.c index 10eb6eb0..c870e518 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.99 2011-01-17 12:29:13 phintuka Exp $ + * $Id: config.c,v 1.100 2011-01-17 12:54:22 phintuka Exp $ * */ @@ -710,9 +710,8 @@ bool config_t::ProcessArgs(int argc, char *argv[]) static const struct option long_options[] = { { "fullscreen", no_argument, NULL, 'f' }, - { "hud", no_argument, NULL, 'D' }, - { "opengl-always",no_argument, NULL, 'O' }, - { "opengl-hud", no_argument, NULL, 'Q' }, + { "hud", optional_argument, NULL, 'D' }, + { "opengl", no_argument, NULL, 'O' }, { "width", required_argument, NULL, 'w' }, { "height", required_argument, NULL, 'h' }, //{ "xkeyboard", no_argument, NULL, 'k' }, @@ -738,6 +737,18 @@ bool config_t::ProcessArgs(int argc, char *argv[]) case 'f': ProcessArg("Fullscreen", "1"); break; case 'D': ProcessArg("X11.HUDOSD", "1"); + if (optarg && strstr(optarg, "xshape")) { + ProcessArg("XShapeHUDOSD", "1"); +#ifndef HAVE_XSHAPE + LOGMSG("XShape HUD OSD not supported\n"); +#endif + } + if (optarg && strstr(optarg, "opengl")) { + ProcessArg("OpenglHUDOSD", "1"); +#ifndef HAVE_OPENGL + LOGMSG("OpenGL HUD OSD not supported\n"); +#endif + } #ifndef HAVE_XRENDER LOGMSG("HUD OSD not supported\n"); #endif @@ -745,11 +756,6 @@ bool config_t::ProcessArgs(int argc, char *argv[]) case 'O': ProcessArg("OpenglAlways", "1"); #ifndef HAVE_OPENGL LOGMSG("OpenGL HUD OSD not supported\n"); -#endif - break; - case 'Q': ProcessArg("OpenglHUDOSD", "1"); -#ifndef HAVE_OPENGL - LOGMSG("OpenGL HUD OSD not supported\n"); #endif break; case 'w': ProcessArg("Fullscreen", "0"); @@ -834,6 +840,7 @@ bool config_t::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "X11.HUDOSD")) hud_osd |= (atoi(Value) ? HUD_COMPOSITE : 0); else if (!strcasecmp(Name, "X11.OpenglAlways")) opengl = atoi(Value); else if (!strcasecmp(Name, "X11.OpenglHUDOSD")) hud_osd |= (atoi(Value) ? HUD_OPENGL : 0); + else if (!strcasecmp(Name, "X11.XShapeHUDOSD")) hud_osd |= (atoi(Value) ? HUD_XSHAPE : 0); else if (!strcasecmp(Name, "Audio.Driver")) STRN0CPY(audio_driver, Value); else if (!strcasecmp(Name, "Audio.Port")) STRN0CPY(audio_port, Value); diff --git a/xine_frontend_main.c b/xine_frontend_main.c index 761ea8c1..6d1dede7 100644 --- a/xine_frontend_main.c +++ b/xine_frontend_main.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_main.c,v 1.92 2011-01-17 12:29:13 phintuka Exp $ + * $Id: xine_frontend_main.c,v 1.93 2011-01-17 12:54:22 phintuka Exp $ * */ @@ -397,11 +397,17 @@ static const char help_str[] = " --aspect=auto:path_to_script\n" " -f, --fullscreen Fullscreen mode\n" #ifdef HAVE_XRENDER - " -D, --hud Head Up Display OSD mode using compositing\n" + " -D, --hud[=flag[,flag]] Head Up Display OSD mode using compositing\n" + " flags:\n" +# ifdef HAVE_XSHAPE + " xshape Use XShape instead of compositing" +# endif +# ifdef HAVE_OPENGL + " opengl Use OpenGL instead of compositing" +# endif #endif #ifdef HAVE_OPENGL - " -Q, --opengl-always Always use OpenGL for video and Head Up Display OSD\n" - " -O, --opengl-hud Head Up Display OSD mode using OpenGL\n" + " -O, --opengl Use OpenGL for video and Head Up Display OSD\n" #endif " -w, --width=x Video window width\n" " -h, --height=x Video window height\n" @@ -449,9 +455,8 @@ static const struct option long_options[] = { { "aspect", required_argument, NULL, 'a' }, { "fullscreen", no_argument, NULL, 'f' }, { "geometry", required_argument, NULL, 'g' }, - { "hud", no_argument, NULL, 'D' }, - { "opengl-always",no_argument, NULL, 'O' }, - { "opengl-hud", no_argument, NULL, 'Q' }, + { "hud", optional_argument, NULL, 'D' }, + { "opengl", no_argument, NULL, 'O' }, { "width", required_argument, NULL, 'w' }, { "height", required_argument, NULL, 'h' }, { "buffers", required_argument, NULL, 'B' }, @@ -576,12 +581,24 @@ int main(int argc, char *argv[]) case 'f': fullscreen=1; PRINTF("Fullscreen mode\n"); break; - case 'D': hud |= HUD_COMPOSITE; + case 'D': hud = HUD_COMPOSITE; #ifdef HAVE_XRENDER PRINTF("HUD OSD mode\n"); #else PRINTF("HUD OSD not supported\n"); #endif + if (optarg && strstr(optarg, "xshape")) { + hud |= HUD_XSHAPE; +#ifndef HAVE_XSHAPE + PRINTF("XShape HUD OSD not supported\n"); +#endif + } + if (optarg && strstr(optarg, "opengl")) { + hud |= HUD_OPENGL; +#ifndef HAVE_OPENGL + PRINTF("OpenGL HUD OSD not supported\n"); +#endif + } break; case 'O': opengl = 1; hud |= HUD_OPENGL; @@ -589,13 +606,6 @@ int main(int argc, char *argv[]) PRINTF("Using OpenGL to draw video and HUD OSD\n"); #else PRINTF("OpenGL not supported\n"); -#endif - break; - case 'Q': hud |= HUD_OPENGL; -#ifdef HAVE_OPENGL - PRINTF("Using OpenGL to draw HUD OSD\n"); -#else - PRINTF("OpenGL not supported\n"); #endif break; case 'w': width = atoi(optarg); diff --git a/xineliboutput.c b/xineliboutput.c index 9dbe52c4..8c8200d5 100644 --- a/xineliboutput.c +++ b/xineliboutput.c @@ -21,7 +21,7 @@ * * xineliboutput.c: VDR Plugin interface * - * $Id: xineliboutput.c,v 1.43 2010-12-09 12:41:31 phintuka Exp $ + * $Id: xineliboutput.c,v 1.44 2011-01-17 12:54:22 phintuka Exp $ * */ @@ -125,7 +125,18 @@ const char cmdLineHelp[] = #endif " -f --fullscreen Fullscreen mode (X11)\n" #ifdef HAVE_XRENDER -" -D --hud Head Up Display OSD (X11)\n" +" -D --hud[=flag[,flag]]" +" Head Up Display OSD (X11)\n" +" flags:\n" +# ifdef HAVE_XSHAPE +" xshape Use XShape instead of compositing" +# endif +# ifdef HAVE_OPENGL +" opengl Use OpenGL instead of compositing" +# endif +#endif +#ifdef HAVE_OPENGL +" -O --opengl Use OpenGL for video and Head Up Display OSD\n" #endif " -w --width=x Window width\n" " -h --height=x Window width\n" -- cgit v1.2.3