[MPlayer-dev-eng] [PATCH] Matrox G400 TV out w/ DirectFB (resend)
Ville Syrjälä
syrjala at sci.fi
Thu Oct 31 02:11:20 CET 2002
On Thu, Oct 31, 2002 at 01:15:14AM +0100, Arpi wrote:
> actually just tried to test your code, and get only sig11:
>
> (...no errors reported by dfb...)
>
> (!) ---> CAUGHT SIGNAL 11 <---
> MPlayer interrupted by signal 11 in module: preinit_libvo
That's most likely me being really stupid :( I know I really should check
the return values from functions. I've attached a patch that should make
things fail more gracefully.
The cause I suspect is missing some of i2c-matroxfb, i2c-proc or i2c-dev
modules. And missing the right /dev/i2c-N file would also cause things to
fail.
> from remote sys in gdb it started, and then crashed the kernel to death
> (segv in kernel), now reconstructing raid... (need to emergency sync & reset)
Oops. Sorry. Don't know why your kernel oopsed though.
--
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/
-------------- next part --------------
--- vo_dfbmga.c.old Thu Oct 31 02:57:13 2002
+++ vo_dfbmga.c Thu Oct 31 02:58:25 2002
@@ -204,7 +204,8 @@
}
if (!inited) {
- DirectFBInit( NULL, NULL );
+ if (DirectFBInit( NULL, NULL ) != DFB_OK)
+ return -1;
if (!fb_dev_name && !(fb_dev_name = getenv( "FRAMEBUFFER" )))
fb_dev_name = "/dev/fb0";
@@ -212,24 +213,28 @@
DirectFBSetOption( "no-cursor", "" );
DirectFBSetOption( "bg-color", "00000000" );
- DirectFBCreate( &dfb );
+ if (DirectFBCreate( &dfb ) != DFB_OK)
+ return -1;
inited = 1;
}
if (use_bes) {
- dfb->GetDisplayLayer( dfb, 1, &bes );
+ if (dfb->GetDisplayLayer( dfb, 1, &bes ) != DFB_OK)
+ return -1;
bes->SetCooperativeLevel( bes, DLSCL_EXCLUSIVE );
bes->SetOpacity( bes, 0 );
}
if (use_crtc2) {
- dfb->GetDisplayLayer( dfb, 2, &crtc2 );
+ if (dfb->GetDisplayLayer( dfb, 2, &crtc2 ) != DFB_OK)
+ return -1;
crtc2->SetCooperativeLevel( crtc2, DLSCL_EXCLUSIVE );
crtc2->SetOpacity( crtc2, 0 );
}
- dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard );
+ if (dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ) != DFB_OK)
+ dfb->Release( dfb );
keyboard->CreateEventBuffer( keyboard, &buffer );
buffer->Reset( buffer );
@@ -290,7 +295,8 @@
dsc.height = in_height;
dsc.pixelformat = dlc.pixelformat;
- dfb->CreateSurface( dfb, &dsc, &frame );
+ if (dfb->CreateSurface( dfb, &dsc, &frame ) != DFB_OK)
+ return -1;
}
if (use_crtc2) {
@@ -368,7 +374,8 @@
DFBColor color;
int i;
- dfb->GetDisplayLayer( dfb, 3, &spic );
+ if (dfb->GetDisplayLayer( dfb, 3, &spic ) != DFB_OK)
+ return -1;
spic->SetCooperativeLevel( spic, DLSCL_EXCLUSIVE );
spic->SetOpacity( spic, 0 );
@@ -927,7 +934,6 @@
static void
check_events( void )
{
- static int opa = 255;
DFBInputEvent event;
if (buffer->GetEvent( buffer, DFB_EVENT( &event )) == DFB_OK) {
More information about the MPlayer-dev-eng
mailing list