Displaying 5 results from an estimated 5 matches for "g_get_current_time".
2007 May 20
0
Branch 'as' - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_player.c
...f-tree 210bee663edb435f5f15cd5e8e9649faecd982d9 (from 91444350cb32843ed2aa0ea386df0ba983a7aec6)
Author: Benjamin Otte <otte at gnome.org>
Date: Sun May 20 21:51:40 2007 +0200
implement GetTime and functionality to get the "current" time
I want to be able to overwrite g_get_current_time() on a per-player basis to
allow stuff such as faster or slower playback. So the context has a vfunc for
getting the time.
diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c
index 9f07f55..1bca426 100644
--- a/libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h 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_as_context_init (SwfdecAsContext
g_hash_table_insert (context->strings, (char *) s + 1, (char *) s);
}
g_assert (*s == 0);
- context->global = swfdec_as_object_new (context);
+ context->global = swfdec_as_object_new_empty (context);
context->rand = g_rand_new ();
g_get_current_time (&context->start_time);
}
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index 48e71b3..22e65b1 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -119,7 +119,7 @@ swfdec_as_function_init_context (SwfdecA
SWFDEC_AS_VALUE_SET_...
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
...context_give_string (SwfdecAsC
return ret;
}
-SwfdecAsContext *
-swfdec_as_context_new (void)
-{
- return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL);
-}
-
/**
* swfdec_as_context_get_time:
* @context: a #SwfdecAsContext
@@ -511,6 +550,18 @@ swfdec_as_context_get_time (SwfdecAsCont
g_get_current_time (tv);
}
+/**
+ * swfdec_as_context_run:
+ * @context: a #SwfdecAsContext
+ *
+ * Continues running the script engine. Executing code in this engine works
+ * in 2 steps: First, you push the frame to be executed onto the stack, then
+ * you call this function to execute it. So this function is th...
2007 Mar 27
0
15 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/.gitignore libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h
...*) g_source_new (&swfdec_iterate_funcs,
+ sizeof (SwfdecIterateSource));
+ source->player = g_object_ref (player);
+ source->speed = 1.0 / speed;
+ source->notify = g_signal_connect (player, "advance",
+ G_CALLBACK (swfdec_iterate_source_advance_cb), source);
+ g_get_current_time (&source->last);
+
+ return (GSource *) source;
+}
+
+guint
+swfdec_iterate_add (SwfdecPlayer *player)
+{
+ GSource *source;
+ guint id;
+
+ g_return_val_if_fail (SWFDEC_IS_PLAYER (player), 0);
+
+ source = swfdec_iterate_source_new (player, 1.0);
+
+ id = g_source_attach (source,...
2008 Jan 21
0
70 commits - configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_socket.c libswfdec-gtk/swfdec_gtk_socket.h libswfdec-gtk/swfdec_playback_alsa.c
...dec/swfdec_as_context.c
@@ -561,7 +561,6 @@ swfdec_as_context_init (SwfdecAsContext *context)
g_hash_table_insert (context->strings, (char *) s + 1, (char *) s);
}
g_assert (*s == 0);
- context->global = swfdec_as_object_new_empty (context);
context->rand = g_rand_new ();
g_get_current_time (&context->start_time);
}
@@ -779,6 +778,7 @@ swfdec_as_context_run (SwfdecAsContext *context)
gboolean check_block; /* some opcodes avoid a scope check */
g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
+
if (context->frame == NULL || context->state == SWFDEC_AS_CONTEXT...