[farsight2/master] Integrate special source into the FsRtpSession (except for adding them)

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


---
 gst/fsrtpconference/fs-rtp-session.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 45f9f5c..7907ee3 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -45,6 +45,7 @@
 #include "fs-rtp-discover-codecs.h"
 #include "fs-rtp-codec-negotiation.h"
 #include "fs-rtp-substream.h"
+#include "fs-rtp-special-source.h"
 
 #define GST_CAT_DEFAULT fsrtpconference_debug
 
@@ -140,6 +141,8 @@ struct _FsRtpSessionPrivate
   /* Protected by the session mutex */
   gint no_rtcp_timeout;
 
+  GList *extra_sources;
+
   GError *construction_error;
 
   gboolean disposed;
@@ -370,6 +373,9 @@ fs_rtp_session_dispose (GObject *object)
     g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem,
       "gst-src");
 
+  self->priv->extra_sources =
+    fs_rtp_special_sources_destroy (self->priv->extra_sources);
+
   /* Now they should all be stopped, we can remove them in peace */
 
   if (self->priv->media_sink_valve) {
@@ -1207,7 +1213,15 @@ static gboolean
 fs_rtp_session_start_telephony_event (FsSession *session, guint8 event,
                                       guint8 volume, FsDTMFMethod method)
 {
-  return FALSE;
+  FsRtpSession *self = FS_RTP_SESSION (session);
+  gboolean ret = FALSE;
+
+  FS_RTP_SESSION_LOCK (self);
+  ret = fs_rtp_special_sources_start_telephony_event (
+      self->priv->extra_sources, event, volume, method);
+  FS_RTP_SESSION_UNLOCK (self);
+
+  return ret;
 }
 
 /**
@@ -1227,7 +1241,15 @@ fs_rtp_session_start_telephony_event (FsSession *session, guint8 event,
 static gboolean
 fs_rtp_session_stop_telephony_event (FsSession *session, FsDTMFMethod method)
 {
-  return FALSE;
+  FsRtpSession *self = FS_RTP_SESSION (session);
+  gboolean ret = FALSE;
+
+  FS_RTP_SESSION_LOCK (self);
+  ret = fs_rtp_special_sources_stop_telephony_event (
+      self->priv->extra_sources, method);
+  FS_RTP_SESSION_UNLOCK (self);
+
+  return ret;
 }
 
 /**
-- 
1.5.6.5




More information about the farsight-commits mailing list