Hi,
I did up a quick patch for df_xine to explicitly set the level of the
layer to a particular value. If it's OK, please commit. Otherwise
perhaps I can work on it when I am more awake. :)
Thanks,
-Rob
Index: samples/df_xine/context.c
===================================================================
RCS file: /cvs/directfb/DirectFB-extra/samples/df_xine/context.c,v
retrieving revision 1.33
diff -u -r1.33 context.c
--- samples/df_xine/context.c 12 Dec 2006 20:38:27 -0000 1.33
+++ samples/df_xine/context.c 9 Jan 2007 03:30:43 -0000
@@ -459,6 +459,11 @@
}
}
}
+ /* force layer to a particular level */
+ if (ctx->layer_level > 0) {
+ SAY( "forcing layer to level %i\n", this->ctx.layer_level );
+ DFBCHECK(ctx->layer->SetLevel( ctx->layer, ctx->layer_level ));
+ }
/* set default options */
ctx->config.flags |= DLCONF_OPTIONS;
Index: samples/df_xine/df_xine.h
===================================================================
RCS file: /cvs/directfb/DirectFB-extra/samples/df_xine/df_xine.h,v
retrieving revision 1.24
diff -u -r1.24 df_xine.h
--- samples/df_xine/df_xine.h 23 Aug 2006 08:56:54 -0000 1.24
+++ samples/df_xine/df_xine.h 9 Jan 2007 03:30:44 -0000
@@ -57,6 +57,7 @@
typedef struct {
int lid;
+ int layer_level;
IDirectFBScreen *screen; /* output screen */
IDirectFBDisplayLayer *layer; /* output layer */
Index: samples/df_xine/main.c
===================================================================
RCS file: /cvs/directfb/DirectFB-extra/samples/df_xine/main.c,v
retrieving revision 1.25
diff -u -r1.25 main.c
--- samples/df_xine/main.c 23 Aug 2006 08:56:54 -0000 1.25
+++ samples/df_xine/main.c 9 Jan 2007 03:30:44 -0000
@@ -129,6 +129,8 @@
puts( " -m S, --mode=S switch to video mode <xres>x<yres>\n"
);
puts( " -l N, --layer=N use layer N for video playback" );
puts( " (default: auto)\n" );
+ puts( " -L N, --layerlevel=N change the layer's level" );
+ puts( " (default: auto)\n" );
puts( " -p S, --pixelformat=S set layer pixelformat to S" );
puts( " (default: auto)\n" );
puts( " -b S, --buffermode=S use buffermode S (single, double or
triple)" );
@@ -199,14 +201,15 @@
memset( this, 0, sizeof( DFXCore ) );
- this->verbosity = 1;
- this->stdctl = false;
- this->scale = true;
- this->hwosd = true;
- this->ctx.lid = -1;
- this->ctx.buffermode = DLBM_BACKVIDEO;
- this->ctx.gmode = DGM_VIDEO;
- this->media.repeat = 1;
+ this->verbosity = 1;
+ this->stdctl = false;
+ this->scale = true;
+ this->hwosd = true;
+ this->ctx.lid = -1;
+ this->ctx.layer_level = -1;
+ this->ctx.buffermode = DLBM_BACKVIDEO;
+ this->ctx.gmode = DGM_VIDEO;
+ this->media.repeat = 1;
DirectFBInit( argn, argp );
@@ -281,6 +284,24 @@
DBUG( "will use layer %i\n", this->ctx.lid );
}
}
+ else if (*option == 'L') {
+ if (isdigit( option[1] ))
+ option++;
+ else if (argv[i+1] && isdigit( *argv[i+1] ))
+ option = argv[++i];
+ else
+ continue;
+
+ this->ctx.layer_level = strtol( option, NULL, 10 );
+ DBUG( "setting layer level to %i\n", this->ctx.layer_level
);
+ }
+ else if (!strncmp( option, "-layerlevel=", 12 )) {
+ option += 7;
+ if (isdigit( *option )) {
+ this->ctx.layer_level = strtol( option, NULL, 10 );
+ DBUG( "setting layer level to %i\n",
this->ctx.layer_level );
+ }
+ }
else if (*option == 'p') {
if (isalpha( option[1] ))
option++;
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev