pidgin.vv: 4a50d858: Use purple_media_get_tee instead of purp...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Sun Mar 22 23:01:11 EDT 2009
-----------------------------------------------------------------
Revision: 4a50d85882916682be05dd26cd0c5c6803604ef0
Ancestor: 9c99cb92eb1133a1434cc0078caded42275b4ea4
Author: maiku at soc.pidgin.im
Date: 2009-03-22T21:27:43
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/4a50d85882916682be05dd26cd0c5c6803604ef0
Modified files:
pidgin/gtkmedia.c
ChangeLog:
Use purple_media_get_tee instead of purple_media_get_sink.
-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c f77c3f634a74d3a72f1ae58cb609bcaafc10e77f
+++ pidgin/gtkmedia.c dc8edcf90f7243ca058f686dca01b82d78eced4b
@@ -677,10 +677,22 @@ pidgin_media_state_changed_cb(PurpleMedi
} 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);
}
}
More information about the Commits
mailing list