summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpbin.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-09-20 14:34:57 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-09-20 14:34:57 +0000
commit7067d01d2a9e46a52f347cfa777e5a50f1d41494 (patch)
tree856d72cdb99c9b4975dd97e8aac6a13715777ca6 /gst/rtpmanager/gstrtpbin.c
parentb5af210ba28305b3c8b313add88fc428b1ebea98 (diff)
downloadgst-plugins-bad-7067d01d2a9e46a52f347cfa777e5a50f1d41494.tar.gz
gst-plugins-bad-7067d01d2a9e46a52f347cfa777e5a50f1d41494.tar.bz2
gst-plugins-bad-7067d01d2a9e46a52f347cfa777e5a50f1d41494.zip
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/gstrtpbin.c')
-rw-r--r--gst/rtpmanager/gstrtpbin.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 035f4cc9..a95a0eec 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -221,6 +221,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,
@@ -385,6 +386,13 @@ on_ssrc_validated (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
}
static void
+on_ssrc_active (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
+{
+ g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_ACTIVE], 0,
+ sess->id, ssrc);
+}
+
+static void
on_bye_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
{
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_BYE_SSRC], 0,
@@ -440,6 +448,8 @@ create_session (GstRtpBin * rtpbin, gint id)
(GCallback) on_ssrc_collision, sess);
g_signal_connect (sess->session, "on-ssrc-validated",
(GCallback) on_ssrc_validated, sess);
+ g_signal_connect (sess->session, "on-ssrc-active",
+ (GCallback) on_ssrc_active, sess);
g_signal_connect (sess->session, "on-bye-ssrc",
(GCallback) on_bye_ssrc, sess);
g_signal_connect (sess->session, "on-bye-timeout",
@@ -1082,6 +1092,19 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass)
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_validated),
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
G_TYPE_UINT, G_TYPE_UINT);
+ /**
+ * GstRtpBin::on-ssrc_active:
+ * @rtpbin: the object which received the signal
+ * @session: the session
+ * @ssrc: the SSRC
+ *
+ * Notify of a SSRC that is active, i.e., sending RTCP.
+ */
+ gst_rtp_bin_signals[SIGNAL_ON_SSRC_ACTIVE] =
+ g_signal_new ("on-ssrc-active", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_active),
+ NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
+ G_TYPE_UINT, G_TYPE_UINT);
/**
* GstRtpBin::on-bye-ssrc: