[farsight2/master] Add rtpdtmfdepay as the receive pipeline

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


---
 gst/fsrtpconference/fs-rtp-dtmf-event-source.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
index c846ca7..9367556 100644
--- a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
+++ b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
@@ -126,6 +126,11 @@ fs_rtp_dtmf_event_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
     return blueprints;
   }
 
+  fact = gst_element_factory_find ("rtpdtmfdepay");
+  if (!fact)
+    GST_CAT_WARNING (fsrtpconference_disco,
+        "Could not find rtpdtmfdepay, will not be able to receive DTMF events");
+
   for (item = g_list_first (blueprints);
        item;
        item = g_list_next (item))
@@ -169,12 +174,19 @@ fs_rtp_dtmf_event_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
     new_bp->rtp_caps = fs_codec_to_gst_caps (new_bp->codec);
     new_bp->media_caps = gst_caps_new_any ();
 
+    if (fact)
+      new_bp->receive_pipeline_factory = g_list_prepend (NULL,
+          g_list_prepend (NULL, gst_object_ref (fact)));
+
     new_blueprints = g_list_append (new_blueprints, new_bp);
 
     already_done = g_list_prepend (already_done,
         GUINT_TO_POINTER (bp->codec->clock_rate));
   }
 
+  if (fact)
+    gst_object_unref (fact);
+
   g_list_free (already_done);
 
   blueprints = g_list_concat (blueprints, new_blueprints);
-- 
1.5.6.5




More information about the farsight-commits mailing list