summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsession.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtpmanager/rtpsession.c')
-rw-r--r--gst/rtpmanager/rtpsession.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index 8e543b31..bf0a0aab 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -23,7 +23,7 @@
#include <gst/rtp/gstrtcpbuffer.h>
#include <gst/netbuffer/gstnetbuffer.h>
-
+#include "gstrtpbin-marshal.h"
#include "rtpsession.h"
GST_DEBUG_CATEGORY_STATIC (rtp_session_debug);
@@ -32,6 +32,7 @@ GST_DEBUG_CATEGORY_STATIC (rtp_session_debug);
/* signals and args */
enum
{
+ SIGNAL_GET_SOURCE_BY_SSRC,
SIGNAL_ON_NEW_SSRC,
SIGNAL_ON_SSRC_COLLISION,
SIGNAL_ON_SSRC_VALIDATED,
@@ -118,6 +119,19 @@ rtp_session_class_init (RTPSessionClass * klass)
gobject_class->get_property = rtp_session_get_property;
/**
+ * RTPSession::get-source-by-ssrc:
+ * @session: the object which received the signal
+ * @ssrc: the SSRC of the RTPSource
+ *
+ * Request the #RTPSource object with SSRC @ssrc in @session.
+ */
+ rtp_session_signals[SIGNAL_GET_SOURCE_BY_SSRC] =
+ g_signal_new ("get-source-by-ssrc", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (RTPSessionClass,
+ get_source_by_ssrc), NULL, NULL, gst_rtp_bin_marshal_OBJECT__UINT,
+ RTP_TYPE_SOURCE, 1, G_TYPE_UINT);
+
+ /**
* RTPSession::on-new-ssrc:
* @session: the object which received the signal
* @src: the new RTPSource
@@ -286,6 +300,9 @@ rtp_session_class_init (RTPSessionClass * klass)
"The number of active sources in the session", 0, G_MAXUINT,
DEFAULT_NUM_ACTIVE_SOURCES, G_PARAM_READABLE));
+ klass->get_source_by_ssrc =
+ GST_DEBUG_FUNCPTR (rtp_session_get_source_by_ssrc);
+
GST_DEBUG_CATEGORY_INIT (rtp_session_debug, "rtpsession", 0, "RTP Session");
}
@@ -947,7 +964,7 @@ static gboolean
check_collision (RTPSession * sess, RTPSource * source,
RTPArrivalStats * arrival, gboolean rtp)
{
- /* If we have not arrival address, we can't do collision checking */
+ /* If we have no arrival address, we can't do collision checking */
if (!arrival->have_address)
return FALSE;