# HG changeset patch # User Mike Ruprecht # Date 1237757263 0 # Node ID dd45432d6b69b2388f5de6ce6392067aa74c88ea # Parent 7759200867611cc97f0272d02397c0858456b8b7 Use purple_media_get_tee instead of purple_media_get_sink. diff -r 775920086761 -r dd45432d6b69 pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Sun Mar 22 21:02:48 2009 +0000 +++ b/pidgin/gtkmedia.c Sun Mar 22 21:27:43 2009 +0000 @@ -677,10 +677,22 @@ } else if (state == PURPLE_MEDIA_STATE_CONNECTED && purple_media_get_session_type(media, sid) & PURPLE_MEDIA_RECV_AUDIO) { - GstElement *media_sink = purple_media_get_sink(media, - sid, name); - gtkmedia->priv->recv_level = gst_bin_get_by_name( - GST_BIN(media_sink), "recvlevel"); + GstElement *tee = purple_media_get_tee(media, sid, name); + GstIterator *iter = gst_element_iterate_src_pads(tee); + GstPad *sinkpad; + if (gst_iterator_next(iter, (gpointer)&sinkpad) + == GST_ITERATOR_OK) { + GstPad *peer = gst_pad_get_peer(sinkpad); + if (peer != NULL) { + gtkmedia->priv->recv_level = + gst_bin_get_by_name( + GST_BIN(GST_OBJECT_PARENT( + peer)), "recvlevel"); + gst_object_unref(peer); + } + gst_object_unref(sinkpad); + } + gst_iterator_free(iter); } }