[farsight2/master] New src pads from the rtpbin are given to the session pending the ssrc-cname association

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


---
 gst/fsrtpconference/fs-rtp-conference.c |   10 +++-------
 gst/fsrtpconference/fs-rtp-session.c    |    5 -----
 gst/fsrtpconference/fs-rtp-session.h    |    6 ++++--
 gst/fsrtpconference/fs-rtp-stream.c     |    5 -----
 gst/fsrtpconference/fs-rtp-stream.h     |    2 --
 5 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 0b57987..e1bd486 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -246,19 +246,15 @@ fs_rtp_conference_rtpbin_pad_added (GstElement *rtpbin, GstPad *new_pad,
   name = gst_pad_get_name (new_pad);
 
   if (g_str_has_prefix (name, "recv_rtp_src_")) {
-    guint session_id, stream_id, pt;
+    guint session_id, ssrc, pt;
 
     if (sscanf (name, "recv_rtp_src_%u_%u_%u",
-        &session_id, &stream_id, &pt) == 3) {
+        &session_id, &ssrc, &pt) == 3) {
       FsRtpSession *session =
         fs_rtp_conference_get_session_by_id (self, session_id);
 
       if (session) {
-        FsRtpStream *stream =FS_RTP_STREAM_CAST (
-            fs_rtp_session_get_stream_by_id (session, stream_id));
-
-        if (stream)
-          fs_rtp_stream_new_recv_pad (stream, new_pad, pt);
+        fs_rtp_session_new_recv_pad (session, new_pad, ssrc, pt);
       }
     }
   } else if (g_str_has_prefix (name, "send_rtp_src_")) {
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 1854fac..477ba29 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -803,11 +803,6 @@ fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt)
   return NULL;
 }
 
-FsStream *
-fs_rtp_session_get_stream_by_id (FsRtpSession *session, guint stream_id)
-{
-  return NULL;
-}
 
 void
 fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *src_pad)
diff --git a/gst/fsrtpconference/fs-rtp-session.h b/gst/fsrtpconference/fs-rtp-session.h
index 2768f37..ece163a 100644
--- a/gst/fsrtpconference/fs-rtp-session.h
+++ b/gst/fsrtpconference/fs-rtp-session.h
@@ -83,8 +83,10 @@ GstCaps *fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt);
 
 void fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *pad);
 
-FsStream *fs_rtp_session_get_stream_by_id (FsRtpSession *session,
-                                           guint stream_id);
+
+void fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad,
+  guint ssrc, guint pt);
+
 
 G_END_DECLS
 
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 96d4042..3328b7c 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -494,11 +494,6 @@ fs_rtp_stream_new (FsRtpSession *session,
 }
 
 
-void
-fs_rtp_stream_new_recv_pad (FsRtpStream *stream, GstPad *pad, guint pt)
-{
-}
-
 static void
 fs_rtp_stream_local_candidates_prepared (
     FsStreamTransmitter *stream_transmitter, gpointer user_data)
diff --git a/gst/fsrtpconference/fs-rtp-stream.h b/gst/fsrtpconference/fs-rtp-stream.h
index 9f3addf..d40f39a 100644
--- a/gst/fsrtpconference/fs-rtp-stream.h
+++ b/gst/fsrtpconference/fs-rtp-stream.h
@@ -76,8 +76,6 @@ FsRtpStream *fs_rtp_stream_new (FsRtpSession *session,
                                 FsStreamTransmitter *stream_transmitter,
                                 GError **error);
 
-void fs_rtp_stream_new_recv_pad (FsRtpStream *stream, GstPad *pad, guint pt);
-
 G_END_DECLS
 
 #endif /* __FS_RTP_STREAM_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list