Displaying 17 results from an estimated 17 matches for "g_main_loop_quit".
2007 Oct 12
0
2 commits - player/swfplay.c test/trace
...;s dispose is properly run again.
diff --git a/player/swfplay.c b/player/swfplay.c
index 4b9cf03..f9b2fb3 100644
--- a/player/swfplay.c
+++ b/player/swfplay.c
@@ -65,7 +65,10 @@ do_fscommand (SwfdecPlayer *player, cons
{
if (g_str_equal (command, "quit")) {
g_assert (loop);
- g_main_loop_quit (loop);
+ if (g_main_loop_is_running (loop)) {
+ gtk_widget_destroy (window);
+ g_main_loop_quit (loop);
+ }
}
/* FIXME: add more */
}
2007 Aug 16
0
Branch 'vivi' - 18 commits - configure.ac doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_types.h libswfdec/swfdec_player.c vivified/core vivified/ui
..._application.c
+++ b/vivified/core/vivi_application.c
@@ -181,7 +181,8 @@ vivi_application_reset (ViviApplication
{
g_return_if_fail (VIVI_IS_APPLICATION (app));
- g_assert (app->loop == NULL); /* FIXME: what do we do if we're inside a breakpoint? */
+ if (app->loop != NULL)
+ g_main_loop_quit (app->loop);
g_object_unref (app->player);
app->player = swfdec_gtk_player_new (SWFDEC_AS_DEBUGGER (app->debugger));
app->player_inited = FALSE;
@@ -262,42 +263,25 @@ vivi_application_step_forward (gpointer
return FALSE;
}
-static void
+void
vivi_application_check (V...
2007 Aug 24
0
2 commits - player/swfplay.c
..._fscommand (SwfdecPlayer *player, const char *command, const char *value, gpointer window)
{
if (g_str_equal (command, "quit")) {
- static gboolean already_quit = FALSE;
- if (!already_quit) {
- gtk_main_quit ();
- already_quit = TRUE;
- }
+ g_assert (loop);
+ g_main_loop_quit (loop);
}
/* FIXME: add more */
}
@@ -150,6 +149,7 @@ main (int argc, char *argv[])
g_object_unref (loader);
return 1;
}
+ loop = g_main_loop_new (NULL, TRUE);
player = swfdec_gtk_player_new (NULL);
if (trace)
g_signal_connect (player, "trace", G_CALLBACK (...
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...finished");
> + g_source_remove (g_source_get_id ((GSource *) gssrc));
> + g_source_unref ((GSource *) gssrc);
> + gssrc = NULL;
> + g_source_remove (g_source_get_id ((GSource *) gsdest));
> + g_source_unref ((GSource *) gsdest);
> + gsdest = NULL;
> + g_main_loop_quit (loop);
> + }
> +
> + return 0;
> +}
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING **
This patch shows how to integrate libnbd and the glib main loop.
Posted mainly as a point of discussion as it doesn't quite work yet.
Rich.
2019 Jul 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...(gsdest, "finished_write: all finished");
+ g_source_remove (g_source_get_id ((GSource *) gssrc));
+ g_source_unref ((GSource *) gssrc);
+ gssrc = NULL;
+ g_source_remove (g_source_get_id ((GSource *) gsdest));
+ g_source_unref ((GSource *) gsdest);
+ gsdest = NULL;
+ g_main_loop_quit (loop);
+ }
+
+ return 0;
+}
--
2.22.0
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...(gsdest, "finished_write: all finished");
+ g_source_remove (g_source_get_id ((GSource *) gssrc));
+ g_source_unref ((GSource *) gssrc);
+ gssrc = NULL;
+ g_source_remove (g_source_get_id ((GSource *) gsdest));
+ g_source_unref ((GSource *) gsdest);
+ gsdest = NULL;
+ g_main_loop_quit (loop);
+ }
+
+ return 0;
+}
--
2.22.0
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
..._APPLICATION_STOPPED:
+ if (is_playing)
+ swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), FALSE);
+ break;
+ case VIVI_APPLICATION_PLAYING:
+ if (!is_playing)
+ swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), TRUE);
+ if (is_breakpoint)
+ g_main_loop_quit (app->loop);
+ break;
+ case VIVI_APPLICATION_STEPPING:
+ if (is_playing)
+ swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), FALSE);
+ if (is_breakpoint) {
+ g_main_loop_quit (app->loop);
+ } else {
+ /* FIXME: sanely handle this */
+ g_idle_add_full (...
2007 Aug 21
0
Branch 'vivi' - 10 commits - libswfdec/swfdec_button_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c vivified/core vivified/dock vivified/ui
...a/vivified/core/vivi_application.c
+++ b/vivified/core/vivi_application.c
@@ -179,12 +179,16 @@ vivi_application_init_player (ViviApplic
void
vivi_application_reset (ViviApplication *app)
{
+ gboolean audio;
+
g_return_if_fail (VIVI_IS_APPLICATION (app));
if (app->loop != NULL)
g_main_loop_quit (app->loop);
+ audio = swfdec_gtk_player_get_audio_enabled (SWFDEC_GTK_PLAYER (app->player));
g_object_unref (app->player);
app->player = swfdec_gtk_player_new (SWFDEC_AS_DEBUGGER (app->debugger));
+ swfdec_gtk_player_set_audio_enabled (SWFDEC_GTK_PLAYER (app->player), aud...
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's
review, *except* that it still doesn't retire commands (although this
seems to make no obvious difference, except possibly a performance and
memory impact).
Rich.
2007 Aug 22
0
8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie_as.c vivified/core
...loader, app->variables);
-}
-
-void
vivi_application_reset (ViviApplication *app)
{
gboolean audio;
@@ -310,6 +290,23 @@ vivi_application_check (ViviApplication
/* leave breakpoint unless stopped */
if (is_breakpoint && app->playback_state != VIVI_APPLICATION_STOPPED)
g_main_loop_quit (app->loop);
+
+ /* init player if playing */
+ if ((app->playback_state == VIVI_APPLICATION_PLAYING ||
+ app->playback_state == VIVI_APPLICATION_STEPPING) &&
+ !app->player_inited) {
+ if (app->filename == NULL) {
+ vivi_application_error (app, "no...
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
...-418,7 +420,7 @@ finished_read (void *vp, int64_t rcookie, int *error)
/* Create a writer idle handler. */
g_idle_add (write_data, NULL);
- return 0;
+ return 1;
}
/* This idle callback schedules a write. */
@@ -507,5 +509,5 @@ finished_write (void *vp, int64_t wcookie, int *error)
g_main_loop_quit (loop);
}
- return 0;
+ return 1;
}
diff --git a/generator/generator b/generator/generator
index fdacd71..e0a2805 100755
--- a/generator/generator
+++ b/generator/generator
@@ -1738,9 +1738,9 @@ unique positive 64 bit cookie for this command, or C<-1> on
error. If this command return...
2007 Aug 14
0
Branch 'vivi' - 11 commits - libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h vivified/core
...ivi_application_check (ViviApplication
swfdec_as_context_maybe_gc (SWFDEC_AS_CONTEXT (app));
switch (app->playback_state) {
+ case VIVI_APPLICATION_EXITING:
+ if (is_playing)
+ swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), FALSE);
+ if (is_breakpoint)
+ g_main_loop_quit (app->loop);
+ break;
case VIVI_APPLICATION_STOPPED:
if (is_playing)
swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), FALSE);
@@ -314,3 +321,13 @@ vivi_application_step (ViviApplication *
app->playback_count = n_times;
}
+void
+vivi_application_quit...
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
...if (player) {
g_object_ref (player);
g_signal_connect (player, "breakpoint", G_CALLBACK (breakpoint_hit_cb), manager);
+ g_signal_connect (player, "trace", G_CALLBACK (trace_cb), manager);
}
}
@@ -293,34 +331,7 @@ swfdec_player_manager_continue (SwfdecPl
g_main_loop_quit (manager->interrupt_loop);
}
-/*** command handling ***/
-
-typedef enum {
- SWFDEC_MESSAGE_INPUT,
- SWFDEC_MESSAGE_OUTPUT,
- SWFDEC_MESSAGE_ERROR
-} SwfdecMessageType;
-
-static void
-swfdec_player_manager_send_message (SwfdecPlayerManager *manager,
- SwfdecMessageType type, char *form...
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
...a/vivified/core/vivi_application.c
+++ b/vivified/core/vivi_application.c
@@ -179,12 +179,16 @@ vivi_application_init_player (ViviApplic
void
vivi_application_reset (ViviApplication *app)
{
+ gboolean audio;
+
g_return_if_fail (VIVI_IS_APPLICATION (app));
if (app->loop != NULL)
g_main_loop_quit (app->loop);
+ audio = swfdec_gtk_player_get_audio_enabled (SWFDEC_GTK_PLAYER (app->player));
g_object_unref (app->player);
app->player = swfdec_gtk_player_new (SWFDEC_AS_DEBUGGER (app->debugger));
+ swfdec_gtk_player_set_audio_enabled (SWFDEC_GTK_PLAYER (app->player), aud...
2020 Sep 25
20
[RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block)
Hi,
This is an initial implementation of a vhost-user backend for the
VirtIO RPMB device. The device is currently in the draft of the next
VirtIO specification and describes block device which uses combination
of a key, nonce, hashing and a persistent write counter to prevent
replay attacks (hence Replay Protected Memory Block).
It is implemented as a vhost-user device because we want to
2007 Aug 26
0
3 commits - libswfdec/swfdec_as_context.c player/swfplay.c test/trace
...swfdec_gtk_widget_set_renderer (SWFDEC_GTK_WIDGET (widget), CAIRO_SURFACE_TYPE_IMAGE);
gtk_container_add (GTK_CONTAINER (window), widget);
- g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect_swapped (window, "destroy", G_CALLBACK (g_main_loop_quit), loop);
gtk_widget_show_all (window);
return window;