[farsight2/master] Dispatch the new ssrc-cname association signal

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:20:08 PST 2008


---
 gst/fsrtpconference/fs-rtp-conference.c |   20 ++++++++++++++++++++
 gst/fsrtpconference/fs-rtp-session.c    |    9 +++++++++
 gst/fsrtpconference/fs-rtp-session.h    |    5 +++++
 3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 86f7601..dda965c 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -117,6 +117,11 @@ static GstCaps *_rtpbin_request_pt_map (GstElement *element,
 static void _rtpbin_pad_added (GstElement *rtpbin,
     GstPad *new_pad,
     gpointer user_data);
+static void _rtpbin_on_new_ssrc_cname_association (GstElement *rtpbin,
+    guint session_id,
+    guint ssrc,
+    gchar *cname,
+    gpointer user_data);
 
 
 static void
@@ -214,6 +219,8 @@ fs_rtp_conference_init (FsRtpConference *conf,
                     G_CALLBACK (_rtpbin_request_pt_map), conf);
   g_signal_connect (conf->gstrtpbin, "pad-added",
                     G_CALLBACK (_rtpbin_pad_added), conf);
+  g_signal_connect (conf->gstrtpbin, "on-new-ssrc-cname-association",
+                    G_CALLBACK (_rtpbin_on_new_ssrc_cname_association), conf);
 }
 
 static GstCaps *
@@ -279,6 +286,19 @@ _rtpbin_pad_added (GstElement *rtpbin, GstPad *new_pad,
   g_free (name);
 }
 
+static void
+_rtpbin_on_new_ssrc_cname_association (GstElement *rtpbin,
+    guint session_id,
+    guint ssrc,
+    gchar *cname,
+    gpointer user_data)
+{
+  FsRtpConference *self = FS_RTP_CONFERENCE (user_data);
+  FsRtpSession *session =
+    fs_rtp_conference_get_session_by_id (self, session_id);
+  fs_rtp_session_associate_ssrc_cname (session, ssrc, cname);
+}
+
 
 /**
  * fs_rtp_conference_get_session_by_id_locked
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index c348780..ce1df0a 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2156,3 +2156,12 @@ fs_rtp_session_get_recv_codec_for_pt_locked (FsRtpSession *session,
 
   return fs_codec_copy (codec_association->codec);
 }
+
+
+void
+fs_rtp_session_associate_ssrc_cname (FsRtpSession *session,
+    guint32 ssrc,
+    gchar *cname)
+{
+  
+}
diff --git a/gst/fsrtpconference/fs-rtp-session.h b/gst/fsrtpconference/fs-rtp-session.h
index b44a6de..d096d5e 100644
--- a/gst/fsrtpconference/fs-rtp-session.h
+++ b/gst/fsrtpconference/fs-rtp-session.h
@@ -107,6 +107,11 @@ FsCodec *fs_rtp_session_get_recv_codec_for_pt_locked (FsRtpSession *session,
     gint pt,
     GError **error);
 
+void fs_rtp_session_associate_ssrc_cname (FsRtpSession *session,
+    guint32 ssrc,
+    gchar *cname);
+
+
 G_END_DECLS
 
 #endif /* __FS_RTP_SESSION_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list