summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsession.c
diff options
context:
space:
mode:
authorHåvard Graff <havard.graff@tandberg.com>2008-10-07 18:54:41 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:38 +0100
commit3bebd53b6fcdf53d6d5fc5d2e7281c7e11fe8300 (patch)
tree9c1ca08f6ab77d78ce40cf26f88ce95167b77cab /gst/rtpmanager/rtpsession.c
parentbd8f4b6c58df1bdb9d412ca11b164196d731fb15 (diff)
gst/rtpmanager/gstrtpbin-marshal.list: Add marshaller for new action signal.
Original commit message from CVS: Patch by: Håvard Graff <havard dot graff at tandberg dot com> * gst/rtpmanager/gstrtpbin-marshal.list: Add marshaller for new action signal. * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_get_internal_session), (gst_rtp_bin_class_init): * gst/rtpmanager/gstrtpbin.h: Add action signal to retrieve the internal RTPSession object. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (gst_rtp_session_get_property), (gst_rtp_session_release_pad): Add property to access the internal RTPSession object. * gst/rtpmanager/rtpsession.c: (rtp_session_class_init), (check_collision): * gst/rtpmanager/rtpsession.h: Add action signal to retrieve an RTPSource object by SSRC. See #555396.
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;