gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] pre-release 0.8.7 libxml header files not found


From: Peter Vermaas
Subject: Re: [Gnash-dev] pre-release 0.8.7 libxml header files not found
Date: Wed, 17 Feb 2010 09:04:13 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Rob Savoye wrote:
On 02/16/10 07:54, Peter Vermaas wrote:
Rob Savoye wrote:

Thanks for the .bbfile. It works now, with gui=fb, if I comment out the
"do_install_append()" part. When I use "--enable-media=gst" I have to
add some extra packages:  libgnashagg libgnashmedia libgnashsound
libgnashcore libgnashnet.

  Ok, I'll look into it. The bbfile I sent when 100% stable will go into
OE I've been told.

I noticed that this version can play video on our device. But we mainly
use gnash as a gui for an application. The reaction to a touchscreen
event seems to be slower than with 0.8.5. It improves a little bit if I
set the framerate to 0.01. It looks like I have to stay with 0.8.5 for
the moment.

  Hum, touchscreen support shouldn't be any slower than it was. I don't
have any working touchscreen hardware right now, so I can't test. I
guess for a GUI 0.8.5 is OK, but there are some nice memory reduction
improvements for XML and bitmap handling in 0.8.7. Interesting to hear
even video works. If you don't mind my asking, what is your hardware
platform ? I'm always curious about the places Gnash gets used.

        - rob -

We use a pxa300 based system @ 624Mhz as core for a table top vending machine. Gnash is used as the gui.

You will find the 2 patches I use at the moment appended. First the gstreamer patch that I needed to get gnash configure working on openembedded. Second the patch I use for the tslib touchscreen. This is a modified version of a patch I have found somewhere else on internet. I modified it so it uses select(). This patch isn't very nice since it disables the keyboard, but I haven't got a keyboard, so I didn't care.

I applied some of the options that are turned on with -ffast-math and that showed an increase of more than 5% in framerate with teddymark. But using -ffast-math fails. The problems seems to be in
"-ffinite-math-only".

Regards,

Peter \/.
*** gnash-0.8.6/configure.ac.orig       2009-09-24 10:12:38.000000000 +0200
--- gnash-0.8.6/configure.ac    2009-09-24 10:12:46.000000000 +0200
***************
*** 1996,2003 ****
         fi
      done
    fi
!   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], 
[gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, 
[0.10])
!   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app 
library], call_gmon_start, [0.10])
    GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, 
[0.10])
    dnl if cross compiling, we're usually not going to be able to pop up
    dnl the codec installer to download the package to install, so disable
--- 1996,2003 ----
         fi
      done
    fi
!   GNASH_PKG_FIND(gstinterfaces, [gst/interfaces/propertyprobe.h], [gstreamer 
interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
!   GNASH_PKG_FIND(gstapp, [gst/app/gstappsink.h], [gstreamer app library], 
call_gmon_start, [0.10])
    GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, 
[0.10])
    dnl if cross compiling, we're usually not going to be able to pop up
    dnl the codec installer to download the package to install, so disable
diff -cr ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/am-frag/fb.am 
gnash-0.8.7/gui/am-frag/fb.am
*** ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/am-frag/fb.am        2010-02-11 
00:20:18.000000000 +0100
--- gnash-0.8.7/gui/am-frag/fb.am       2010-02-15 11:23:36.000000000 +0100
***************
*** 23,29 ****
  fb_gnash_SOURCES = $(GUI_SRCS) gui_fb.cpp fb.cpp fbsup.h
  fb_gnash_CPPFLAGS = -DGUI_FB -DGUI_CONFIG=\"FB\" \
        $(AM_CPPFLAGS) 
! fb_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic $(AM_LDFLAGS)
  #fb_gnash_DEPENDENCIES = .configline
  
  if BUILD_AGG_RENDERER
--- 23,29 ----
  fb_gnash_SOURCES = $(GUI_SRCS) gui_fb.cpp fb.cpp fbsup.h
  fb_gnash_CPPFLAGS = -DGUI_FB -DGUI_CONFIG=\"FB\" \
        $(AM_CPPFLAGS) 
! fb_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic $(AM_LDFLAGS) -lts
  #fb_gnash_DEPENDENCIES = .configline
  
  if BUILD_AGG_RENDERER
diff -cr ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/fb.cpp gnash-0.8.7/gui/fb.cpp
*** ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/fb.cpp       2010-02-11 
00:20:18.000000000 +0100
--- gnash-0.8.7/gui/fb.cpp      2010-02-15 11:43:24.000000000 +0100
***************
*** 64,69 ****
--- 64,85 ----
  /// the coordinates you just found out. Write the coordinates separated by
  /// commas (X,Y,X,Y), like this: 
  ///   TSCALIB=491,1635,1581,639 gnash yourmovie.swf    
+ ///
+ /// 10-4-2008 N. Coesel
+ /// Added support for tslib. Tslib is a library which allows to create
+ /// a stack / cascade of filters to filter and scale touch-screen output.
+ /// The source doesn't come with much documentation, but writing your
+ /// own filter based on an existing filter is really easy. Tslib can 
+ /// deal with old style H3600 style touchscreens and the newer event 
+ /// interface. See http://tslib.berlios.de/ to get the source. 
+ ///
+ /// The check_tslib() routine assumes filtering for movement and presses
+ /// is properly setup. Scaling is supposed to be performed by tslib or
+ /// the underlying touchscreen driver.
+ ///
+ /// 11-4-2008 N. Coesel
+ /// Change timer stuff in run() to 64 bit (unsigned long long) integers
+ 
  
  #ifdef HAVE_CONFIG_H
  #include "gnashconfig.h"
***************
*** 82,87 ****
--- 98,104 ----
  #include "GnashSystemIOHeaders.h"
  #include <csignal>
  #include <cstdlib> // getenv
+ #include <unistd.h> 
  
  #include "gnash.h"
  #include "gui.h"
***************
*** 96,101 ****
--- 113,120 ----
  
  #include <linux/input.h>    // for /dev/input/event*
  
+ #define USE_TSLIB
+ 
  //#define DEBUG_SHOW_FPS  // prints number of frames per second to STDOUT
  
  #ifdef DEBUG_SHOW_FPS
***************
*** 122,127 ****
--- 141,156 ----
  //--
  
  
+ // NC: Some defines to turn mouse support on or off
+ #ifdef USE_MOUSE_PS2
+ #define USE_MOUSE
+ #endif
+ 
+ #ifdef USE_MOUSE_ETT
+ #define USE_MOUSE
+ #endif
+ 
+ 
  namespace gnash
  {
  
***************
*** 176,181 ****
--- 205,213 ----
    #endif
  
    input_fd=-1;
+ #ifdef USE_TSLIB  
+   tsDev = NULL;
+ #endif
    
    signal(SIGINT, terminate_signal);
    signal(SIGTERM, terminate_signal);
***************
*** 192,197 ****
--- 224,236 ----
    
    close(input_fd);
  
+ #ifdef USE_TSLIB
+     if (tsDev!=NULL)
+       {
+         ts_close(tsDev);      //ts_close doesn't like a NULL pointer
+       }
+ #endif
+ 
    #ifdef DOUBLE_BUFFER
    if (buffer) {
      log_debug(_("Free'ing offscreen buffer"));
***************
*** 242,259 ****
  
  bool FBGui::init(int /*argc*/, char *** /*argv*/)
  {
! 
    // Initialize mouse (don't abort if no mouse found)
    if (!init_mouse()) {
      // just report to the user, keep on going...
      log_debug(_("You won't have any pointing input device, sorry."));
    }
    
    // Initialize keyboard (still not critical)
    if (!init_keyboard()) {   
      log_debug(_("You won't have any keyboard input device, sorry."));
    }
  
    // Open the framebuffer device
    fd = open("/dev/fb0", O_RDWR);
    if (fd<0) {
--- 281,307 ----
  
  bool FBGui::init(int /*argc*/, char *** /*argv*/)
  {
! #ifdef USE_MOUSE
    // Initialize mouse (don't abort if no mouse found)
    if (!init_mouse()) {
      // just report to the user, keep on going...
      log_debug(_("You won't have any pointing input device, sorry."));
    }
+ #endif
    
    // Initialize keyboard (still not critical)
    if (!init_keyboard()) {   
      log_debug(_("You won't have any keyboard input device, sorry."));
    }
  
+ #ifdef USE_TSLIB
+   if (init_tslib()==false)
+       {
+       log_debug("You won't have any tslib input device, sorry.");
+       }
+ #endif
+ 
+ 
    // Open the framebuffer device
    fd = open("/dev/fb0", O_RDWR);
    if (fd<0) {
***************
*** 359,395 ****
  
  bool FBGui::run()
  {
!   struct timeval tv;
  
-   double start_timer;
-   
    if (!gettimeofday(&tv, NULL))
!     start_timer = static_cast<double>(tv.tv_sec) +
!     static_cast<double>(tv.tv_usec) / 1000000.0;
    else
!     start_timer = 0.0;
!     
!   
    // let the GUI recompute the x/y scale factors to best fit the whole screen
    resize_view(_validbounds.width(), _validbounds.height());
  
    while (!terminate_request) {
!   
!     // wait the "heartbeat" inteval
!     gnashSleep(_interval * 1000);    
!     // TODO: Do we need to check the real time slept or is it OK when we woke
!     // up early because of some Linux signal sent to our process (and thus
!     // "advance" faster than the "heartbeat" interval)? - Udo
!   
!     // check input devices
!     check_mouse();
!     check_keyboard();
!   
!     // advance movie  
!     Gui::advance_movie(this);
!     
!   }
!   
    return true;
  }
  
--- 407,473 ----
  
  bool FBGui::run()
  {
!  struct timeval tv;
! 
!   unsigned long long timer=0;   //64 bit timer in usec
!   unsigned long long gui_interval;
! 
!   fd_set rfds;
!   int fd = -1;
!   int retval = 0;
! 
!   gui_interval = _interval * 1000;
! 
! #ifdef USE_TSLIB
!   fd = ts_fd(tsDev);
! #endif
  
    if (!gettimeofday(&tv, NULL))
!     timer = tv.tv_sec * 1000000 + tv.tv_usec;
    else
!     timer = 0;
! 
!  
    // let the GUI recompute the x/y scale factors to best fit the whole screen
    resize_view(_validbounds.width(), _validbounds.height());
  
    while (!terminate_request) {
! 
!     unsigned long long  prevtimer = timer;
! 
!     while ((timer-prevtimer) < gui_interval) {
! 
!         tv.tv_sec  = (gui_interval-(timer-prevtimer)) / 1000000;
!         tv.tv_usec = (gui_interval-(timer-prevtimer)) % 1000000;
! 
!         if (fd >= 0)
!         {
!             FD_ZERO(&rfds);
!             FD_SET(fd, &rfds);
! 
!             retval = select((fd+1), &rfds, NULL, NULL, &tv);
!             if (retval > 0)
!             {
!                 if (FD_ISSET(fd, &rfds))
!                 {
!                     FD_CLR(fd, &rfds);
!                     check_tslib();
!                 }
!             }
!         }
! 
! #ifdef USE_MOUSE
!       check_mouse(); // TODO: Exit delay loop on mouse events!
!       check_keyboard(); // TODO: Exit delay loop on keyboard events!
! #endif
! 
!       if (!gettimeofday(&tv, NULL))
!         timer = tv.tv_sec * 1000000 + tv.tv_usec;
!     }
! 
!   // advance movie
!   Gui::advance_movie(this);
!   } 
    return true;
  }
  
***************
*** 1469,1473 ****
--- 1547,1636 ----
  
  }
  
+ #ifdef USE_TSLIB
+ bool FBGui::init_tslib() 
+ {
+   char* devname = getenv(TSLIB_DEVICE_ENV);
+   if (!devname) devname=TSLIB_DEVICE_NAME;
+ 
+   
+   tsDev = ts_open(devname,1); //Open tslib non-blocking
+   if (tsDev==NULL)
+       {
+     log_debug("Could not open touchscreen %s: %s", devname, strerror(errno));
+     return false;
+       }
+ 
+   ts_config(tsDev); 
+   if (ts_fd(tsDev)<0)
+       {
+       log_debug("Could not get touchscreen fd %s: %s", devname, 
strerror(errno));
+       return false;
+       }
+ 
+   log_debug("Using TSLIB on %s", devname);
+   return true;
+  
+ }
+ 
+ 
+ void FBGui::check_tslib()
+ {
+     //Read events from the touchscreen and transport them into Gnash
+     //Tslib should be setup so the output is pretty clean.
+     struct ts_sample event;
+     
+       static int      old_mouse_x = 0;
+       static int      old_mouse_y = 0;
+       static unsigned int     old_mouse_btn = 0;
+ 
+       int new_mouse_x = 0;
+       int new_mouse_y = 0;
+       unsigned int new_mouse_btn = 0;
+ 
+       const int threshold = m_stage_width / 100;
+ 
+       bool move_pending = false;
+ 
+     if (tsDev==NULL) return;          //No tslib device initialized, exit!
+     
+     while (ts_read(tsDev, &event, 1) > 0)
+       {       
+               new_mouse_btn = event.pressure;
+               new_mouse_x = event.x;
+               new_mouse_y = event.y;
+ 
+               if (new_mouse_x < 0)    new_mouse_x = 0;
+               if (new_mouse_y < 0)    new_mouse_y = 0;
+ 
+               if (new_mouse_x > m_stage_width)        new_mouse_x = 
m_stage_width;
+               if (new_mouse_y > m_stage_height)       new_mouse_y = 
m_stage_height;
+ 
+               if ((abs(new_mouse_x - old_mouse_x) > threshold) ||
+                   (abs(new_mouse_y - old_mouse_y) > threshold))
+               {
+                       move_pending = true;
+               }
+ 
+               if ((new_mouse_btn != old_mouse_btn) ||
+                   (move_pending))
+               {
+                       move_pending = false;
+                       old_mouse_btn = new_mouse_btn;
+                       old_mouse_x = new_mouse_x;
+                       old_mouse_y = new_mouse_y;
+ 
+                       notify_mouse_moved(new_mouse_x, new_mouse_y);
+                       notify_mouse_clicked(new_mouse_btn, 1);  //fire mouse 
click event into Gnash
+                       log_debug("Clicked: %d, %d ", new_mouse_x, new_mouse_y);
+               }
+       }
+ }
+ 
+ 
+ #endif                //end USE_TSLIB
+ 
+ 
+ 
  // end of namespace gnash
  }
diff -cr ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/fbsup.h gnash-0.8.7/gui/fbsup.h
*** ../gnash-0.8.7-r0.orig/gnash-0.8.7/gui/fbsup.h      2010-02-11 
00:20:17.000000000 +0100
--- gnash-0.8.7/gui/fbsup.h     2010-02-15 11:23:36.000000000 +0100
***************
*** 46,52 ****
  //#define USE_MOUSE_PS2
  
  // Define this to read from /dev/input/event0 (new generic input subsystem)
! #define USE_INPUT_EVENTS
  
  // Define this to support eTurboTouch / eGalax touchscreens. When reading from
  // a serial device, it must be initialized (stty) externally. 
--- 46,70 ----
  //#define USE_MOUSE_PS2
  
  // Define this to read from /dev/input/event0 (new generic input subsystem)
! //#define USE_INPUT_EVENTS
! 
! #define USE_TSLIB
! 
! #ifdef USE_TSLIB
! extern "C"
! {
! #include <tslib.h>
! }
! 
! //Either use environment variable or hardcoded value
! //Hint: /dev/ts can be a symlink to the real ts device.
! //TSLIB_DEVICE environment variable should point to the
! //touchscreen device the library is using.
! #define TSLIB_DEVICE_ENV      "TSLIB_TSDEVICE"
! #define TSLIB_DEVICE_NAME     "/dev/ts"
! 
! #endif
! 
  
  // Define this to support eTurboTouch / eGalax touchscreens. When reading from
  // a serial device, it must be initialized (stty) externally. 
***************
*** 131,136 ****
--- 149,160 ----
        int mouse_x, mouse_y, mouse_btn;
        unsigned char mouse_buf[256];
        int mouse_buf_size;
+ 
+ #ifdef USE_TSLIB
+         struct tsdev *tsDev;
+         bool init_tslib();
+         void check_tslib();
+ #endif
        
        // Keyboard SHIFT/CTRL/ALT states (left + right)
        bool keyb_lshift, keyb_rshift, keyb_lctrl, keyb_rctrl, keyb_lalt, 
keyb_ralt;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]