[farsight2/master] Add callback on the apparition of the send_rtp_src_%d sometimes pad on gstrtpbin

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


---
 gst/fsrtpconference/fs-rtp-conference.c |   11 +++++++++++
 gst/fsrtpconference/fs-rtp-session.h    |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 027f961..a5c4c17 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -260,6 +260,17 @@ fs_rtp_conference_rtpbin_pad_added (GstElement *rtpbin, GstPad *new_pad,
           fs_rtp_stream_new_recv_pad (stream, new_pad, pt);
       }
     }
+  } else if (g_str_has_prefix (name, "send_rtp_src_")) {
+     guint session_id;
+
+     if (sscanf (name, "send_rtp_src_%u", &session_id)) {
+       FsRtpSession *session =
+         fs_rtp_conference_get_session_by_id (self, session_id);
+
+       if (session) {
+         fs_rtp_session_link_transmitter (session, new_pad);
+       }
+     }
   }
 
   g_free (name);
diff --git a/gst/fsrtpconference/fs-rtp-session.h b/gst/fsrtpconference/fs-rtp-session.h
index 221877d..68696a3 100644
--- a/gst/fsrtpconference/fs-rtp-session.h
+++ b/gst/fsrtpconference/fs-rtp-session.h
@@ -76,6 +76,8 @@ FsRtpSession *fs_rtp_session_new (FsMediaType media_type,
 
 GstCaps *fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt);
 
+void fs_rtp_session_link_transmitter (FsRtpSession *session, GstPad *pad);
+
 FsStream *fs_rtp_session_get_stream_by_id (FsRtpSession *session,
                                            guint stream_id);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list