summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsession.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-09-20 14:34:57 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:30 +0100
commit949f1685ce1c3ddf04873825f1bdc1c0bb7f284e (patch)
tree109e6da51aa20ad6e62978f3ccbb45d88cd77817 /gst/rtpmanager/rtpsession.c
parent56d583228740f37745db800a010b3f7b4ce6f164 (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/rtpsession.c')
-rw-r--r--gst/rtpmanager/rtpsession.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index fa9b84db..0f907efd 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -36,6 +36,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,
@@ -120,6 +121,18 @@ rtp_session_class_init (RTPSessionClass * klass)
NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
G_TYPE_OBJECT);
/**
+ * RTPSession::on-ssrc_active:
+ * @session: the object which received the signal
+ * @src: the active RTPSource
+ *
+ * Notify of a SSRC that is active, i.e., sending RTCP.
+ */
+ 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 (RTPSessionClass, on_ssrc_active),
+ NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+ G_TYPE_OBJECT);
+ /**
* RTPSession::on-bye-ssrc:
* @session: the object which received the signal
* @src: the RTPSource that went away
@@ -282,6 +295,14 @@ on_ssrc_validated (RTPSession * sess, RTPSource * source)
}
static void
+on_ssrc_active (RTPSession * sess, RTPSource * source)
+{
+ RTP_SESSION_UNLOCK (sess);
+ g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_ACTIVE], 0, source);
+ RTP_SESSION_LOCK (sess);
+}
+
+static void
on_bye_ssrc (RTPSession * sess, RTPSource * source)
{
RTP_SESSION_UNLOCK (sess);
@@ -1080,6 +1101,8 @@ rtp_session_process_rb (RTPSession * sess, RTPSource * source,
* the other sender to see if we are better or worse. */
rtp_source_process_rb (source, arrival->time, fractionlost, packetslost,
exthighestseq, jitter, lsr, dlsr);
+
+ on_ssrc_active (sess, source);
}
}
}