[Swfdec-commits] 10 commits - configure.ac NEWS README swfdec/swfdec_as_interpret.c test/image test/rtmp test/sound test/trace

Benjamin Otte company at kemper.freedesktop.org
Mon Jan 28 15:01:40 PST 2008


 NEWS                                 |   16 +++++
 README                               |    3 -
 configure.ac                         |    5 -
 swfdec/swfdec_as_interpret.c         |    9 +--
 test/image/Makefile.am               |    2 
 test/rtmp/.gitignore                 |   10 ---
 test/rtmp/Makefile.am                |    8 --
 test/rtmp/rtmp_server.c              |   98 -----------------------------------
 test/sound/Makefile.am               |    2 
 test/trace/Makefile.am               |    5 +
 test/trace/waitforframe.c            |   75 ++++++++++++++++++++++++++
 test/trace/waitforframe1-4.swf       |binary
 test/trace/waitforframe1-4.swf.trace |    4 +
 test/trace/waitforframe2-4.swf       |binary
 test/trace/waitforframe2-4.swf.trace |    3 +
 15 files changed, 113 insertions(+), 127 deletions(-)

New commits:
commit d8d0b9411d04760a153bf61dce569d783acef478
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Jan 29 00:01:32 2008 +0100

    missing trailing backslash
    
    something was not released here...

diff --git a/test/sound/Makefile.am b/test/sound/Makefile.am
index ddb3d13..96e859a 100644
--- a/test/sound/Makefile.am
+++ b/test/sound/Makefile.am
@@ -33,7 +33,7 @@ EXTRA_DIST = \
 	adpcm-5.swf \
 	adpcm-5.swf.1.0.raw \
 	adpcm-5-2.swf \
-	adpcm-5-2.swf.1.0.raw
+	adpcm-5-2.swf.1.0.raw \
 	crash-0.5.3-no-samples.c \
 	crash-0.5.3-no-samples.swf \
 	crash-0.5.3-no-samples.swf.1.0.raw \
commit 42857d62492b9d31659ca61357e082bb941069e4
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Jan 29 00:01:12 2008 +0100

    back to development

diff --git a/configure.ac b/configure.ac
index c7612b8..cac18b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.58])
-AC_INIT(swfdec,0.5.90)
+AC_INIT(swfdec,0.5.90.1)
 
 [nano=$(echo $PACKAGE_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\.*//')]
 if test x"$nano" = x1 ; then
commit a0ac47365d92e7cbc837873f642ded4edf49b635
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 22:26:13 2008 +0100

    release 0.5.90

diff --git a/configure.ac b/configure.ac
index 66fb78b..c7612b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.58])
-AC_INIT(swfdec,0.5.5.1)
+AC_INIT(swfdec,0.5.90)
 
 [nano=$(echo $PACKAGE_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\.*//')]
 if test x"$nano" = x1 ; then
commit f10c4c84c8b06af86dc07082545cda7c2778693b
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 22:24:32 2008 +0100

    update README

diff --git a/README b/README
index 3c51157..a959a41 100644
--- a/README
+++ b/README
@@ -60,7 +60,7 @@ Limitations:
 Dependencies:
 
   cairo (>= 1.2.0 - >= 1.4.0 recommended) with png support enabled
-  glib (>= 2.10.0)
+  glib (>= 2.14.0)
   liboil (>= 0.3.6)
   Pangocairo (>= 1.16.0) - this is provided by Pango
   zlib (>= 1.1.4)
@@ -70,6 +70,7 @@ Dependencies:
   MAD (>= 0.15.1b - optional, required for MP3 audio format support)
 
   GTK+ (>= 2.8.0 - used by swfdec-gtk)
+  libsoup (>= 2.4.0 - used by swfdec-gtk)
   ALSA (>= 1.0 - optional, required for sound output by swfdec-gtk)
 
 
commit 383413c9509f9f4edc642fe81ac0e2e27533a776
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 22:23:14 2008 +0100

    we're not supposed to be 0.5.90 yet

diff --git a/configure.ac b/configure.ac
index c7612b8..66fb78b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.58])
-AC_INIT(swfdec,0.5.90)
+AC_INIT(swfdec,0.5.5.1)
 
 [nano=$(echo $PACKAGE_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\.*//')]
 if test x"$nano" = x1 ; then
commit ab5455fff713dfb16458888bddc9d83d4cc4ab63
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 22:09:31 2008 +0100

    add script files

diff --git a/test/image/Makefile.am b/test/image/Makefile.am
index 05af8e9..7fef43b 100644
--- a/test/image/Makefile.am
+++ b/test/image/Makefile.am
@@ -44,6 +44,8 @@ EXTRA_DIST = \
 	color-transform-add80.swf.png \
 	color-transform-add80-alpha.swf \
 	color-transform-add80-alpha.swf.png \
+	default.stas \
+	default.sts \
 	duplicate-depth.c \
 	duplicate-depth-5.swf \
 	duplicate-depth-5.swf.png \
commit cafe61ef851a557e1f45e5d872ea875cdc207245
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 22:02:10 2008 +0100

    get rid of rtmp dir

diff --git a/configure.ac b/configure.ac
index 02281c7..c7612b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.58])
-AC_INIT(swfdec,0.5.5.1)
+AC_INIT(swfdec,0.5.90)
 
 [nano=$(echo $PACKAGE_VERSION | sed 's/[0-9]\.[0-9]\.[0-9][0-9]*\.*//')]
 if test x"$nano" = x1 ; then
@@ -33,7 +33,7 @@ else
 fi
 AC_DEFINE_UNQUOTED(SWFDEC_LEVEL_DEFAULT, $DEFAULT_DEBUG_LEVEL, [Default debug level used])
 
-SWFDEC_LIBVERSION="5:0:0"
+SWFDEC_LIBVERSION="90:0:0"
 AC_SUBST(SWFDEC_LIBVERSION)
 AM_PROG_LIBTOOL
 
@@ -332,7 +332,6 @@ player/Makefile
 test/Makefile
 test/custom/Makefile
 test/image/Makefile
-test/rtmp/Makefile
 test/sound/Makefile
 test/trace/Makefile
 test/various/Makefile
diff --git a/test/rtmp/.gitignore b/test/rtmp/.gitignore
deleted file mode 100644
index 804265c..0000000
--- a/test/rtmp/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*~
-.deps
-.libs
-
-Makefile
-Makefile.in
-*.lo
-*.o
-
-rtmp-server
diff --git a/test/rtmp/Makefile.am b/test/rtmp/Makefile.am
deleted file mode 100644
index cfe8416..0000000
--- a/test/rtmp/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_PROGRAMS = rtmp-server
-
-TESTS = $(check_PROGRAMS)
-
-rtmp_server_SOURCES = rtmp_server.c
-rtmp_server_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS)
-rtmp_server_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS) $(CAIRO_LIBS)
-
diff --git a/test/rtmp/rtmp_server.c b/test/rtmp/rtmp_server.c
deleted file mode 100644
index a5f6362..0000000
--- a/test/rtmp/rtmp_server.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Swfdec
- * Copyright (C) 2008 Benjamin Otte <otte at gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library 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
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02110-1301  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <libsoup/soup.h>
-#include <libsoup/soup-address.h>
-#include <swfdec/swfdec.h>
-#include <glib/gprintf.h>
-
-static void
-socket_print (SoupSocket *sock, const char *format, ...)
-{
-  va_list varargs;
-
-  g_print ("%p ", sock);
-  va_start (varargs, format);
-  g_vprintf (format, varargs);
-  va_end (varargs);
-}
-
-static void
-hexdump (SwfdecBuffer *buffer)
-{
-  guint i;
-
-  for (i = 0; i < buffer->length; i++) {
-    g_print ("%02X%s", buffer->data[i], i % 8 == 7 ? "\n" : (i % 4 == 3 ? "  " : " "));
-  }
-  if (i % 8)
-    g_print ("\n");
-}
-
-static void
-do_read (SoupSocket *conn, gpointer unused)
-{
-  SwfdecBuffer *buf;
-  SoupSocketIOStatus status;
-
-  buf = swfdec_buffer_new_and_alloc (16);
-  while ((status = soup_socket_read (conn, buf->data, buf->length, &buf->length)) == SOUP_SOCKET_OK) {
-    socket_print (conn, "\n");
-    hexdump (buf);
-    soup_socket_write (conn, buf->data, buf->length, &buf->length);
-    buf->length = 16;
-  }
-  swfdec_buffer_unref (buf);
-  socket_print (conn, "status: %u\n", (guint) status);
-}
-
-static void
-new_connection (SoupSocket *server, SoupSocket *conn, gpointer unused)
-{
-  g_object_ref (conn);
-  socket_print (conn, "new connection\n");
-  g_signal_connect (conn, "readable", G_CALLBACK (do_read), NULL);
-  do_read (conn, NULL);
-}
-
-int
-main (int argc, char **argv)
-{
-  GMainLoop *loop;
-  SoupSocket *server;
-  SoupAddress *address;
-
-  swfdec_init ();
-
-  address = soup_address_new_any (SOUP_ADDRESS_FAMILY_IPV4, 1935);
-  server = soup_socket_new ("non-blocking", TRUE, NULL);
-  soup_socket_listen (server, address);
-  g_signal_connect (server, "new-connection", G_CALLBACK (new_connection), NULL);
-  g_object_unref (address);
-
-  loop = g_main_loop_new (NULL, FALSE);
-  g_main_loop_run (loop);
-  g_main_loop_unref (loop);
-
-  return 0;
-}
-
commit 5eb32e82db4a8843891b89e1b316a83720e0b8b1
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 21:57:18 2008 +0100

    update NEWS

diff --git a/NEWS b/NEWS
index 30f8e05..fde88e5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,20 @@
 
+ 0.5.90 ("rutube")
+
+This is a preparation for the upcoming 0.6 release to go in time with the Gnome 
+2.22 release.
+- rename "libswfdec(-gtk)" dir to "swfdec(-gtk)"
+- update libsoup requirement to 2.4
+- rework input API - now has SwfdecStream, SwfdecLoader and SwfdecSocket classes
+- new and improved testsuite
+- completely overhaul security subsystem, invalid access denies should be a 
+  thing of the past
+- implement flash.geom.Point and flash.geom.Rectangle
+- implement internal parts of ExternalInterface object
+- plug various memory leaks
+- fix lots of internal bugs
+- various portability fixes for embedded and OpenBSD
+
  0.5.5 ("cps")
 
 In time for Gnome's 2.21.4 release, here's a new Swfdec release. Features:
commit 07726356742ef4e4be766085c7a1acda6907d500
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 21:41:58 2008 +0100

    add testcases for the WaitForFrame actions

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 3d4ccb2..d2173df 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -3180,6 +3180,11 @@ EXTRA_DIST = \
 	video-properties-7.swf.trace \
 	video-properties-8.swf \
 	video-properties-8.swf.trace \
+	waitforframe1-4.swf \
+	waitforframe1-4.swf.trace \
+	waitforframe2-4.swf \
+	waitforframe2-4.swf.trace \
+	waitforframe.c \
 	waitforframe-huge.as \
 	waitforframe-huge-4.swf \
 	waitforframe-huge-4.swf.trace \
diff --git a/test/trace/waitforframe.c b/test/trace/waitforframe.c
new file mode 100644
index 0000000..542ae29
--- /dev/null
+++ b/test/trace/waitforframe.c
@@ -0,0 +1,75 @@
+/* gcc -Wall `pkg-config --libs --cflags libming glib-2.0` waitforframe.c -o waitforframe && ./waitforframe
+ */
+
+#include <ming.h>
+#include <glib.h>
+#include <stdio.h>
+
+#define BYTES_PER_FRAME 10000
+#define N_FRAMES 10
+
+static void
+add_n_bytes_frame (SWFMovie movie, guint n_bytes)
+{
+  char *action;
+  
+  g_return_if_fail (n_bytes >= 34);
+
+  action = g_strdup_printf ("asm { push \"%*s\" pop };", n_bytes - 33, "x");
+  SWFMovie_add (movie, (SWFBlock) newSWFAction (action));
+  SWFMovie_nextFrame (movie);
+  g_free (action);
+}
+
+static void
+do_movie (int version)
+{
+  SWFMovie movie;
+  guint i;
+  char *s;
+  GString *str;
+
+  movie = newSWFMovieWithVersion (4);
+  SWFMovie_setRate (movie, 1);
+  SWFMovie_setDimension (movie, 200, 150);
+
+  str = g_string_new ("");
+  for (i = 0; i < 10; i++) {
+    if (version == 1) {
+      g_string_append_printf (str,
+	  "if (! frameLoaded (%u)) {"
+	  "  trace (\"%u\");"
+	  "}", i, i);
+    } else {
+      g_string_append_printf (str,
+	  "if (! frameLoaded (%u * 1)) {"
+	  "  trace (\"%u\");"
+	  "}", i, i);
+    }
+  }
+  g_string_append (str, "getURL (\"fscommand:quit\", \"\");");
+  SWFMovie_add (movie, (SWFBlock) newSWFAction (str->str));
+  g_string_free (str, TRUE);
+  add_n_bytes_frame (movie, BYTES_PER_FRAME - 90);
+  for (i = 1; i < N_FRAMES - 1; i++) {
+    add_n_bytes_frame (movie, BYTES_PER_FRAME);
+  }
+  add_n_bytes_frame (movie, BYTES_PER_FRAME - 3);
+
+  s = g_strdup_printf ("waitforframe%d-4.swf", version);
+  SWFMovie_save (movie, s);
+  g_free (s);
+}
+
+int
+main (int argc, char **argv)
+{
+  if (Ming_init ())
+    return 1;
+  Ming_setSWFCompression (-1);
+
+  do_movie (1);
+  do_movie (2);
+
+  return 0;
+}
diff --git a/test/trace/waitforframe1-4.swf b/test/trace/waitforframe1-4.swf
new file mode 100644
index 0000000..03a8ac8
Binary files /dev/null and b/test/trace/waitforframe1-4.swf differ
diff --git a/test/trace/waitforframe1-4.swf.trace b/test/trace/waitforframe1-4.swf.trace
new file mode 100644
index 0000000..0c2766e
--- /dev/null
+++ b/test/trace/waitforframe1-4.swf.trace
@@ -0,0 +1,4 @@
+6
+7
+8
+9
diff --git a/test/trace/waitforframe2-4.swf b/test/trace/waitforframe2-4.swf
new file mode 100644
index 0000000..3d6e10c
Binary files /dev/null and b/test/trace/waitforframe2-4.swf differ
diff --git a/test/trace/waitforframe2-4.swf.trace b/test/trace/waitforframe2-4.swf.trace
new file mode 100644
index 0000000..61d2d0a
--- /dev/null
+++ b/test/trace/waitforframe2-4.swf.trace
@@ -0,0 +1,3 @@
+7
+8
+9
commit 190a947049465e61fd72da39dc36e46313a6b779
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jan 28 21:36:55 2008 +0100

    fix WaitForFrame actions to wait for the right frame

diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 716bbf2..da2ba77 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -250,12 +250,9 @@ swfdec_action_wait_for_frame2 (SwfdecAsContext *cx, guint action, const guint8 *
 
   movie = SWFDEC_SPRITE_MOVIE (cx->frame->target);
   frame = swfdec_value_to_frame (cx, movie, swfdec_as_stack_pop (cx));
-  if (frame == 0) {
-    SWFDEC_FIXME ("wait for invalid frames or not?");
-  }
   loaded = swfdec_sprite_movie_get_frames_loaded (movie);
   if (loaded < (int) movie->n_frames &&
-      loaded <= frame)
+      loaded < frame - 1)
     swfdec_script_skip_actions (cx, data[0]);
 }
 
@@ -276,11 +273,11 @@ swfdec_action_wait_for_frame (SwfdecAsContext *cx, guint action, const guint8 *d
   }
 
   movie = SWFDEC_SPRITE_MOVIE (cx->frame->target);
-  frame = data[0] || (data[1] << 8);
+  frame = data[0] | (data[1] << 8);
   jump = data[2];
   loaded = swfdec_sprite_movie_get_frames_loaded (movie);
   if (loaded < (int) movie->n_frames &&
-      loaded <= frame)
+      loaded < frame)
     swfdec_script_skip_actions (cx, jump);
 }
 


More information about the Swfdec-commits mailing list