Hi,
it would be nice (especially for Freevo users) if this patch which adds
some version information to df_xine would be admitted. I didn't know
what version to use, as I didn't find a DirectFB-extra coded version, so
please adjust as needed if necessary, maybe in some way that requires
very low maintainance from one version to the other...
Regards,
Lucian
diff -Naur DirectFB-extra_orig/samples/df_xine/main.c
DirectFB-extra/samples/df_xine/main.c
--- DirectFB-extra_orig/samples/df_xine/main.c 2005-10-25 00:11:13.000000000
+0200
+++ DirectFB-extra/samples/df_xine/main.c 2005-10-25 02:09:03.000000000
+0200
@@ -37,6 +37,8 @@
#include "keymap.h"
+#define DFXINE_VERSION "0.9.23"
+
/*****************************************************************************/
static DFXCore core;
@@ -123,6 +125,7 @@
puts( "\nUsage: df_xine [options] MRLs...\n" );
puts( " -h , --help show this help\n" );
+ puts( " -V , --version display version information\n" );
puts( " -v N, --verbosity=N set verbosity level to N" );
puts( " (minimum: 0, maximum: 2, default:
1)\n" );
puts( " -l N, --layer=N use layer N for video playback" );
@@ -185,7 +188,7 @@
}
static void
-dfx_init( DFXCore *this, int *argn, char ***argp )
+dfx_version( DFXCore *this, int *argn, char ***argp )
{
char **argv;
int argc;
@@ -193,6 +196,34 @@
if (*argn < 2)
dfx_usage();
+
+ for (argv = *argp, argc = *argn, i = 1; i < argc; i++) {
+ char *option = argv[i];
+
+ if (!option || !*option)
+ continue;
+
+ if (*option == '-') {
+ option++;
+
+ if (!strcmp( option, "V" ) || !strcmp( option, "-version" )) {
+ printf(
+ "df_xine %s is a DirectFB frontend for xine-lib-%s\n",
+ DFXINE_VERSION,
+ XINE_VERSION );
+ if (*argn == 2)
+ exit( EXIT_SUCCESS );
+ }
+ }
+ }
+}
+
+static void
+dfx_init( DFXCore *this, int *argn, char ***argp )
+{
+ char **argv;
+ int argc;
+ int i;
memset( this, 0, sizeof( DFXCore ) );
@@ -580,7 +611,9 @@
{
DFXCore *this = &core;
- dfx_init( this, &argc, &argv );
+ dfx_version ( this, &argc, &argv);
+
+ dfx_init( this, &argc, &argv);
DFBCHECK(DirectFBCreate( &this->dfb ));
SAY( "here we go!\n" );
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev