Mercurial > pidgin.yaz
changeset 26419:dd45432d6b69
Use purple_media_get_tee instead of purple_media_get_sink.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sun, 22 Mar 2009 21:27:43 +0000 |
parents | 775920086761 |
children | 754be87047dc |
files | pidgin/gtkmedia.c |
diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }