Displaying 20 results from an estimated 34 matches for "gconstpointer".
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...c
@@ -30,12 +30,13 @@
#include <libswfdec/swfdec_tag.h>
#include "swfedit_tag.h"
#include "swfdec_out.h"
+#include "swfedit_file.h"
#include "swfedit_list.h"
/*** LOAD/SAVE ***/
static void
-swfedit_object_write (gpointer data, SwfdecOut *out, gconstpointer hint)
+swfedit_object_write (SwfeditToken *token, gpointer data, SwfdecOut *out, gconstpointer hint)
{
SwfdecBuffer *buffer;
@@ -46,19 +47,19 @@ swfedit_object_write (gpointer data, Swf
}
static gpointer
-swfedit_object_read (SwfdecBits *bits, gconstpointer hint)
+swfedit_object_read (Swf...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...N (c)) {
- dump_button (SWFDEC_BUTTON (c));
- }
- if (SWFDEC_IS_SOUND (c)) {
- dump_sound (SWFDEC_SOUND (c));
- }
-}
-
-static void
-enqueue (gpointer key, gpointer value, gpointer listp)
-{
- GList **list = listp;
-
- *list = g_list_prepend (*list, value);
-}
-
-static int
-sort_by_id (gconstpointer a, gconstpointer b)
-{
- if (SWFDEC_CHARACTER (a)->id < SWFDEC_CHARACTER (b)->id)
- return -1;
- return 1;
-}
-
-int
-main (int argc, char *argv[])
-{
- SwfdecSwfDecoder *s;
- SwfdecPlayer *player;
- GError *error = NULL;
- GOptionEntry options[] = {
- { "verbose", ...
2007 Feb 14
0
7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
...lude "libswfdec/swfdec_script.h"
+#include "swfdec_out.h"
+#include "swfedit_file.h"
+
+/* the stuff we look for */
+guint *add_trace = NULL;
+
+typedef gboolean ( *SwfeditTokenForeachFunc) (SwfeditToken *token, guint idx,
+ const char *name, SwfeditTokenType type, gconstpointer value, gpointer data);
+
+static gboolean
+swfedit_token_foreach (SwfeditToken *token, SwfeditTokenForeachFunc func,
+ gpointer data)
+{
+ SwfeditTokenEntry *entry;
+ guint i;
+
+ g_return_val_if_fail (SWFEDIT_IS_TOKEN (token), FALSE);
+ g_return_val_if_fail (func != NULL, FALSE);
+
+ for...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...r *buffer = swfdec_buffer_new ();
buffer->length = array->len;
@@ -97,7 +112,6 @@ swfedit_from_string_unsigned (const char
return FALSE;
if (u > max)
return FALSE;
- *result = GUINT_TO_POINTER ((guint) u);
return TRUE;
}
@@ -140,6 +154,63 @@ swfedit_rect_to_string (gconstpointer va
(int) rect->x1, (int) rect->y1);
}
+static gboolean
+swfedit_rgb_from_string (const char *s, gpointer* result)
+{
+ guint r, g, b;
+ if (strlen (s) != 6)
+ return FALSE;
+ if (!swfedit_parse_hex (s, &r))
+ return FALSE;
+ s += 2;
+ if (!swfedit_parse_hex (s, &g...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...test/swfedit_token.c
@@ -125,6 +125,21 @@ swfedit_to_string_unsigned (gconstpointe
return g_strdup_printf ("%u", GPOINTER_TO_UINT (value));
}
+static gboolean
+swfedit_rect_from_string (const char *s, gpointer* result)
+{
+ return FALSE;
+}
+
+static char *
+swfedit_rect_to_string (gconstpointer value)
+{
+ const SwfdecRect *rect = value;
+
+ return g_strdup_printf ("%d, %d, %d, %d", (int) rect->x0, (int) rect->y0,
+ (int) rect->x1, (int) rect->y1);
+}
+
struct {
gboolean (* from_string) (const char *s, gpointer *);
char * (* to_string) (gconstpointer va...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...wfdec_debugger.c
@@ -28,20 +28,36 @@
#include "swfdec_movie.h"
#include "swfdec_player_internal.h"
#include "js/jsdbgapi.h"
+#include "js/jsinterp.h" /* for frame->swf */
/*** SwfdecDebuggerScript ***/
+static gboolean
+swfdec_debugger_add_command (gconstpointer bytecode, guint action,
+ const guint8 *data, guint len, gpointer arrayp)
+{
+ SwfdecDebuggerCommand command;
+
+ command.code = bytecode;
+ command.breakpoint = 0;
+ command.description = swfdec_script_print_action (action, data, len);
+ g_array_append_val (arrayp, command);
+ return TRU...
2007 Aug 09
0
Branch 'vivi' - 12 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec/Makefile.am libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_debugger.c
...make swfdec_script_new take ownership of the passed in buffer
And document that behaviour
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index c207435..221e25c 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -199,15 +199,29 @@ validate_action (gconstpointer bytecode,
return TRUE;
}
+/**
+ * swfdec_script_new:
+ * @buffer: the #SwfdecBuffer containing the script. This function will take
+ * ownership of the passed in buffer.
+ * @name: name of the script for debugging purposes
+ * @version: Actionscript version to use in this script
+ *...
2007 Mar 13
0
4 commits - test/swfscript.c
...gcc, this variable can never be undefined, but it might be a bit hard for you to figure out why, so I've NULL'ed it for you.
diff --git a/test/swfscript.c b/test/swfscript.c
index 40d0e27..e53a3d9 100644
--- a/test/swfscript.c
+++ b/test/swfscript.c
@@ -108,7 +108,7 @@ fixup_jumps_foreach (gconstpointer bytec
GINT16_TO_LE (jump_offset - offset - 5);
}
if (action == 0x8a || action == 0x8d) {
- Action *cur;
+ Action *cur = NULL; /* silence gcc */
guint id = action == 0x8a ? 2 : 0;
guint i, count;
guint offset = (guint8 *) bytecode - state->script->buffer->d...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
...= swfdec_buffer_new ();
+ buffer->length = array->len;
+ buffer->data = array->data;
+ g_byte_array_free (array, FALSE);
+ *result = buffer;
+ return TRUE;
+ }
+ g_byte_array_free (array, TRUE);
+ return FALSE;
+}
+
+static char *
+swfedit_binary_to_string (gconstpointer value)
+{
+ guint i;
+ const SwfdecBuffer *buffer = value;
+ GString *string = g_string_new ("");
+
+ for (i = 0; i < buffer->length; i++) {
+ if (i && i % 4 == 0)
+ g_string_append_c (string, ' ');
+ g_string_append_printf (string, "%02X...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...mpile_jump },
- { 0x9a, "GetURL2", NULL },
- /* version 5 */
- { 0x9b, "DefineFunction", NULL },
- /* version 4 */
- { 0x9d, "If", compile_if },
- { 0x9e, "Call", NULL },
- { 0x9f, "GotoFrame2", compile_goto_frame2 }
-};
-
-int
-uint_compare (gconstpointer v1, gconstpointer v2)
-{
- return *((const unsigned int*) v1) - *((const unsigned int*) v2);
-}
-
-static const SwfdecActionSpec *
-swfdec_action_find (guint action)
-{
- return bsearch (&action, actions, G_N_ELEMENTS (actions),
- sizeof (SwfdecActionSpec), uint_compare);
-}
diff --git...
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...(SwfdecMovie * movie,
const char * url,
SwfdecLoaderRequest request,
SwfdecBuffer * data);
-void swfdec_movie_load (SwfdecMovie * movie,
- const char * url,
- SwfdecLoaderRequest request,
- SwfdecBuffer * data);
int swfdec_movie_compare_depths (gconstpointer a,
gconstpointer b);
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index fc43ef3..ace4c45 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -1573,6 +1573,8 @@ swfdec_player_invalidate (SwfdecPlayer *player, const SwfdecRect *rect)
* swfdec_pl...
2004 Sep 10
2
xmms plugin, fileinfo
...void save_cb(GtkWidget * w, gpointer data)
{
- gchar *text;
+}
- text = gtk_entry_get_text(entry);
- memset(tag, ' ', length);
- memcpy(tag, text, strlen(text) > length ? length : strlen(text));
+static void remove_cb(GtkWidget * w, gpointer data)
+{
}
-static gint genre_comp_func(gconstpointer a, gconstpointer b)
+static void show_tag()
{
- return strcasecmp(a, b);
+ FLAC_Plugin__CanonicalTag tag;
+
+ FLAC_plugin__canonical_tag_init(&tag);
+ FLAC_plugin__canonical_tag_get_combined(current_filename, &tag);
+
+ if(flac_cfg.title.convert_char_set) {
+ convert_from_file_to_user_in_...
2007 Jan 22
0
Branch 'interpreter' - 3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_swf_decoder.c test/Makefile.am test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_tag.c test/swfedit_tag.h test/swfedit_token.c test/swfedit_token.h
...cBuffer *buffer = swfdec_buffer_new ();
+ buffer->length = array->len;
+ buffer->data = array->data;
+ g_byte_array_free (array, FALSE);
+ *result = buffer;
+ return TRUE;
+ }
+ g_byte_array_free (array, TRUE);
+ return FALSE;
+}
+
+static char *
+swfedit_binary_write (gconstpointer value)
+{
+ guint i;
+ const SwfdecBuffer *buffer = value;
+ GString *string = g_string_new ("");
+
+ for (i = 0; i < buffer->length; i++) {
+ if (i && i % 4 == 0)
+ g_string_append_c (string, ' ');
+ g_string_append_printf (string, "%2X", bu...
2007 Oct 26
0
6 commits - configure.ac libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c player/swfplay.c
...s_intersect (caps, template_caps);
+
+ gst_caps_unref (template_caps);
+ if (gst_caps_is_empty (intersect)) {
+ gst_caps_unref (intersect);
+ } else {
+ gst_caps_unref (intersect);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static int
+swfdec_gst_compare_features (gconstpointer a_, gconstpointer b_)
+{
+ int diff;
+ GstPluginFeature *a = GST_PLUGIN_FEATURE (a_);
+ GstPluginFeature *b = GST_PLUGIN_FEATURE (b_);
- swfdec_gst_audio_unref (player, NULL);
+ diff = gst_plugin_feature_get_rank (b) - gst_plugin_feature_get_rank (a);
+ if (diff != 0)
+ return diff;
+
+...
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...}
+ break;
+ default:
+ SWFDEC_ERROR ("Push: type %u not implemented", type);
+ return JS_FALSE;
+ }
+ }
+ return g_string_free (string, FALSE);
+}
+
+/* NB: constant pool actions are special in that they are called at init time */
static gboolean
swfdec_debugger_add_command (gconstpointer bytecode, guint action,
- const guint8 *data, guint len, gpointer arrayp)
+ const guint8 *data, guint len, gpointer parserp)
{
+ ScriptParser *parser = parserp;
SwfdecDebuggerCommand command;
command.code = bytecode;
command.breakpoint = 0;
- command.description = swfdec_script...
2007 Feb 19
0
22 commits - libswfdec/js libswfdec/swfdec_debugger.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_script.c
...work - revert to old system
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 0b52aeb..0717ff5 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -101,20 +101,6 @@ swfdec_player_get_next_event_time (Swfde
}
}
-static int
-swfdec_timeout_compare (gconstpointer a, gconstpointer b)
-{
- const SwfdecTimeout *ta = a;
- const SwfdecTimeout *tb = b;
-
- /* FIXME: not overflow-safe */
- if (ta->timestamp < tb->timestamp)
- return -1;
- if (ta->timestamp > tb->timestamp)
- return 1;
- return 0;
-}
-
/**
* swfdec_player_add_timeou...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...} else {
+ char *ret = g_strdup_printf ("_level%u%s",
+ movie->depth + 16384, s->str);
+ g_string_free (s, TRUE);
+ return ret;
+ }
+ movie = movie->parent;
+ } while (TRUE);
+ g_assert_not_reached ();
+ return NULL;
+}
+
int
swfdec_movie_compare_depths (gconstpointer a, gconstpointer b)
{
diff --git a/libswfdec/swfdec_movie.h b/libswfdec/swfdec_movie.h
index 61f495c..0351b54 100644
--- a/libswfdec/swfdec_movie.h
+++ b/libswfdec/swfdec_movie.h
@@ -177,6 +177,7 @@ void swfdec_movie_send_mouse_change (Sw
SwfdecMovie * swfdec_movie_get_movie_at (SwfdecMovie * m...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...fdec/swfdec_script.c b/libswfdec/swfdec_script.c
index b34aba7..2dd36be 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -168,6 +168,13 @@ swfdec_script_foreach_internal (SwfdecBits *bits, SwfdecScriptForeachFunc func,
return TRUE;
}
+static gboolean
+validate_action (gconstpointer bytecode, guint action, const guint8 *data, guint len, gpointer scriptp)
+{
+ // TODO: get rid of this function
+ return TRUE;
+}
+
/*** PUBLIC API ***/
gboolean
@@ -230,9 +237,16 @@ swfdec_script_new_from_bits (SwfdecBits *bits, const char *name, guint version)
* DefineFunction and frien...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
..._PRELOAD_SUPER = (1 << 4),
+ SWFDEC_SCRIPT_SUPPRESS_SUPER = (1 << 5),
+ SWFDEC_SCRIPT_PRELOAD_ROOT = (1 << 6),
+ SWFDEC_SCRIPT_PRELOAD_PARENT = (1 << 7),
+ SWFDEC_SCRIPT_PRELOAD_GLOBAL = (1 << 8)
+} SwfdecScriptFlag;
+
typedef gboolean (* SwfdecScriptForeachFunc) (gconstpointer bytecode, guint action,
const guint8 *data, guint len, gpointer user_data);
@@ -41,6 +53,8 @@ struct _SwfdecScript {
gpointer debugger; /* debugger owning us or NULL */
/* needed by functions */
SwfdecBuffer * constant_pool; /* constant pool action */
+ guint flags; /* Swfd...
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...est *
+test_new (char *filename)
+{
+ Test *test;
+
+ test = g_slice_new0 (Test);
+ test->filename = filename;
+ return test;
+}
+
+static void
+test_free (Test *test)
+{
+ g_free (test->filename);
+ g_free (test->output);
+ g_slice_free (Test, test);
+}
+
+static int
+test_compare (gconstpointer a, gconstpointer b)
+{
+ const Test *ta = (const Test *) a;
+ const Test *tb = (const Test *) b;
+
+ return strcmp (ta->filename, tb->filename);
+}
+
static void
trace_cb (SwfdecPlayer *player, const char *message, GString *string)
{
@@ -41,8 +76,8 @@ fscommand_cb (SwfdecPlayer *player,...