[empathy: 9/23] audio-src: add some comments explaining the PA changes
- From: Jonny Lamb <jonnylamb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 9/23] audio-src: add some comments explaining the PA changes
- Date: Mon, 1 Aug 2011 12:51:09 +0000 (UTC)
commit 01b0be54353820459d4741f2858be21207f7e754
Author: Jonny Lamb <jonny lamb collabora co uk>
Date: Wed Jul 27 13:21:49 2011 +0100
audio-src: add some comments explaining the PA changes
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
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 96caae9..bde6e29 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]