diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-07-27 20:21:49 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-07-29 18:02:07 +0800 |
commit | 01b0be54353820459d4741f2858be21207f7e754 (patch) | |
tree | 5e3bc1f129686f5e8dac02407889e9e420bab651 /src/empathy-audio-src.c | |
parent | 1de1a894194a0fa355ef382783fa54f25ddca75c (diff) | |
download | gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar.gz gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar.bz2 gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar.lz gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar.xz gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.tar.zst gsoc2013-empathy-01b0be54353820459d4741f2858be21207f7e754.zip |
audio-src: add some comments explaining the PA changes
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/empathy-audio-src.c')
-rw-r--r-- | src/empathy-audio-src.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c index 96caae970..bde6e2942 100644 --- a/src/empathy-audio-src.c +++ b/src/empathy-audio-src.c @@ -321,14 +321,20 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj) gst_object_unref (G_OBJECT (src)); + /* PulseAudio stuff: We need to create a dummy pa_glib_mainloop* so + * Pulse can use the mainloop that GTK has created for us. */ priv->loop = pa_glib_mainloop_new (NULL); priv->context = pa_context_new (pa_glib_mainloop_get_api (priv->loop), "EmpathyAudioSrc"); + /* Now listen for state changes so we know when we've connected. */ pa_context_set_state_callback (priv->context, empathy_audio_src_pa_state_change_cb, obj); pa_context_connect (priv->context, NULL, 0, NULL); + /* Listen to changes to GstPulseSrc:stream-index so we know when + * it's no longer G_MAXUINT (starting for the first time) or if it + * changes (READY->NULL->READY...) */ g_signal_connect (priv->src, "notify::stream-index", G_CALLBACK (empathy_audio_src_stream_index_notify), obj); |