I've successfully installed DirectFB and have been using it with JPEGS
and keyboard input.  But I must have a configuration problem in trying
to use the video provider with libflash.

I believe I successfully installed libflash (libflash-0.4.so.10,
libflash-0.4.so.10.0., libflash.la, libflash.so are in my /usr/local/lib
directory), but when I try to run my code I get the following error:

(*) Single Application Core. (with MMX support)
(*) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
(*) DirectFB/InputDevice: IMPS/2 Mouse 0.9 (convergence integrated media
GmbH)
(*) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media GmbH)
(*) MMX detected and enabled
(*) DirectFB/GraphicsDevice: MMX Software Rasterizer 0.5 (convergence
integrated media GmbH)
(!) DirectFB/core/fbdev: Panning display failed!
       --> Invalid argument
(!) DirectFB/core/fbdev: Panning display failed!
       --> Invalid argument
(#) DirectFBError [Failed creating video provider CreateVideoProvider]:
Interface implementation not available!

I tried adding "-llibflash" to my Makefile, but got the error:

/usr/bin/ld: cannot find -llibflash


When I do a "cat /proc/fb" I get

0 VESA VGA
1 VGA16 VGA

The code I wrote is based on what I could piece together from the
examples and tutorial code (df_video_particle.c and tutorial files using
still images) and is pasted at the end of this email.

I hope I've given you all of the pertinent information.  Obviously, I'm
a newbie with Linux and with graphic drivers.

Thank you,
Amy

#include <stdio.h>
#include <unistd.h>

#include <directfb.h>

#include<stdlib.h>
#include <flash.h>

//globals
static IDirectFB *dfb = NULL;
IDirectFBSurface *primary;
IDirectFBSurface *video;
IDirectFBVideoProvider *videoprovider;
IDirectFBInputDevice *keyboard;

static int screen_width  = 0;
static int screen_height = 0;
#define DFBCHECK(x...)                                         \
     {                                                            \
       DFBResult err = x;                                         \
                                                                  \
       if (err != DFB_OK)                                         \
         {                                                        \
           fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
           DirectFBErrorFatal( #x, err );                         \
         }                                                        \
     }



int main (int argc, char **argv)
{
        DFBResult err;
             DFBSurfaceDescription desc;
             DFBSurfaceDescription dsc;

     /*
      * (Initialize)
      */
        if (DirectFBInit( &argc, &argv )  !=  DFB_OK)
             return 1;
        if (DirectFBCreate( &dfb )  !=  DFB_OK)
             return 1;
        err = dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard );
        if (err != DFB_OK) {
             DirectFBError( "CreateInputDevice for keyboard failed", err );
             dfb->Release( dfb );
             return 1;
        }
dsc.flags = DSDESC_CAPS;
dsc.caps  = (DFBSurfaceCapabilities)(DSCAPS_PRIMARY | DSCAPS_FLIPPING |
DSCAPS_SYSTEMONLY);
DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
DFBCHECK (primary->GetSize (primary, &screen_width, &screen_height));

     DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
    /*err = dfb->SetVideoMode( dfb, 640, 480,16 );
        if (err != DFB_OK) {
             DirectFBError( "Failed setting video mode", err );
             //keyboard->Release( keyboard );
             dfb->Release( dfb );
             return 1;
        }  */


             err = dfb->CreateVideoProvider( dfb, "Cosmo_opening.swf",
                                             &videoprovider );
             if (err != DFB_OK) {
                  DirectFBError( "Failed creating video provider
CreateVideoProvider", err );
                  primary->Release( primary );
                  //keyboard->Release( keyboard );
                  dfb->Release( dfb );
                  return 1;
             }

             videoprovider->GetSurfaceDescription( videoprovider, &desc );

             err = dfb->CreateSurface( dfb, &desc, &video );
             if (err != DFB_OK) {
                  DirectFBError( "Failed creating video surface
GetSurfaceDescription", err );
                  videoprovider->Release( videoprovider );
                  primary->Release( primary );
                  //keyboard->Release( keyboard );
                  dfb->Release( dfb );
                  return 1;
             }


             err = videoprovider->PlayTo( videoprovider, video, NULL,
NULL, NULL );
             if (err != DFB_OK) {
                  DirectFBError( "Failed creating video surface PlayTo",
err );
                  videoprovider->Release( videoprovider );
                  video->Release( video );
                  primary->Release( primary );
                  //keyboard->Release( keyboard );
                  dfb->Release( dfb );
                  return 1;
             }
        videoprovider->Release( videoprovider );
        video->Release( video );
        primary->Release( primary );
        //keyboard->Release( keyboard );
        dfb->Release( dfb );

        return 42;
}

-- 

Amy Brisben, Ph.D.
Senior Biomedical Engineer
Anthrotronix, Inc.
387 Technology Drive
College Park, MD 20742
Phone: 301-405-5420
Fax: 301-314-9592
Mobile: 410-493-9555
[EMAIL PROTECTED]
_ http://www.anthrotronix.com/ _



-- 

Amy Brisben, Ph.D.
Senior Biomedical Engineer
Anthrotronix, Inc.
387 Technology Drive
College Park, MD 20742
Phone: 301-405-5420
Fax: 301-314-9592
Mobile: 410-493-9555
[EMAIL PROTECTED]
_ http://www.anthrotronix.com/ _



-- 
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-users" as subject.

Reply via email to