diff options
author | Julien Isorce <julien.isorce@collabora.co.uk> | 2013-11-01 17:04:28 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2013-11-11 15:25:52 +0100 |
commit | b32fc6f41629237a0c98435bbb9d3c00a167851f (patch) | |
tree | 07deea8b74a9e1058b2c723cf923f75bde5525f6 | |
parent | 3623ebf01e14603154b51de1c6dc0832a05466ff (diff) |
gstrtpsession: send custom upstream event "GstRTPCollision" on send_rtp_sink pad
See https://bugzilla.gnome.org/show_bug.cgi?id=711560
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 6ff65ebf7..4a33f6967 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -318,6 +318,7 @@ static void on_ssrc_collision (RTPSession * session, RTPSource * src, GstRtpSession * sess) { GstPad *recv_rtp_sink; + GstPad *send_rtp_sink; g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_SSRC_COLLISION], 0, src->ssrc); @@ -325,12 +326,22 @@ on_ssrc_collision (RTPSession * session, RTPSource * src, GstRtpSession * sess) GST_RTP_SESSION_LOCK (sess); if ((recv_rtp_sink = sess->recv_rtp_sink)) gst_object_ref (recv_rtp_sink); + if ((send_rtp_sink = sess->send_rtp_sink)) + gst_object_ref (send_rtp_sink); GST_RTP_SESSION_UNLOCK (sess); if (recv_rtp_sink) { gst_pad_push_event (recv_rtp_sink, gst_event_new_reconfigure ()); gst_object_unref (recv_rtp_sink); } + + if (send_rtp_sink) { + GstEvent *event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, + gst_structure_new ("GstRTPCollision", "ssrc", G_TYPE_UINT, + (guint) src->ssrc, NULL)); + gst_pad_push_event (send_rtp_sink, event); + gst_object_unref (send_rtp_sink); + } } static void |