From: <li...@yo...> - 2007-05-24 17:02:55
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1180026132 -3600 # Node ID 9a5b43b4a97615f6c57bd0b12d2f0c656c41050a # Parent 3ee24313208ce45532227482cf615c22271ddceb Make --help list the available video and audio output plugins. diff -r 9a5b43b4a97615f6c57bd0b12d2f0c656c41050a -r 3ee24313208ce45532227482cf615c22271ddceb ChangeLog --- a/ChangeLog Thu May 24 18:02:12 2007 +0100 +++ b/ChangeLog Thu May 24 17:30:12 2007 +0100 @@ -84,6 +84,7 @@ 0.5.900:2007/??/?? windowed-mode toolbar to remain visible. * Made the run-time time elapsed/remaining toggle global, as it probably should have been to start with. + * --help now lists the available video and audio output plugins. 0.5.11: 2007/02/01 [dsalt] diff -r 9a5b43b4a97615f6c57bd0b12d2f0c656c41050a -r 3ee24313208ce45532227482cf615c22271ddceb src/main.c --- a/src/main.c Thu May 24 18:02:12 2007 +0100 +++ b/src/main.c Thu May 24 17:30:12 2007 +0100 @@ -279,6 +279,22 @@ getdir (const char *env, const char *dir return getenv (env) ? : g_strconcat (dir, NULL); } +static void +list_plugins (const char *msg, typeof (xine_list_audio_output_plugins) list_func) +{ + static xine_t *xine = NULL; + if (!xine) + xine_init (xine = xine_new ()); + g_print ("%s", msg); + const char *const *list = list_func (xine); + while (list && *list) + { + g_print (" %s", *list); + ++list; + } + g_print ("\n"); +} + int main(int argc, char* argv[]) { gboolean enqueue, autoplay, fullscreen; @@ -448,6 +464,7 @@ int main(int argc, char* argv[]) } if (optstate & 1) + { g_print (_("\ gxine %s (%s)\n\ usage: %s [options] [MRLs...]\n\ @@ -462,6 +479,9 @@ options:\n\ -f, --full-screen start in full-screen mode\n\ -v, --verbose be more verbose\n\ \n"), VERSION, VENDOR_PKG_VERSION CSET_ID, argv[0]); + list_plugins (_("Available video drivers:"), xine_list_video_output_plugins); + list_plugins (_("Available audio drivers:"), xine_list_audio_output_plugins); + } else if (optstate & 4) g_print ("gxine %s (%s)\n%s\n%s", VERSION, VENDOR_PKG_VERSION CSET_ID, get_copyright_notice (), _("\ |