search for: remove_handle

Displaying 12 results from an estimated 12 matches for "remove_handle".

Did you mean: removed_handle
2007 Jul 16
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_oss.c
...moved), sound); + for (walk = swfdec_player_get_audio (player); walk; walk = walk->next) { + swfdec_stream_open (sound, walk->data); + } + g_main_context_ref (context); + sound->context = context; + return sound; +} + +void +swfdec_playback_close (SwfdecPlayback *sound) +{ +#define REMOVE_HANDLER_FULL(obj,func,data,count) G_STMT_START {\ + if (g_signal_handlers_disconnect_by_func ((obj), \ + G_CALLBACK (func), (data)) != (count)) { \ + g_assert_not_reached (); \ + } \ +} G_STMT_END +#define REMOVE_HANDLER(obj,func,data) REMOVE_HANDLER_FULL (obj, func, data, 1) + + while (sound->st...
2007 Jan 29
0
3 commits - autogen.sh configure.ac player/.gitignore player/Makefile.am player/swfdec_playback_alsa.c player/swfdec_playback.c player/swfdec_playback_none.c
...tream->pcm, offset, avail) < 0) { - g_printerr ("snd_pcm_mmap_commit failed\n"); - return FALSE; - } - stream->offset += avail; - //g_print ("offset: %u (+%u)\n", stream->offset, (guint) avail); - } - return TRUE; -} - -static void -swfdec_stream_remove_handlers (Stream *stream) -{ - unsigned int i; - - for (i = 0; i < stream->n_sources; i++) { - if (stream->sources[i]) { - g_source_destroy (stream->sources[i]); - g_source_unref (stream->sources[i]); - stream->sources[i] = NULL; - } - } -} - -static void swfdec_s...
2007 Nov 08
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_pa.c
...->data); + } + g_main_context_ref (context); + sound->context = context; + return sound; +} + +static void +context_drain_complete (pa_context *pa, void *data) +{ + pa_context_disconnect (pa); + pa_context_unref (pa); +} + +void +swfdec_playback_close (SwfdecPlayback *sound) +{ +#define REMOVE_HANDLER_FULL(obj,func,data,count) G_STMT_START {\ + if (g_signal_handlers_disconnect_by_func ((obj), \ + G_CALLBACK (func), (data)) != (count)) { \ + g_assert_not_reached (); \ + } \ +} G_STMT_END +#define REMOVE_HANDLER(obj,func,data) REMOVE_HANDLER_FULL (obj, func, data, 1) + + while (sound->st...
2007 Nov 22
0
2 commits - libswfdec-gtk/swfdec_playback_pa.c
...ound->pa, context_state_callback, NULL); + pa_context_set_state_callback (sound->pa, context_state_callback, sound); pa_context_connect (sound->pa, NULL, /* default server */ 0, /* default flags */ @@ -320,14 +332,16 @@ swfdec_playback_close (SwfdecPlayback *sound) REMOVE_HANDLER (sound->player, audio_added, sound); REMOVE_HANDLER (sound->player, audio_removed, sound); - op = pa_context_drain (sound->pa, context_drain_complete, NULL); - if (op == NULL) { - pa_context_disconnect (sound->pa); - pa_context_unref (sound->pa); - } else { - pa_ope...
2014 Mar 14
3
Sys::Virt integration into other event loops
Hi all, I’m trying to integrate Perl’s Sys::Virt into an already existing AnyEvent program. I’m accustomed to writing things like this: use EV; use AnyEvent; use AnyEvent::Handle; my $h = AnyEvent::Handle->new(fh => $fh, …); $h->on_read(sub { … }); EV::run; ## start the event loop I can add some code in the on_read() handler and every time the $fh has something to read, it will fire
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
...uot;advance", G_CALLBACK (advance_before), sound); g_signal_connect (player, "audio-added", G_CALLBACK (audio_added), sound); g_signal_connect (player, "audio-removed", G_CALLBACK (audio_removed), sound); @@ -346,7 +346,6 @@ swfdec_playback_close (SwfdecPlayback *s REMOVE_HANDLER (sound->player, advance_before, sound); REMOVE_HANDLER (sound->player, audio_added, sound); REMOVE_HANDLER (sound->player, audio_removed, sound); - g_object_unref (sound->player); g_main_context_unref (sound->context); g_free (sound); } diff-tree ea7b64b68489721b867fef...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...tream->pcm, offset, avail) < 0) { - g_printerr ("snd_pcm_mmap_commit failed\n"); - return FALSE; - } - stream->offset += avail; - //g_print ("offset: %u (+%u)\n", stream->offset, (guint) avail); - } - return TRUE; -} - -static void -swfdec_stream_remove_handlers (Stream *stream) -{ - unsigned int i; - - for (i = 0; i < stream->n_sources; i++) { - if (stream->sources[i]) { - g_source_destroy (stream->sources[i]); - g_source_unref (stream->sources[i]); - stream->sources[i] = NULL; - } - } -} - -static void swfdec_s...
2014 Mar 14
0
Re: Sys::Virt integration into other event loops
...particularly good docs or example code here, but you can see how todo this by looking at the Perl test suite. eg the t/800-events.t file. This test suite does a pure perl event loop based on select(). You'd probably want to adapt that and call into AnyEvent, instead of select(). The add_handle/remove_handle/update_handle/add_timeout/update_timeout/ remove_timeout methods should all call into appropriate AnyEvent APIs. Then you just need to run AnyEvent as normal. If you get this all working please do send back your code for it - it would be nice to add a examples/anyevent.pl demo file for this to hel...
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
..._before), sound); g_signal_connect (player, "audio-added", G_CALLBACK (audio_added), sound); @@ -331,9 +331,8 @@ swfdec_playback_open (SwfdecPlayer *play } void -swfdec_playback_close (gpointer data) +swfdec_playback_close (SwfdecPlayback *sound) { - Sound *sound = data; #define REMOVE_HANDLER_FULL(obj,func,data,count) G_STMT_START {\ if (g_signal_handlers_disconnect_by_func ((obj), \ G_CALLBACK (func), (data)) != (count)) { \ diff --git a/libswfdec-gtk/swfdec_playback_none.c b/libswfdec-gtk/swfdec_playback_none.c index 6464a4a..79651d6 100644 --- a/libswfdec-gtk/swfdec_playback_no...
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
...uot;advance", G_CALLBACK (advance_before), sound); g_signal_connect (player, "audio-added", G_CALLBACK (audio_added), sound); g_signal_connect (player, "audio-removed", G_CALLBACK (audio_removed), sound); @@ -346,7 +346,6 @@ swfdec_playback_close (SwfdecPlayback *s REMOVE_HANDLER (sound->player, advance_before, sound); REMOVE_HANDLER (sound->player, audio_added, sound); REMOVE_HANDLER (sound->player, audio_removed, sound); - g_object_unref (sound->player); g_main_context_unref (sound->context); g_free (sound); } diff-tree ea7b64b68489721b867fef...
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
...ew (); #endif diff --git a/libswfdec-gtk/swfdec_playback_alsa.c b/libswfdec-gtk/swfdec_playback_alsa.c index dd539c5..bddd189 100644 --- a/libswfdec-gtk/swfdec_playback_alsa.c +++ b/libswfdec-gtk/swfdec_playback_alsa.c @@ -118,7 +118,7 @@ try_write (Stream *stream) } static void -swfdec_stream_remove_handlers (Stream *stream) +swfdec_playback_stream_remove_handlers (Stream *stream) { guint i; @@ -131,7 +131,7 @@ swfdec_stream_remove_handlers (Stream *stream) } } -static void swfdec_stream_start (Stream *stream); +static void swfdec_playback_stream_start (Stream *stream); static gboolean...
2007 Apr 13
0
[954] branches/wxruby2/wxwidgets_282: Additions to Image API 2.6 -> 2.8, remove comment cruft
...<ins>+* "Image#is_ok":#Image_isok </ins><span class="cx"> * "RGBValue::RGBValue":#Image_RGBValue </span><span class="cx"> * "Image#rg_bto_hsv":#Image_rgbtohsv </span><span class="cx"> * "Image#remove_handler":#Image_removehandler </span><span class="lines">@@ -144,7 +149,7 @@ </span><span class="cx"> </span><span class="cx"> *Image.new*(%(arg-type)Image% image) </span><span class="cx"> </span><del...