diff options
author | phintuka <phintuka> | 2011-01-17 12:54:22 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2011-01-17 12:54:22 +0000 |
commit | c7407f83b9420e58369ed92ceb12299457cb76f4 (patch) | |
tree | 4c3c0bf1bb9121d29371cdf0e68d3de68c3782e0 | |
parent | fb9049ee1dff11c2ff42789db6a067ae9bf7577b (diff) | |
download | xineliboutput-c7407f83b9420e58369ed92ceb12299457cb76f4.tar.gz xineliboutput-c7407f83b9420e58369ed92ceb12299457cb76f4.tar.bz2 |
Changed command-line arguments:
--opengl-always ==> --opengl
--opengl-hud ==> --hud=opengl
Added xshape HUD option
-rw-r--r-- | config.c | 25 | ||||
-rw-r--r-- | xine_frontend_main.c | 40 | ||||
-rw-r--r-- | xineliboutput.c | 15 |
3 files changed, 54 insertions, 26 deletions
@@ -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 @@ -747,11 +758,6 @@ bool config_t::ProcessArgs(int argc, char *argv[]) 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"); ProcessArg("X11.WindowWidth", optarg); break; @@ -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; @@ -591,13 +608,6 @@ int main(int argc, char *argv[]) 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); PRINTF("Width: %d\n", width); break; 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" |