[telepathy-stream-engine/refs/tags/telepathy-stream-engine_0.5.10] Iterate on the audio sending pipeline too

Olivier Crête olivier.crete at collabora.co.uk
Mon Oct 26 09:28:26 PDT 2009


---
 src/tp-stream-engine.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/tp-stream-engine.c b/src/tp-stream-engine.c
index 524b2ce..1ed8aad 100644
--- a/src/tp-stream-engine.c
+++ b/src/tp-stream-engine.c
@@ -787,6 +787,8 @@ channel_stream_created (TfChannel *chan G_GNUC_UNUSED,
   if (media_type == TP_MEDIA_STREAM_TYPE_AUDIO)
     {
       TpStreamEngineAudioStream *audiostream;
+      GstIterator *iter;
+      GstElement *src;
 
       audiostream = tp_stream_engine_audio_stream_new (stream,
           GST_BIN (self->priv->pipeline), &error);
@@ -806,6 +808,23 @@ channel_stream_created (TfChannel *chan G_GNUC_UNUSED,
           audiostream);
       g_mutex_unlock (self->priv->mutex);
 
+      g_object_get (audiostream, "src", &src, NULL);
+
+      g_mutex_lock (self->priv->mutex);
+      iter = gst_element_iterate_src_pads (src);
+      while (gst_iterator_foreach (iter, audio_pad_iter, self) ==
+          GST_ITERATOR_RESYNC)
+        gst_iterator_resync (iter);
+
+      gst_iterator_resync (iter);
+      while (gst_iterator_foreach (iter, audio_pad_internal_links_iter, self) ==
+          GST_ITERATOR_RESYNC)
+        gst_iterator_resync (iter);
+      gst_iterator_free (iter);
+      g_mutex_unlock (self->priv->mutex);
+
+      gst_object_unref (src);
+
       g_signal_connect (audiostream, "sink-added",
           G_CALLBACK (audio_sink_added_cb), self);
     }
-- 
1.5.6.5




More information about the telepathy-commits mailing list