ext/esd/README: Remove, it contains nothing useful anyway.
authorTim-Philipp Müller <tim@centricular.net>
Mon, 24 Jul 2006 14:37:36 +0000 (14:37 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 24 Jul 2006 14:37:36 +0000 (14:37 +0000)
Original commit message from CVS:
* ext/esd/README:
Remove, it contains nothing useful anyway.
* ext/esd/esdsink.c: (gst_esdsink_init), (gst_esdsink_prepare),
(gst_esdsink_delay):
Some small clean-ups; use GST_BOILERPLATE etc.

ChangeLog
ext/esd/README [deleted file]
ext/esd/esdsink.c

index cf760bd..6d5907e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-07-24  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * ext/esd/README:
+         Remove, it contains nothing useful anyway.
+
+       * ext/esd/esdsink.c: (gst_esdsink_init), (gst_esdsink_prepare),
+       (gst_esdsink_delay):
+         Some small clean-ups; use GST_BOILERPLATE etc.
+
 2006-07-24  Wim Taymans  <wim@fluendo.com>
 
        * gst/law/alaw-decode.c: (alawdec_getcaps):
diff --git a/ext/esd/README b/ext/esd/README
deleted file mode 100644 (file)
index d5ebcf0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-The esdsink plugin
-==================
-
-The esdsink plugin is for outputting an audio stream to an esd soundserver, whether local or on a remote machine 
-
-esdsink has 2 arguments that it accepts:
- - 'mute'      (boolean value)
- - 'depth'     (sample depth in bits- defaults to 16)
- - 'host'      (used only if you want to connect to a remote esd soundserver)
- - 'frequency' (integer value in Hz)
- - 'channels'  (number of channels - 2 for stereo)
-
index ae51ea7..de82d34 100644 (file)
@@ -58,7 +58,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw-int, "
-        "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
+        "endianness = (int) BYTE_ORDER, "
         "signed = (boolean) TRUE, "
         "width = (int) 16, "
         "depth = (int) 16, "
@@ -71,9 +71,6 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
         "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]")
     );
 
-static void gst_esdsink_base_init (gpointer g_class);
-static void gst_esdsink_class_init (GstEsdSinkClass * klass);
-static void gst_esdsink_init (GstEsdSink * esdsink);
 static void gst_esdsink_finalize (GObject * object);
 
 static GstCaps *gst_esdsink_getcaps (GstBaseSink * bsink);
@@ -93,32 +90,7 @@ static void gst_esdsink_set_property (GObject * object, guint prop_id,
 static void gst_esdsink_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static GstElementClass *parent_class = NULL;
-
-GType
-gst_esdsink_get_type (void)
-{
-  static GType esdsink_type = 0;
-
-  if (!esdsink_type) {
-    static const GTypeInfo esdsink_info = {
-      sizeof (GstEsdSinkClass),
-      gst_esdsink_base_init,
-      NULL,
-      (GClassInitFunc) gst_esdsink_class_init,
-      NULL,
-      NULL,
-      sizeof (GstEsdSink),
-      0,
-      (GInstanceInitFunc) gst_esdsink_init,
-    };
-
-    esdsink_type =
-        g_type_register_static (GST_TYPE_AUDIO_SINK, "GstEsdSink",
-        &esdsink_info, 0);
-  }
-  return esdsink_type;
-}
+GST_BOILERPLATE (GstEsdSink, gst_esdsink, GstAudioSink, GST_TYPE_AUDIO_SINK);
 
 static void
 gst_esdsink_base_init (gpointer g_class)
@@ -167,7 +139,7 @@ gst_esdsink_class_init (GstEsdSinkClass * klass)
 }
 
 static void
-gst_esdsink_init (GstEsdSink * esdsink)
+gst_esdsink_init (GstEsdSink * esdsink, GstEsdSinkClass * klass)
 {
   esdsink->fd = -1;
   esdsink->ctrl_fd = -1;
@@ -322,6 +294,9 @@ gst_esdsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
 
   spec->segsize = ESD_BUF_SIZE;
   spec->segtotal = (ESD_MAX_WRITE_SIZE / spec->segsize);
+
+  /* FIXME: this is wrong for signed ints (and the
+   * audioringbuffers should do it for us anyway) */
   spec->silence_sample[0] = 0;
   spec->silence_sample[1] = 0;
   spec->silence_sample[2] = 0;
@@ -411,7 +386,7 @@ gst_esdsink_delay (GstAudioSink * asink)
 
   /* latency is measured in samples at a rate of 44100, this 
    * cannot overflow. */
-  latency = latency * 44100LL / esdsink->rate;
+  latency = latency * G_GINT64_CONSTANT (44100) / esdsink->rate;
 
   GST_DEBUG_OBJECT (asink, "got latency: %u", latency);