search for: swfdec_action_get_time

Displaying 11 results from an estimated 11 matches for "swfdec_action_get_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
...dec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index acdfb74..886dae6 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1632,16 +1632,23 @@ swfdec_action_type_of (SwfdecAsContext * SWFDEC_AS_VALUE_SET_STRING (val, type); } -#if 0 static void swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - SwfdecPlayer *player = JS_GetContextPrivate (cx); + GTimeVal tv; + gulong diff; + + swfdec_as_context_get_time (cx, &tv); + /* we assume here that swfdec_as_context_get_time always returns a tv > start_time */ + di...
2007 Oct 15
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_codec_audio.h test/swfdec-extract.c
...tions[256] = { [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", NULL, 1, 1, { NULL, swfdec_action_ascii_to_char_5, swfdec_action_ascii_to_char_5, swfdec_action_ascii_to_char, swfdec_action_ascii_to_char } }, [SWFDEC_AS_ACTION_GET_TIME] = { "GetTime", NULL, 0, 1, { NULL, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time } }, [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract", NULL, 3, 1, { NULL, swfdec_action_string_extract, swfdec_action_string_extract, swfdec_action_string_extract, swfdec_action_string_extract } }, - [S...
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
...ULL, 4 }, [SWFDEC_AS_ACTION_CHAR_TO_ASCII] = { "CharToAscii", NULL, 1, 1, swfdec_action_char_to_ascii, 4 }, [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", NULL, 1, 1, swfdec_action_ascii_to_char, 4 }, [SWFDEC_AS_ACTION_GET_TIME] = { "GetTime", NULL, 0, 1, swfdec_action_get_time, 4 }, [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract", NULL, 3, 1, swfdec_action_string_extract, 4 }, - [SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII] = { "MBCharToAscii", NULL }, + [SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII] = { "MBCharToAscii", NULL, -1, -1, NULL, 4 },...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...ion is untested but seems to work diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index b425233..428fc4c 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1942,6 +1942,15 @@ swfdec_action_type_of (JSContext *cx, gu return JS_TRUE; } +static JSBool +swfdec_action_get_time (JSContext *cx, guint action, const guint8 *data, guint len) +{ + SwfdecPlayer *player = JS_GetContextPrivate (cx); + + *cx->fp->sp++ = INT_TO_JSVAL ((int) SWFDEC_TICKS_TO_MSECS (player->time)); + return JS_TRUE; +} + /*** PRINT FUNCTIONS ***/ static char * @@ -2282,7 +2291,7 @@ sta...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c 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 libswfdec/swfdec_as_function.h
...Ascii", NULL }, + [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", NULL }, #if 0 - [0x31] = { "MBStringLength", NULL }, - [0x32] = { "CharToAscii", NULL }, - [0x33] = { "AsciiToChar", NULL }, [0x34] = { "GetTime", NULL, 0, 1, { NULL, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time } }, - [0x35] = { "MBStringExtract", NULL }, - [0x36] = { "MBCharToAscii", NULL }, - [0x37] = { "MVAsciiToChar", NULL }, +#endif + [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract...
2007 Jul 02
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c test/trace
..._to_ascii } }, [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", NULL, 1, 1, { NULL, swfdec_action_ascii_to_char_5, swfdec_action_ascii_to_char_5, swfdec_action_ascii_to_char, swfdec_action_ascii_to_char } }, [SWFDEC_AS_ACTION_GET_TIME] = { "GetTime", NULL, 0, 1, { NULL, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time, swfdec_action_get_time } }, [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract", NULL },
2007 Mar 07
1
2 commits - libswfdec/swfdec_script.c test/trace
libswfdec/swfdec_script.c | 14 ++++++++++++-- test/trace/Makefile.am | 2 ++ test/trace/gotoframe.swf |binary test/trace/gotoframe.swf.trace | 13 +++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) New commits: diff-tree 12348410a3509928a6e8e4c8ca00292a58ff542c (from 46e62d4410c20c19774a45758d8ebf11cd0bdf96) Author: Benjamin Otte <otte@gnome.org>
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...ert_not_reached (); + return JS_FALSE; + } + /* can't use InternString here because of case sensitivity issues */ + string = JS_NewStringCopyZ (cx, type); + if (string == NULL) + return JS_FALSE; + cx->fp->sp[-1] = STRING_TO_JSVAL (string); + return JS_TRUE; +} + +static void +swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + SwfdecPlayer *player = JS_GetContextPrivate (cx); + + *cx->fp->sp++ = INT_TO_JSVAL ((int) SWFDEC_TICKS_TO_MSECS (player->time)); + return JS_TRUE; +} + +static void +swfdec_action_extends (SwfdecAsContext *cx, guint...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
.../* can't use InternString here because of case sensitivity issues */ - string = JS_NewStringCopyZ (cx, type); - if (string == NULL) - return JS_FALSE; - cx->fp->sp[-1] = STRING_TO_JSVAL (string); - return JS_TRUE; + SWFDEC_AS_VALUE_SET_STRING (val, type); } +#if 0 static void swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { @@ -2218,7 +2222,9 @@ const SwfdecActionSpec swfdec_as_actions [0x41] = { "DefineLocal2", NULL, 1, 0, { NULL, NULL, swfdec_action_define_local2, swfdec_action_define_local2, swfdec_action_define_local2 } }, [0x42]...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c test/trace
...7 +0300 Reorganize instanceOf code to get separate swfdec_action_is_instance_of func diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index f2867a3..3b45b3b 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2174,45 +2174,60 @@ swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, g SWFDEC_AS_VALUE_SET_INT (swfdec_as_stack_push (cx), diff); } +static gboolean +swfdec_action_is_instance_of (SwfdecAsObject *object, + SwfdecAsObject *constructor) +{ + SwfdecAsValue val; + SwfdecAsObject *class, *prototype; + +...
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...; Date: Thu Oct 25 14:49:16 2007 +0300 Implement the InstanceOf ActionScript action diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 99a1215..8f5012c 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2175,6 +2175,50 @@ swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, g } static void +swfdec_action_instance_of (SwfdecAsContext *cx, guint action, + const guint8 *data, guint len) +{ + SwfdecAsValue val, *val_p; + SwfdecAsObject *object, *class, *constructor, *prototype; + + val_p = swfdec_as_stack_p...