[gst-cvs] gst-plugins-bad: rtpbin: Implement relasing of the rtp recv pad
Wim Taymans
wtay at kemper.freedesktop.org
Thu May 21 15:54:25 PDT 2009
Module: gst-plugins-bad
Branch: master
Commit: 4424fd3c93ab2f2b9590a3b0c461c16d01f8a00a
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=4424fd3c93ab2f2b9590a3b0c461c16d01f8a00a
Author: Olivier Crête <olivier.crete at collabora.co.uk>
Date: Fri May 22 00:51:53 2009 +0200
rtpbin: Implement relasing of the rtp recv pad
---
gst/rtpmanager/gstrtpbin.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index a1411e1..075776e 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -2081,8 +2081,23 @@ link_failed:
static void
remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad)
{
- g_warning ("gstrtpbin: releasing pad %s:%s is not implemented",
- GST_DEBUG_PAD_NAME (pad));
+ if (session->demux_newpad_sig) {
+ g_signal_handler_disconnect (session->demux, session->demux_newpad_sig);
+ session->demux_newpad_sig = 0;
+ }
+
+ if (session->recv_rtp_src) {
+ gst_object_unref (session->recv_rtp_src);
+ session->recv_rtp_src = NULL;
+ }
+
+ if (session->recv_rtp_sink) {
+ gst_element_release_request_pad (session->session, session->recv_rtp_sink);
+ session->recv_rtp_sink = NULL;
+ }
+
+ gst_pad_set_active (pad, FALSE);
+ gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad);
}
/* Create a pad for receiving RTCP for the session in @name. Must be called with
More information about the Gstreamer-commits
mailing list