[Swfdec] Branch 'as' - 5 commits - libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie.c test/image
Benjamin Otte
company at kemper.freedesktop.org
Wed Jun 20 03:15:33 PDT 2007
libswfdec/swfdec_graphic_movie.c | 6 -
libswfdec/swfdec_movie.c | 3
libswfdec/swfdec_sprite_movie.c | 7 +
test/image/Makefile.am | 58 ++++++++++++++
test/image/replace-button-button-5.swf |binary
test/image/replace-button-button-5.swf.png |binary
test/image/replace-button-button-6.swf |binary
test/image/replace-button-button-6.swf.png |binary
test/image/replace-button-button-7.swf |binary
test/image/replace-button-button-7.swf.png |binary
test/image/replace-button-movie-5.swf |binary
test/image/replace-button-movie-5.swf.png |binary
test/image/replace-button-movie-6.swf |binary
test/image/replace-button-movie-6.swf.png |binary
test/image/replace-button-movie-7.swf |binary
test/image/replace-button-movie-7.swf.png |binary
test/image/replace-button-shape-5.swf |binary
test/image/replace-button-shape-5.swf.png |binary
test/image/replace-button-shape-6.swf |binary
test/image/replace-button-shape-6.swf.png |binary
test/image/replace-button-shape-7.swf |binary
test/image/replace-button-shape-7.swf.png |binary
test/image/replace-movie-button-5.swf |binary
test/image/replace-movie-button-5.swf.png |binary
test/image/replace-movie-button-6.swf |binary
test/image/replace-movie-button-6.swf.png |binary
test/image/replace-movie-button-7.swf |binary
test/image/replace-movie-button-7.swf.png |binary
test/image/replace-movie-movie-5.swf |binary
test/image/replace-movie-movie-5.swf.png |binary
test/image/replace-movie-movie-6.swf |binary
test/image/replace-movie-movie-6.swf.png |binary
test/image/replace-movie-movie-7.swf |binary
test/image/replace-movie-movie-7.swf.png |binary
test/image/replace-movie-shape-5.swf |binary
test/image/replace-movie-shape-5.swf.png |binary
test/image/replace-movie-shape-6.swf |binary
test/image/replace-movie-shape-6.swf.png |binary
test/image/replace-movie-shape-7.swf |binary
test/image/replace-movie-shape-7.swf.png |binary
test/image/replace-shape-button-5.swf |binary
test/image/replace-shape-button-5.swf.png |binary
test/image/replace-shape-button-6.swf |binary
test/image/replace-shape-button-6.swf.png |binary
test/image/replace-shape-button-7.swf |binary
test/image/replace-shape-button-7.swf.png |binary
test/image/replace-shape-movie-5.swf |binary
test/image/replace-shape-movie-5.swf.png |binary
test/image/replace-shape-movie-6.swf |binary
test/image/replace-shape-movie-6.swf.png |binary
test/image/replace-shape-movie-7.swf |binary
test/image/replace-shape-movie-7.swf.png |binary
test/image/replace-shape-shape-5.swf |binary
test/image/replace-shape-shape-5.swf.png |binary
test/image/replace-shape-shape-6.swf |binary
test/image/replace-shape-shape-6.swf.png |binary
test/image/replace-shape-shape-7.swf |binary
test/image/replace-shape-shape-7.swf.png |binary
test/image/replace.c | 116 +++++++++++++++++++++++++++++
59 files changed, 183 insertions(+), 7 deletions(-)
New commits:
diff-tree dd148d832b6b33de52cf3e4a744aaac2439c4f6b (from 76539ac3adffb3888da86d513deac7aee3cf8611)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 12:07:57 2007 +0200
add replace tests that check which characters get replaced
diff --git a/test/image/Makefile.am b/test/image/Makefile.am
index 44c9149..d63d933 100644
--- a/test/image/Makefile.am
+++ b/test/image/Makefile.am
@@ -25,4 +25,60 @@ EXTRA_DIST = \
image-lossless-alpha.swf.png \
negative-color-transform.c \
negative-color-transform.swf \
- negative-color-transform.swf.png
+ negative-color-transform.swf.png \
+ replace.c \
+ replace-button-button-5.swf \
+ replace-button-button-5.swf.png \
+ replace-button-button-6.swf \
+ replace-button-button-6.swf.png \
+ replace-button-button-7.swf \
+ replace-button-button-7.swf.png \
+ replace-button-movie-5.swf \
+ replace-button-movie-5.swf.png \
+ replace-button-movie-6.swf \
+ replace-button-movie-6.swf.png \
+ replace-button-movie-7.swf \
+ replace-button-movie-7.swf.png \
+ replace-button-shape-5.swf \
+ replace-button-shape-5.swf.png \
+ replace-button-shape-6.swf \
+ replace-button-shape-6.swf.png \
+ replace-button-shape-7.swf \
+ replace-button-shape-7.swf.png \
+ replace-movie-button-5.swf \
+ replace-movie-button-5.swf.png \
+ replace-movie-button-6.swf \
+ replace-movie-button-6.swf.png \
+ replace-movie-button-7.swf \
+ replace-movie-button-7.swf.png \
+ replace-movie-movie-5.swf \
+ replace-movie-movie-5.swf.png \
+ replace-movie-movie-6.swf \
+ replace-movie-movie-6.swf.png \
+ replace-movie-movie-7.swf \
+ replace-movie-movie-7.swf.png \
+ replace-movie-shape-5.swf \
+ replace-movie-shape-5.swf.png \
+ replace-movie-shape-6.swf \
+ replace-movie-shape-6.swf.png \
+ replace-movie-shape-7.swf \
+ replace-movie-shape-7.swf.png \
+ replace-shape-button-5.swf \
+ replace-shape-button-5.swf.png \
+ replace-shape-button-6.swf \
+ replace-shape-button-6.swf.png \
+ replace-shape-button-7.swf \
+ replace-shape-button-7.swf.png \
+ replace-shape-movie-5.swf \
+ replace-shape-movie-5.swf.png \
+ replace-shape-movie-6.swf \
+ replace-shape-movie-6.swf.png \
+ replace-shape-movie-7.swf \
+ replace-shape-movie-7.swf.png \
+ replace-shape-shape-5.swf \
+ replace-shape-shape-5.swf.png \
+ replace-shape-shape-6.swf \
+ replace-shape-shape-6.swf.png \
+ replace-shape-shape-7.swf \
+ replace-shape-shape-7.swf.png
+
diff --git a/test/image/replace-button-button-5.swf b/test/image/replace-button-button-5.swf
new file mode 100644
index 0000000..f2557c7
Binary files /dev/null and b/test/image/replace-button-button-5.swf differ
diff --git a/test/image/replace-button-button-5.swf.png b/test/image/replace-button-button-5.swf.png
new file mode 100644
index 0000000..507438a
Binary files /dev/null and b/test/image/replace-button-button-5.swf.png differ
diff --git a/test/image/replace-button-button-6.swf b/test/image/replace-button-button-6.swf
new file mode 100644
index 0000000..ac95d36
Binary files /dev/null and b/test/image/replace-button-button-6.swf differ
diff --git a/test/image/replace-button-button-6.swf.png b/test/image/replace-button-button-6.swf.png
new file mode 100644
index 0000000..8a905b2
Binary files /dev/null and b/test/image/replace-button-button-6.swf.png differ
diff --git a/test/image/replace-button-button-7.swf b/test/image/replace-button-button-7.swf
new file mode 100644
index 0000000..bc2ddad
Binary files /dev/null and b/test/image/replace-button-button-7.swf differ
diff --git a/test/image/replace-button-button-7.swf.png b/test/image/replace-button-button-7.swf.png
new file mode 100644
index 0000000..a7b592c
Binary files /dev/null and b/test/image/replace-button-button-7.swf.png differ
diff --git a/test/image/replace-button-movie-5.swf b/test/image/replace-button-movie-5.swf
new file mode 100644
index 0000000..2f32b48
Binary files /dev/null and b/test/image/replace-button-movie-5.swf differ
diff --git a/test/image/replace-button-movie-5.swf.png b/test/image/replace-button-movie-5.swf.png
new file mode 100644
index 0000000..68403d5
Binary files /dev/null and b/test/image/replace-button-movie-5.swf.png differ
diff --git a/test/image/replace-button-movie-6.swf b/test/image/replace-button-movie-6.swf
new file mode 100644
index 0000000..c2235bc
Binary files /dev/null and b/test/image/replace-button-movie-6.swf differ
diff --git a/test/image/replace-button-movie-6.swf.png b/test/image/replace-button-movie-6.swf.png
new file mode 100644
index 0000000..01a6664
Binary files /dev/null and b/test/image/replace-button-movie-6.swf.png differ
diff --git a/test/image/replace-button-movie-7.swf b/test/image/replace-button-movie-7.swf
new file mode 100644
index 0000000..97b3070
Binary files /dev/null and b/test/image/replace-button-movie-7.swf differ
diff --git a/test/image/replace-button-movie-7.swf.png b/test/image/replace-button-movie-7.swf.png
new file mode 100644
index 0000000..0f6f8d6
Binary files /dev/null and b/test/image/replace-button-movie-7.swf.png differ
diff --git a/test/image/replace-button-shape-5.swf b/test/image/replace-button-shape-5.swf
new file mode 100644
index 0000000..113b334
Binary files /dev/null and b/test/image/replace-button-shape-5.swf differ
diff --git a/test/image/replace-button-shape-5.swf.png b/test/image/replace-button-shape-5.swf.png
new file mode 100644
index 0000000..d03145c
Binary files /dev/null and b/test/image/replace-button-shape-5.swf.png differ
diff --git a/test/image/replace-button-shape-6.swf b/test/image/replace-button-shape-6.swf
new file mode 100644
index 0000000..6d0b94b
Binary files /dev/null and b/test/image/replace-button-shape-6.swf differ
diff --git a/test/image/replace-button-shape-6.swf.png b/test/image/replace-button-shape-6.swf.png
new file mode 100644
index 0000000..6f3ca25
Binary files /dev/null and b/test/image/replace-button-shape-6.swf.png differ
diff --git a/test/image/replace-button-shape-7.swf b/test/image/replace-button-shape-7.swf
new file mode 100644
index 0000000..37bca94
Binary files /dev/null and b/test/image/replace-button-shape-7.swf differ
diff --git a/test/image/replace-button-shape-7.swf.png b/test/image/replace-button-shape-7.swf.png
new file mode 100644
index 0000000..f02b6ae
Binary files /dev/null and b/test/image/replace-button-shape-7.swf.png differ
diff --git a/test/image/replace-movie-button-5.swf b/test/image/replace-movie-button-5.swf
new file mode 100644
index 0000000..84dd98a
Binary files /dev/null and b/test/image/replace-movie-button-5.swf differ
diff --git a/test/image/replace-movie-button-5.swf.png b/test/image/replace-movie-button-5.swf.png
new file mode 100644
index 0000000..c9ca62b
Binary files /dev/null and b/test/image/replace-movie-button-5.swf.png differ
diff --git a/test/image/replace-movie-button-6.swf b/test/image/replace-movie-button-6.swf
new file mode 100644
index 0000000..dc5e6d0
Binary files /dev/null and b/test/image/replace-movie-button-6.swf differ
diff --git a/test/image/replace-movie-button-6.swf.png b/test/image/replace-movie-button-6.swf.png
new file mode 100644
index 0000000..62039f8
Binary files /dev/null and b/test/image/replace-movie-button-6.swf.png differ
diff --git a/test/image/replace-movie-button-7.swf b/test/image/replace-movie-button-7.swf
new file mode 100644
index 0000000..3f8c747
Binary files /dev/null and b/test/image/replace-movie-button-7.swf differ
diff --git a/test/image/replace-movie-button-7.swf.png b/test/image/replace-movie-button-7.swf.png
new file mode 100644
index 0000000..42877d7
Binary files /dev/null and b/test/image/replace-movie-button-7.swf.png differ
diff --git a/test/image/replace-movie-movie-5.swf b/test/image/replace-movie-movie-5.swf
new file mode 100644
index 0000000..a5fff36
Binary files /dev/null and b/test/image/replace-movie-movie-5.swf differ
diff --git a/test/image/replace-movie-movie-5.swf.png b/test/image/replace-movie-movie-5.swf.png
new file mode 100644
index 0000000..b85137f
Binary files /dev/null and b/test/image/replace-movie-movie-5.swf.png differ
diff --git a/test/image/replace-movie-movie-6.swf b/test/image/replace-movie-movie-6.swf
new file mode 100644
index 0000000..eab5722
Binary files /dev/null and b/test/image/replace-movie-movie-6.swf differ
diff --git a/test/image/replace-movie-movie-6.swf.png b/test/image/replace-movie-movie-6.swf.png
new file mode 100644
index 0000000..0e31805
Binary files /dev/null and b/test/image/replace-movie-movie-6.swf.png differ
diff --git a/test/image/replace-movie-movie-7.swf b/test/image/replace-movie-movie-7.swf
new file mode 100644
index 0000000..d9986f4
Binary files /dev/null and b/test/image/replace-movie-movie-7.swf differ
diff --git a/test/image/replace-movie-movie-7.swf.png b/test/image/replace-movie-movie-7.swf.png
new file mode 100644
index 0000000..94c0c3d
Binary files /dev/null and b/test/image/replace-movie-movie-7.swf.png differ
diff --git a/test/image/replace-movie-shape-5.swf b/test/image/replace-movie-shape-5.swf
new file mode 100644
index 0000000..0f9593b
Binary files /dev/null and b/test/image/replace-movie-shape-5.swf differ
diff --git a/test/image/replace-movie-shape-5.swf.png b/test/image/replace-movie-shape-5.swf.png
new file mode 100644
index 0000000..409719e
Binary files /dev/null and b/test/image/replace-movie-shape-5.swf.png differ
diff --git a/test/image/replace-movie-shape-6.swf b/test/image/replace-movie-shape-6.swf
new file mode 100644
index 0000000..92d414f
Binary files /dev/null and b/test/image/replace-movie-shape-6.swf differ
diff --git a/test/image/replace-movie-shape-6.swf.png b/test/image/replace-movie-shape-6.swf.png
new file mode 100644
index 0000000..c0b879b
Binary files /dev/null and b/test/image/replace-movie-shape-6.swf.png differ
diff --git a/test/image/replace-movie-shape-7.swf b/test/image/replace-movie-shape-7.swf
new file mode 100644
index 0000000..834ef3f
Binary files /dev/null and b/test/image/replace-movie-shape-7.swf differ
diff --git a/test/image/replace-movie-shape-7.swf.png b/test/image/replace-movie-shape-7.swf.png
new file mode 100644
index 0000000..fa0e694
Binary files /dev/null and b/test/image/replace-movie-shape-7.swf.png differ
diff --git a/test/image/replace-shape-button-5.swf b/test/image/replace-shape-button-5.swf
new file mode 100644
index 0000000..f6f2343
Binary files /dev/null and b/test/image/replace-shape-button-5.swf differ
diff --git a/test/image/replace-shape-button-5.swf.png b/test/image/replace-shape-button-5.swf.png
new file mode 100644
index 0000000..3a7dc3c
Binary files /dev/null and b/test/image/replace-shape-button-5.swf.png differ
diff --git a/test/image/replace-shape-button-6.swf b/test/image/replace-shape-button-6.swf
new file mode 100644
index 0000000..9d0c074
Binary files /dev/null and b/test/image/replace-shape-button-6.swf differ
diff --git a/test/image/replace-shape-button-6.swf.png b/test/image/replace-shape-button-6.swf.png
new file mode 100644
index 0000000..1df3eec
Binary files /dev/null and b/test/image/replace-shape-button-6.swf.png differ
diff --git a/test/image/replace-shape-button-7.swf b/test/image/replace-shape-button-7.swf
new file mode 100644
index 0000000..e2f3a27
Binary files /dev/null and b/test/image/replace-shape-button-7.swf differ
diff --git a/test/image/replace-shape-button-7.swf.png b/test/image/replace-shape-button-7.swf.png
new file mode 100644
index 0000000..e9a51cd
Binary files /dev/null and b/test/image/replace-shape-button-7.swf.png differ
diff --git a/test/image/replace-shape-movie-5.swf b/test/image/replace-shape-movie-5.swf
new file mode 100644
index 0000000..b36290a
Binary files /dev/null and b/test/image/replace-shape-movie-5.swf differ
diff --git a/test/image/replace-shape-movie-5.swf.png b/test/image/replace-shape-movie-5.swf.png
new file mode 100644
index 0000000..71a617b
Binary files /dev/null and b/test/image/replace-shape-movie-5.swf.png differ
diff --git a/test/image/replace-shape-movie-6.swf b/test/image/replace-shape-movie-6.swf
new file mode 100644
index 0000000..898fc86
Binary files /dev/null and b/test/image/replace-shape-movie-6.swf differ
diff --git a/test/image/replace-shape-movie-6.swf.png b/test/image/replace-shape-movie-6.swf.png
new file mode 100644
index 0000000..55080a6
Binary files /dev/null and b/test/image/replace-shape-movie-6.swf.png differ
diff --git a/test/image/replace-shape-movie-7.swf b/test/image/replace-shape-movie-7.swf
new file mode 100644
index 0000000..6d6d4c0
Binary files /dev/null and b/test/image/replace-shape-movie-7.swf differ
diff --git a/test/image/replace-shape-movie-7.swf.png b/test/image/replace-shape-movie-7.swf.png
new file mode 100644
index 0000000..8dfc3ce
Binary files /dev/null and b/test/image/replace-shape-movie-7.swf.png differ
diff --git a/test/image/replace-shape-shape-5.swf b/test/image/replace-shape-shape-5.swf
new file mode 100644
index 0000000..2980e87
Binary files /dev/null and b/test/image/replace-shape-shape-5.swf differ
diff --git a/test/image/replace-shape-shape-5.swf.png b/test/image/replace-shape-shape-5.swf.png
new file mode 100644
index 0000000..1e3d9e2
Binary files /dev/null and b/test/image/replace-shape-shape-5.swf.png differ
diff --git a/test/image/replace-shape-shape-6.swf b/test/image/replace-shape-shape-6.swf
new file mode 100644
index 0000000..64a29d2
Binary files /dev/null and b/test/image/replace-shape-shape-6.swf differ
diff --git a/test/image/replace-shape-shape-6.swf.png b/test/image/replace-shape-shape-6.swf.png
new file mode 100644
index 0000000..8a65619
Binary files /dev/null and b/test/image/replace-shape-shape-6.swf.png differ
diff --git a/test/image/replace-shape-shape-7.swf b/test/image/replace-shape-shape-7.swf
new file mode 100644
index 0000000..69de816
Binary files /dev/null and b/test/image/replace-shape-shape-7.swf differ
diff --git a/test/image/replace-shape-shape-7.swf.png b/test/image/replace-shape-shape-7.swf.png
new file mode 100644
index 0000000..845289d
Binary files /dev/null and b/test/image/replace-shape-shape-7.swf.png differ
diff --git a/test/image/replace.c b/test/image/replace.c
new file mode 100644
index 0000000..92c98d7
--- /dev/null
+++ b/test/image/replace.c
@@ -0,0 +1,116 @@
+/* gcc `pkg-config --libs --cflags libming glib-2.0` replace.c -o replace && ./replace
+ */
+
+#include <ming.h>
+#include <glib.h>
+
+typedef enum {
+ SHAPE,
+ MOVIE,
+ BUTTON,
+ N_TYPES
+} Type;
+
+char *types[] = {
+ "shape",
+ "movie",
+ "button",
+};
+
+static SWFDisplayItem
+add_rectangle (SWFMovie movie, Type type, int r, int g, int b)
+{
+ SWFShape shape;
+ SWFFillStyle fill;
+ SWFDisplayItem item;
+
+ shape = newSWFShape ();
+ fill = SWFShape_addSolidFillStyle (shape, r, g, b, 255);
+ SWFShape_setRightFillStyle (shape, fill);
+ SWFShape_drawLineTo (shape, 50, 0);
+ SWFShape_drawLineTo (shape, 50, 50);
+ SWFShape_drawLineTo (shape, 0, 50);
+ SWFShape_drawLineTo (shape, 0, 0);
+
+ switch (type) {
+ case SHAPE:
+ item = SWFMovie_add (movie, (SWFBlock) shape);
+ break;
+ case MOVIE:
+ {
+ SWFMovieClip clip;
+ clip = newSWFMovieClip ();
+ SWFMovieClip_add (clip, (SWFBlock) shape);
+ SWFMovieClip_nextFrame (clip);
+ item = SWFMovie_add (movie, (SWFBlock) clip);
+ }
+ break;
+ case BUTTON:
+ {
+ SWFButton button;
+ button = newSWFButton ();
+ SWFButton_addCharacter (button, (SWFCharacter) shape, 0xF);
+ item = SWFMovie_add (movie, (SWFBlock) button);
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ SWFDisplayItem_setDepth (item, 1);
+ return item;
+}
+
+static void
+modify_placement (SWFMovie movie, Type t1, Type t2)
+{
+ SWFDisplayItem item;
+
+ add_rectangle (movie, t1, 255, 0, 0);
+ SWFMovie_nextFrame (movie);
+ item = add_rectangle (movie, t2, 0, 0, 255);
+ SWFDisplayItem_setMove (item);
+ SWFMovie_nextFrame (movie);
+}
+
+static void
+do_movie (int version)
+{
+ SWFMovie movie;
+ char *real_name;
+ Type t1, t2;
+
+ for (t1 = 0; t1 < N_TYPES; t1++) {
+ for (t2 = 0; t2 < N_TYPES; t2++) {
+ movie = newSWFMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ modify_placement (movie, t1, t2);
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (""
+ "stop ();"
+ ));
+ SWFMovie_nextFrame (movie);
+
+ real_name = g_strdup_printf ("replace-%s-%s-%d.swf", types[t1], types[t2], version);
+ SWFMovie_save (movie, real_name);
+ g_free (real_name);
+ }
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ int i;
+
+ if (Ming_init ())
+ return 1;
+
+ for (i = 5; i < 8; i++)
+ do_movie (i);
+
+ return 0;
+}
diff-tree 76539ac3adffb3888da86d513deac7aee3cf8611 (from 04c26849608a5a5728ef1873661349e6903c6956)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 11:55:13 2007 +0200
merge graphics when merging compatible movies.
I don't like the fix at all, it's not clean. But it seems to work for now.
diff --git a/libswfdec/swfdec_sprite_movie.c b/libswfdec/swfdec_sprite_movie.c
index cbbc8b7..5e96105 100644
--- a/libswfdec/swfdec_sprite_movie.c
+++ b/libswfdec/swfdec_sprite_movie.c
@@ -28,6 +28,7 @@
#include "swfdec_audio_event.h"
#include "swfdec_audio_stream.h"
#include "swfdec_debug.h"
+#include "swfdec_graphic_movie.h"
#include "swfdec_player_internal.h"
#include "swfdec_ringbuffer.h"
#include "swfdec_script.h"
@@ -423,6 +424,12 @@ swfdec_sprite_movie_goto (SwfdecMovie *m
if (cur->depth == prev->depth &&
swfdec_movie_is_compatible (prev, cur)) {
walk->data = prev;
+ /* FIXME: This merging stuff probably needs to be improved a _lot_ */
+ if (SWFDEC_IS_GRAPHIC_MOVIE (cur)) {
+ SwfdecMovieClass *klass = SWFDEC_MOVIE_GET_CLASS (prev);
+ if (klass->replace)
+ klass->replace (prev, SWFDEC_GRAPHIC_MOVIE (cur)->graphic);
+ }
swfdec_movie_set_static_properties (prev, &cur->original_transform,
&cur->original_ctrans, cur->original_ratio, cur->clip_depth, cur->events);
swfdec_movie_destroy (cur);
diff-tree 04c26849608a5a5728ef1873661349e6903c6956 (from 5a91029f4be976e4ceed5d68fd947b071a57215c)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 11:54:29 2007 +0200
another debugging g_print needs to die
diff --git a/libswfdec/swfdec_graphic_movie.c b/libswfdec/swfdec_graphic_movie.c
index 4a1dfee..0a12385 100644
--- a/libswfdec/swfdec_graphic_movie.c
+++ b/libswfdec/swfdec_graphic_movie.c
@@ -76,7 +76,7 @@ swfdec_graphic_movie_replace (SwfdecMovi
SWFDEC_FIXME ("Can we replace with %s objects?", G_OBJECT_TYPE_NAME (graphic));
return;
}
- g_print ("replacing %u with %u\n", SWFDEC_CHARACTER (gmovie->graphic)->id,
+ SWFDEC_LOG ("replacing %u with %u", SWFDEC_CHARACTER (gmovie->graphic)->id,
SWFDEC_CHARACTER (graphic)->id);
swfdec_movie_invalidate (movie);
g_object_unref (gmovie->graphic);
diff-tree 5a91029f4be976e4ceed5d68fd947b071a57215c (from 876683f706f6b1ec352f7c4676ce0254b67bba46)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 11:50:12 2007 +0200
No special case here for Flash 6.
I need to work on my test file creators.
diff --git a/libswfdec/swfdec_graphic_movie.c b/libswfdec/swfdec_graphic_movie.c
index b3cfd73..4a1dfee 100644
--- a/libswfdec/swfdec_graphic_movie.c
+++ b/libswfdec/swfdec_graphic_movie.c
@@ -66,9 +66,7 @@ swfdec_graphic_movie_replace (SwfdecMovi
if (SWFDEC_IS_SHAPE (graphic) ||
SWFDEC_IS_TEXT (graphic)) {
- /* wtf? */
- if (SWFDEC_SWF_DECODER (movie->swf->decoder)->version == 6)
- return;
+ /* nothing to do here, please move along */
} else if (SWFDEC_IS_SPRITE (graphic) ||
SWFDEC_IS_BUTTON (graphic) ||
SWFDEC_IS_EDIT_TEXT (graphic)) {
@@ -78,6 +76,8 @@ swfdec_graphic_movie_replace (SwfdecMovi
SWFDEC_FIXME ("Can we replace with %s objects?", G_OBJECT_TYPE_NAME (graphic));
return;
}
+ g_print ("replacing %u with %u\n", SWFDEC_CHARACTER (gmovie->graphic)->id,
+ SWFDEC_CHARACTER (graphic)->id);
swfdec_movie_invalidate (movie);
g_object_unref (gmovie->graphic);
gmovie->graphic = g_object_ref (graphic);
diff-tree 876683f706f6b1ec352f7c4676ce0254b67bba46 (from 255d2e184bae07fbcd9db8a906450a21e0f687c7)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 11:49:34 2007 +0200
remove debugging g_print
diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c
index c66d5be..1b09906 100644
--- a/libswfdec/swfdec_movie.c
+++ b/libswfdec/swfdec_movie.c
@@ -331,7 +331,6 @@ swfdec_movie_destroy (SwfdecMovie *movie
klass->finish_movie (movie);
player->movies = g_list_remove (player->movies, movie);
movie->state = SWFDEC_MOVIE_STATE_DESTROYED;
- g_print ("destroying movie %p %s\n", movie, movie->name);
g_object_unref (movie);
}
@@ -937,8 +936,6 @@ swfdec_movie_new (SwfdecPlayer *player,
/* emit the new-movie signal */
if (SWFDEC_IS_DEBUGGER (player))
g_signal_emit_by_name (player, "movie-added", movie);
- g_print ("new movie %p %s for %p %s @ %u\n", movie, movie->name, parent,
- parent ? parent->name : "", movie->depth);
return movie;
}
More information about the Swfdec
mailing list