]> git.0d.be Git - empathy.git/blobdiff - src/empathy-audio-sink.c
Reorder header inclusions accordingly to the Telepathy coding style
[empathy.git] / src / empathy-audio-sink.c
index ba5cab77d32cdc03520bebcf2766b6c64fad0986..985a1fa36d83d8f825277b1676dc543601e40cd6 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
+#include "config.h"
+#include "empathy-audio-sink.h"
 
-#include <gst/audio/audio.h>
+#ifdef HAVE_GST1
+#include <gst/audio/streamvolume.h>
+#else
 #include <gst/interfaces/streamvolume.h>
-
-#include <telepathy-glib/telepathy-glib.h>
+#endif
 
 #include "empathy-audio-utils.h"
 
-#include "empathy-audio-sink.h"
-
 #define DEBUG_FLAG EMPATHY_DEBUG_VOIP
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 G_DEFINE_TYPE(EmpathyGstAudioSink, empathy_audio_sink, GST_TYPE_BIN)
 
@@ -51,8 +48,12 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE(
     "sink%d",
     GST_PAD_SINK,
     GST_PAD_REQUEST,
+#ifdef HAVE_GST1
+    GST_STATIC_CAPS ( "audio/x-raw" )
+#else
     GST_STATIC_CAPS ( GST_AUDIO_INT_PAD_TEMPLATE_CAPS " ; "
         GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS)
+#endif
 );
 
 enum {
@@ -80,9 +81,16 @@ empathy_audio_sink_init (EmpathyGstAudioSink *self)
   g_mutex_init (&self->priv->volume_mutex);
 }
 
+#ifdef HAVE_GST1
+static GstPad * empathy_audio_sink_request_new_pad (GstElement *self,
+  GstPadTemplate *templ,
+  const gchar* name,
+  const GstCaps *caps);
+#else
 static GstPad * empathy_audio_sink_request_new_pad (GstElement *self,
   GstPadTemplate *templ,
   const gchar* name);
+#endif
 
 static void empathy_audio_sink_release_pad (GstElement *self,
   GstPad *pad);
@@ -293,10 +301,18 @@ empathy_audio_sink_volume_idle_setup (gpointer user_data)
   return FALSE;
 }
 
+#ifdef HAVE_GST1
+static GstPad *
+empathy_audio_sink_request_new_pad (GstElement *element,
+  GstPadTemplate *templ,
+  const gchar* name,
+  const GstCaps *caps)
+#else
 static GstPad *
 empathy_audio_sink_request_new_pad (GstElement *element,
   GstPadTemplate *templ,
   const gchar* name)
+#endif
 {
   EmpathyGstAudioSink *self = EMPATHY_GST_AUDIO_SINK (element);
   GstElement *bin, *resample, *audioconvert0, *audioconvert1;