[farsight2/master] Name the discovery elements meaningfully

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


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

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 23b910c..8636d31 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2982,6 +2982,7 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
     session->priv->discovery_codecbin = NULL;
   }
 
+  /* They must both exist or neither exists, anything else is wrong */
   if ((session->priv->discovery_fakesink == NULL ||
           session->priv->discovery_capsfilter == NULL) &&
       session->priv->discovery_fakesink != session->priv->discovery_capsfilter)
@@ -2997,8 +2998,10 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
   {
     GstCaps *caps;
 
+    tmp = g_strdup_printf ("discovery_fakesink_%d", session->id);
     session->priv->discovery_fakesink =
-      gst_element_factory_make ("fakesink", NULL);
+      gst_element_factory_make ("fakesink", tmp);
+    g_free (tmp);
     if (!session->priv->discovery_fakesink)
     {
       g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
@@ -3025,8 +3028,10 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
       goto error;
     }
 
+    tmp = g_strdup_printf ("discovery_capsfilter_%d", session->id);
     session->priv->discovery_capsfilter =
-      gst_element_factory_make ("capsfilter", NULL);
+      gst_element_factory_make ("capsfilter", tmp);
+    g_free (tmp);
     if (!session->priv->discovery_capsfilter)
     {
       g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
-- 
1.5.6.5




More information about the farsight-commits mailing list