summaryrefslogtreecommitdiffstats
path: root/sys/osxaudio/gstosxaudio.c
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2008-08-26 21:13:08 +0000
committerMichael Smith <msmith@xiph.org>2008-08-26 21:13:08 +0000
commit192c1b942b5a727b03223869e7213af1941b0d5d (patch)
tree977ed239522f2b38c229710fd952293bc26b8119 /sys/osxaudio/gstosxaudio.c
parent2ea5c05241edb2ca63967c3056a5ee3347bce576 (diff)
sys/osxaudio/: Rewrite caps setting and ring buffer initialisation.
Original commit message from CVS: * sys/osxaudio/Makefile.am: * sys/osxaudio/gstosxaudio.c: * sys/osxaudio/gstosxaudiosink.c: * sys/osxaudio/gstosxaudiosink.h: * sys/osxaudio/gstosxaudiosrc.c: * sys/osxaudio/gstosxaudiosrc.h: * sys/osxaudio/gstosxringbuffer.c: * sys/osxaudio/gstosxringbuffer.h: Rewrite caps setting and ring buffer initialisation. Previously we never told CoreAudio what format we were going to send it, so it only worked due to luck, and not at all on some hardware. Now we explicitly advertise what formats the hardware supports, and then configure the selected one correctly.
Diffstat (limited to 'sys/osxaudio/gstosxaudio.c')
-rw-r--r--sys/osxaudio/gstosxaudio.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/sys/osxaudio/gstosxaudio.c b/sys/osxaudio/gstosxaudio.c
index 8a79bed2..89232842 100644
--- a/sys/osxaudio/gstosxaudio.c
+++ b/sys/osxaudio/gstosxaudio.c
@@ -1,6 +1,7 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com>
+ * Copyright (C) 2007,2008 Pioneers of the Inevitable <songbird@songbirdnest.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
@@ -16,7 +17,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
- * The development of this code was made possible due to the involvement of Pioneers of the * Inevitable, the creators of the Songbird Music player
+ * The development of this code was made possible due to the involvement of
+ * Pioneers of the Inevitable, the creators of the Songbird Music player
*
*/
@@ -49,29 +51,20 @@
#include "gstosxaudioelement.h"
#include "gstosxaudiosink.h"
#include "gstosxaudiosrc.h"
-extern gchar *__gst_osxaudio_plugin_dir;
-
-GST_DEBUG_CATEGORY (osxaudio_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
- if (!gst_library_load ("gstaudio"))
- return FALSE;
-
- if (!gst_element_register (plugin, "osxaudiosink", GST_RANK_PRIMARY,
- GST_TYPE_OSXAUDIOSINK)) {
+ if (!gst_element_register (plugin, "fixedosxaudiosink", GST_RANK_PRIMARY + 1,
+ GST_TYPE_OSX_AUDIO_SINK)) {
return FALSE;
}
- if (!gst_element_register (plugin, "osxaudiosrc", GST_RANK_PRIMARY,
- GST_TYPE_OSXAUDIOSRC)) {
+ if (!gst_element_register (plugin, "fixedosxaudiosrc", GST_RANK_PRIMARY + 1,
+ GST_TYPE_OSX_AUDIO_SRC)) {
return FALSE;
}
- GST_DEBUG_CATEGORY_INIT (osxaudio_debug, "osx", 0, "OSX audio elements");
-
-
return TRUE;
}