Displaying 20 results from an estimated 88 matches for "swfdecswfdecoder".
2007 Jun 15
0
Branch 'as' - 5 commits - libswfdec/swfdec_as_native_function.c libswfdec/swfdec_edittext.c libswfdec/swfdec_edittext.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_morphshape.h
...for the sprite handling rework.
diff --git a/libswfdec/swfdec_edittext.c b/libswfdec/swfdec_edittext.c
index 9d12274..ed641e8 100644
--- a/libswfdec/swfdec_edittext.c
+++ b/libswfdec/swfdec_edittext.c
@@ -83,7 +83,7 @@ swfdec_edit_text_init (SwfdecEditText *
}
int
-tag_func_define_edit_text (SwfdecSwfDecoder * s)
+tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
{
SwfdecEditText *text;
guint id;
diff --git a/libswfdec/swfdec_edittext.h b/libswfdec/swfdec_edittext.h
index 0bf5c27..be38c4d 100644
--- a/libswfdec/swfdec_edittext.h
+++ b/libswfdec/swfdec_edittext.h
@@ -77,7 +77,8 @@ struc...
2007 Apr 16
0
7 commits - libswfdec/swfdec_codec_gst.c libswfdec/swfdec_font.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_shape.c libswfdec/swfdec_shape.h libswfdec/swfdec_sprite.c
...shape_get_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse);
swfdec_bits_syncbits (&s->b);
if (swfdec_bits_skip_bytes (&save_bits, size) != size) {
SWFDEC_ERROR ("invalid offset value, not enough bytes available");
@@ -336,7 +336,7 @@ tag_func_define_font_2 (SwfdecSwfDecoder
shape->n_line_bits = swfdec_bits_getbits (&s->b, 4);
SWFDEC_LOG ("n_line_bits = %d", shape->n_line_bits);
- swfdec_shape_get_recs (s, shape);
+ swfdec_shape_get_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse);
}
if (wide_codes) {
swfdec...
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
...*/
gboolean bgcolor_set; /* TRUE if the background color has been set */
diff --git a/libswfdec/swfdec_swf_decoder.c b/libswfdec/swfdec_swf_decoder.c
index 97f6965..f8a34b1 100644
--- a/libswfdec/swfdec_swf_decoder.c
+++ b/libswfdec/swfdec_swf_decoder.c
@@ -194,9 +194,11 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
swfdec_bits_get_rect (&s->b, &rect);
if (rect.x0 != 0.0 || rect.y0 != 0.0)
- SWFDEC_ERROR ("SWF window doesn't start at 0 0 but at %g %g\n", rect.x0, rect.y0);
- dec->width = ceil (rect.x1 / SWFDEC_TWIPS_SCALE_FACTOR);
- dec->height = ceil (rect.y1 /...
2007 Jun 06
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_root_sprite.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h libswfdec/swfdec_tag.c
...tions(+), 255 deletions(-)
New commits:
diff-tree d06b5d5094832befb740170c297bd3861fc7068c (from bf3f17bb8f8aa3d5a9cf4d4121e77efc2c1f048c)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 6 17:29:39 2007 +0200
get rid of the root sprite and put the relevant information into the SwfdecSwfDecoder
diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am
index 68350fc..5d8a92a 100644
--- a/libswfdec/Makefile.am
+++ b/libswfdec/Makefile.am
@@ -98,7 +98,6 @@ libswfdec_ at SWFDEC_MAJORMINOR@_la_SOURCES
swfdec_rect.c \
swfdec_ringbuffer.c \
swfdec_root_movie.c \
- swfdec_root_sprite.c \...
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...efine SWFDEC_TEXT_SCALE_FACTOR (1024.0)
-
typedef struct _SwfdecBits SwfdecBits;
struct _SwfdecBits
diff --git a/libswfdec/swfdec_font.c b/libswfdec/swfdec_font.c
index d70a881..ac64c22 100644
--- a/libswfdec/swfdec_font.c
+++ b/libswfdec/swfdec_font.c
@@ -206,6 +206,7 @@ tag_func_define_font (SwfdecSwfDecoder *
font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT);
if (!font)
return SWFDEC_STATUS_OK;
+ font->scale_factor = SWFDEC_TEXT_SCALE_FACTOR;
offsets = s->b;
n_glyphs = swfdec_bits_get_u16 (&s->b);
@@ -234,16 +235,22 @@ tag_func_define_font (SwfdecSwf...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...;
- /* we trust the offsets here */
- s->b = save_bits;
+ if (swfdec_bits_left (&s->b)) {
+ SWFDEC_WARNING ("parsing shape didn't use %d bytes",
+ swfdec_bits_left (&s->b) / 8);
}
+ s->b = save_bits;
}
int
@@ -232,7 +229,7 @@ tag_func_define_font (SwfdecSwfDecoder *
g_array_set_size (font->glyphs, n_glyphs);
offset = swfdec_bits_get_u16 (&offsets);
- for (i = 0; i < n_glyphs; i++) {
+ for (i = 0; i < n_glyphs && swfdec_bits_left (&s->b); i++) {
SwfdecFontEntry *entry = &g_array_index (font->glyphs, SwfdecFont...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...007 +0200
break the ExportAssets loop if no more bytes are available
diff --git a/libswfdec/swfdec_root_sprite.c b/libswfdec/swfdec_root_sprite.c
index 7159927..41e8b31 100644
--- a/libswfdec/swfdec_root_sprite.c
+++ b/libswfdec/swfdec_root_sprite.c
@@ -117,7 +117,7 @@ tag_func_export_assets (SwfdecSwfDecoder
count = swfdec_bits_get_u16 (bits);
SWFDEC_LOG ("exporting %u assets", count);
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count && swfdec_bits_left (bits); i++) {
guint id;
SwfdecCharacter *object;
char *name;
diff-tree 4ecf6f08ab585cbf8089373...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...007 +0200
break the ExportAssets loop if no more bytes are available
diff --git a/libswfdec/swfdec_root_sprite.c b/libswfdec/swfdec_root_sprite.c
index 7159927..41e8b31 100644
--- a/libswfdec/swfdec_root_sprite.c
+++ b/libswfdec/swfdec_root_sprite.c
@@ -117,7 +117,7 @@ tag_func_export_assets (SwfdecSwfDecoder
count = swfdec_bits_get_u16 (bits);
SWFDEC_LOG ("exporting %u assets", count);
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count && swfdec_bits_left (bits); i++) {
guint id;
SwfdecCharacter *object;
char *name;
diff-tree 4ecf6f08ab585cbf8089373...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...dec_debug_set_level (guint level);
int swfdec_debug_get_level (void);
#endif
diff --git a/libswfdec/swfdec_edittext.c b/libswfdec/swfdec_edittext.c
index 37727eb..151feb2 100644
--- a/libswfdec/swfdec_edittext.c
+++ b/libswfdec/swfdec_edittext.c
@@ -97,7 +97,7 @@ int
tag_func_define_edit_text (SwfdecSwfDecoder * s)
{
SwfdecEditText *text;
- unsigned int id;
+ guint id;
int reserved, use_outlines;
gboolean has_font, has_color, has_max_length, has_layout, has_text;
SwfdecBits *b = &s->b;
@@ -154,7 +154,7 @@ tag_func_define_edit_text (SwfdecSwfDeco
text->max_length = swfdec_bit...
2007 Jun 18
0
Branch 'as' - 8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_sprite_movie.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h
...fer tuples
first.
- sprite->frames contents should stop exisiting. All its contents should be put into
sprite->actions instead. This is mainly pending on an overhaul of the audio handlers.
- SwfdecRootActions should probably be queued in sprite->actions instead of
SwfdecSwfDecoder.
diff --git a/libswfdec/swfdec_sprite.c b/libswfdec/swfdec_sprite.c
index 9786f3b..fb3b111 100644
--- a/libswfdec/swfdec_sprite.c
+++ b/libswfdec/swfdec_sprite.c
@@ -59,32 +59,18 @@ swfdec_sprite_dispose (GObject *object)
if (sprite->frames[i].sound_block) {
swfdec_buffer_unref...
2007 Feb 15
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_shape.c libswfdec/swfdec_tag.c
...e SwfdecBits which could cause crashes. This patch updates it to use the
"new" functions.
diff --git a/libswfdec/swfdec_tag.c b/libswfdec/swfdec_tag.c
index e7c8aa8..f4497f2 100644
--- a/libswfdec/swfdec_tag.c
+++ b/libswfdec/swfdec_tag.c
@@ -190,35 +190,30 @@ tag_func_define_text_2 (SwfdecSwfDecoder
int
tag_func_define_sprite (SwfdecSwfDecoder * s)
{
- SwfdecBits *bits = &s->b;
SwfdecBits parse;
int id;
SwfdecSprite *sprite;
int ret;
- SwfdecBits save_bits;
+ guint tag;
- save_bits = s->b;
+ parse = s->b;
- id = swfdec_bits_get_u16 (bits);
+ id = swfdec_b...
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
...15 files changed, 323 insertions(+), 170 deletions(-)
New commits:
diff-tree ca675ea7b69b11cbc58c1ee4ea94e95a50ef4a90 (from b83df26d3c0ff337c64e3108907b4b8f8f674805)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Mar 6 21:30:53 2007 +0100
update to list -> hash table change in SwfdecSwfDecoder
diff --git a/test/dump.c b/test/dump.c
index efddeee..e248729 100644
--- a/test/dump.c
+++ b/test/dump.c
@@ -317,43 +317,39 @@ dump_image (SwfdecImage *image)
}
static void
-dump_objects (SwfdecSwfDecoder *s)
+dump_object (gpointer key, gpointer value, gpointer unused)
{
- GList *g;
- Swfd...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...dec_debug_set_level (guint level);
int swfdec_debug_get_level (void);
#endif
diff --git a/libswfdec/swfdec_edittext.c b/libswfdec/swfdec_edittext.c
index 37727eb..151feb2 100644
--- a/libswfdec/swfdec_edittext.c
+++ b/libswfdec/swfdec_edittext.c
@@ -97,7 +97,7 @@ int
tag_func_define_edit_text (SwfdecSwfDecoder * s)
{
SwfdecEditText *text;
- unsigned int id;
+ guint id;
int reserved, use_outlines;
gboolean has_font, has_color, has_max_length, has_layout, has_text;
SwfdecBits *b = &s->b;
@@ -154,7 +154,7 @@ tag_func_define_edit_text (SwfdecSwfDeco
text->max_length = swfdec_bit...
2007 Mar 07
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
...de
s->characters = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, g_object_unref);
s->input_queue = swfdec_buffer_queue_new ();
- s->exports = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
-}
-
-gpointer
-swfdec_swf_decoder_get_export (SwfdecSwfDecoder * s, const char *name)
-{
- gpointer result;
-
- g_return_val_if_fail (SWFDEC_IS_SWF_DECODER (s), NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- result = g_hash_table_lookup (s->exports, name);
- return result;
}
gpointer
diff --git a/libswfdec/swfdec_swf_decoder.h b/libswfdec/...
2007 Mar 09
0
libswfdec/swfdec_root_sprite.c libswfdec/swfdec_root_sprite.h
...root->root_actions[sprite->parse_frame] =
+ g_array_new (FALSE, FALSE, sizeof (SwfdecSpriteAction));
+ array = root->root_actions[sprite->parse_frame];
+ }
+ action.type = type;
+ action.data = data;
+ g_array_append_val (array, action);
+}
+
+int
+tag_func_export_assets (SwfdecSwfDecoder * s)
+{
+ SwfdecBits *bits = &s->b;
+ unsigned int count, i;
+
+ count = swfdec_bits_get_u16 (bits);
+ SWFDEC_LOG ("exporting %u assets", count);
+ for (i = 0; i < count; i++) {
+ guint id;
+ SwfdecCharacter *object;
+ char *name;
+ id = swfdec_bits_get_u16 (bit...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...ayer * player,
SwfdecMovie * drag,
diff --git a/libswfdec/swfdec_resource.c b/libswfdec/swfdec_resource.c
index 7e953d5..7d4eb27 100644
--- a/libswfdec/swfdec_resource.c
+++ b/libswfdec/swfdec_resource.c
@@ -78,6 +78,8 @@ swfdec_resource_loader_target_image (SwfdecResource *instance)
SwfdecSwfDecoder *dec = SWFDEC_SWF_DECODER (instance->decoder);
movie->sprite = dec->main_sprite;
+ g_assert (movie->sprite->parse_frame > 0);
+ movie->n_frames = movie->sprite->n_frames;
swfdec_movie_invalidate (SWFDEC_MOVIE (movie));
swfdec_resource_check_rights (...
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...19:28:22 2007 +0200
Previous way of reading sound envelopes was still somewhat off, fixed
diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c
index 0e7f831..3e9da94 100644
--- a/libswfdec/swfdec_sound.c
+++ b/libswfdec/swfdec_sound.c
@@ -303,8 +303,7 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
int has_loops;
int has_out_point;
int has_in_point;
- guint i, j, n_envelopes;
- GArray *envelopes;
+ guint i, j;
SwfdecSound *sound;
SwfdecSoundChunk *chunk;
@@ -352,47 +351,29 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)...
2007 Aug 13
0
2 commits - libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h
...d filter parsing (better: ignoring) for buttons
diff --git a/libswfdec/swfdec_tag.c b/libswfdec/swfdec_tag.c
index a556e19..ef1db99 100644
--- a/libswfdec/swfdec_tag.c
+++ b/libswfdec/swfdec_tag.c
@@ -387,43 +387,56 @@ swfdec_button_append_content (SwfdecButt
static int
tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag)
{
- SwfdecBits *bits = &s->b;
- int id;
- int flags;
- int offset;
+ SwfdecBits bits;
+ int id, reserved;
+ guint length;
SwfdecButton *button;
char *script_name;
- id = swfdec_bits_get_u16 (bits);
+ id = swfdec_bits_get_u16 (&s->b);
button = swfde...
2007 Apr 20
0
8 commits - libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_root_sprite.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c NEWS test/parse.c
...= SWFDEC_STATE_EOF;
+ SWFDEC_ERROR ("data after last frame");
}
if (tag == 0) {
diff --git a/libswfdec/swfdec_tag.c b/libswfdec/swfdec_tag.c
index 0d0eeb8..6000d45 100644
--- a/libswfdec/swfdec_tag.c
+++ b/libswfdec/swfdec_tag.c
@@ -195,7 +195,7 @@ tag_func_define_sprite (SwfdecSwfDecoder
int id;
SwfdecSprite *sprite;
int ret;
- guint tag;
+ guint tag = 1;
parse = s->b;
@@ -209,7 +209,7 @@ tag_func_define_sprite (SwfdecSwfDecoder
swfdec_sprite_set_n_frames (sprite, swfdec_bits_get_u16 (&parse), SWFDEC_DECODER (s)->rate);
s->parse_sprite = sprit...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...p;z, Z_SYNC_FLUSH);
if (ret != Z_STREAM_END) {
SWFDEC_WARNING ("lossless: ret == %d", ret);
}
+ inflateEnd (&z);
- if (plen)
- (*plen) = z->total_out;
-
- inflateEnd (z);
-
- g_free (z);
return data;
}
@@ -278,11 +262,8 @@ int
tag_func_define_bits_jpeg_3 (SwfdecSwfDecoder * s)
{
SwfdecBits *bits = &s->b;
- int id;
+ guint id;
SwfdecImage *image;
- unsigned char *endptr;
-
- endptr = bits->ptr + bits->buffer->length;
id = swfdec_bits_get_u16 (bits);
SWFDEC_LOG (" id = %d", id);
@@ -292,9 +273,7 @@ tag_func_define_bits_jpe...