[empathy: 3/23] audio-src: remove the element-added stuff



commit 65e9deccdb37c518ebfa766b7762ace338e9a027
Author: Jonny Lamb <jonny lamb collabora co uk>
Date:   Tue Jul 26 14:24:29 2011 +0100

    audio-src: remove the element-added stuff
    
    Now that we hard-code pulsesrc, this is unnecessary.
    
    Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

 src/empathy-audio-src.c |   30 ------------------------------
 1 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c
index 252e8aa..8730de8 100644
--- a/src/empathy-audio-src.c
+++ b/src/empathy-audio-src.c
@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <gst/farsight/fs-element-added-notifier.h>
 #include "empathy-audio-src.h"
 
 G_DEFINE_TYPE(EmpathyGstAudioSrc, empathy_audio_src, GST_TYPE_BIN)
@@ -52,7 +51,6 @@ struct _EmpathyGstAudioSrcPrivate
   GstElement *src;
   GstElement *volume;
   GstElement *level;
-  FsElementAddedNotifier *notifier;
 
   gdouble peak_level;
   gdouble rms_level;
@@ -66,28 +64,6 @@ struct _EmpathyGstAudioSrcPrivate
   EmpathyGstAudioSrcPrivate))
 
 static void
-empathy_audio_src_element_added_cb (FsElementAddedNotifier *notifier,
-  GstBin *bin, GstElement *element, EmpathyGstAudioSrc *self)
-{
-  EmpathyGstAudioSrcPrivate *priv = EMPATHY_GST_AUDIO_SRC_GET_PRIVATE (self);
-
-  if (g_object_class_find_property (G_OBJECT_GET_CLASS (element), "volume"))
-    {
-      gdouble volume;
-
-      volume = empathy_audio_src_get_volume (self);
-      empathy_audio_src_set_volume (self, 1.0);
-
-      if (priv->volume != NULL)
-        g_object_unref (priv->volume);
-      priv->volume = g_object_ref (element);
-
-      if (volume != 1.0)
-        empathy_audio_src_set_volume (self, volume);
-    }
-}
-
-static void
 empathy_audio_src_init (EmpathyGstAudioSrc *obj)
 {
   EmpathyGstAudioSrcPrivate *priv = EMPATHY_GST_AUDIO_SRC_GET_PRIVATE (obj);
@@ -97,10 +73,6 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
   priv->peak_level = -G_MAXDOUBLE;
   priv->lock = g_mutex_new ();
 
-  priv->notifier = fs_element_added_notifier_new ();
-  g_signal_connect (priv->notifier, "element-added",
-    G_CALLBACK (empathy_audio_src_element_added_cb), obj);
-
   src_element = g_getenv ("EMPATHY_AUDIO_SRC");
   if (src_element == NULL)
     src_element = "pulsesrc";
@@ -108,8 +80,6 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj)
   priv->src = gst_element_factory_make (src_element, NULL);
   gst_bin_add (GST_BIN (obj), priv->src);
 
-  fs_element_added_notifier_add (priv->notifier, GST_BIN (priv->src));
-
   priv->volume = gst_element_factory_make ("volume", NULL);
   g_object_ref (priv->volume);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]