summaryrefslogtreecommitdiff
path: root/gst/rtpmanager/rtpsession.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-01-30 16:50:36 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-01-30 16:50:36 +0100
commit77511b156e1dbc45c7dd0f24bb2832c9145fd535 (patch)
tree262fe8eb9af6e7cb74f3b5554c9a6f18df15b04e /gst/rtpmanager/rtpsession.c
parent9a9d4ecceabd0de3632f588ce5d89d7ba78b5490 (diff)
rtpsession: Add new on-receiving-rtcp signal
This will be emitted whenever an RTCP packet is received. Different to on-feedback-rtcp, this signal gets every complete RTCP packet and not just the individual feedback packets.
Diffstat (limited to 'gst/rtpmanager/rtpsession.c')
-rw-r--r--gst/rtpmanager/rtpsession.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index d5af155cc..cdcd686a0 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -50,6 +50,7 @@ enum
SIGNAL_ON_FEEDBACK_RTCP,
SIGNAL_SEND_RTCP,
SIGNAL_SEND_RTCP_FULL,
+ SIGNAL_ON_RECEIVING_RTCP,
LAST_SIGNAL
};
@@ -340,6 +341,22 @@ rtp_session_class_init (RTPSessionClass * klass)
G_STRUCT_OFFSET (RTPSessionClass, send_rtcp), NULL, NULL,
g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, G_TYPE_UINT64);
+ /**
+ * RTPSession::on-receiving-rtcp
+ * @session: the object which received the signal
+ * @buffer: the #GstBuffer containing the RTCP packet that was received
+ *
+ * This signal is emitted when receiving an RTCP packet before it is handled
+ * by the session. It can be used to extract custom information from RTCP packets.
+ *
+ * Since: 1.6
+ */
+ rtp_session_signals[SIGNAL_ON_RECEIVING_RTCP] =
+ g_signal_new ("on-sending-rtcp", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RTPSessionClass, on_receiving_rtcp),
+ NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1,
+ GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE);
+
g_object_class_install_property (gobject_class, PROP_INTERNAL_SSRC,
g_param_spec_uint ("internal-ssrc", "Internal SSRC",
"The internal SSRC used for the session (deprecated)",
@@ -2560,6 +2577,9 @@ rtp_session_process_rtcp (RTPSession * sess, GstBuffer * buffer,
GST_DEBUG ("received RTCP packet");
+ g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_RECEIVING_RTCP], 0,
+ buffer);
+
RTP_SESSION_LOCK (sess);
/* update pinfo stats */
update_packet_info (sess, &pinfo, FALSE, FALSE, FALSE, buffer, current_time,