search for: gtimeval

Displaying 15 results from an estimated 15 matches for "gtimeval".

Did you mean: timeval
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
...text->rand = g_rand_new (); + g_get_current_time (&context->start_time); } /*** STRINGS ***/ @@ -359,6 +360,30 @@ swfdec_as_context_new (void) return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } +/** + * swfdec_as_context_get_time: + * @context: a #SwfdecAsContext + * @tv: a #GTimeVal to be set to the context's time + * + * This function queries the time to be used inside this context. By default, + * this is the same as g_get_current_time(), but it may be overwriten to allow + * things such as slower or faster playback. + **/ +void +swfdec_as_context_get_time (SwfdecAsConte...
2007 Apr 03
0
11 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec-gtk/swfdec_source.c libswfdec/swfdec_cached.c libswfdec/swfdec_font.c libswfdec/swfdec_morphshape.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c
...e outside of a player. It'll remove itself when the player goes away. diff --git a/libswfdec-gtk/swfdec_source.c b/libswfdec-gtk/swfdec_source.c index f001de3..10d0f0e 100644 --- a/libswfdec-gtk/swfdec_source.c +++ b/libswfdec-gtk/swfdec_source.c @@ -34,7 +34,7 @@ my_time_val_difference (const GTimeVal * typedef struct _SwfdecIterateSource SwfdecIterateSource; struct _SwfdecIterateSource { GSource source; - SwfdecPlayer * player; + SwfdecPlayer * player; /* player we manage or NULL if player was deleted */ double speed; /* inverse playback speed (so 0.5 means double speed) */ gul...
2007 Oct 22
0
6 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h
...*object) } g_array_free (player->invalidations, TRUE); player->invalidations = NULL; + if (player->runtime) { + g_timer_destroy (player->runtime); + player->runtime = NULL; + } } static void @@ -1289,6 +1300,16 @@ swfdec_player_get_time (SwfdecAsContext *context, GTimeVal *tv) g_time_val_add (tv, SWFDEC_TICKS_TO_MSECS (SWFDEC_PLAYER (context)->time) * 1000); } +static gboolean +swfdec_player_check_continue (SwfdecAsContext *context) +{ + SwfdecPlayer *player = SWFDEC_PLAYER (context); + + if (player->max_runtime == 0) + return TRUE; + return g_time...
2007 Aug 22
0
Branch 'vivi' - 2 commits - libswfdec-gtk/swfdec_source.c vivified/ui
...wfdecPlayer * player; /* player we manage or NULL if player was deleted */ double speed; /* inverse playback speed (so 0.5 means double speed) */ - gulong notify; /* set for iterate notifications */ + gulong notify; /* set for iterate notifications (only valid when player != NULL) */ GTimeVal last; /* last time */ }; @@ -115,7 +115,7 @@ swfdec_iterate_finalize (GSource *source { SwfdecIterateSource *source = (SwfdecIterateSource *) source_; - if (source->notify) { + if (source->notify && source->player) { g_signal_handler_disconnect (source->player,...
2007 Jun 17
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c
..._hash, g_direct_equal); diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h index 5d2d7ba..d9815e4 100644 --- a/libswfdec/swfdec_as_context.h +++ b/libswfdec/swfdec_as_context.h @@ -52,8 +52,12 @@ struct _SwfdecAsContext { GRand * rand; /* random number generator */ GTimeVal start_time; /* time this movie started (for GetTime action) */ + /* GC properties */ + gsize memory_until_gc;/* amount of memory allocations that trigger a GC */ + /* bookkeeping for GC */ - gsize memory; /* memory currently in use */ + gsize memory; /* total memory currently i...
2007 Nov 08
0
8 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_player.c test/trace
...er.c b/libswfdec/swfdec_player.c index 019b962..7d68208 100644 --- a/libswfdec/swfdec_player.c +++ b/libswfdec/swfdec_player.c @@ -1995,6 +1995,7 @@ swfdec_player_unroot_object (SwfdecPlayer *player, GObject *object) SwfdecPlayer * swfdec_player_new (SwfdecAsDebugger *debugger) { + static const GTimeVal the_beginning = { 1035840244, 0 }; SwfdecPlayer *player; g_return_val_if_fail (debugger == NULL || SWFDEC_IS_AS_DEBUGGER (debugger), NULL); @@ -2003,6 +2004,8 @@ swfdec_player_new (SwfdecAsDebugger *debugger) player = g_object_new (SWFDEC_TYPE_PLAYER, "random-seed", 0, &...
2007 Jul 13
0
3 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...ly executing frame or %NULL if none + **/ +SwfdecAsFrame * +swfdec_as_context_get_frame (SwfdecAsContext *context) +{ + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + + return context->frame; +} + +/** * swfdec_as_context_get_time: * @context: a #SwfdecAsContext * @tv: a #GTimeVal to be set to the context's time diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h index 47b5453..d18fa62 100644 --- a/libswfdec/swfdec_as_context.h +++ b/libswfdec/swfdec_as_context.h @@ -95,6 +95,9 @@ GType swfdec_as_context_get_type (void) void swfdec_as_context_st...
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
...long with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "swfdec_source.h" + +static glong +my_time_val_difference (const GTimeVal *compare, const GTimeVal *now) +{ + return (compare->tv_sec - now->tv_sec) * 1000 + + (compare->tv_usec - now->tv_usec) / 1000; +} + +/*** SwfdecIterateSource ***/ + +typedef struct _SwfdecIterateSource SwfdecIterateSource; +struct _SwfdecIterateSource { + GSource source; + Swfd...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...gt;throwing) + return FALSE; + + if (value != NULL) + *value = context->throw_value; + + context->throwing = FALSE; + SWFDEC_AS_VALUE_SET_UNDEFINED (&context->throw_value); + + return TRUE; +} + +/** * swfdec_as_context_get_time: * @context: a #SwfdecAsContext * @tv: a #GTimeVal to be set to the context's time diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h index 0f062c8..145f647 100644 --- a/libswfdec/swfdec_as_context.h +++ b/libswfdec/swfdec_as_context.h @@ -113,6 +113,11 @@ const char * swfdec_as_context_give_string (SwfdecAsContext * con...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...e outside of a player. It'll remove itself when the player goes away. diff --git a/libswfdec-gtk/swfdec_source.c b/libswfdec-gtk/swfdec_source.c index f001de3..10d0f0e 100644 --- a/libswfdec-gtk/swfdec_source.c +++ b/libswfdec-gtk/swfdec_source.c @@ -34,7 +34,7 @@ my_time_val_difference (const GTimeVal * typedef struct _SwfdecIterateSource SwfdecIterateSource; struct _SwfdecIterateSource { GSource source; - SwfdecPlayer * player; + SwfdecPlayer * player; /* player we manage or NULL if player was deleted */ double speed; /* inverse playback speed (so 0.5 means double speed) */ gul...
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
...(SwfdecAsContext * context); - /* debugging: call this function before executing a bytecode if non-NULL */ - void (* step) (SwfdecAsContext * context); /* overwrite if you want to report a different time than gettimeofday */ void (* get_time) (SwfdecAsContext * context, GTimeVal * tv); diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c index 9b0fd2a..89adbf6 100644 --- a/libswfdec/swfdec_debugger.c +++ b/libswfdec/swfdec_debugger.c @@ -386,6 +386,7 @@ swfdec_debugger_dispose (GObject *object G_OBJECT_CLASS (swfdec_debugger_parent_class)->dispose...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...} + SwfdecAsContext * swfdec_as_context_new (void) { diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h index 88c6c6f..5d2d7ba 100644 --- a/libswfdec/swfdec_as_context.h +++ b/libswfdec/swfdec_as_context.h @@ -93,6 +93,8 @@ void swfdec_as_context_get_time (Swfdec GTimeVal * tv); const char * swfdec_as_context_get_string (SwfdecAsContext * context, const char * string); +const char * swfdec_as_context_give_string (SwfdecAsContext * context, + char * string); #define swfdec_as_context_abort_oom(context) swfdec_as_context_abort (context, "Out...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...(priv->intervals, (GFunc) swfdec_as_object_mark, NULL); + g_list_foreach (priv->rooted_objects, swfdec_player_mark_rooted_object, NULL); SWFDEC_AS_CONTEXT_CLASS (swfdec_player_parent_class)->mark (context); } @@ -1489,17 +1529,18 @@ swfdec_player_get_time (SwfdecAsContext *context, GTimeVal *tv) *tv = context->start_time; /* FIXME: what granularity do we want? Currently it's milliseconds */ - g_time_val_add (tv, SWFDEC_TICKS_TO_MSECS (SWFDEC_PLAYER (context)->time) * 1000); + g_time_val_add (tv, SWFDEC_TICKS_TO_MSECS (SWFDEC_PLAYER (context)->priv->time) * 10...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...wfdecPlayer * player; /* player we manage or NULL if player was deleted */ double speed; /* inverse playback speed (so 0.5 means double speed) */ - gulong notify; /* set for iterate notifications */ + gulong notify; /* set for iterate notifications (only valid when player != NULL) */ GTimeVal last; /* last time */ }; @@ -115,7 +115,7 @@ swfdec_iterate_finalize (GSource *source { SwfdecIterateSource *source = (SwfdecIterateSource *) source_; - if (source->notify) { + if (source->notify && source->player) { g_signal_handler_disconnect (source->player,...
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
...ecAsContextState state; /* our current state */ - SwfdecAsObject * global; /* the global object */ + SwfdecAsObject * global; /* the global object or NULL if not initialized yet. + In SwfdecPlayer is NULL unless a sandbox is in use */ GRand * rand; /* random number generator */ GTimeVal start_time; /* time this movie started (for GetTime action) */ @@ -96,8 +97,7 @@ struct _SwfdecAsContextClass { GType swfdec_as_context_get_type (void); -void swfdec_as_context_startup (SwfdecAsContext * context, - guint version); +void swfdec_as_context_startup (Swf...