[Swfdec-commits] 2 commits - swfdec/swfdec_as_interpret.c test/trace
Pekka Lampila
medar at kemper.freedesktop.org
Thu Apr 24 05:09:55 PDT 2008
swfdec/swfdec_as_interpret.c | 2
test/trace/Makefile.am | 6 ++
test/trace/nextframe-stop.swf |binary
test/trace/nextframe-stop.swf.trace | 3 +
test/trace/nextframe-stop.xml | 74 ++++++++++++++++++++++++++++++++
test/trace/previousframe-stop.swf |binary
test/trace/previousframe-stop.swf.trace | 5 ++
test/trace/previousframe-stop.xml | 74 ++++++++++++++++++++++++++++++++
8 files changed, 164 insertions(+)
New commits:
commit 667caad213215187f7d10cf619abe7b2c745f4c2
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Thu Apr 24 15:03:12 2008 +0300
Also stop after prevFrame. Add a test case for that too
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 0c6bf8b..1121270 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -101,6 +101,7 @@ swfdec_action_previous_frame (SwfdecAsContext *cx, guint action, const guint8 *d
SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target);
if (movie->frame > 1) {
swfdec_sprite_movie_goto (movie, movie->frame - 1);
+ movie->playing = FALSE;
} else {
SWFDEC_INFO ("can't execute previousFrame, already at first frame");
}
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 40d963f..49e1d39 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -2229,6 +2229,9 @@ EXTRA_DIST = \
point-properties-8.swf.trace \
preload.swf \
preload.swf.trace \
+ previousframe-stop.xml \
+ previousframe-stop.swf \
+ previousframe-stop.swf.trace \
print-job-init.as \
print-job-init-5.swf \
print-job-init-5.swf.trace \
diff --git a/test/trace/previousframe-stop.swf b/test/trace/previousframe-stop.swf
new file mode 100644
index 0000000..216939b
Binary files /dev/null and b/test/trace/previousframe-stop.swf differ
diff --git a/test/trace/previousframe-stop.swf.trace b/test/trace/previousframe-stop.swf.trace
new file mode 100644
index 0000000..e83be5c
--- /dev/null
+++ b/test/trace/previousframe-stop.swf.trace
@@ -0,0 +1,5 @@
+1
+2
+3
+2
+2
diff --git a/test/trace/previousframe-stop.xml b/test/trace/previousframe-stop.xml
new file mode 100644
index 0000000..38a754b
--- /dev/null
+++ b/test/trace/previousframe-stop.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<swf version="8" compressed="1">
+ <Header framerate="15" frames="3">
+ <size>
+ <Rectangle left="0" right="2000" top="0" bottom="3000"/>
+ </size>
+ <tags>
+ <FileAttributes hasMetaData="0" useNetwork="0"/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <PreviousFrame/>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <End/>
+ </tags>
+ </Header>
+</swf>
commit bd5aab3eef5aa526f5b779268b5c07b83a7ff71c
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Thu Apr 24 14:56:51 2008 +0300
Make nextFrame stop the movie. Add a test case
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 12e30e8..0c6bf8b 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -85,6 +85,7 @@ swfdec_action_next_frame (SwfdecAsContext *cx, guint action, const guint8 *data,
SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target);
if (movie->frame < movie->n_frames) {
swfdec_sprite_movie_goto (movie, movie->frame + 1);
+ movie->playing = FALSE;
} else {
SWFDEC_INFO ("can't execute nextFrame, already at last frame");
}
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 2628d50..40d963f 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -1865,6 +1865,9 @@ EXTRA_DIST = \
newobject-paths-7.swf.trace \
newobject-paths-8.swf \
newobject-paths-8.swf.trace \
+ nextframe-stop.xml \
+ nextframe-stop.swf \
+ nextframe-stop.swf.trace \
number.swf \
number.swf.trace \
number-properties.as \
diff --git a/test/trace/nextframe-stop.swf b/test/trace/nextframe-stop.swf
new file mode 100644
index 0000000..460647a
Binary files /dev/null and b/test/trace/nextframe-stop.swf differ
diff --git a/test/trace/nextframe-stop.swf.trace b/test/trace/nextframe-stop.swf.trace
new file mode 100644
index 0000000..2ca3cd5
--- /dev/null
+++ b/test/trace/nextframe-stop.swf.trace
@@ -0,0 +1,3 @@
+1
+2
+2
diff --git a/test/trace/nextframe-stop.xml b/test/trace/nextframe-stop.xml
new file mode 100644
index 0000000..0951bde
--- /dev/null
+++ b/test/trace/nextframe-stop.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<swf version="8" compressed="1">
+ <Header framerate="15" frames="3">
+ <size>
+ <Rectangle left="0" right="2000" top="0" bottom="3000"/>
+ </size>
+ <tags>
+ <FileAttributes hasMetaData="0" useNetwork="0"/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <NextFrame/>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <DoAction>
+ <actions>
+ <Dictionary>
+ <strings>
+ <String value="_currentframe"/>
+ </strings>
+ </Dictionary>
+ <PushData>
+ <items>
+ <StackDictionaryLookup index="0"/>
+ </items>
+ </PushData>
+ <GetVariable/>
+ <Trace/>
+ <EndAction/>
+ </actions>
+ </DoAction>
+ <ShowFrame/>
+ <End/>
+ </tags>
+ </Header>
+</swf>
More information about the Swfdec-commits
mailing list