diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-09-20 14:34:57 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-11 02:30:30 +0100 |
commit | 949f1685ce1c3ddf04873825f1bdc1c0bb7f284e (patch) | |
tree | 109e6da51aa20ad6e62978f3ccbb45d88cd77817 /gst/rtpmanager/gstrtpsession.c | |
parent | 56d583228740f37745db800a010b3f7b4ce6f164 (diff) |
gst/rtpmanager/: Add notification of active SSRCs to various RTP elements. Fixes #478566.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (on_ssrc_active), (create_session),
(gst_rtp_bin_class_init):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpsession.c: (on_ssrc_active),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_event_send_rtp_sink):
* gst/rtpmanager/gstrtpsession.h:
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(on_ssrc_active), (rtp_session_process_rb):
* gst/rtpmanager/rtpsession.h:
Add notification of active SSRCs to various RTP elements. Fixes #478566.
Diffstat (limited to 'gst/rtpmanager/gstrtpsession.c')
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 83210ff8..773f0901 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -208,6 +208,7 @@ enum SIGNAL_ON_NEW_SSRC, SIGNAL_ON_SSRC_COLLISION, SIGNAL_ON_SSRC_VALIDATED, + SIGNAL_ON_SSRC_ACTIVE, SIGNAL_ON_BYE_SSRC, SIGNAL_ON_BYE_TIMEOUT, SIGNAL_ON_TIMEOUT, @@ -307,6 +308,13 @@ on_ssrc_validated (RTPSession * session, RTPSource * src, GstRtpSession * sess) } static void +on_ssrc_active (RTPSession * session, RTPSource * src, GstRtpSession * sess) +{ + g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_SSRC_ACTIVE], 0, + src->ssrc); +} + +static void on_bye_ssrc (RTPSession * session, RTPSource * src, GstRtpSession * sess) { g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_BYE_SSRC], 0, @@ -429,6 +437,18 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_ssrc_validated), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + /** + * GstRtpSession::on-ssrc_active: + * @sess: the object which received the signal + * @ssrc: the SSRC + * + * Notify of a SSRC that is active, i.e., sending RTCP. + */ + gst_rtp_session_signals[SIGNAL_ON_SSRC_ACTIVE] = + g_signal_new ("on-ssrc-active", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, + on_ssrc_active), NULL, NULL, g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); /** * GstRtpSession::on-bye-ssrc: @@ -497,6 +517,8 @@ gst_rtp_session_init (GstRtpSession * rtpsession, GstRtpSessionClass * klass) (GCallback) on_ssrc_collision, rtpsession); g_signal_connect (rtpsession->priv->session, "on-ssrc-validated", (GCallback) on_ssrc_validated, rtpsession); + g_signal_connect (rtpsession->priv->session, "on-ssrc-active", + (GCallback) on_ssrc_active, rtpsession); g_signal_connect (rtpsession->priv->session, "on-bye-ssrc", (GCallback) on_bye_ssrc, rtpsession); g_signal_connect (rtpsession->priv->session, "on-bye-timeout", @@ -1229,6 +1251,9 @@ gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event) ret = gst_pad_push_event (rtpsession->send_rtp_src, event); break; } + case GST_EVENT_EOS: + ret = gst_pad_push_event (rtpsession->send_rtp_src, event); + break; default: ret = gst_pad_push_event (rtpsession->send_rtp_src, event); break; |