diff options
author | Håvard Graff <havard.graff@tandberg.com> | 2008-10-07 18:54:41 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-10-07 18:54:41 +0000 |
commit | b398d611a459a674d6d7f097350ce47fe7e721d1 (patch) | |
tree | bf68f94de59ae16d02d9c0d1e28341586a22f80c /gst/rtpmanager/gstrtpbin.c | |
parent | ae65d3945bd52f49fcf03b404f24555650b2b402 (diff) | |
download | gst-plugins-bad-b398d611a459a674d6d7f097350ce47fe7e721d1.tar.gz gst-plugins-bad-b398d611a459a674d6d7f097350ce47fe7e721d1.tar.bz2 gst-plugins-bad-b398d611a459a674d6d7f097350ce47fe7e721d1.zip |
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/gstrtpbin.c')
-rw-r--r-- | gst/rtpmanager/gstrtpbin.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 19d17656..605a73dd 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -119,6 +119,7 @@ #include "gstrtpbin-marshal.h" #include "gstrtpbin.h" +#include "rtpsession.h" #include "gstrtpsession.h" #include "gstrtpjitterbuffer.h" @@ -228,6 +229,7 @@ enum { SIGNAL_REQUEST_PT_MAP, SIGNAL_CLEAR_PT_MAP, + SIGNAL_GET_INTERNAL_SESSION, SIGNAL_ON_NEW_SSRC, SIGNAL_ON_SSRC_COLLISION, @@ -734,6 +736,25 @@ gst_rtp_bin_clear_pt_map (GstRtpBin * bin) GST_RTP_BIN_UNLOCK (bin); } +static RTPSession * +gst_rtp_bin_get_internal_session (GstRtpBin * bin, guint session_id) +{ + RTPSession *internal_session = NULL; + GstRtpBinSession *session; + + GST_RTP_BIN_LOCK (bin); + GST_DEBUG_OBJECT (bin, "retrieving internal RTPSession object, index: %d", + session_id); + session = find_session_by_id (bin, (gint) session_id); + if (session) { + g_object_get (session->session, "internal-session", &internal_session, + NULL); + } + GST_RTP_BIN_UNLOCK (bin); + + return internal_session; +} + static void gst_rtp_bin_propagate_property_to_jitterbuffer (GstRtpBin * bin, const gchar * name, const GValue * value) @@ -1290,6 +1311,18 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass, clear_pt_map), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); + /** + * GstRtpBin::get-internal-session: + * @rtpbin: the object which received the signal + * @id: the session id + * + * Request the internal RTPSession object as #GObject in session @id. + */ + gst_rtp_bin_signals[SIGNAL_GET_INTERNAL_SESSION] = + g_signal_new ("get-internal-session", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass, + get_internal_session), NULL, NULL, gst_rtp_bin_marshal_OBJECT__UINT, + RTP_TYPE_SESSION, 1, G_TYPE_UINT); /** * GstRtpBin::on-new-ssrc: @@ -1460,6 +1493,8 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass) gstbin_class->handle_message = GST_DEBUG_FUNCPTR (gst_rtp_bin_handle_message); klass->clear_pt_map = GST_DEBUG_FUNCPTR (gst_rtp_bin_clear_pt_map); + klass->get_internal_session = + GST_DEBUG_FUNCPTR (gst_rtp_bin_get_internal_session); GST_DEBUG_CATEGORY_INIT (gst_rtp_bin_debug, "rtpbin", 0, "RTP bin"); } |