gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9694: Merge from trunk.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9694: Merge from trunk.
Date: Wed, 25 Feb 2009 19:57:02 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9694
committer: Benjamin Wolsey <address@hidden>
branch nick: avm2
timestamp: Wed 2009-02-25 19:57:02 +0100
message:
  Merge from trunk.
added:
  gui/gtk_glue_agg_xv.cpp
  gui/gtk_glue_agg_xv.h
  libmedia/VideoConverter.h
  libmedia/ffmpeg/VideoConverterFfmpeg.cpp
  libmedia/ffmpeg/VideoConverterFfmpeg.h
  libmedia/gst/VideoConverterGst.cpp
  libmedia/gst/VideoConverterGst.h
modified:
  Makefile.am
  configure.ac
  cygnal/rtmp_server.cpp
  doc/C/usermanual/gnashrc.xml
  extensions/Makefile.am
  extensions/dbus/Makefile.am
  extensions/dejagnu/Makefile.am
  extensions/fileio/Makefile.am
  extensions/gtk2/Makefile.am
  extensions/launcher/Makefile.am
  extensions/lirc/Makefile.am
  extensions/metome/Makefile.am
  extensions/mysql/Makefile.am
  extensions/mysql/mysql_db.cpp
  gui/Kde4Gui.cpp
  gui/am-frag/gtk.am
  gui/gtk.cpp
  gui/gui.h
  libbase/curl_adapter.cpp
  libbase/gnashrc.in
  libbase/rc.cpp
  libbase/rc.h
  libcore/TextField.cpp
  libcore/movie_root.h
  libmedia/Makefile.am
  libmedia/MediaHandler.h
  libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
  libmedia/ffmpeg/MediaHandlerFfmpeg.h
  libmedia/gst/MediaHandlerGst.cpp
  libmedia/gst/MediaHandlerGst.h
  libmedia/gst/swfdec_codec_gst.c
  libmedia/gst/swfdec_codec_gst.h
  libsound/Makefile.am
  macros/x11.m4
  plugin/plugin.cpp
  testsuite/MovieTester.cpp
  testsuite/libbase/TCXXRc.cpp
  testsuite/libbase/gnashrc-local.in
  testsuite/libbase/gnashrc.in
  testsuite/libnet.all/generate_amfbins.cpp
  testsuite/libnet.all/test_diskstream.cpp
  utilities/processor.cpp
    ------------------------------------------------------------
    revno: 9439.1.1165
    committer: Bastiaan Jacques <address@hidden>
    branch nick: trunk
    timestamp: Sat 2009-02-21 15:19:48 +0100
    message:
      XV support, part one: colorspace conversion.
      
      * libmedia/VideoConverter.h: Base class for video converter 
        implementations.
      * libmedia/MediaHandler.{h}: Media handler support for creating
        video converter objects.
      * libmedia/ffmpeg/MediaHandlerFfmpeg.{cpp,h}: Support creating 
        the ffmpeg video converter.
      * libmedia/gst/MediaHandlerGst.{cpp,h}: Idem dito.
      * libmedia/gst/swfdec_codec_gst.{c,h}: Add a function specifically
        for creating a colorspace conversion "pipeline".
      * libmedia/ffmpeg/VideoConverterFfmpeg{cpp,h}: Implementation of the
        ffmpeg video converter.
      * libmedia/gst/VideoConverterGst.{cpp,h}: Gstreamer video converter
        implementation.
      * libmedia/Makefile.am: Enable building of newly added files.
    added:
      libmedia/VideoConverter.h
      libmedia/ffmpeg/VideoConverterFfmpeg.cpp
      libmedia/ffmpeg/VideoConverterFfmpeg.h
      libmedia/gst/VideoConverterGst.cpp
      libmedia/gst/VideoConverterGst.h
    modified:
      libmedia/Makefile.am
      libmedia/MediaHandler.h
      libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
      libmedia/ffmpeg/MediaHandlerFfmpeg.h
      libmedia/gst/MediaHandlerGst.cpp
      libmedia/gst/MediaHandlerGst.h
      libmedia/gst/swfdec_codec_gst.c
      libmedia/gst/swfdec_codec_gst.h
    ------------------------------------------------------------
    revno: 9439.1.1166
    committer: address@hidden
    branch nick: trunk
    timestamp: Sat 2009-02-21 12:04:42 -0700
    message:
      get rid of extraneous newline in text field.
    modified:
      cygnal/rtmp_server.cpp
    ------------------------------------------------------------
    revno: 9439.1.1167
    committer: John Wimer <address@hidden>
    branch nick: trunk
    timestamp: Sun 2009-02-22 12:28:14 +0100
    message:
      Add the edit submenu menu to the popup menu
    modified:
      gui/Kde4Gui.cpp
    ------------------------------------------------------------
    revno: 9439.1.1168
    committer: John Wimer <address@hidden>
    branch nick: trunk
    timestamp: Sun 2009-02-22 16:47:03 +0100
    message:
      Allow Kde4gui plugin to properly re-embed when exiting fullscreen mode
    modified:
      gui/Kde4Gui.cpp
    ------------------------------------------------------------
    revno: 9439.1.1169
    committer: Markus Gothe <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 02:07:03 +0100
    message:
      class refactoring and extern C for the include for libswscale
    modified:
      libmedia/ffmpeg/VideoConverterFfmpeg.cpp
      libmedia/ffmpeg/VideoConverterFfmpeg.h
    ------------------------------------------------------------
    revno: 9439.1.1170
    committer: Bastiaan Jacques <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 05:13:31 +0100
    message:
      XV support, part 2.
      
      macros/x11.m4: Look for the Xv library and header file.
      gui/am-frag/gtk.am: Build Xv if it's availabe on the system.
      libbase/rc.{cpp,h}: Add "XVideo" boolean setting for gnashrc.
      gui/gtk.cpp: If Xvideo is available and enabled in gnashrc, try to use
        it and fall back on normal rendering if that fails.
      gui/gtk_glue_agg_xv.{cpp,h}: Xv glue implementation that originates from
        the proof-of-concept patch by Craig Kelley <address@hidden>.
      gui/gui.h: Remove unused method.
      libmedia/ffmpeg/VideoConverterFfmpeg.cpp: Add guard parenthesis around
        struct initializer.
      libmedia/gst/VideoConverterGst.cpp: Ensure that the decoder exists 
        before we attempt to clean it up.
    added:
      gui/gtk_glue_agg_xv.cpp
      gui/gtk_glue_agg_xv.h
    modified:
      gui/am-frag/gtk.am
      gui/gtk.cpp
      gui/gui.h
      libbase/rc.cpp
      libbase/rc.h
      libmedia/ffmpeg/VideoConverterFfmpeg.cpp
      libmedia/gst/VideoConverterGst.cpp
      macros/x11.m4
    ------------------------------------------------------------
    revno: 9439.1.1171
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 15:57:23 +0100
    message:
      Dunno why close() was commented out, later test for state==CLOSED 
obviously failed like that
    modified:
      testsuite/libnet.all/test_diskstream.cpp
    ------------------------------------------------------------
    revno: 9439.1.1172
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 16:17:47 +0100
    message:
      drop unused methods
    modified:
      libcore/movie_root.h
    ------------------------------------------------------------
    revno: 9439.1.1173
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 17:16:17 +0100
    message:
      Fix build w/out media handler, and avoid aborting as a consequence (no 
media => no sound)
    modified:
      libsound/Makefile.am
      testsuite/MovieTester.cpp
      utilities/processor.cpp
    ------------------------------------------------------------
    revno: 9439.1.1174
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 17:32:29 +0100
    message:
      Oops, I broke builds *with* media in last commit, now fixed
    modified:
      utilities/processor.cpp
    ------------------------------------------------------------
    revno: 9439.1.1175
    committer: Bastiaan Jacques <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 17:47:48 +0100
    message:
      Add system header for compilation on OpenBSD.
    modified:
      testsuite/libnet.all/generate_amfbins.cpp
    ------------------------------------------------------------
    revno: 9439.1.1176
    committer: Bastiaan Jacques <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 18:10:56 +0100
    message:
      Document the gnashrc XVideo setting.
    modified:
      doc/C/usermanual/gnashrc.xml
      libbase/gnashrc.in
      testsuite/libbase/gnashrc.in
    ------------------------------------------------------------
    revno: 9439.1.1177
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 19:04:44 +0100
    message:
      Consider signal interruption of select as a timeout. Makes klash survive 
popups.
    modified:
      libbase/curl_adapter.cpp
    ------------------------------------------------------------
    revno: 9439.1.1178
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Mon 2009-02-23 19:10:04 +0100
    message:
      Add actual testing for XVideo RC setting
    modified:
      testsuite/libbase/TCXXRc.cpp
      testsuite/libbase/gnashrc-local.in
    ------------------------------------------------------------
    revno: 9439.1.1179
    committer: address@hidden
    branch nick: trunk
    timestamp: Mon 2009-02-23 13:01:26 -0700
    message:
      fix typo so VideoConverterGst.h gets included in the dist tarball.
    modified:
      libmedia/Makefile.am
    ------------------------------------------------------------
    revno: 9439.1.1180
    committer: John Wimer <address@hidden>
    branch nick: trunk
    timestamp: Tue 2009-02-24 19:20:50 +0100
    message:
      Remove the requirement of the browser being gtk2 based. It's no longer 
needed.
      This allows QtWebKit to embed the gnash plugin (gtk and kde4 both work)
    modified:
      plugin/plugin.cpp
    ------------------------------------------------------------
    revno: 9439.1.1181
    committer: address@hidden
    branch nick: trunk
    timestamp: Tue 2009-02-24 11:38:34 -0700
    message:
      don't try to run the testsuite for distcheck, we do that as a separate 
step.
    modified:
      Makefile.am
    ------------------------------------------------------------
    revno: 9439.1.1182
    committer: Sandro Santilli <address@hidden>
    branch nick: trunk
    timestamp: Tue 2009-02-24 22:22:03 +0100
    message:
      Advertise XVideo support on 'make dumpconfig' when built-in (only for GTK 
gui atm)
    modified:
      Makefile.am
    ------------------------------------------------------------
    revno: 9439.1.1183
    committer: address@hidden
    branch nick: trunk
    timestamp: Tue 2009-02-24 19:00:44 -0700
    message:
      merge from release branch.
    modified:
      configure.ac
      extensions/Makefile.am
      extensions/dbus/Makefile.am
      extensions/dejagnu/Makefile.am
      extensions/fileio/Makefile.am
      extensions/gtk2/Makefile.am
      extensions/launcher/Makefile.am
      extensions/lirc/Makefile.am
      extensions/metome/Makefile.am
      extensions/mysql/Makefile.am
      extensions/mysql/mysql_db.cpp
      libmedia/ffmpeg/VideoConverterFfmpeg.cpp
        ------------------------------------------------------------
        revno: 9439.276.18
        committer: Benjamin Wolsey <address@hidden>
        branch nick: release_0_8_5
        timestamp: Fri 2009-02-20 07:48:41 +0100
        message:
          Merge fix to leak in gst codec information from trunk.
        modified:
          libmedia/gst/AudioDecoderGst.cpp
          libmedia/gst/VideoDecoderGst.cpp
        ------------------------------------------------------------
        revno: 9439.276.19
        committer: John Wimer <address@hidden>
        branch nick: release_0_8_5
        timestamp: Sun 2009-02-22 20:23:08 +0100
        message:
          Merge from trunk fixes related to fullscreen when in plugin mode
        modified:
          gui/Kde4Gui.cpp
        ------------------------------------------------------------
        revno: 9439.276.20
        committer: Bastiaan Jacques <address@hidden>
        branch nick: release_0_8_5
        timestamp: Mon 2009-02-23 21:54:26 +0100
        message:
          Merge: XV support part 1.
        added:
          libmedia/VideoConverter.h
          libmedia/ffmpeg/VideoConverterFfmpeg.cpp
          libmedia/ffmpeg/VideoConverterFfmpeg.h
          libmedia/gst/VideoConverterGst.cpp
          libmedia/gst/VideoConverterGst.h
        modified:
          libmedia/Makefile.am
          libmedia/MediaHandler.h
          libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
          libmedia/ffmpeg/MediaHandlerFfmpeg.h
          libmedia/gst/MediaHandlerGst.cpp
          libmedia/gst/MediaHandlerGst.h
          libmedia/gst/swfdec_codec_gst.c
          libmedia/gst/swfdec_codec_gst.h
        ------------------------------------------------------------
        revno: 9439.276.21
        committer: Bastiaan Jacques <address@hidden>
        branch nick: release_0_8_5
        timestamp: Mon 2009-02-23 21:56:03 +0100
        message:
          Merge: XV support part 2.
        added:
          gui/gtk_glue_agg_xv.cpp
          gui/gtk_glue_agg_xv.h
        modified:
          gui/am-frag/gtk.am
          gui/gtk.cpp
          gui/gui.h
          libbase/rc.cpp
          libbase/rc.h
          libmedia/ffmpeg/VideoConverterFfmpeg.cpp
          libmedia/gst/VideoConverterGst.cpp
          macros/x11.m4
        ------------------------------------------------------------
        revno: 9439.276.22
        committer: Bastiaan Jacques <address@hidden>
        branch nick: release_0_8_5
        timestamp: Mon 2009-02-23 21:58:59 +0100
        message:
          Merge: XV documentation.
        modified:
          doc/C/usermanual/gnashrc.xml
          libbase/gnashrc.in
          testsuite/libbase/gnashrc.in
        ------------------------------------------------------------
        revno: 9439.276.23
        committer: Bastiaan Jacques <address@hidden>
        branch nick: release_0_8_5
        timestamp: Mon 2009-02-23 22:02:03 +0100
        message:
          Merge Xv config file test.
        modified:
          testsuite/libbase/TCXXRc.cpp
          testsuite/libbase/gnashrc-local.in
        ------------------------------------------------------------
        revno: 9439.276.24
        committer: Bastiaan Jacques <address@hidden>
        branch nick: release_0_8_5
        timestamp: Mon 2009-02-23 22:06:48 +0100
        message:
          Merge: OpenBSD build fix.
        modified:
          testsuite/libnet.all/generate_amfbins.cpp
        ------------------------------------------------------------
        revno: 9439.276.25
        committer: address@hidden
        branch nick: release_0_8_5
        timestamp: Tue 2009-02-24 18:36:03 -0700
        message:
          don't build the gtk extension.
        modified:
          configure.ac
          extensions/Makefile.am
        ------------------------------------------------------------
        revno: 9439.276.26
        committer: address@hidden
        branch nick: release_0_8_5
        timestamp: Tue 2009-02-24 18:36:22 -0700
        message:
          fix the path to asobjs, which had changed.
        modified:
          extensions/dbus/Makefile.am
          extensions/dejagnu/Makefile.am
          extensions/fileio/Makefile.am
          extensions/gtk2/Makefile.am
          extensions/launcher/Makefile.am
          extensions/lirc/Makefile.am
          extensions/metome/Makefile.am
          extensions/mysql/Makefile.am
          extensions/mysql/mysql_db.cpp
    ------------------------------------------------------------
    revno: 9439.1.1184
    committer: Benjamin Wolsey <address@hidden>
    branch nick: trunk
    timestamp: Wed 2009-02-25 08:02:16 +0100
    message:
      Remove duplicate definition of SwsContextWrapper after merge from
      release branch. It is now back in the implementation file, because there's
      no benefit to having it in a header unless that header is included by all
      places that use SwsContextWrapper (e.g. VideoDecoderFfmpeg).
    modified:
      libmedia/ffmpeg/VideoConverterFfmpeg.h
    ------------------------------------------------------------
    revno: 9439.1.1185
    committer: Benjamin Wolsey <address@hidden>
    branch nick: trunk
    timestamp: Wed 2009-02-25 08:44:45 +0100
    message:
      Fix device font display properly (patch from Michael Fötsch), drop
      compile-time option for pp-compatible font handling.
    modified:
      libcore/TextField.cpp
        ------------------------------------------------------------
        revno: 9439.278.1
        author: Michael Fötsch <address@hidden>
        committer: Benjamin Wolsey <address@hidden>
        branch nick: temp
        timestamp: Wed 2009-02-25 08:21:58 +0100
        message:
          Correctly render device fonts with parent cxform. Fixes YouTube 
'recently watched' widget
        modified:
          libcore/TextField.cpp
        ------------------------------------------------------------
        revno: 9439.278.2
        committer: Benjamin Wolsey <address@hidden>
        branch nick: temp
        timestamp: Wed 2009-02-25 08:22:26 +0100
        message:
          Remove PP_COMPATIBLE_DEVICE_FONT_HANDLING macro. Because at least one
          prominent case relies on this 'bug' (YouTube), it's no longer 
optional.
          The other strange behaviour of device fonts (rotation) is not 
implemented.
        modified:
          libcore/TextField.cpp
        ------------------------------------------------------------
        revno: 9439.278.3
        committer: Benjamin Wolsey <address@hidden>
        branch nick: temp
        timestamp: Wed 2009-02-25 08:25:37 +0100
        message:
          Indentation.
        modified:
          libcore/TextField.cpp
        ------------------------------------------------------------
        revno: 9439.278.4
        committer: Benjamin Wolsey <address@hidden>
        branch nick: temp
        timestamp: Wed 2009-02-25 08:30:10 +0100
        message:
          Note on test.
        modified:
          libcore/TextField.cpp
=== modified file 'Makefile.am'
--- a/Makefile.am       2009-02-14 18:42:17 +0000
+++ b/Makefile.am       2009-02-24 21:22:03 +0000
@@ -37,7 +37,8 @@
 DISTCHECK_CONFIGURE_FLAGS = \
        --with-plugins-install=prefix \
        --enable-extensions=all \
-       --enable-gui=all 
+       --enable-gui=all \
+       --disable-testsuite
 #--enable-cygnal
 
 STD_DIRS = \
@@ -313,8 +314,12 @@
        @echo " Renderer engine: $(RENDERER_CONFIG)"
 
 if BUILD_GTK_GUI
+if HAVE_XV
+       @echo " Supported GUI: GTK (+XVideo)"
+else
        @echo " Supported GUI: GTK"
 endif
+endif
 if BUILD_HILDON_GUI
        @echo " Supported GUI: HILDON"
 endif

=== modified file 'configure.ac'
--- a/configure.ac      2009-02-20 12:24:00 +0000
+++ b/configure.ac      2009-02-25 18:57:02 +0000
@@ -534,7 +534,6 @@
         build_fltk=yes
         build_kde3=yes
         build_kde4=yes
-        build_gtk=yes
         build_sdl=yes
 dnl        build_qtopia=yes
 dnl        build_hildon=yes

=== modified file 'cygnal/rtmp_server.cpp'
--- a/cygnal/rtmp_server.cpp    2009-02-14 22:42:54 +0000
+++ b/cygnal/rtmp_server.cpp    2009-02-21 19:04:42 +0000
@@ -1209,8 +1209,7 @@
                                if (body) {
                                    if (body->getMethodName() == "connect") {
                                        response = 
rtmp->encodeResult(RTMPMsg::NC_CONNECT_SUCCESS);
-                                   } else if (body->getMethodName() == "createS
-tream") {
+                                   } else if (body->getMethodName() == 
"createStream") {
                                        response = 
rtmp->encodeResult(RTMPMsg::NS_DATA_START);
                                    } else {
                                        response = 
rtmp->encodeResult(RTMPMsg::NS_FAILED);

=== modified file 'doc/C/usermanual/gnashrc.xml'
--- a/doc/C/usermanual/gnashrc.xml      2008-03-10 19:39:34 +0000
+++ b/doc/C/usermanual/gnashrc.xml      2009-02-25 02:00:44 +0000
@@ -248,7 +248,14 @@
            </programlisting>
          </entry>
        </row>
-       
+       <row>
+         <entry>XVideo</entry>
+         <entry>on/off</entry>
+         <entry>If set to <emphasis>on</emphasis>, &app; will attempt to 
render using the X Video Extension, if
+                system support was found during compilation. By default, X 
Video rendering is disabled.
+         </entry>
+       </row>
+
       </tbody>
     </tgroup>
   </table>

=== modified file 'extensions/Makefile.am'
--- a/extensions/Makefile.am    2008-07-22 08:44:22 +0000
+++ b/extensions/Makefile.am    2009-02-25 01:36:03 +0000
@@ -47,7 +47,7 @@
 
 if BUILD_GTK_EXT
 if BUILD_GTK_GUI
-OTHER_DIRS += gtk2
+OTHER_DIRS += # gtk2
 endif
 endif
 DIST_SUBDIRS = dejagnu fileio mysql gtk2 lirc dbus metome

=== modified file 'extensions/dbus/Makefile.am'
--- a/extensions/dbus/Makefile.am       2008-07-22 21:24:49 +0000
+++ b/extensions/dbus/Makefile.am       2009-02-25 01:36:22 +0000
@@ -26,7 +26,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-           -I$(top_srcdir)/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            $(INCLTDL)
 
 dbus_la_SOURCES = dbus_ext.cpp dbus_ext.h

=== modified file 'extensions/dejagnu/Makefile.am'
--- a/extensions/dejagnu/Makefile.am    2008-07-22 21:24:49 +0000
+++ b/extensions/dejagnu/Makefile.am    2009-02-25 01:36:22 +0000
@@ -26,7 +26,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-           -I$(top_srcdir)/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            $(INCLTDL)
 
 AM_LDFLAGS =  \

=== modified file 'extensions/fileio/Makefile.am'
--- a/extensions/fileio/Makefile.am     2008-07-22 21:24:49 +0000
+++ b/extensions/fileio/Makefile.am     2009-02-25 01:36:22 +0000
@@ -31,7 +31,7 @@
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
            -I$(top_srcdir)/libcore/parser \
-           -I$(top_srcdir)/libcore/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            $(BOOST_CFLAGS) \
            $(PTHREAD_CFLAGS) \
            $(INCLTDL)

=== modified file 'extensions/gtk2/Makefile.am'
--- a/extensions/gtk2/Makefile.am       2008-07-22 21:24:49 +0000
+++ b/extensions/gtk2/Makefile.am       2009-02-25 01:36:22 +0000
@@ -29,7 +29,7 @@
        -I$(top_srcdir)/libcore \
        -I$(top_srcdir)/libcore/vm \
        -I$(top_srcdir)/libcore/parser \
-       -I$(top_srcdir)/libcore/asobjs \
+       -I$(top_srcdir)/libcore/asobj \
        $(LIBXML_CFLAGS) \
        $(SDL_CFLAGS) \
        $(DMALLOC_CFLAGS) \

=== modified file 'extensions/launcher/Makefile.am'
--- a/extensions/launcher/Makefile.am   2008-07-22 21:24:49 +0000
+++ b/extensions/launcher/Makefile.am   2009-02-25 01:36:22 +0000
@@ -28,7 +28,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-           -I$(top_srcdir)/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            $(BOOST_CFLAGS) \
            $(NULL)
 

=== modified file 'extensions/lirc/Makefile.am'
--- a/extensions/lirc/Makefile.am       2008-07-22 21:24:49 +0000
+++ b/extensions/lirc/Makefile.am       2009-02-25 01:36:22 +0000
@@ -26,7 +26,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-           -I$(top_srcdir)/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            -I$(top_srcdir)/libnet \
            $(BOOST_CFLAGS) \
            $(INCLTDL)

=== modified file 'extensions/metome/Makefile.am'
--- a/extensions/metome/Makefile.am     2008-07-22 21:24:49 +0000
+++ b/extensions/metome/Makefile.am     2009-02-25 01:36:22 +0000
@@ -26,7 +26,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-           -I$(top_srcdir)/asobjs \
+           -I$(top_srcdir)/libcore/asobj \
            $(INCLTDL)
 
 metome_ext_la_SOURCES = metome_ext.cpp metome_ext.h

=== modified file 'extensions/mysql/Makefile.am'
--- a/extensions/mysql/Makefile.am      2008-07-22 21:24:49 +0000
+++ b/extensions/mysql/Makefile.am      2009-02-25 01:36:22 +0000
@@ -26,7 +26,7 @@
             -I$(top_srcdir)/libbase \
             -I$(top_srcdir)/libcore \
             -I$(top_srcdir)/libcore/vm \
-            -I$(top_srcdir)/asobjs \
+            -I$(top_srcdir)/libcore/asobj \
             -I$(top_srcdir)/libltdl \
             $(MYSQL_CFLAGS)
 

=== modified file 'extensions/mysql/mysql_db.cpp'
--- a/extensions/mysql/mysql_db.cpp     2008-12-27 19:56:32 +0000
+++ b/extensions/mysql/mysql_db.cpp     2009-02-25 01:36:22 +0000
@@ -387,7 +387,8 @@
 {
 //    GNASH_REPORT_FUNCTION;
     boost::intrusive_ptr<mysql_as_object> ptr = 
ensureType<mysql_as_object>(fn.this_ptr);
-    return as_value(ptr->obj.store_result());
+    gnash::as_object *obj = reinterpret_cast<gnash::as_object  
*>(ptr->obj.store_result());
+    return as_value(obj);
 }
 
 as_value

=== modified file 'gui/Kde4Gui.cpp'
--- a/gui/Kde4Gui.cpp   2009-02-11 22:56:10 +0000
+++ b/gui/Kde4Gui.cpp   2009-02-25 02:00:44 +0000
@@ -173,6 +173,7 @@
 {
     QMenu popupMenu(_drawingWidget);
     popupMenu.addMenu(fileMenu);
+    popupMenu.addMenu(editMenu);
     popupMenu.addMenu(movieControlMenu);
     popupMenu.addMenu(viewMenu);
     popupMenu.exec(point);
@@ -286,9 +287,9 @@
     _fullscreen = true;
     fullscreenAction->setChecked(_fullscreen);
 
-    _window->showFullScreen();
-    QMenuBar* mainMenu = _window->menuBar();
-    if (mainMenu) mainMenu->hide();
+    // Make the widget a top level window so it can be fullscreen
+    _drawingWidget->setWindowFlags(Qt::Window);
+    _drawingWidget->showFullScreen();
 }
 
 void
@@ -297,9 +298,15 @@
     _fullscreen = false;
     fullscreenAction->setChecked(_fullscreen);
 
-    _window->showNormal();
-    QMenuBar* mainMenu = _window->menuBar();
-    if (mainMenu) mainMenu->show();
+    // Re-embed the drawing wiget into the browser
+    if (_xid) {
+        _drawingWidget->embedInto(_xid);
+    }
+    else {
+        _drawingWidget->setWindowFlags(Qt::Widget);
+    }
+
+    _drawingWidget->showNormal();
 }
 
 gnash::key::code

=== modified file 'gui/am-frag/gtk.am'
--- a/gui/am-frag/gtk.am        2008-02-17 02:04:26 +0000
+++ b/gui/am-frag/gtk.am        2009-02-25 02:00:44 +0000
@@ -42,6 +42,10 @@
                gtk.cpp gtksup.h gtk_glue.h
 gtk_gnash_LDADD = $(top_builddir)/backend/libgnashagg.la \
                $(GNASH_LIBS) $(GTK_LIBS) $(AGG_LIBS) $(CAIRO_LIBS)
+if HAVE_XV
+gtk_gnash_SOURCES += gtk_glue_agg_xv.cpp gtk_glue_agg_xv.h
+gtk_gnash_LDADD += $(X11_LIBS)
+endif               # HAVE_XV
 endif                          # BUILD_AGG_RENDERER
 if BUILD_CAIRO_RENDERER
 gtk_gnash_CPPFLAGS += $(CAIRO_CFLAGS)

=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp       2009-02-12 15:15:22 +0000
+++ b/gui/gtk.cpp       2009-02-25 02:00:44 +0000
@@ -68,6 +68,9 @@
 
 #ifdef RENDERER_AGG
 #include "gtk_glue_agg.h"
+#ifdef HAVE_XV
+#include "gtk_glue_agg_xv.h"
+#endif // HAVE_XV
 #endif
 
 #ifdef GUI_HILDON
@@ -173,10 +176,28 @@
     _glue.reset(new GtkCairoGlue);
 #elif defined(RENDERER_OPENGL)
     _glue.reset(new GtkGlExtGlue);
-#elif defined(RENDERER_AGG)
+#elif defined(RENDERER_AGG) && !defined(HAVE_XV)
     _glue.reset(new GtkAggGlue);
-#endif
-    _glue->init (argc, argv);
+#elif defined(RENDERER_AGG) && defined(HAVE_XV)
+    RcInitFile& rcfile = RcInitFile::getDefaultInstance();
+
+    if (rcfile.useXv()) {
+        _glue.reset(new GtkAggXvGlue);
+        if (!_glue->init (argc, argv)) {
+            _glue.reset(new GtkAggGlue);
+            _glue->init(argc, argv);
+        }
+    } else {
+        _glue.reset(new GtkAggGlue);
+        _glue->init(argc, argv);
+    }
+#endif
+
+#if ! (defined(HAVE_XV) && defined(RENDERER_AGG))
+    if (!_glue->init (argc, argv)) {
+        return false;
+    }
+#endif
 
     addPixmapDirectory (PKGDATADIR);
 

=== added file 'gui/gtk_glue_agg_xv.cpp'
--- a/gui/gtk_glue_agg_xv.cpp   1970-01-01 00:00:00 +0000
+++ b/gui/gtk_glue_agg_xv.cpp   2009-02-25 02:00:44 +0000
@@ -0,0 +1,636 @@
+//
+//   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+
+/// \page gtk_shm_support GTK shared memory extension support
+/// 
+/// Xv glue for AGG.
+//
+/// Xv does hardware scaling for us.
+/// Thus, we should let the renderer render at a scale of 1 and we'll let
+/// Xv scale the rendered image to window size. Of course this destroys
+/// aspect ratio potentially set by the SWF.
+ 
+
+
+#include "gnash.h"
+#include "log.h"
+#include "render_handler.h"
+#include "render_handler_agg.h"
+#include "gtk_glue_agg_xv.h"
+#include "VideoConverter.h"
+#include "VM.h"
+
+#include <cerrno>
+
+#include <gdk/gdkx.h>
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+namespace gnash
+{
+
+GtkAggXvGlue::GtkAggXvGlue()
+  : _agg_renderer(0),
+    _stride(0),
+    _xv_image(0),
+    _xv_image_is_shared(false),
+    _xv_port(std::numeric_limits<XvPortID>::max()),
+    _xv_max_width(0),
+    _xv_max_height(0),
+    _window_width(0),
+    _window_height(0),
+    _movie_width(0),
+    _movie_height(0),
+    _mediaHandler(media::MediaHandler::get()),
+    _shm_info(0)    
+{
+    memset(&_xv_format, 0, sizeof(XvImageFormatValues));
+}
+
+GtkAggXvGlue::~GtkAggXvGlue()
+{
+    destroy_x_image();
+}
+
+bool
+GtkAggXvGlue::init(int /*argc*/, char **/*argv*/[])
+{
+    int dummy;
+    unsigned int p_version, p_release, p_request_base, p_event_base,
+                 p_error_base;
+      
+    if (!XQueryExtension(gdk_display, "XVideo", &dummy, &dummy, &dummy)) {
+        log_debug(_("WARNING: No XVideo extension available."));
+        return false;
+    }
+    if (XvQueryExtension(gdk_display, &p_version, &p_release, &p_request_base,
+                         &p_event_base, &p_error_base) != Success) {
+        log_debug(_("WARNING: XVideo extension is available, but is not 
currently ready."));
+        return false;
+    }
+
+    log_debug(_("GTK-AGG: XVideo available (version: %d, release: %d, "
+              "request base: %d, event base: %d, error base: %d)"),
+              p_version, p_release, p_request_base, p_event_base,
+              p_error_base);
+
+    return findXvPort(gdk_display);
+}
+
+void
+GtkAggXvGlue::prepDrawingArea(GtkWidget *drawing_area)
+{
+    _drawing_area = drawing_area;
+
+    gtk_widget_set_double_buffered(_drawing_area, FALSE);
+}
+
+render_handler*
+GtkAggXvGlue::createRenderHandler()
+{
+    _agg_renderer = 
create_render_handler_agg(findPixelFormat(_xv_format).c_str());
+    return _agg_renderer;
+}
+
+void
+GtkAggXvGlue::setupRendering()
+{
+    static bool first = true;
+    if (first && VM::isInitialized()) {
+        first = false;
+        
+        movie_definition* def = VM::get().getRoot().get_movie_definition();
+        assert(def);
+    
+        _movie_width = def->get_width_pixels();
+        _movie_height = def->get_height_pixels();        
+    
+        if (!create_xv_shmimage(_movie_width, _movie_height)) {
+            if (!create_xv_image(_movie_width, _movie_height)) {
+                log_error(_("GTK-AGG: Could not create the Xv image."));
+                first = true;
+                return;
+            }
+        }
+        
+        if (_xv_format.type == XvRGB) {
+            // init renderer to write directly to xv_image
+            static_cast<render_handler_agg_base *>(_agg_renderer)->init_buffer
+                  ((unsigned char*) _xv_image->data, _xv_image->data_size,
+                  _movie_width, _movie_height, _xv_image->pitches[0]);
+    
+        } else {        
+        
+           int _bpp = 24;
+           int depth_bytes = _bpp / 8;
+
+            // 4 byte alignment. Gst expects this and ffmpeg doesn't object.
+           _stride = ( (_movie_width*depth_bytes) + 4 - 1 ) & ~( 4 - 1 );  
+           
+           int bufsize = _stride * _movie_height;
+
+           _offscreenbuf.reset(new unsigned char[bufsize]);
+           
+           render_handler_agg_base * renderer =
+             static_cast<render_handler_agg_base *>(_agg_renderer);
+           renderer->init_buffer(_offscreenbuf.get(), bufsize, _movie_width,
+                                 _movie_height, _stride);
+
+        }
+    }
+}
+
+
+void 
+GtkAggXvGlue::beforeRendering()
+{
+    setupRendering();
+    
+    // We force the scale to its original state in case the GUI changed it (in
+    // the event of a resize), because we want Xv to do the scaling for us.    
+    _agg_renderer->set_scale(1.0, 1.0);
+}
+
+void
+GtkAggXvGlue::render()
+{
+    render(0, 0, _movie_width, _movie_height);
+}
+
+void
+GtkAggXvGlue::render(int minx, int miny, int maxx, int maxy)
+{
+    if (!_drawing_area || !_xv_image) {
+        return;
+    }
+    
+    if (_xv_format.type == XvYUV) {
+
+        boost::uint32_t imgtype = 0;
+        media::ImgBuf img(imgtype, _offscreenbuf.get(),
+                          _stride*_movie_height,
+                           _movie_width, _movie_height);
+        img.dealloc = media::ImgBuf::noop;
+        img.stride[0] = _stride;
+
+        std::auto_ptr<media::ImgBuf> buf = _video_converter->convert(img);
+        if (!buf.get()) {
+            log_error(_("RGB->YUV conversion failed."));
+            return;
+        }
+        if ((size_t)_xv_image->data_size != buf->size) {
+            log_error(_("Converter returned invalid YUV data size (exp: %d, 
got %d)"),
+                      _xv_image->data_size, buf->size);
+            return;
+        }
+        
+
+        memcpy(_xv_image->data, buf->data, buf->size);
+    }
+
+    if (_xv_image_is_shared) {
+        XLockDisplay(gdk_display);
+
+        XvShmPutImage(
+            gdk_display,
+            _xv_port,
+            GDK_WINDOW_XWINDOW(_drawing_area->window), 
+            GDK_GC_XGC(_drawing_area->style->fg_gc[GTK_STATE_NORMAL]),  // ???
+            _xv_image,
+            //minx, miny, w, h,
+            0, 0, _movie_width, _movie_height, /* source */
+            //minx2, miny2, w2, h2,
+            0, 0, _window_width, _window_height, /* destination */
+            False);            
+            
+        XSync(gdk_display, False);
+
+        XUnlockDisplay (gdk_display);
+    
+    } else {
+        XvPutImage(
+            gdk_display,
+             _xv_port,
+             GDK_WINDOW_XWINDOW(_drawing_area->window), 
+             GDK_GC_XGC(_drawing_area->style->fg_gc[GTK_STATE_NORMAL]),  // ???
+             _xv_image,
+             //minx, miny, w, h,
+             0, 0, _movie_width, _movie_height, /* source */
+             //minx2, miny2, w2, h2,
+             0, 0, _window_width, _window_height /* destination */);
+    }
+
+}
+
+void
+GtkAggXvGlue::configure(GtkWidget *const /*widget*/, GdkEventConfigure *const 
event)
+{
+
+    _window_width = event->width;
+    _window_height = event->height;
+}
+
+
+void
+get_max_xv_image(Display *display, XvPortID xv_port,
+                            unsigned int *width, unsigned int *height)
+{
+    XvEncodingInfo * encodings;
+    unsigned int num_encodings, idx;
+
+    XvQueryEncodings(display, xv_port, &num_encodings, &encodings);
+    if ( encodings ) {
+        for ( idx = 0; idx < num_encodings; ++idx ) {
+            if (std::equal(encodings[idx].name, encodings[idx].name+8, 
"XV_IMAGE")) {
+                *width  = encodings[idx].width;
+                *height = encodings[idx].height;
+                break;
+            }
+        }
+    }
+    log_debug("GTK-AGG: Maximum XVideo dimensions: %ux%u\n", *width, *height );
+    XvFreeEncodingInfo( encodings );
+}
+
+bool
+GtkAggXvGlue::findXvPort(Display* display)
+{
+    unsigned int num_adaptors;
+    XvAdaptorInfo* adaptor_info;
+
+    if ((XvQueryAdaptors(display, DefaultRootWindow(display), &num_adaptors,
+                         &adaptor_info) != Success)) {
+        log_debug("GTK-AGG: WARNING: No XVideo adapters. Falling back to 
non-Xv.");
+    
+        return false;    
+    }
+  
+    log_debug("GTK-AGG: NOTICE: Found %d XVideo adapter(s) on GPU.", 
num_adaptors);
+    
+    for (unsigned int i = 0; i < num_adaptors; ++i) {
+
+        const XvAdaptorInfo& adaptor = adaptor_info[i];
+        
+        if (!((adaptor.type & XvInputMask) &&
+              (adaptor.type & XvImageMask))) {
+            continue;
+        }
+        
+        for (XvPortID port = adaptor.base_id;
+             port < adaptor.base_id + adaptor.num_ports;
+             ++port) {
+             
+             int num_formats;
+             XvImageFormatValues* formats = XvListImageFormats(display, port, 
&num_formats);
+
+             for (int j=0; j < num_formats; j++) {
+                 const XvImageFormatValues& format = formats[j];
+                 
+                 if (!isFormatBetter(_xv_format, format)) {
+                     continue;
+                 }
+
+                 std::string agg_pixelformat = findPixelFormat(format);
+                 if (agg_pixelformat.empty()) {
+                     continue;
+                 }
+                 
+                 if (!ensurePortGrabbed(display, port)) {
+                     continue;
+                 }
+                 
+                 _xv_format = format;
+             }
+             
+             XFree(formats);             
+        }
+    }
+    
+    XvFreeAdaptorInfo(adaptor_info);    
+
+    if (_xv_port != std::numeric_limits<XvPortID>::max()) {
+        const char fourcc[] = {(_xv_format.id & 0xFF),
+                               (_xv_format.id >> 8)  & 0xFF,
+                               (_xv_format.id >> 16) & 0xFF, 
+                               (_xv_format.id >> 24) & 0xFF, 0};
+        log_debug(_("GTK-AGG: Selected format %s for Xv rendering."), fourcc);
+        get_max_xv_image(display, _xv_port, &_xv_max_width, &_xv_max_height);
+    }
+    
+    return _xv_format.id != 0;
+}
+
+std::string
+GtkAggXvGlue::findPixelFormat(const XvImageFormatValues& format)
+{
+    std::string rv;
+
+    if ((format.type == XvRGB) && (format.format == XvPacked)) {
+
+        unsigned int red_shift, red_prec;
+        unsigned int green_shift, green_prec;
+        unsigned int blue_shift, blue_prec;
+
+        decode_mask(format.red_mask,   &red_shift,   &red_prec);
+        decode_mask(format.green_mask, &green_shift, &green_prec);
+        decode_mask(format.blue_mask,  &blue_shift,  &blue_prec);
+
+        const char *pixelformat = agg_detect_pixel_format(
+            red_shift, red_prec,
+            green_shift, green_prec,
+            blue_shift, blue_prec,
+            format.bits_per_pixel);
+
+        if (!pixelformat) {
+            log_debug("GTK-AGG: Unknown RGB format "
+                    "'%d:%d:%d:%x:%x:%x' reported by Xv."
+                    "  Please report this to the gnash-dev "
+                    "mailing list.", format.id,
+                    format.bits_per_pixel, format.depth,
+                    format.red_mask, format.green_mask,
+                    format.blue_mask);
+            return rv;
+        }
+
+        rv = pixelformat;
+
+    } else {
+        std::auto_ptr<media::VideoConverter> converter =
+            _mediaHandler->createVideoConverter(0x32424752 /* RGB */, 
format.id);
+
+        if (!converter.get()) {
+            return rv;
+        }
+
+        _video_converter = converter;
+        
+        rv = "RGB24";
+    }
+    
+    return rv;
+}
+
+bool
+GtkAggXvGlue::ensurePortGrabbed(Display *display, XvPortID port)
+{
+    if (port == _xv_port) {
+        return true;
+    }
+    
+    if (!grabXvPort(display, port)) {
+        return false;
+    }
+
+    if (_xv_port != std::numeric_limits<XvPortID>::max()) {
+        XvUngrabPort(display, _xv_port, CurrentTime);
+    }
+    
+    _xv_port = port;
+    
+    return true;;
+}
+
+bool
+GtkAggXvGlue::isFormatBetter(const XvImageFormatValues& oldformat,
+                             const XvImageFormatValues& newformat)
+{
+    if ( (newformat.type == XvRGB) ) {
+        if (oldformat.type != XvRGB) {
+            return true;
+        }
+        
+        return (newformat.depth > oldformat.depth);
+    }
+
+    return newformat.bits_per_pixel > oldformat.bits_per_pixel;
+}
+
+void 
+GtkAggXvGlue::decode_mask(unsigned long mask, unsigned int *shift, unsigned 
int *size)
+{
+    *shift = 0;
+    *size = 0;
+    
+    if (mask==0) return; // invalid mask
+    
+    while (!(mask & 1)) {
+        (*shift)++;
+        mask = mask >> 1;
+    }
+    
+    while (mask & 1) {
+        (*size)++;
+        mask = mask >> 1;
+    }
+}
+
+
+bool
+GtkAggXvGlue::grabXvPort(Display *display, XvPortID port) 
+{
+    int status;
+
+    if ((status = XvGrabPort(display, port, CurrentTime)) == Success){
+        log_debug("GTK-AGG: XVideo successfully grabbed port %ld.",
+                (ptrdiff_t)port);
+        return true;
+    } else {
+        const char* reason;
+        switch (status) {
+        case XvInvalidTime:
+            reason = "XvInvalidTime";
+            break;
+        case XvAlreadyGrabbed:
+            reason = "XvAlreadyGrabbed";
+            break;
+        case XvBadExtension:
+            reason = "XvBadExtension";
+            break;
+        case XvBadAlloc:
+            reason = "XvBadAlloc";
+            break;
+        default:
+            reason = "Unknown";
+        }
+        log_debug("GTK-AGG: WARNING: Unable to XvGrabPort(%ld).  Error: %s", 
+                 (unsigned long)port, reason);
+    }
+    return false;
+}
+
+bool
+GtkAggXvGlue::create_xv_image(unsigned int width, unsigned int height)
+{
+    destroy_x_image();
+        
+    _xv_image = XvCreateImage (gdk_display, _xv_port, 
+                               _xv_format.id,
+                               NULL, width, height);
+    if (!_xv_image) {
+        printf("GTK-AGG: XvCreateImage failed!");
+        return false;
+    }
+    if ((_xv_image->width < (int)width) || (_xv_image->height < (int)height)) {
+        log_debug("GTK-AGG: xv_image => XVideo requested %dx%d, got %dx%d.  
Aborting.\n",
+                width, height, _xv_image->width, _xv_image->height);
+        destroy_x_image();
+        return false;
+    }
+    _xv_image->data = (char*)malloc(_xv_image->data_size);
+    if (!_xv_image->data) {
+        printf("GTK-AGG: Could not allocate %i bytes for Xv buffer: %s\n",
+                _xv_image->data_size, strerror(errno));
+        return false;
+    }
+    memset(_xv_image->data, 0, _xv_image->data_size);
+    _xv_image_is_shared = false;
+    
+    log_debug(_("GTK-AGG: Created non-shared XvImage address@hidden, data=%#x, 
%d bytes, %d planes."), 
+              width, height, (ptrdiff_t)_xv_image, (ptrdiff_t)_xv_image->data, 
+              _xv_image->data_size, _xv_image->num_planes);
+    return true;
+}
+
+bool
+GtkAggXvGlue::create_xv_shmimage(unsigned int width, unsigned int height)
+{
+    // First, we make sure that we can actually use XShm. Gdk seems to do a
+    // better job at detecting this than we traditionally have, so we'll just
+    // try to create small shared GdkImage.
+
+    assert(_drawing_area && _drawing_area->window);
+    
+    GdkVisual* wvisual = gdk_drawable_get_visual(_drawing_area->window);
+
+    GdkImage* tmpimage = gdk_image_new (GDK_IMAGE_SHARED, wvisual, 1, 1);
+    
+    if (tmpimage) {
+        gdk_image_destroy(tmpimage);
+    } else {
+        log_debug(_("GTK-AGG: XShm not supported; will use non-shared 
memory."));
+        return false;
+    }
+
+    // destroy any already existing structures
+    destroy_x_image();
+
+    // prepare segment info (populated by XvShmCreateImage)
+    _shm_info = (XShmSegmentInfo*) malloc(sizeof(XShmSegmentInfo));  
+    assert(_shm_info != NULL);
+
+    // create shared memory XImage
+    if ((width > _xv_max_width) || (height > _xv_max_height)) {
+        log_debug("GTK-AGG: xv_shmimage => %dx%d too big for XVideo", width, 
height);
+        return false;
+    }
+    _xv_image = XvShmCreateImage(gdk_display, _xv_port, 
+                                 _xv_format.id,
+                                 NULL, width, height, _shm_info);
+    if (!_xv_image) {
+        printf("GTK-AGG: XvShmCreateImage failed!");
+        return false;
+    }
+    if ((_xv_image->width < (int)width) || (_xv_image->height < (int)height)) {
+        log_debug("GTK-AGG: xv_shmimage => XVideo requested %dx%d, got %dx%d.  
Aborting.\n",
+                width, height, _xv_image->width, _xv_image->height);
+        destroy_x_image();
+        return false;
+    }
+    _xv_image_is_shared = true;
+
+    // create shared memory segment
+    _shm_info->shmid = shmget(IPC_PRIVATE, 
+                            _xv_image->data_size,
+                            IPC_CREAT|0777);
+    if (_shm_info->shmid == -1) {
+        printf("GTK-AGG: xv_shmimage => Failed requesting Xv shared memory 
segment "
+                    "(%s). Perhaps the "
+                    "required memory size is bigger than the limit set by the 
kernel.",
+                    strerror(errno));
+        destroy_x_image();
+        return false;
+    }
+
+    // attach the shared memory segment to our process
+    _shm_info->shmaddr = _xv_image->data = (char*) shmat(_shm_info->shmid, 
NULL, 0);
+    
+    if (_shm_info->shmaddr == (char*)-1) {
+        printf("GTK-AGG: xv_shmimage => Failed attaching to Xv shared memory 
segment: %s",
+                    strerror(errno));
+        destroy_x_image();
+        return false;
+    }
+    
+    // clear memory
+    memset(_xv_image->data, 0, _xv_image->data_size);
+    
+    log_debug("GTK-AGG: Created shared XvImage address@hidden, data=%#x, %d 
bytes.", 
+              width, height, (ptrdiff_t)_xv_image, (ptrdiff_t)_xv_image->data, 
+              _xv_image->data_size);
+
+    // Give the server full access to our memory segment. We just follow
+    // the documentation which recommends this, but we could also give him
+    // just read-only access since we don't need XShmGetImage...
+    _shm_info->readOnly = False;
+    
+    // Finally, tell the server to attach to our shared memory segment  
+    if (!XShmAttach(gdk_display, _shm_info)) {
+        printf("GTK-AGG: xv_shmimage => Server failed attaching to the shared "
+                    "memory segment");
+        destroy_x_image();
+        return false;
+    }
+
+    XSync(gdk_display, False);
+
+    // mark segment for automatic destruction after last process detaches
+    shmctl(_shm_info->shmid, IPC_RMID, 0);
+
+    return true;
+}
+
+void 
+GtkAggXvGlue::destroy_x_image()
+{
+    if (_xv_image) {
+        log_debug("GTK-AGG: destroy => Using XFree (XVideo) to dispose of "
+                  "shared memory (%#x,%#x).", (ptrdiff_t)_xv_image, 
(ptrdiff_t)_xv_image->data);
+        if (_xv_image->data != NULL) {
+            if (_xv_image_is_shared) {
+                   shmdt(_xv_image->data);
+               } else {
+                XFree(_xv_image->data);
+               }
+            XFree(_xv_image);
+        }
+        _xv_image = NULL;
+        _xv_image_is_shared = false;
+    }
+
+    if (_shm_info) {
+        // TODO: call shmdt?
+        free(_shm_info);
+        _shm_info=NULL;
+    }
+}
+
+
+} // namespace gnash
+

=== added file 'gui/gtk_glue_agg_xv.h'
--- a/gui/gtk_glue_agg_xv.h     1970-01-01 00:00:00 +0000
+++ b/gui/gtk_glue_agg_xv.h     2009-02-25 02:00:44 +0000
@@ -0,0 +1,101 @@
+//
+//   Copyright (C) 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "gtk_glue.h"
+#include "MediaHandler.h"
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <boost/scoped_array.hpp>
+
+#include <X11/Xlib.h>
+
+#include <X11/extensions/XShm.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+
+namespace gnash
+{
+
+class GtkAggXvGlue : public GtkGlue
+{
+  public:
+    GtkAggXvGlue();
+    ~GtkAggXvGlue();
+
+    bool init(int argc, char **argv[]);
+    void prepDrawingArea(GtkWidget *drawing_area);
+    render_handler* createRenderHandler();
+    void beforeRendering();
+    void render();
+    void render(int minx, int miny, int maxx, int maxy);
+    void configure(GtkWidget *const widget, GdkEventConfigure *const event);
+
+  private:
+    bool findXvPort(Display* display);
+    bool grabXvPort(Display *display, XvPortID port);
+    bool create_xv_image(unsigned int width, unsigned int height);
+    bool create_xv_shmimage(unsigned int width, unsigned int height);
+    void destroy_x_image();
+    void setupRendering();
+    void decode_mask(unsigned long mask, unsigned int *shift, unsigned int 
*size);
+    bool isFormatBetter(const XvImageFormatValues& oldformat,
+                        const XvImageFormatValues& newformat);
+    bool ensurePortGrabbed(Display *display, XvPortID port);
+    std::string findPixelFormat(const XvImageFormatValues& format);
+
+    /// This will be used in case of RGB->YUV conversion.
+    boost::scoped_array<boost::uint8_t> _offscreenbuf;
+    render_handler *_agg_renderer;
+    size_t _stride;
+
+    /// If the hardware accepts RGB, then Agg will render directly into this.
+    XvImage* _xv_image;           
+    bool _xv_image_is_shared;
+    XvPortID _xv_port;
+    unsigned int _xv_max_width;
+    unsigned int _xv_max_height;
+    int _window_width;
+    int _window_height;
+    int _movie_width;
+    int _movie_height;
+    
+    media::MediaHandler* _mediaHandler;
+    std::auto_ptr<media::VideoConverter> _video_converter;
+    
+    XvImageFormatValues _xv_format;
+
+    XShmSegmentInfo *_shm_info;
+};
+
+} // namespace gnash
+
+
+
+
+
+
+
+
+
+

=== modified file 'gui/gui.h'
--- a/gui/gui.h 2009-02-11 11:49:44 +0000
+++ b/gui/gui.h 2009-02-25 02:00:44 +0000
@@ -377,8 +377,6 @@
     ///
     virtual bool yesno(const std::string& question);
 
-    movie_root* getStage() const { return _stage; }
-
 protected:
 
     /// Default constructor. Initialises members to safe defaults.

=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp  2009-02-11 21:58:37 +0000
+++ b/libbase/curl_adapter.cpp  2009-02-23 18:04:44 +0000
@@ -673,11 +673,23 @@
                int ret = select(maxfd + 1, &readfd, &writefd, &exceptfd, &tv);
                if ( ret == -1 )
                {
-                       // something unexpected happened
-                       boost::format fmt = boost::format(
-                               "error polling data from connection to %s: %s ")
-                               % _url % strerror(errno);
-                       throw GnashException(fmt.str());
+            if ( errno == EINTR )
+            {
+                // we got interupted by a signal
+                // let's consider this as a timeout
+#ifdef GNASH_CURL_VERBOSE
+                log_debug("select() was interrupted by a signal");
+#endif
+                ret = 0;
+            }
+            else
+            {
+                // something unexpected happened
+                boost::format fmt = boost::format(
+                    "error polling data from connection to %s: %s ")
+                    % _url % strerror(errno);
+                throw GnashException(fmt.str());
+            }
                }
                if ( ! ret )
                {

=== modified file 'libbase/gnashrc.in'
--- a/libbase/gnashrc.in        2008-10-20 12:04:28 +0000
+++ b/libbase/gnashrc.in        2009-02-25 02:00:44 +0000
@@ -192,3 +192,10 @@
 # Default: false
 #
 set LocalConnection off
+
+# Enable support for the X Video extension. Note that this requires a
+# kernel/X11 driver, and compile-time gstreamer or ffmpeg and libXv .
+#
+# Default: false
+#
+#set XVideo false

=== modified file 'libbase/rc.cpp'
--- a/libbase/rc.cpp    2009-02-16 16:11:57 +0000
+++ b/libbase/rc.cpp    2009-02-25 02:00:44 +0000
@@ -104,7 +104,8 @@
     _quality(-1),
     _saveStreamingMedia(false),
     _saveLoadedMedia(false),
-    _popups(true)
+    _popups(true),
+    _useXv(false)
 {
     expandPath(_solsandbox);
 
@@ -482,6 +483,8 @@
             ||
                  extractSetting(_pluginSound, "pluginsound", variable, value)
             ||
+                 extractSetting(_useXv, "xvideo", variable, value)
+            ||
                  extractSetting(_verboseASCodingErrors,
                            "ASCodingErrorsVerbosity", variable, value)
             ||
@@ -678,6 +681,7 @@
     cmd << "ignoreFSCommand " << _ignoreFSCommand << endl <<    
     cmd << "saveStreamingMedia " << _saveStreamingMedia << endl <<    
     cmd << "saveLoadedMedia " << _saveLoadedMedia << endl <<    
+    cmd << "XVideo " << _useXv << endl <<    
    
     // Strings.
 
@@ -744,6 +748,12 @@
 }
 
 void
+RcInitFile::useXv(bool value)
+{
+    _useXv = value;
+}
+
+void
 RcInitFile::useLocalHost(bool value)
 {
     _localhostOnly = value;

=== modified file 'libbase/rc.h'
--- a/libbase/rc.h      2009-02-09 12:30:31 +0000
+++ b/libbase/rc.h      2009-02-25 02:00:44 +0000
@@ -134,6 +134,9 @@
 
     bool useLocalDomain() const { return _localdomainOnly; }
     void useLocalDomain(bool value);
+
+    bool useXv() const { return _useXv; }
+    void useXv(bool value);
  
     /// Whether to restrict access to the local host   
     bool useLocalHost() const { return _localhostOnly; }
@@ -506,6 +509,8 @@
 
     bool _popups;
 
+    bool _useXv;
+
 };
 
 // End of gnash namespace 

=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-02-10 15:38:43 +0000
+++ b/libcore/TextField.cpp     2009-02-25 07:30:10 +0000
@@ -54,18 +54,6 @@
 // Text fields have a fixed 2 pixel padding for each side (regardless of 
border)
 #define PADDING_TWIPS 40 
 
-// Define the following macro to maintain compatibility with the proprietary
-// player when it comes to opacity of textfields using device fonts.
-// See 
http://gnashdev.org/wiki/index.php/DeviceFonts#Differences_with_proprietary_player_implementation
-//
-// This is now disabled by default because INCOMPLETE and unclean
-// A clean implementation (IMHO) would warn user about the fact
-// it is doing a stupid thing for compatibilty reason.
-// Also, for good compatibility, we should skip rendering
-// of rotated or skewed text.
-//
-//#define PP_COMPATIBLE_DEVICE_FONT_HANDLING 1
-
 // Define the following to get detailed log information about
 // textfield bounds and HTML tags:
 //#define GNASH_DEBUG_TEXTFIELDS 1
@@ -1691,22 +1679,15 @@
 cxform    
 TextField::get_world_cxform() const
 {
-  cxform cf = character::get_world_cxform();
-  
-#ifdef PP_COMPATIBLE_DEVICE_FONT_HANDLING
-  if ( ! getEmbedFonts() ) /* if using a device font (PP compatibility) */ 
-  {
-    // set alpha to default values to make the text field opaque
-    cf.m_[3][0] = 1.0f;
-    cf.m_[3][1] = 0.0f;
-    
-    // NOTE: Linux version of Adobe's player also ignores tint
-    // transform, so we should (or not) return an identity cxform
-    // here. This has to be discussed...
-  }
-#endif
-  
-  return cf;
+    // This is not automatically tested. See testsuite/samples/input-fields.swf
+    // for a manual check.
+
+    // If using a device font (PP compatibility), do not take parent cxform
+    // into account.
+    if (!getEmbedFonts()) {
+        return cxform();
+    }
+    else return character::get_world_cxform();
 }
 
 void

=== modified file 'libcore/movie_root.h'
--- a/libcore/movie_root.h      2009-02-10 14:04:14 +0000
+++ b/libcore/movie_root.h      2009-02-23 15:17:47 +0000
@@ -221,17 +221,6 @@
     ///   after loading into it.
     void dropLevel(int depth);
 
-    /// @@ should this delegate to _level0?  probably !
-    void set_member(const std::string& /*name*/, const as_value& /*val*/)
-    {
-    }
-
-    /// @@ should this delegate to _level0?  probably !
-    bool get_member(const std::string& /*name*/, as_value* /*val*/)
-    {
-        return false;
-    }
-
     /// Change display viewport coordinates
     //
     /// This currently also change the display scale

=== modified file 'libmedia/Makefile.am'
--- a/libmedia/Makefile.am      2009-01-22 20:10:39 +0000
+++ b/libmedia/Makefile.am      2009-02-25 02:00:44 +0000
@@ -81,6 +81,7 @@
 noinst_HEADERS = \
        AudioDecoder.h \
        VideoDecoder.h \
+       VideoConverter.h \
        MediaParser.h \
        MediaHandler.h \
        FLVParser.h \
@@ -97,6 +98,7 @@
                gst/VideoDecoderGst.cpp \
                gst/AudioDecoderGst.cpp \
                gst/MediaParserGst.cpp \
+               gst/VideoConverterGst.cpp \
                gst/GstUtil.cpp \
                gst/swfdec_codec_gst.c \
                $(NULL)
@@ -106,6 +108,7 @@
                gst/AudioDecoderGst.h \
                gst/VideoDecoderGst.h \
                gst/MediaParserGst.h \
+               gst/VideoConverterGst.h \
                gst/GstUtil.h \
                gst/swfdec_codec_gst.h \
                gst/gnash_gst_version.h \
@@ -129,6 +132,7 @@
                ffmpeg/AudioDecoderFfmpeg.cpp \
                ffmpeg/VideoDecoderFfmpeg.cpp \
                ffmpeg/AudioResamplerFfmpeg.cpp \
+               ffmpeg/VideoConverterFfmpeg.cpp \
                $(NULL)
 
    noinst_HEADERS += \
@@ -138,6 +142,7 @@
                ffmpeg/VideoDecoderFfmpeg.h \
                ffmpeg/AudioResamplerFfmpeg.h \
                ffmpeg/ffmpegHeaders.h \
+               ffmpeg/VideoConverterFfmpeg.h \
                $(NULL)
 
    libgnashmedia_la_LIBADD += \

=== modified file 'libmedia/MediaHandler.h'
--- a/libmedia/MediaHandler.h   2009-01-22 20:10:39 +0000
+++ b/libmedia/MediaHandler.h   2009-02-25 02:00:44 +0000
@@ -26,6 +26,7 @@
 
 #include "MediaParser.h" // for videoCodecType and audioCodecType enums
 #include "dsodefs.h" // DSOEXPORT
+#include "VideoConverter.h"
 
 #include <memory>
 
@@ -106,6 +107,15 @@
     ///             gnash::MediaException if a fatal error occurs.
        virtual std::auto_ptr<AudioDecoder> createAudioDecoder(const AudioInfo& 
info)=0;
 
+    /// Create an VideoConverter for converting between color spaces.
+    //
+    /// @param srcFormat The source image color space
+    /// @param dstFormat The destination image color space
+    ///
+    /// @return A valid VideoConverter or a NULL auto_ptr if a fatal error 
occurs.
+    virtual std::auto_ptr<VideoConverter>
+        createVideoConverter(ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC 
dstFormat)=0;
+
     /// Return the number of bytes padding needed for input buffers
     //
     /// Bitstream readers are optimized to read several bytes at a time,

=== added file 'libmedia/VideoConverter.h'
--- a/libmedia/VideoConverter.h 1970-01-01 00:00:00 +0000
+++ b/libmedia/VideoConverter.h 2009-02-25 02:00:44 +0000
@@ -0,0 +1,113 @@
+//   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+#ifndef GNASH_VIDEOCONVERTER_H
+#define GNASH_VIDEOCONVERTER_H
+
+#include <boost/noncopyable.hpp>
+#include <boost/cstdint.hpp>
+#include <memory>
+
+namespace gnash {
+namespace media {
+
+
+
+/// Image buffer wrapper
+//
+/// Unfortunately, the GnashImage buffer class currently insists on owning
+/// its buffer. Hacking around this results in things like gnashGstBuffer,
+/// which is less than desirable. Furthermore, it only supports a handful of
+/// pixel and image formats. Something more elaborate is needed to support the
+/// various YUV formats and different bit depths for RGB. But in the mean time:
+/// here's a simple image class for use in VideoConverter, at least until we
+/// merge the image classes.
+
+struct ImgBuf : public boost::noncopyable
+{
+    typedef boost::uint32_t Type4CC;
+    typedef void (*FreeFunc)(void*);
+
+    ImgBuf(Type4CC t, boost::uint8_t* dataptr, size_t datasize, size_t w,
+           size_t h)
+    : type(t),
+      data(dataptr),
+      size(datasize),
+      width(w),
+      height(h),
+      dealloc(array_delete)
+    {}
+    
+    ~ImgBuf()
+    {
+        dealloc(data);
+    }
+    
+    static void array_delete(void* voidptr)
+    {
+        boost::uint8_t* ptr = static_cast<boost::uint8_t*>(voidptr);
+        delete [] ptr;
+    }
+    
+    static void noop(void* /*voidptr*/)
+    {
+    }
+
+    Type4CC type;
+    boost::uint8_t* data;
+
+    size_t size; // in bytes
+    size_t width; // in pixels
+    size_t height; // in pixels
+    
+    size_t stride[4];
+    
+    FreeFunc dealloc;
+};
+
+
+/// Abstract base class for video image space conversion.
+
+class VideoConverter : public boost::noncopyable {
+
+public:
+    VideoConverter(ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC dstFormat)
+     : _src_fmt(srcFormat),
+       _dst_fmt(dstFormat) 
+    {
+    }
+    
+    virtual ~VideoConverter()
+    {
+    }
+  
+    /// Convert a (video) image from one colorspace to another.
+    //
+    /// @param src the image to convert
+    /// @return the converted image or a NULL auto_ptr if an error occurred.
+    virtual std::auto_ptr<ImgBuf> convert(const ImgBuf& src) = 0;
+  
+protected:
+    ImgBuf::Type4CC  _src_fmt;
+    ImgBuf::Type4CC  _dst_fmt;
+};
+
+       
+} // gnash.media namespace 
+} // gnash namespace
+
+#endif // __VIDEOCONVERTER_H__

=== modified file 'libmedia/ffmpeg/MediaHandlerFfmpeg.cpp'
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp    2009-01-22 20:10:39 +0000
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp    2009-02-25 02:00:44 +0000
@@ -24,6 +24,7 @@
 #include "AudioDecoderFfmpeg.h"
 #include "GnashException.h"
 #include "FLVParser.h"
+#include "VideoConverterFfmpeg.h"
 
 #include "IOChannel.h" // for visibility of destructor
 #include "MediaParser.h" // for visibility of destructor
@@ -64,6 +65,26 @@
        return ret;
 }
 
+std::auto_ptr<VideoConverter>
+MediaHandlerFfmpeg::createVideoConverter(ImgBuf::Type4CC srcFormat,
+                                         ImgBuf::Type4CC dstFormat)
+{
+    std::auto_ptr<VideoConverter> converter;
+
+    try
+    {
+        converter.reset(new VideoConverterFfmpeg(srcFormat, dstFormat));
+    }
+    catch (GnashException& ex)
+    {
+        log_error("Could not create Ffmpeg based video converter parser for "
+                "input format: %s", ex.what());
+    }
+    
+    return converter;
+}
+
+
 std::auto_ptr<AudioDecoder>
 MediaHandlerFfmpeg::createAudioDecoder(const AudioInfo& info)
 {

=== modified file 'libmedia/ffmpeg/MediaHandlerFfmpeg.h'
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.h      2008-10-27 11:20:47 +0000
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.h      2009-02-25 02:00:44 +0000
@@ -51,6 +51,9 @@
        virtual std::auto_ptr<MediaParser> 
createMediaParser(std::auto_ptr<IOChannel> stream);
 
        virtual std::auto_ptr<VideoDecoder> createVideoDecoder(const VideoInfo& 
info);
+       
+       virtual std::auto_ptr<VideoConverter>
+               createVideoConverter(ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC 
dstFormat);
 
        virtual std::auto_ptr<AudioDecoder> createAudioDecoder(const AudioInfo& 
info);
 

=== added file 'libmedia/ffmpeg/VideoConverterFfmpeg.cpp'
--- a/libmedia/ffmpeg/VideoConverterFfmpeg.cpp  1970-01-01 00:00:00 +0000
+++ b/libmedia/ffmpeg/VideoConverterFfmpeg.cpp  2009-02-25 02:00:44 +0000
@@ -0,0 +1,194 @@
+// 
+//     Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//     Copyright (C) 1999-2008 the VideoLAN team
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA    02110-1301    
USA
+
+#include "VideoConverterFfmpeg.h"
+#include "GnashException.h"
+
+namespace gnash {
+namespace media {
+namespace ffmpeg {
+
+#ifdef HAVE_SWSCALE_H
+/// A wrapper round an SwsContext that ensures it's
+/// freed on destruction.
+class SwsContextWrapper
+{
+public:
+
+    SwsContextWrapper(SwsContext* context)
+        :
+        _context(context)
+    {}
+
+    ~SwsContextWrapper()
+    {
+         sws_freeContext(_context);
+    }
+    
+    SwsContext* getContext() const { return _context; }
+
+private:
+    SwsContext* _context;
+
+};
+#endif
+
+// The lookup table in this function is adapted from chroma.c from the VLC
+// codebase; its license permits distribution under GPLv3 and later.
+PixelFormat
+fourcc_to_ffmpeg(ImgBuf::Type4CC code)
+{
+
+#define GNASH_FOURCC( a, b, c, d ) \
+              ( ((uint32_t)a) | ( ((uint32_t)b) << 8 ) \
+              | ( ((uint32_t)c) << 16 ) | ( ((uint32_t)d) << 24 ) )   
+
+    static const struct
+    {
+        ImgBuf::Type4CC  fourcc;
+        PixelFormat ffmpegcode;
+    } pixfmt_table[] =
+    {
+        // Planar YUV formats
+        {GNASH_FOURCC('I','4','4','4'), PIX_FMT_YUV444P},
+        {GNASH_FOURCC('J','4','4','4'), PIX_FMT_YUVJ444P},
+
+#if LIBAVUTIL_VERSION_INT >= ((49<<16)+(5<<8)+0)
+        {GNASH_FOURCC('I','4','4','0'), PIX_FMT_YUV440P},
+        {GNASH_FOURCC('J','4','4','0'), PIX_FMT_YUVJ440P},
+#endif
+
+        {GNASH_FOURCC('I','4','2','2'), PIX_FMT_YUV422P},
+        {GNASH_FOURCC('J','4','2','2'), PIX_FMT_YUVJ422P},
+
+        {GNASH_FOURCC('I','4','2','0'), PIX_FMT_YUV420P},
+        {GNASH_FOURCC('Y','V','1','2'), PIX_FMT_YUV420P},
+        {GNASH_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P},
+        {GNASH_FOURCC('J','4','2','0'), PIX_FMT_YUVJ420P},
+        {GNASH_FOURCC('I','4','1','1'), PIX_FMT_YUV411P},
+        {GNASH_FOURCC('I','4','1','0'), PIX_FMT_YUV410P},
+        {GNASH_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P},
+
+        {GNASH_FOURCC('N','V','1','2'), PIX_FMT_NV12},
+        {GNASH_FOURCC('N','V','2','1'), PIX_FMT_NV21},
+
+        {GNASH_FOURCC('Y','U','Y','2'), PIX_FMT_YUYV422},
+        {GNASH_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422},
+        {GNASH_FOURCC('U','Y','V','Y'), PIX_FMT_UYVY422},
+        {GNASH_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411},
+
+        { 0, PIX_FMT_NONE}
+    };
+#undef GNASH_FOURCC
+
+    for (int i = 0; pixfmt_table[i].fourcc != 0; i++ ) {
+    
+        if (pixfmt_table[i].fourcc == code) {
+            return pixfmt_table[i].ffmpegcode;
+        }
+    }
+   
+    return PIX_FMT_NONE;
+}
+
+VideoConverterFfmpeg::VideoConverterFfmpeg(ImgBuf::Type4CC srcFormat, 
ImgBuf::Type4CC dstFormat)
+    : VideoConverter(srcFormat, dstFormat)
+{
+     if(fourcc_to_ffmpeg(_dst_fmt) == PIX_FMT_NONE) {
+         throw MediaException(_("VideoConverterFfmpeg cannot convert to the "
+                              "requested format"));
+     }
+}
+
+VideoConverterFfmpeg::~VideoConverterFfmpeg()
+{
+  
+}
+
+
+std::auto_ptr<ImgBuf>
+VideoConverterFfmpeg::convert(const ImgBuf& src)
+{
+    std::auto_ptr<ImgBuf> ret;    
+    
+    const int width = src.width;
+    const int height = src.height;
+
+    PixelFormat dst_pixFmt = fourcc_to_ffmpeg(_dst_fmt);
+    assert(dst_pixFmt != PIX_FMT_NONE);
+    PixelFormat src_pixFmt = PIX_FMT_RGB24;
+    
+#ifdef HAVE_SWSCALE_H
+
+    if (!_swsContext.get()) {
+
+        _swsContext.reset(new SwsContextWrapper(sws_getContext(width, height,
+            src_pixFmt, width, height, dst_pixFmt, SWS_BILINEAR, NULL, NULL,
+            NULL)));
+
+        if (!_swsContext->getContext()) {
+
+            // This means we will try to assign the 
+            // context again next time.
+            _swsContext.reset();
+            
+            return ret;
+        }
+    }
+#endif
+
+
+    AVPicture srcpicture = {{src.data, 0, 0, 0}, {src.stride[0], 0, 0, 0}};
+    
+    
+    int bufsize = avpicture_get_size(dst_pixFmt, width, height);
+    if (bufsize == -1) {
+        return ret;
+    }
+
+    boost::uint8_t* dstbuffer = new boost::uint8_t[bufsize];
+
+    AVPicture dstpicture;
+    avpicture_fill(&dstpicture, dstbuffer, dst_pixFmt, width, height);
+    
+ 
+#ifndef HAVE_SWSCALE_H
+    img_convert(&dstpicture, dst_pixFmt, &srcpicture, src_pixFmt, width,
+                height);
+#else
+
+    int rv = sws_scale(_swsContext->getContext(), srcpicture.data,
+                       srcpicture.linesize, 0, height, dstpicture.data,
+                       dstpicture.linesize);
+
+    if (rv == -1) {
+        return ret;
+    }
+#endif    
+    ret.reset(new ImgBuf(_dst_fmt, dstbuffer, bufsize, src.width,
+                         src.height));
+    std::copy(dstpicture.linesize, dstpicture.linesize+4, ret->stride); 
+ 
+    return ret;
+}
+
+
+
+} // gnash.media.ffmpeg namespace 
+} // gnash.media namespace 
+} // gnash namespace

=== added file 'libmedia/ffmpeg/VideoConverterFfmpeg.h'
--- a/libmedia/ffmpeg/VideoConverterFfmpeg.h    1970-01-01 00:00:00 +0000
+++ b/libmedia/ffmpeg/VideoConverterFfmpeg.h    2009-02-25 07:02:16 +0000
@@ -0,0 +1,64 @@
+//
+//     Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA    02110-1301    
USA
+
+
+#ifndef GNASH_VIDEOCONVERTERFFMPEG_H
+#define GNASH_VIDEOCONVERTERFFMPEG_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "ffmpegHeaders.h"
+#include "VideoConverter.h"
+
+#include "log.h"
+
+#if HAVE_SWSCALE_H
+extern "C" {
+#include <libswscale/swscale.h>
+}
+#endif
+
+
+namespace gnash {
+namespace media {
+namespace ffmpeg {
+
+class SwsContextWrapper;
+
+class VideoConverterFfmpeg : public VideoConverter {
+
+public:
+    VideoConverterFfmpeg(ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC dstFormat);
+    
+    ~VideoConverterFfmpeg();
+
+    std::auto_ptr<ImgBuf> convert(const ImgBuf& src);
+  
+private:
+
+#if HAVE_SWSCALE_H
+    std::auto_ptr<SwsContextWrapper> _swsContext;
+#endif
+};
+
+}
+}
+}
+
+#endif // GNASH_VIDEOCONVERTERFFMPEG_H

=== modified file 'libmedia/gst/MediaHandlerGst.cpp'
--- a/libmedia/gst/MediaHandlerGst.cpp  2009-01-22 20:10:39 +0000
+++ b/libmedia/gst/MediaHandlerGst.cpp  2009-02-25 02:00:44 +0000
@@ -22,6 +22,7 @@
 #include "VideoDecoderGst.h"
 #include "AudioDecoderGst.h"
 #include "MediaParserGst.h"
+#include "VideoConverterGst.h"
 #include "FLVParser.h"
 
 #ifdef DECODING_SPEEX
@@ -132,6 +133,24 @@
        return ret;
 }
 
+std::auto_ptr<VideoConverter>
+MediaHandlerGst::createVideoConverter(ImgBuf::Type4CC srcFormat, 
ImgBuf::Type4CC dstFormat)
+{
+    std::auto_ptr<VideoConverter> converter;
+
+    try
+    {
+        converter.reset(new VideoConverterGst(srcFormat, dstFormat));
+    }
+    catch (GnashException& ex)
+    {
+        log_error("Could not create Gstreamer based video converter parser for 
"
+                "input format: %s", ex.what());
+    }
+    
+    return converter;
+}
+
 } // gnash.media.gst namespace
 } // gnash.media namespace 
 } // gnash namespace

=== modified file 'libmedia/gst/MediaHandlerGst.h'
--- a/libmedia/gst/MediaHandlerGst.h    2008-10-27 11:20:47 +0000
+++ b/libmedia/gst/MediaHandlerGst.h    2009-02-25 02:00:44 +0000
@@ -53,6 +53,9 @@
        virtual std::auto_ptr<VideoDecoder> createVideoDecoder(const VideoInfo& 
info);
 
        virtual std::auto_ptr<AudioDecoder> createAudioDecoder(const AudioInfo& 
info);
+       
+       virtual std::auto_ptr<VideoConverter> 
createVideoConverter(ImgBuf::Type4CC srcFormat,
+                                                              ImgBuf::Type4CC 
dstFormat);
 };
 
 

=== added file 'libmedia/gst/VideoConverterGst.cpp'
--- a/libmedia/gst/VideoConverterGst.cpp        1970-01-01 00:00:00 +0000
+++ b/libmedia/gst/VideoConverterGst.cpp        2009-02-25 02:00:44 +0000
@@ -0,0 +1,166 @@
+//   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#include "VideoConverterGst.h"
+#include "MediaParser.h"
+#include "log.h"
+#include <cassert>
+
+
+namespace gnash {
+namespace media {
+namespace gst {
+
+/// Base class for video image space conversion.
+
+VideoConverterGst::VideoConverterGst(ImgBuf::Type4CC srcFormat, 
ImgBuf::Type4CC dstFormat)
+    : VideoConverter(srcFormat, dstFormat)
+{
+    _decoder.bin = 0;
+
+    gst_init (NULL, NULL);
+    
+    GstElementFactory* colorspacefactory = gst_element_factory_find 
("ffmpegcolorspace");
+    if (!colorspacefactory) {
+        throw MediaException(_("VideoConverterGst: ffmpegcolorspace element 
missing"));
+    }   
+
+    GstCaps* caps = gst_caps_new_simple("video/x-raw-yuv",
+                                        "format", GST_TYPE_FOURCC, _dst_fmt,
+                                        NULL); 
+
+    // Verify that ffmpegcolorspace can actually convert to the requested fmt.
+    bool found = false;
+    for (const GList* walk = gst_element_factory_get_static_pad_templates 
(colorspacefactory);
+         walk; walk = walk->next) {
+        GstStaticPadTemplate* templ = (GstStaticPadTemplate*) walk->data;
+
+        if (templ->direction != GST_PAD_SRC) {
+            continue;
+        }
+
+        GstCaps* template_caps = gst_static_caps_get (&templ->static_caps);
+        GstCaps* intersect = gst_caps_intersect (caps, template_caps);   
+        gst_caps_unref (template_caps);
+    
+        found = !gst_caps_is_empty (intersect);    
+        gst_caps_unref (intersect);
+
+        if (found) {
+            break;
+        }
+    }
+
+    gst_caps_unref(caps);
+    gst_object_unref(colorspacefactory);
+
+    if (!found) {
+         throw MediaException(_("VideoConverterGst: can't output requested 
format"));
+    }
+}
+
+bool
+VideoConverterGst::init(const ImgBuf& src)
+{
+    // FIXME: mask values are probably wrong.
+    GstCaps* srccaps = gst_caps_new_simple("video/x-raw-rgb",
+            "bpp", G_TYPE_INT, 24,
+            "depth", G_TYPE_INT, 24,
+            "width", G_TYPE_INT, src.width,
+            "height", G_TYPE_INT, src.height,
+            "red_mask", G_TYPE_INT, 16711680,
+            "green_mask", G_TYPE_INT, 65280,
+            "blue_mask", G_TYPE_INT, 255,
+            "endianness",G_TYPE_INT,  4321,
+            "framerate", GST_TYPE_FRACTION, 0, 1,
+            NULL);
+
+    GstCaps* sinkcaps = gst_caps_new_simple("video/x-raw-yuv",
+            "format", GST_TYPE_FOURCC, _dst_fmt,
+            "width", G_TYPE_INT, src.width,
+            "height", G_TYPE_INT, src.height,
+            "framerate", GST_TYPE_FRACTION, 0, 1,
+            NULL);
+
+    if (!sinkcaps || !srccaps) {
+        log_error(_("VideoConverterGst: internal error "
+                    "(caps creation failed)"));    
+        return false;  
+    }
+
+    bool rv = swfdec_gst_colorspace_init (&_decoder, srccaps, sinkcaps);
+    if (!rv) {
+        log_error(_("VideoConverterGst: initialisation failed."));
+        return false;
+    }
+
+    gst_caps_unref (srccaps);
+    gst_caps_unref (sinkcaps);
+    
+    return true;
+}
+
+VideoConverterGst::~VideoConverterGst()
+{
+    if (_decoder.bin) {
+        swfdec_gst_decoder_push_eos(&_decoder);
+        swfdec_gst_decoder_finish(&_decoder);
+    }
+}
+
+std::auto_ptr<ImgBuf>
+VideoConverterGst::convert(const ImgBuf& src)
+{
+    std::auto_ptr<ImgBuf> ret;
+    
+    if (!init(src)) {
+        return ret;  
+    }
+
+    GstBuffer* buffer = gst_buffer_new();
+
+    GST_BUFFER_DATA(buffer) = const_cast<boost::uint8_t*>(src.data);
+    GST_BUFFER_SIZE(buffer) = src.size;
+    GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_READONLY);
+
+    bool success = swfdec_gst_decoder_push(&_decoder, buffer);
+    if (!success) {
+        log_error(_("VideoConverterGst: buffer push failed."));
+        return ret;
+    }
+    
+    GstBuffer* retbuffer = swfdec_gst_decoder_pull (&_decoder);
+
+    if (!retbuffer) {
+        log_error(_("VideoConverterGst: buffer pull failed."));
+        return ret;
+    }
+  
+    ret.reset(new ImgBuf(_dst_fmt, GST_BUFFER_DATA(retbuffer),
+                         GST_BUFFER_SIZE(retbuffer), src.width, src.height));
+
+    GST_BUFFER_MALLOCDATA(retbuffer) = 0; // don't free
+    gst_buffer_unref(retbuffer);
+    
+    ret->dealloc = g_free;
+  
+    return ret;
+}
+
+} // gnash.media.gst namespace
+} // gnash.media namespace 
+} // gnash namespace
+

=== added file 'libmedia/gst/VideoConverterGst.h'
--- a/libmedia/gst/VideoConverterGst.h  1970-01-01 00:00:00 +0000
+++ b/libmedia/gst/VideoConverterGst.h  2009-02-25 02:00:44 +0000
@@ -0,0 +1,53 @@
+//   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+#ifndef GNASH_VIDEOCONVERTERGST_H
+#define GNASH_VIDEOCONVERTERGST_H
+
+#include "VideoConverter.h"
+#include "swfdec_codec_gst.h"
+
+
+
+#include <gst/gst.h>
+
+namespace gnash {
+namespace media {
+namespace gst {
+
+/// Base class for video image space conversion.
+
+class VideoConverterGst : public VideoConverter {
+
+public:
+    VideoConverterGst(ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC dstFormat);
+    
+    ~VideoConverterGst();
+  
+    std::auto_ptr<ImgBuf> convert(const ImgBuf& src);
+    
+    bool init(const ImgBuf& src);
+  
+private:
+    SwfdecGstDecoder _decoder;
+};
+
+} // gnash.media.gst namespace
+} // gnash.media namespace 
+} // gnash namespace
+
+#endif // __VIDEOCONVERTERGST_H__

=== modified file 'libmedia/gst/swfdec_codec_gst.c'
--- a/libmedia/gst/swfdec_codec_gst.c   2008-10-05 00:08:38 +0000
+++ b/libmedia/gst/swfdec_codec_gst.c   2009-02-25 02:00:44 +0000
@@ -234,6 +234,37 @@
 }
 
 gboolean
+swfdec_gst_colorspace_init (SwfdecGstDecoder *dec, GstCaps *srccaps, GstCaps 
*sinkcaps)
+{
+  GstElement *converter;
+
+  dec->bin = gst_bin_new ("bin");
+
+  converter = gst_element_factory_make ("ffmpegcolorspace", NULL);
+  if (converter == NULL) {
+    SWFDEC_ERROR ("failed to create converter");
+    return FALSE;
+  }
+  gst_bin_add (GST_BIN (dec->bin), converter);
+  dec->src = swfdec_gst_connect_srcpad (converter, srccaps);
+  if (dec->src == NULL)
+    return FALSE;
+
+  dec->sink = swfdec_gst_connect_sinkpad (converter, sinkcaps);
+  if (dec->sink == NULL)
+    return FALSE;
+  gst_pad_set_chain_function (dec->sink, swfdec_gst_chain_func);
+  dec->queue = g_queue_new ();
+  g_object_set_data (G_OBJECT (dec->sink), "swfdec-queue", dec->queue);
+  if (!gst_element_set_state (dec->bin, GST_STATE_PLAYING) == 
GST_STATE_CHANGE_SUCCESS) {
+    SWFDEC_ERROR ("could not change element state");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+
+gboolean
 swfdec_gst_decoder_init (SwfdecGstDecoder *dec, GstCaps *srccaps, GstCaps 
*sinkcaps, ...)
 {
   va_list args;

=== modified file 'libmedia/gst/swfdec_codec_gst.h'
--- a/libmedia/gst/swfdec_codec_gst.h   2008-10-05 00:08:38 +0000
+++ b/libmedia/gst/swfdec_codec_gst.h   2009-02-25 02:00:44 +0000
@@ -37,6 +37,11 @@
                                                 GstCaps *              srccaps,
                                                 GstCaps *              
sinkcaps,
                                                 ...) G_GNUC_NULL_TERMINATED;
+
+gboolean       swfdec_gst_colorspace_init      (SwfdecGstDecoder *     dec,
+                                                GstCaps *              srccaps,
+                                                GstCaps *              
sinkcaps);
+                                                
 void           swfdec_gst_decoder_push_eos     (SwfdecGstDecoder *     dec);
 GstBuffer *    swfdec_gst_decoder_pull         (SwfdecGstDecoder *     dec);
 gboolean       swfdec_gst_decoder_push         (SwfdecGstDecoder *     dec,

=== modified file 'libsound/Makefile.am'
--- a/libsound/Makefile.am      2008-11-08 10:14:21 +0000
+++ b/libsound/Makefile.am      2009-02-23 16:16:17 +0000
@@ -40,14 +40,12 @@
        $(NULL)
 
 libgnashsound_la_SOURCES = \
-       sdl/sound_handler_sdl.cpp \
        sound_handler.cpp \
        EmbedSound.cpp \
        EmbedSoundInst.cpp \
        $(NULL)
 
 noinst_HEADERS = \
-       sdl/sound_handler_sdl.h \
        NullSoundHandler.h \
        sound_handler.h \
        SoundEnvelope.h \
@@ -57,6 +55,11 @@
     AuxStream.h
        $(NULL)
 
+if USE_SOUND_SDL
+ libgnashsound_la_SOURCES += sdl/sound_handler_sdl.cpp 
+ noinst_HEADERS += sdl/sound_handler_sdl.h
+endif
+
 
 libgnashsound_la_LDFLAGS = -release $(VERSION)
 

=== modified file 'macros/x11.m4'
--- a/macros/x11.m4     2008-09-22 10:20:32 +0000
+++ b/macros/x11.m4     2009-02-25 02:00:44 +0000
@@ -43,6 +43,14 @@
   if test x"${ac_cv_path_x11_incl}" = x ; then
     AC_CHECK_HEADERS(X11/X.h, [ac_cv_path_x11_incl=""])
   fi
+  
+  dnl We want to know whether the headers for XShm exist.
+  if test x"${ac_cv_path_x11_incl}" != x ; then
+    includedirfound=`echo "${ac_cv_path_x11_incl}" | cut -b 3-`
+    if test -f "$includedirfound/X11/extensions/Xv.h"; then
+      xv_incl=yes
+    fi
+  fi
 
   AC_MSG_CHECKING([for X11 headers])
   if test x"${ac_cv_path_x11_incl}" != x ; then
@@ -88,7 +96,11 @@
           ac_cv_path_x11_lib="${ac_cv_path_x11_lib} -lSM"
         fi
         if test -f $i/libICE.a -o -f $i/libICE.${shlibext}; then
-         ac_cv_path_x11_lib="${ac_cv_path_x11_lib} -lICE"
+          ac_cv_path_x11_lib="${ac_cv_path_x11_lib} -lICE"
+        fi
+        if test -f $i/libXv.a -o -f $i/libXv.${shlibext}; then
+          ac_cv_path_x11_lib="${ac_cv_path_x11_lib} -lXv"
+          xv_lib=yes
         fi
         break
       fi
@@ -126,6 +138,11 @@
   if test "x$x11" = xyes; then
     AC_DEFINE(HAVE_X11, [1], [X11 headers and libraries])
   fi
+  
+  if test x"$xv_incl" != x -a x"$xv_lib" != x; then
+    AC_DEFINE(HAVE_XV, [1], [X Video extension header and library])
+  fi
+  AM_CONDITIONAL(HAVE_XV, [ test x"$xv_incl" != x -a x"$xv_lib" != x ])
 
   AC_SUBST(X11_CFLAGS)
   AC_SUBST(X11_LIBS)

=== modified file 'plugin/plugin.cpp'
--- a/plugin/plugin.cpp 2009-02-10 11:33:38 +0000
+++ b/plugin/plugin.cpp 2009-02-24 18:20:50 +0000
@@ -220,6 +220,7 @@
 #endif
     }
 
+#if 0 // Gtk is no longer required in the browser
     err = CallNPN_GetValueProc(NPNFuncs.getvalue, NULL,
                 NPNVToolkit,
                 (void *)&toolkit);
@@ -243,6 +244,7 @@
         std::cout << "GTK2 supported in this browser" << std::endl;
 #endif
     }
+#endif
 
     /*
     Check for environment variables.

=== modified file 'testsuite/MovieTester.cpp'
--- a/testsuite/MovieTester.cpp 2009-02-09 09:29:52 +0000
+++ b/testsuite/MovieTester.cpp 2009-02-23 16:16:17 +0000
@@ -238,28 +238,31 @@
 {
        _clock.advance(ms);
 
-    // We need to fetch as many samples
-    // as needed for a theoretical 44100hz loop.
-    // That is 44100 samples each second.
-    // 44100/1000 = x/ms
-    //  x = (44100*ms) / 1000
-    unsigned int nSamples = (441*ms) / 10;
-    if ( ms%10 )
-    {
-        log_error("MovieTester::advanceClock: %d ms lost in sound advancement",
-            ms%10);
-    }
-
-    unsigned int toFetch = nSamples*2;
-
-    log_debug("advanceClock(%d) needs to fetch %d samples", ms, toFetch);
-
-    boost::int16_t samples[1024];
-    while (toFetch)
-    {
-        unsigned int n = std::min(toFetch, 1024u);
-        _sound_handler->fetchSamples((boost::int16_t*)&samples, n);
-        toFetch -= n;
+    if ( _sound_handler )
+    {
+        // We need to fetch as many samples
+        // as needed for a theoretical 44100hz loop.
+        // That is 44100 samples each second.
+        // 44100/1000 = x/ms
+        //  x = (44100*ms) / 1000
+        unsigned int nSamples = (441*ms) / 10;
+        if ( ms%10 )
+        {
+            log_error("MovieTester::advanceClock: %d ms lost in sound 
advancement",
+                ms%10);
+        }
+
+        unsigned int toFetch = nSamples*2;
+
+        log_debug("advanceClock(%d) needs to fetch %d samples", ms, toFetch);
+
+        boost::int16_t samples[1024];
+        while (toFetch)
+        {
+            unsigned int n = std::min(toFetch, 1024u);
+            _sound_handler->fetchSamples((boost::int16_t*)&samples, n);
+            toFetch -= n;
+        }
     }
     
 }
@@ -573,8 +576,15 @@
 void
 MovieTester::initTestingSoundHandlers()
 {
-
-    _sound_handler.reset( new sound::NullSoundHandler() );
+    // Currently, SoundHandler can't be constructed
+    // w/out a registered MediaHandler .
+    // Should be fixed though...
+    //
+    if ( gnash::media::MediaHandler::get() ) {
+        log_error("MediaHandler::get returns: %s",
+            gnash::media::MediaHandler::get());
+        _sound_handler.reset( new sound::NullSoundHandler() );
+    }
 }
 
 void
@@ -588,7 +598,7 @@
 #elif defined(USE_GST)
         handler.reset( new gnash::media::gst::MediaHandlerGst() );
 #else
-       std::cerr << "Neigher SOUND_SDL nor SOUND_GST defined" << std::endl;
+       std::cerr << "Neigther SOUND_SDL nor SOUND_GST defined" << std::endl;
        return;
 #endif
 

=== modified file 'testsuite/libbase/TCXXRc.cpp'
--- a/testsuite/libbase/TCXXRc.cpp      2008-11-21 15:15:25 +0000
+++ b/testsuite/libbase/TCXXRc.cpp      2009-02-25 02:00:44 +0000
@@ -225,6 +225,12 @@
         }
     }
 
+    if (rc.useXv() == false) {
+        runtest.pass ("Xvideo off by default");
+    } else {
+        runtest.fail ("Xvideo is on by default!");
+    }
+
     // Parse a second file
     if (rc.parseFile("gnashrc-local")) {
 
@@ -264,6 +270,12 @@
                 runtest.fail ("rc.getLocalSandboxPath() doesn't have the 
correct last element after append");
             }
         }
+
+        if (rc.useXv() == true) {
+            runtest.pass ("Xvideo on by local.rc");
+        } else {
+            runtest.fail ("Xvideo on by local.rc");
+        }
     }
 
     if (rc.getURLOpenerFormat() == "lynx %u") {

=== modified file 'testsuite/libbase/gnashrc-local.in'
--- a/testsuite/libbase/gnashrc-local.in        2007-10-20 08:16:04 +0000
+++ b/testsuite/libbase/gnashrc-local.in        2009-02-25 02:00:44 +0000
@@ -6,3 +6,6 @@
 append blacklist www.gnashdev.org www.wikipedia.de
 
 append localSandboxPath /tmp/gnash
+
+# Use XVideo
+set XVideo true

=== modified file 'testsuite/libbase/gnashrc.in'
--- a/testsuite/libbase/gnashrc.in      2008-02-11 08:13:05 +0000
+++ b/testsuite/libbase/gnashrc.in      2009-02-25 02:00:44 +0000
@@ -72,3 +72,6 @@
 
 # Set read-only SharedObjects
 set SOLReadOnly true
+
+# Don't use XVideo
+set XVideo false

=== modified file 'testsuite/libnet.all/generate_amfbins.cpp'
--- a/testsuite/libnet.all/generate_amfbins.cpp 2008-12-19 20:51:40 +0000
+++ b/testsuite/libnet.all/generate_amfbins.cpp 2009-02-25 02:00:44 +0000
@@ -31,6 +31,8 @@
 #include <log.h>
 #include <iostream>
 #include <string>
+#include <unistd.h>
+
 #include "as_value.h"
 #include "as_object.h"
 

=== modified file 'testsuite/libnet.all/test_diskstream.cpp'
--- a/testsuite/libnet.all/test_diskstream.cpp  2009-02-19 18:57:33 +0000
+++ b/testsuite/libnet.all/test_diskstream.cpp  2009-02-23 14:57:23 +0000
@@ -154,7 +154,7 @@
     }
 
     // close the currently opened file
-//    ds1.close();
+    ds1.close();
     if (ds1.getState() == DiskStream::CLOSED) {
         runtest.pass("close()");
     } else {

=== modified file 'utilities/processor.cpp'
--- a/utilities/processor.cpp   2009-02-09 09:29:52 +0000
+++ b/utilities/processor.cpp   2009-02-23 16:32:29 +0000
@@ -341,20 +341,20 @@
     }
 
 
+    std::auto_ptr<gnash::media::MediaHandler> mediaHandler;
+    boost::shared_ptr<sound::sound_handler> soundHandler;
+
 #ifdef USE_FFMPEG
-    std::auto_ptr<media::MediaHandler> handler(
-            new gnash::media::ffmpeg::MediaHandlerFfmpeg() );
+    mediaHandler.reset( new gnash::media::ffmpeg::MediaHandlerFfmpeg() );
 #elif defined(USE_GST)
-    std::auto_ptr<media::MediaHandler> handler(
-            new gnash::media::gst::MediaHandlerGst() );
-#else
-    std::cerr << "Neither SOUND_SDL nor SOUND_GST defined" << std::endl;
-    exit(1);
+    mediaHandler.reset( new gnash::media::gst::MediaHandlerGst() );
 #endif
-    gnash::media::MediaHandler::set(handler);
 
-    boost::shared_ptr<sound::sound_handler> soundHandler(
-            new sound::NullSoundHandler());
+    if ( mediaHandler.get() )
+    {
+        gnash::media::MediaHandler::set(mediaHandler);
+        soundHandler.reset( new sound::NullSoundHandler() );
+    }
 
     boost::shared_ptr<StreamProvider> sp(new StreamProvider);
 


reply via email to

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