summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-05-22 16:41:19 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-05-22 16:41:19 +0200
commite8423da78eea949f8223da5c27ea36544a3a6c5b (patch)
treeb0906374ea1b3e0f6b3e28c738bad31d8909770a /gst
parent0d014baaa4c61010c98c6899cd2338da1423014b (diff)
downloadgst-plugins-bad-e8423da78eea949f8223da5c27ea36544a3a6c5b.tar.gz
gst-plugins-bad-e8423da78eea949f8223da5c27ea36544a3a6c5b.tar.bz2
gst-plugins-bad-e8423da78eea949f8223da5c27ea36544a3a6c5b.zip
rtpbin: add to new signal to remove SSRC pads
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/gstrtpbin.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index f7d7e54a..017ffc02 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -493,27 +493,18 @@ find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc)
}
static void
-ssrc_demux_pad_removed (GstElement * element, GstPad * pad,
+ssrc_demux_pad_removed (GstElement * element, guint ssrc, GstPad * pad,
GstRtpBinSession * session)
{
- guint ssrc;
GstRtpBinStream *stream = NULL;
- gchar *name;
- gint res;
-
- name = gst_pad_get_name (pad);
- res = sscanf (name, "src_%d", &ssrc);
- g_free (name);
-
- if (res != 1)
- return;
GST_RTP_SESSION_LOCK (session);
- if ((stream = find_stream_by_ssrc (session, ssrc))) {
+ if ((stream = find_stream_by_ssrc (session, ssrc)))
session->streams = g_slist_remove (session->streams, stream);
- free_stream (stream);
- }
GST_RTP_SESSION_UNLOCK (session);
+
+ if (stream)
+ free_stream (stream);
}
/* create a session with the given id. Must be called with RTP_BIN_LOCK */
@@ -2093,7 +2084,7 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
session->demux_newpad_sig = g_signal_connect (session->demux,
"new-ssrc-pad", (GCallback) new_ssrc_pad_found, session);
session->demux_padremoved_sig = g_signal_connect (session->demux,
- "pad-removed", (GCallback) ssrc_demux_pad_removed, session);
+ "removed-ssrc-pad", (GCallback) ssrc_demux_pad_removed, session);
GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad");
session->recv_rtp_sink_ghost =