--- gst-plugins-good-0.10.5/configure.ac-orig	2007-03-16 14:28:00.798606000 +0800
+++ gst-plugins-good-0.10.5/configure.ac	2007-03-16 14:39:11.987155000 +0800
@@ -541,6 +541,12 @@ GST_CHECK_FEATURE(CDIO, [cdio library], 
   GST_PKG_CHECK_MODULES(CDIO, libcdio >= 0.71)
 ])
 
+dnl *** cddasrc ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_CDDASRC, true)
+GST_CHECK_FEATURE(CDDASRC, [HAL libraries], cddasrc, [
+  GST_PKG_CHECK_MODULES(CDDASRC, [hal >= 0.5.8, hal-storage >= 0.5.8, dbus-1 >= 0.32])
+])
+
 dnl **** ESound ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
 GST_CHECK_FEATURE(ESD, [ESounD sound daemon], esdsink, [
@@ -878,6 +884,7 @@ ext/Makefile
 ext/aalib/Makefile
 ext/annodex/Makefile
 ext/cairo/Makefile
+ext/cddasrc/Makefile
 ext/cdio/Makefile
 ext/dv/Makefile
 ext/esd/Makefile
--- gst-plugins-good-0.10.5/ext/Makefile.am-orig	2007-03-16 14:36:50.057857000 +0800
+++ gst-plugins-good-0.10.5/ext/Makefile.am	2007-03-16 14:37:04.594644000 +0800
@@ -22,6 +22,12 @@ else
 CDIO_DIR =
 endif
 
+if USE_CDDASRC
+CDDASRC_DIR = cddasrc
+else
+CDDASRC_DIR =
+endif
+
 if USE_ESD
 ESD_DIR = esd
 else
@@ -123,6 +129,7 @@ SUBDIRS = \
 	$(ANNODEX_DIR) \
 	$(CAIRO_DIR) \
 	$(CDIO_DIR) \
+	$(CDDASRC_DIR) \
 	$(DV1394_DIR) \
 	$(ESD_DIR) \
 	$(FLAC_DIR) \
--- /dev/null	2007-03-17 20:03:31.000000000 +0800
+++ gst-plugins-good-0.10.5/ext/cddasrc/gstcddasrc.h	2007-03-17 20:05:49.318199000 +0800
@@ -0,0 +1,67 @@
+/* GStreamer
+ * Copyright (C) 2007 Brian Cameron <Brian.Cameron@sun.com> and
+ *                    Artem Kachitchkine <Artem.Kachitchkine@sun.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_CDDASRC_H__
+#define __GST_CDDASRC_H__
+
+#include <sys/types.h>
+#include "gst/cdda/gstcddabasesrc.h"
+
+#define CDDASRC_BSIZE   2352
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_CDDASRC            (gst_cddasrc_get_type())
+#define GST_CDDASRC(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDDASRC,GstCddaSrc))
+#define GST_CDDASRC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDDASRC,GstCddaSrcClass))
+#define GST_IS_CDDASRC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDDASRC))
+#define GST_IS_CDDASRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDDASRC))
+#define GST_CDDASRC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CDDASRCSRC, GstCddaSrcClass))
+
+typedef struct _GstCddaSrc GstCddaSrc;
+typedef struct _GstCddaSrcClass GstCddaSrcClass;
+
+#define CDDASRC_BSIZE   2352
+
+/**
+ * GstCddaSrc::
+ *
+ * The cddasrc object structure.
+ */
+struct _GstCddaSrc {
+  GstCddaBaseSrc   cddabasesrc;
+
+  /*< private >*/
+  int             fd;
+  uint_t          track_count;
+  char            **devices;
+  boolean_t       *has_audio;
+};
+
+struct _GstCddaSrcClass {
+  GstCddaBaseSrcClass parent_class;
+};
+
+GType    gst_cddasrc_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_CDDASRC_H__ */
+
--- /dev/null	2007-03-19 00:56:10.000000000 +0800
+++ gst-plugins-good-0.10.5/ext/cddasrc/gstcddasrc.c	2007-03-19 00:55:49.593511000 +0800
@@ -0,0 +1,565 @@
+/* GStreamer
+ * Copyright (C) <2007> Brian Cameron <Brian.Cameron@sun.com> and
+ *                      Artem Kachitchkine <Artem.Kachitchkine@sun.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:element-cddasrc
+ * @short_description: Reads raw audio from an Audio CD
+ * @see_also: GstCddaBaseSrc
+ *
+ * <refsect2>
+ * <para>
+ * cddasrc reads and extracts raw audio from Audio CDs using kernel
+ * ioctls directly.
+ * </para>
+ * <title>Example launch line</title>
+ * <para>
+ * <programlisting>
+ * gst-launch cddasrc track=5 ! audioconvert ! vorbisenc ! oggmux ! filesink location=track5.ogg
+ * </programlisting>
+ * This pipeline extracts track 5 of the audio CD and encodes it into an
+ * Ogg/Vorbis file.
+ * </para>
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <libintl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/byteorder.h>
+#include <sys/cdio.h>
+#include <hal/libhal.h>
+#include <hal/libhal-storage.h>
+
+#include "gstcddasrc.h"
+#include "gst/gst-i18n-plugin.h"
+
+#define DEFAULT_READ_SPEED   -1
+
+enum
+{
+  PROP0 = 0,
+  PROP_READ_SPEED
+};
+
+GST_DEBUG_CATEGORY_STATIC (gst_cddasrc_debug);
+#define GST_CAT_DEFAULT gst_cddasrc_debug
+
+GST_BOILERPLATE (GstCddaSrc, gst_cddasrc, GstCddaBaseSrc,
+    GST_TYPE_CDDA_BASE_SRC)
+
+static void gst_cddasrc_finalize (GObject * obj);
+static GstBuffer *gst_cddasrc_read_sector (GstCddaBaseSrc * src,
+    gint sector);
+static gboolean gst_cddasrc_open (GstCddaBaseSrc * src,
+    const gchar * device);
+static void gst_cddasrc_close (GstCddaBaseSrc * src);
+static gchar **gst_cddasrc_probe_devices (GstCddaBaseSrc * cddabasesrc);
+static gchar *gst_cddasrc_get_default_device (GstCddaBaseSrc * cddabasesrc);
+static void gst_cddasrc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_cddasrc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static void gst_cddasrc_hal_find_cdroms (GstCddaSrc *);
+
+static const GstElementDetails cddasrc_details =
+GST_ELEMENT_DETAILS ("CD Audio (cdda) Source",
+    "Source/File",
+    "Read audio from CD",
+    "Brian Cameron <Brian.Cameron@sun.com>, " "Artem Kachitchkine <Artem.Kachitchkine@sun.com>");
+
+static void
+gst_cddasrc_base_init (gpointer g_class)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+  gst_element_class_set_details (element_class, &cddasrc_details);
+}
+
+static void
+gst_cddasrc_init (GstCddaSrc * src, GstCddaSrcClass * klass)
+{
+  src->devices = NULL;
+}
+
+static void
+gst_cddasrc_class_init (GstCddaSrcClass * klass)
+{
+  GstCddaBaseSrcClass *cddabasesrc_class = GST_CDDA_BASE_SRC_CLASS (klass);
+  GObjectClass *gobject_class            = G_OBJECT_CLASS (klass);
+
+  gobject_class->set_property            = gst_cddasrc_set_property;
+  gobject_class->get_property            = gst_cddasrc_get_property;
+  gobject_class->finalize                = gst_cddasrc_finalize;
+
+  cddabasesrc_class->open                = gst_cddasrc_open;
+  cddabasesrc_class->close               = gst_cddasrc_close;
+  cddabasesrc_class->read_sector         = gst_cddasrc_read_sector;
+  cddabasesrc_class->get_default_device  = gst_cddasrc_get_default_device;
+  cddabasesrc_class->probe_devices       = gst_cddasrc_probe_devices;
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_READ_SPEED,
+      g_param_spec_int ("read-speed", "Read speed",
+          "Read from device at the specified speed (-1 = default)", -1, 100,
+          DEFAULT_READ_SPEED, G_PARAM_READWRITE));
+}
+
+static gchar **
+gst_cddasrc_probe_devices (GstCddaBaseSrc * cddabasesrc)
+{
+  GstCddaSrc *src = GST_CDDASRC (cddabasesrc);
+
+  if (src->devices != NULL) {
+     free (src->devices);
+     free (src->has_audio);
+
+     src->devices = NULL;
+     src->has_audio = NULL;
+  }
+  gst_cddasrc_hal_find_cdroms (src);
+
+  return (src->devices);
+}
+
+static gchar *
+gst_cddasrc_get_default_device (GstCddaBaseSrc * cddabasesrc)
+{
+  GstCddaSrc *src;
+  gchar *ret = NULL;
+  int i;
+
+  src = GST_CDDASRC (cddabasesrc);
+
+  if (src->devices == NULL) {
+     gst_cddasrc_probe_devices (cddabasesrc);
+     if (src->devices == NULL) {
+        return (NULL);
+     }
+  }
+
+  /* prefer a drive with an audio disc, otherwise pick first */
+  for (i = 0; src->devices[i] != NULL; i++) {
+      if (src->has_audio[i]) {
+         ret = src->devices[i];
+         break;
+      }
+  }
+
+  if (ret == NULL)
+     ret = src->devices[0];
+
+  GST_LOG_OBJECT (src, "returning default device: %s", GST_STR_NULL (ret));
+
+  return (ret);
+}
+
+static gboolean
+cddasrc_init_device (GstCddaSrc *src)
+{
+  /* spin up and set max speed */
+  if (ioctl (src->fd, CDROMSTART) < 0)
+     return (FALSE);
+  else
+     return (TRUE);
+}
+
+static boolean_t
+cddasrc_read_toc (GstCddaSrc *src)
+{
+  struct cdrom_tochdr   toc_hdr;
+  struct cdrom_tocentry toc_entry;
+  uint_t i;
+
+  /* determine track count */
+  if (ioctl (src->fd, CDROMREADTOCHDR, &toc_hdr) < 0) {
+     return (FALSE);
+  }
+
+  src->track_count = toc_hdr.cdth_trk1 - toc_hdr.cdth_trk0 + 1;
+
+  /* retrieve track entries */
+  toc_entry.cdte_format = CDROM_LBA;
+  for (i = 1; i <= src->track_count; i++) {
+     GstCddaBaseSrcTrack track = { 0, };
+
+     toc_entry.cdte_track = i;
+     if (ioctl (src->fd, CDROMREADTOCENTRY, &toc_entry) == -1)
+        return (FALSE);
+
+     track.num      = i;
+     track.is_audio = (toc_entry.cdte_ctrl != CDROM_DATA_TRACK);
+     track.tags     = NULL;
+     track.start    = toc_entry.cdte_addr.lba;
+
+     /* End of the track is the start of the next track */
+     if (i == src->track_count)
+        toc_entry.cdte_track = CDROM_LEADOUT;
+     else 
+        toc_entry.cdte_track = i+1;
+
+     if (ioctl (src->fd, CDROMREADTOCENTRY, &toc_entry) == -1)
+        return (FALSE);
+
+     track.end      = toc_entry.cdte_addr.lba - 1;
+
+     gst_cdda_base_src_add_track (GST_CDDA_BASE_SRC (src), &track);
+  }
+
+  return (TRUE);
+}
+
+static gboolean
+gst_cddasrc_open (GstCddaBaseSrc * cddabasesrc, const gchar * device)
+{
+  GstCddaSrc *src = GST_CDDASRC (cddabasesrc);
+  gboolean ret;
+
+  GST_LOG_OBJECT (src, "Trying to open device %s", device);
+
+  g_assert (device != NULL);
+
+  if ((src->fd = open (device, O_RDONLY)) < 0) {
+     GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+        (_("Could not open CD device for reading.")),
+        ("open () of %s failed", device));
+     return (FALSE);
+   }
+
+   if (!cddasrc_init_device (src)) {
+      GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+        (_("Could not open CD device for reading.")),
+        ("init () failed"));
+      return (FALSE);
+   }
+   ret = cddasrc_read_toc (src);
+
+   return ret;
+}
+
+static void
+gst_cddasrc_close (GstCddaBaseSrc * cddabasesrc)
+{
+  GstCddaSrc *src = GST_CDDASRC (cddabasesrc);
+  close (src->fd);
+}
+
+static void
+cddasrc_byte_swap (void *buf, uint_t len)
+{
+  uint16_t *p;
+  uint16_t v;
+
+  for (p = buf; p < (uint16_t *)buf + len; p++) {
+      v = *p;
+      *p = BSWAP_16 (v);
+  }
+}
+
+static gboolean
+cddasrc_read (GstCddaSrc *src, void *buf, uint_t addr, uint_t len)
+{
+  struct cdrom_cdda cdda;
+
+  cdda.cdda_addr    = addr;
+  cdda.cdda_length  = len;
+  cdda.cdda_data    = (caddr_t)buf;
+  cdda.cdda_subcode = CDROM_DA_NO_SUBCODE;
+
+  if (ioctl (src->fd, CDROMCDDA, &cdda) < 0) {
+     if (ioctl (src->fd, CDROMCDDA, &cdda) < 0) {
+        GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+           (_("Failed reading CD.")),
+           ("read () failed"));
+        return (FALSE);
+     }
+  }
+
+#ifdef _BIG_ENDIAN
+  cddasrc_byte_swap (buf, len * 2352);
+#endif
+
+  return (TRUE);
+}
+
+static GstBuffer *
+gst_cddasrc_read_sector (GstCddaBaseSrc * cddabasesrc, gint sector)
+{
+  GstBuffer  *buf2;
+  GstCddaSrc *src = GST_CDDASRC (cddabasesrc);
+  size_t     len  = CDDASRC_BSIZE;
+  void       *buf;
+
+  if ((buf = calloc (1, (sizeof (void *) * len))) != NULL) { 
+     if (!cddasrc_read (src, buf, sector, 1)) {
+        free (buf);
+        buf = NULL;
+        return NULL;
+      }
+  }
+
+  buf2 = gst_buffer_new_and_alloc (CDDASRC_BSIZE);
+  memcpy (GST_BUFFER_DATA (buf2), buf, CDDASRC_BSIZE);
+  free (buf);
+  return (buf2);
+}
+
+static void
+gst_cddasrc_finalize (GObject * obj)
+{
+  GstCddaSrc *src = GST_CDDASRC (obj);
+
+  g_free (src->devices);
+
+  G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (gst_cddasrc_debug, "cddasrc", 0,
+      "CDDA Source");
+
+  if (!gst_element_register (plugin, "cddasrc", GST_RANK_SECONDARY,
+          GST_TYPE_CDDASRC))
+    return FALSE;
+
+#ifdef ENABLE_NLS
+  GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+      LOCALEDIR);
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
+
+
+  return TRUE;
+}
+
+static void
+gst_cddasrc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstCddaSrc *src = GST_CDDASRC (object);
+
+  switch (prop_id) {
+    case PROP_READ_SPEED:{
+      gint read_speed;
+      gint solaris_speed;
+
+      read_speed = g_value_get_int (value);
+
+      /*
+       * Solaris only supports certain speeds, so use the
+       * fastest available speed.
+       */
+      if (read_speed < 2)
+         solaris_speed = CDROM_NORMAL_SPEED;
+      else if (read_speed >= 2 && read_speed < 4)
+         solaris_speed = CDROM_DOUBLE_SPEED;
+      else if (read_speed >= 4 && read_speed < 12)
+         solaris_speed = CDROM_QUAD_SPEED;
+      else if (read_speed == 12)
+         solaris_speed = CDROM_TWELVE_SPEED;
+      else if (read_speed >= 12)
+         solaris_speed = CDROM_MAXIMUM_SPEED;
+
+      /*
+       * This ioctl will return -1 if the drive doesn't support
+       * changing speed.
+       */
+      ioctl (src->fd, CDROMSDRVSPEED, solaris_speed);
+
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_cddasrc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstCddaSrc *src = GST_CDDASRC (object);
+
+  switch (prop_id) {
+    case PROP_READ_SPEED:{
+      gint solaris_speed;
+      gint read_speed;
+      gint ret;
+
+      /*
+       * Solaris only supports certain speeds, so return
+       * supported values.  Just say MAXIMUM is 100 since
+       * Solaris ioctls doesn't let you find out the actual
+       * drive speed, but we know it is max (100).
+       */
+      ret = ioctl (src->fd, CDROMGDRVSPEED, &solaris_speed);
+      if (ret < 0)
+         read_speed = -1; /* drive does not support getting speed */
+      if (solaris_speed == CDROM_NORMAL_SPEED)
+         read_speed = 1;
+      else if (solaris_speed == CDROM_DOUBLE_SPEED)
+         read_speed = 2;
+      else if (solaris_speed == CDROM_QUAD_SPEED)
+         read_speed = 4;
+      else if (solaris_speed == CDROM_TWELVE_SPEED)
+         read_speed = 12;
+      else if (solaris_speed == CDROM_MAXIMUM_SPEED)
+         read_speed = 100;
+
+      g_value_set_int (value, read_speed);
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    "cddasrc",
+    "Read audio from CD",
+    plugin_init, VERSION, "GPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
+
+/* ===== HAL stuff ===== */
+
+static LibHalContext *
+gst_cddasrc_hal_init (GstCddaSrc *src)
+{
+  DBusError error;
+  LibHalContext *hal_ctx = NULL;
+
+  dbus_error_init (&error);
+  if ((hal_ctx = libhal_ctx_new ()) == NULL) {
+     GST_ELEMENT_ERROR (src, LIBRARY, INIT,
+        ("failed to initialize HAL"), ("failed to initialize HAL"));
+     goto out;
+  }
+  if (!libhal_ctx_set_dbus_connection(hal_ctx,
+      dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
+
+     GST_ELEMENT_ERROR (src, LIBRARY, INIT,
+        ("DBus connection failed"),
+        ("libhal_ctx_set_dbus_connection: %s %s", error.name, error.message));
+     libhal_ctx_free (hal_ctx);
+     goto out;
+  }
+  if (!libhal_ctx_init(hal_ctx, &error)) {
+    GST_ELEMENT_ERROR (src, LIBRARY, INIT,
+       ("HAL context init failed"),
+       ("libhal_ctx_init: %s: %s", error.name, error.message));
+    libhal_ctx_free (hal_ctx);
+    goto out;
+  }
+out:
+  dbus_error_free (&error);
+
+  return (hal_ctx);
+}
+
+static void
+gst_cddasrc_hal_fini (LibHalContext *hal_ctx)
+{
+  DBusError error;
+
+  dbus_error_init (&error);
+  libhal_ctx_shutdown (hal_ctx, &error);
+  libhal_ctx_free (hal_ctx);
+  dbus_error_free (&error);
+}
+
+static void
+gst_cddasrc_hal_find_cdroms (GstCddaSrc *src)
+{
+  DBusError       error;
+  LibHalContext   *hal_ctx;
+  int             i, j, k;
+  char            **drive_udis, **volume_udis;
+  int             num_drives, num_volumes;
+  char            *raw_device;
+  LibHalDrive     *drive;
+  dbus_bool_t     has_audio;
+
+  if ((hal_ctx = gst_cddasrc_hal_init (src)) == NULL) {
+     return;
+  }
+  dbus_error_init (&error);
+
+  drive_udis = libhal_find_device_by_capability (hal_ctx, "storage.cdrom",
+    &num_drives, &error);
+
+  if (dbus_error_is_set (&error) || drive_udis == NULL) {
+     goto out;
+  }
+
+  src->devices   = calloc (num_drives + 1, sizeof (char *));
+  src->has_audio = calloc (num_drives + 1, sizeof (boolean_t));
+
+  for (i = j = 0; i < num_drives; i++) {
+     raw_device = libhal_device_get_property_string (hal_ctx,
+        drive_udis[i], "block.solaris.raw_device", &error);
+     dbus_error_free (&error);
+
+     if ((raw_device == NULL) || (strlen (raw_device) == 0)) {
+        libhal_free_string (raw_device);
+        continue;
+     }
+
+     src->devices[j] = strdup (raw_device);
+     libhal_free_string (raw_device);
+
+     /* check for audio disc in this drive */
+     if ((drive = libhal_drive_from_udi (hal_ctx, drive_udis[i])) != NULL) {
+        if ((volume_udis = libhal_drive_find_all_volumes (hal_ctx,
+             drive, &num_volumes)) != NULL) {
+
+           for (k = 0; k < num_volumes; k++) {
+               src->has_audio[j] = (boolean_t)
+               libhal_device_get_property_bool (hal_ctx,
+                  volume_udis[k], "volume.disc.has_audio", &error);
+               dbus_error_free (&error);
+               if (src->has_audio[j]) {
+                  break;
+               }
+           }
+           libhal_free_string_array (volume_udis);
+        }
+        libhal_drive_free (drive);
+     }
+
+     j++;
+  }
+
+out:
+  libhal_free_string_array (drive_udis);
+  dbus_error_free (&error);
+
+  gst_cddasrc_hal_fini (hal_ctx);
+}
+
--- /dev/null	2007-03-19 01:47:57.000000000 +0800
+++ gst-plugins-good-0.10.5/ext/cddasrc/Makefile.am	2007-03-19 01:46:41.639278000 +0800
@@ -0,0 +1,20 @@
+plugin_LTLIBRARIES = libgstcddasrc.la
+
+libgstcddasrc_la_SOURCES = \
+	gstcddasrc.c
+
+libgstcddasrc_la_CFLAGS = \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(CDDASRC_CFLAGS)
+
+libgstcddasrc_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) -lgstcdda-$(GST_MAJORMINOR) \
+	$(GST_BASE_LIBS) \
+	$(CDDASRC_LIBS)
+
+libgstcddasrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
+
+noinst_HEADERS = \
+	gstcddasrc.h
