Displaying 20 results from an estimated 30 matches for "swfdec_player_get_next_ev".
2007 Aug 26
0
9 commits - libswfdec-gtk/swfdec_source.c libswfdec/swfdec_marshal.list libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_instance.c test/dump.c test/Makefile.am
...}
}
diff --git a/test/trace/trace.c b/test/trace/trace.c
index 65a4c5b..f42fb0f 100644
--- a/test/trace/trace.c
+++ b/test/trace/trace.c
@@ -133,7 +133,6 @@ run_test (gpointer testp, gpointer unuse
/* FIXME: will not do 10 iterations if there's other stuff loaded */
glong advance = swfdec_player_get_next_event (player);
- g_print ("advancing %ld (of %lu left)\n", advance, time_left);
g_assert (advance >= 0);
if (inter) {
int t = swfdec_interaction_get_next_event (inter);
diff-tree d1ca3601102b10b5d64f03eed69d1634b193d7dd (from 01235ec735043322af3c5be841275b87858d6831...
2007 Aug 09
1
swfdec ported on arm
I have cross compiled swfdec-0.5 for ARM and I have also written a player for framebuffer.
But its too slow!! Can you tell me the reason behind this? Can i increase speed by somehow? I doubt my code for player.
I have written following loop in my player:
while(1)
{
diff = swfdec_player_get_next_event(player);
swfdec_player_advance(player, diff);
swfdec_player_render(player, cr, 0, 0, w, h);
}
Shall I add something? Thanks in advance.
Shabbir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/swfdec/attachments/20070...
2008 Sep 01
1
Porting Swfdec to Mac OS X & Timing question
...tely at first, but it would be nice to be able
to use the repository at some point in the future...
2. I also have a question about timing. Here is my current timer code;
it's written in Objective-C but should be quite readable:
- (void)scheduleNextEvent
{
glong millisecondsToNextEvent = swfdec_player_get_next_event(_private-
>_player);
[_private->_nextEventTimer release];
_private->_nextEventTimer = nil;
if (millisecondsToNextEvent == -1) // nothing's going on, so do nothing
return;
else if (millisecondsToNextEvent == 0) // we need to trigger the next
event immediately
{
swfde...
2010 Jan 17
1
screenshot of swf file
...argv[1];
char *output = argv[2];
SwfdecPlayer *player = swfdec_player_new(NULL);
SwfdecURL *url = swfdec_url_new_from_input(input);
swfdec_player_set_url(player, url);
swfdec_url_free (url);
swfdec_player_set_size (player, 800, 480);
swfdec_player_advance(player, swfdec_player_get_next_event (player));
swfdec_player_save(player, 800, 480, output);
return 0;
}
Using this i get a blank transparent png output as reported by the
original poster. Ive also tried the gnome thumbnailer which produces
the same result. The swf file is a single frame containing just two
boxes. I...
2007 Nov 07
0
7 commits - doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_decoder.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
.../swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -80,7 +80,7 @@ swfdec_player_set_loader
swfdec_player_set_loader_with_variables
swfdec_player_is_initialized
swfdec_player_get_rate
-swfdec_player_get_image_size
+swfdec_player_get_default_size
swfdec_player_get_size
swfdec_player_set_size
swfdec_player_get_next_event
diff --git a/libswfdec-gtk/swfdec_gtk_widget.c b/libswfdec-gtk/swfdec_gtk_widget.c
index 895d5a3..8d617fd 100644
--- a/libswfdec-gtk/swfdec_gtk_widget.c
+++ b/libswfdec-gtk/swfdec_gtk_widget.c
@@ -330,8 +330,11 @@ swfdec_gtk_widget_size_request (GtkWidget *gtkwidget, GtkRequisition *req)
if (...
2007 Jun 13
0
Branch 'as' - 2 commits - libswfdec/swfdec_sprite.c test/trace
...@ run_test (const char *filename)
return FALSE;
}
- time_left = ceil (10000 / swfdec_player_get_rate (player));
- /* FIXME: Make the number of iterations configurable? */
- while (TRUE) {
- /* FIXME: will not do 10 iterations if there's other stuff loaded */
- guint advance = swfdec_player_get_next_event (player);
-
- if (advance > time_left)
- break;
- swfdec_player_advance (player, advance);
- time_left -= advance;
- }
+ advance = ceil (10000 / swfdec_player_get_rate (player));
+ swfdec_player_advance (player, advance);
g_signal_handlers_disconnect_by_func (player, trace...
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
...ouble speed; /* inverse playback speed (so 0.5 means double speed) */
gulong notify; /* set for iterate notifications */
GTimeVal last; /* last time */
@@ -47,6 +47,7 @@ swfdec_iterate_get_msecs_to_next_event (
GTimeVal now;
glong diff;
+ g_assert (source->player);
diff = swfdec_player_get_next_event (source->player);
if (diff == 0)
return G_MAXLONG;
@@ -62,7 +63,13 @@ swfdec_iterate_get_msecs_to_next_event (
static gboolean
swfdec_iterate_prepare (GSource *source, gint *timeout)
{
- glong diff = swfdec_iterate_get_msecs_to_next_event (source);
+ glong diff;
+
+ diff = swf...
2008 Jan 14
0
player/swfdec-player.ui player/swfdec-window.c player/swfdec-window.h
...borted (SWFDEC_AS_CONTEXT (player)))
+ swfdec_window_error (window, _("Broken Flash file, playback aborted."));
+}
+
+static void
+swfdec_window_player_next_event (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWindow *window)
+{
+ if (!swfdec_player_is_initialized (player) && swfdec_player_get_next_event (player) < 0)
+ swfdec_window_error (window, _("%s is not a Flash file."),
+ swfdec_loader_get_filename (window->loader));
+}
+
+static void
swfdec_window_player_initialized (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWindow *window)
{
static const char *mime[2] = {...
2007 Jun 15
0
Branch 'as' - 4 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite.c test/trace
...yer));
- swfdec_player_advance (player, advance);
+ time_left = ceil (10000 / swfdec_player_get_rate (player));
+ /* FIXME: Make the number of iterations configurable? */
+ while (quit == FALSE) {
+ /* FIXME: will not do 10 iterations if there's other stuff loaded */
+ guint advance = swfdec_player_get_next_event (player);
+
+ if (advance > time_left)
+ break;
+ swfdec_player_advance (player, advance);
+ time_left -= advance;
+ }
g_signal_handlers_disconnect_by_func (player, trace_cb, string);
g_object_unref (player);
diff-tree 7126839b418cf8980ab2c67401e99010d11c496c (from c877...
2007 Nov 01
0
4 commits - libswfdec/swfdec_sound_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/crashfinder.c test/Makefile.am
...!swfdec_as_context_is_aborted (SWFDEC_AS_CONTEXT (player)))
+ {
+ elapsed = (glong)(g_timer_elapsed (timer, NULL) * 1000);
+ if (elapsed >= max_per_file)
+ break;
+ swfdec_player_set_maximum_runtime (player,
+ MIN (max_per_advance, max_per_file - elapsed));
+
+ advance = swfdec_player_get_next_event (player);
+ swfdec_player_advance (player, advance);
+
+ swfdec_player_render (player, cr, 0, 0, 0, 0);
+
+ played += advance;
+ }
+
+ if (elapsed >= max_per_file ||
+ swfdec_as_context_is_aborted (SWFDEC_AS_CONTEXT (player))) {
+ g_print ("Aborted: %s\n",...
2008 Jan 08
0
4 commits - configure.ac test/compiler.c test/.gitignore test/Makefile.am test/swfdec_test.c test/swfdec_test_function.c test/swfdec_test_function.h test/swfdec_test_global.c test/swfdec_test_initialize.as test/swfdec_test_initialize.h
...S_CHECK (SWFDEC_TYPE_TEST_TEST, &test, "i", &msecs);
- if (msecs <= 0 || test->player_quit)
+ if (msecs < 0 || test->player_quit)
return;
swfdec_test_test_ensure_player (test);
- while (msecs > 0 && !test->player_quit) {
- int next_event = swfdec_player_get_next_event (test->player);
- if (next_event < 0)
- break;
- next_event = MIN (next_event, msecs);
- swfdec_player_advance (test->player, next_event);
- msecs -= next_event;
+ if (msecs == 0) {
+ if (!test->player_quit)
+ swfdec_player_advance (test->player, 0);
+ }...
2007 Feb 17
0
2 commits - doc/swfdec-sections.txt libswfdec/swfdec_color.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
...the SwfdecPlayer, so it can be overwritten
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 43457d5..4a45ff4 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -45,6 +45,8 @@ swfdec_player_is_initialized
swfdec_player_get_rate
swfdec_player_get_image_size
swfdec_player_get_next_event
+swfdec_player_get_background_color
+swfdec_player_set_background_color
swfdec_player_render
swfdec_player_advance
swfdec_player_handle_mouse
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 2255771..a1b9660 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c test/trace
...e
diff --git a/test/trace/trace.c b/test/trace/trace.c
index 92354e6..55276d7 100644
--- a/test/trace/trace.c
+++ b/test/trace/trace.c
@@ -133,13 +133,15 @@ run_test (gpointer testp, gpointer unused)
/* FIXME: will not do 10 iterations if there's other stuff loaded */
glong advance = swfdec_player_get_next_event (player);
- g_assert (advance >= 0);
if (inter) {
int t = swfdec_interaction_get_next_event (inter);
g_assert (t >= 0);
- advance = MIN (advance, t);
+ if (advance < 0)
+ advance = t;
+ else
+ advance = MIN (advance, t);
}
- if ((guint) adv...
2007 Feb 17
0
8 commits - configure.ac doc/swfdec-sections.txt libswfdec/swfdec_loader.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h
...swfdec_player_set_loader (SwfdecPlayer * player,
SwfdecLoader * loader);
+void swfdec_player_set_loader_with_variables
+ (SwfdecPlayer * player,
+ SwfdecLoader * loader,
+ const char * variables);
gboolean swfdec_player_is_initialized (SwfdecPlayer * player);
guint swfdec_player_get_next_event (SwfdecPlayer * player);
diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h
index 2da8ecc..2d2c6f9 100644
--- a/libswfdec/swfdec_player_internal.h
+++ b/libswfdec/swfdec_player_internal.h
@@ -128,7 +128,8 @@ void swfdec_player_stop_all_sounds (Swf
SwfdecRoot...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...+ loader = swfdec_loader_new_from_file (filename, &error);
+ if (loader == NULL) {
+ g_print (" ERROR: %s\n", error->message);
+ goto error;
+ }
+ player = swfdec_player_new ();
+ swfdec_player_set_loader (player, loader);
+
+ for (i = 0; i < 10; i++) {
+ msecs = swfdec_player_get_next_event (player);
+ swfdec_player_advance (player, msecs);
+ }
+ swfdec_player_get_image_size (player, &w, &h);
+ if (w == 0 || h == 0) {
+ g_print (" ERROR: width and height not set\n");
+ goto error;
+ }
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h...
2008 Jan 08
0
4 commits - test/.gitignore test/image test/Makefile.am test/swfdec_test_function.c test/swfdec_test_image.c test/swfdec_test_image.h test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
..._file_loader_new (filename);
- if (loader->error) {
- g_print (" ERROR: %s\n", loader->error);
- g_object_unref (loader);
- goto error;
- }
- player = swfdec_player_new (NULL);
- swfdec_player_set_loader (player, loader);
-
- for (i = 0; i < 10; i++) {
- msecs = swfdec_player_get_next_event (player);
- swfdec_player_advance (player, msecs);
- }
- swfdec_player_get_default_size (player, &w, &h);
- if (w == 0 || h == 0) {
- g_print (" ERROR: width and height not set\n");
- goto error;
- }
- surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w,...
2007 Aug 17
0
Branch 'vivi' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c test/trace vivified/core vivified/ui
...guint next_event;
+ app->step_source = 0;
+ if (app->loop != NULL ||
+ app->playback_state != VIVI_APPLICATION_STEPPING)
+ return FALSE;
+
+ app->playback_count--;
+ if (app->playback_count == 0)
+ app->playback_state = VIVI_APPLICATION_STOPPED;
next_event = swfdec_player_get_next_event (app->player);
swfdec_player_advance (app->player, next_event);
+ vivi_application_check (app);
return FALSE;
}
@@ -281,9 +290,8 @@ vivi_application_check (ViviApplication
case VIVI_APPLICATION_PLAYING:
break;
case VIVI_APPLICATION_STEPPING:
- if (!is_bre...
2007 Mar 14
0
10 commits - libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loadertarget.c
...+ return FALSE;
+ }
+ time_left = ceil (10000 / swfdec_player_get_rate (player));
/* FIXME: Make the number of iterations configurable? */
- for (i = 0; i < 10; i++) {
+ while (TRUE) {
/* FIXME: will not do 10 iterations if there's other stuff loaded */
guint advance = swfdec_player_get_next_event (player);
+
+ if (advance > time_left)
+ break;
swfdec_player_advance (player, advance);
+ time_left -= advance;
}
g_signal_handlers_disconnect_by_func (player, trace_cb, string);
g_object_unref (player);
diff-tree 318f367d0a5fe8efaff7861b06baaaebbc9dd7db (from cfd5a7...
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
...ouble speed) */
+ gulong notify; /* set for iterate notifications */
+ GTimeVal last; /* last time */
+};
+
+static glong
+swfdec_iterate_get_msecs_to_next_event (GSource *source_)
+{
+ SwfdecIterateSource *source = (SwfdecIterateSource *) source_;
+ GTimeVal now;
+ glong diff;
+
+ diff = swfdec_player_get_next_event (source->player);
+ if (diff == 0)
+ return G_MAXLONG;
+ diff *= source->speed;
+ g_source_get_current_time (source_, &now);
+ /* should really add to source->last instead of sutracting from now */
+ g_time_val_add (&now, -diff * 1000);
+ diff = my_time_val_difference (...
2007 Aug 13
0
Branch 'vivi' - 24 commits - configure.ac libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h vivified/core vivified/dock vivified/ui
...et_loader (app->player, loader);
app->player_inited = TRUE;
@@ -177,6 +189,51 @@ vivi_application_get_player (ViviApplica
return app->player;
}
+static gboolean
+vivi_application_step_forward (gpointer appp)
+{
+ ViviApplication *app = appp;
+ guint next_event;
+
+ next_event = swfdec_player_get_next_event (app->player);
+ swfdec_player_advance (app->player, next_event);
+
+ return FALSE;
+}
+
+static void
+vivi_application_check (ViviApplication *app)
+{
+ gboolean is_playing = swfdec_gtk_player_get_playing (SWFDEC_GTK_PLAYER (app->player));
+ gboolean is_breakpoint = app->loop !=...