summaryrefslogtreecommitdiffstats
path: root/sys/osxaudio/gstosxaudiosink.c
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-03-15 11:39:53 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-03-15 11:39:53 +0000
commit4d0df9433c3a9ba3345c4d394b7ec20653ee6044 (patch)
tree075dbaaf00bbc7b14de4a6d87dc7519c4d90bfb9 /sys/osxaudio/gstosxaudiosink.c
parent1be3219c706bf105acde3efcafe20b962def928d (diff)
Activate osxaudio in gst-plugins-good with proper build setup.
Original commit message from CVS: * configure.ac: * sys/Makefile.am: * sys/osxaudio/Makefile.am: * sys/osxaudio/gstosxaudio.c: * sys/osxaudio/gstosxaudiosink.c: (gst_osx_audio_sink_osxelement_do_init), (gst_osx_audio_sink_init), (gst_osx_audio_sink_getcaps), (gst_osx_audio_sink_create_ringbuffer), (plugin_init): * sys/osxaudio/gstosxaudiosrc.c: (gst_osx_audio_src_osxelement_do_init), (gst_osx_audio_src_init), (gst_osx_audio_src_create_ringbuffer): * sys/osxaudio/gstosxringbuffer.c: (gst_osx_ring_buffer_get_type), (gst_osx_ring_buffer_class_init), (gst_osx_ring_buffer_init), (gst_osx_ring_buffer_acquire), (gst_osx_ring_buffer_start), (gst_osx_ring_buffer_pause), (gst_osx_ring_buffer_stop): * sys/osxaudio/gstosxringbuffer.h: Activate osxaudio in gst-plugins-good with proper build setup. Add inlined documentation. Fix debug statements Fix ringbuffer when pausing. Fixes #323471
Diffstat (limited to 'sys/osxaudio/gstosxaudiosink.c')
-rw-r--r--sys/osxaudio/gstosxaudiosink.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/osxaudio/gstosxaudiosink.c b/sys/osxaudio/gstosxaudiosink.c
index 43bcbdfb..222056c8 100644
--- a/sys/osxaudio/gstosxaudiosink.c
+++ b/sys/osxaudio/gstosxaudiosink.c
@@ -129,7 +129,7 @@ gst_osx_audio_sink_osxelement_do_init (GType type)
GST_DEBUG_CATEGORY_INIT (osx_audiosink_debug, "osxaudiosink", 0,
"OSX Audio Sink");
- GST_DEBUG ("Adding static interface\n");
+ GST_DEBUG ("Adding static interface");
g_type_add_interface_static (type, GST_OSX_AUDIO_ELEMENT_TYPE,
&osxelement_info);
}
@@ -190,9 +190,9 @@ gst_osx_audio_sink_init (GstOsxAudioSink * sink, GstOsxAudioSinkClass * gclass)
{
/* GstElementClass *klass = GST_ELEMENT_GET_CLASS (sink); */
sink->ringbuffer = NULL;
- GST_DEBUG ("Initialising object\n");
- gst_osx_audio_sink_create_ringbuffer (sink);
+ GST_DEBUG ("Initialising object");
+ gst_osx_audio_sink_create_ringbuffer (GST_BASE_AUDIO_SINK (sink));
}
static void
@@ -256,11 +256,12 @@ gst_osx_audio_sink_getcaps (GstBaseSink * sink)
kAudioDevicePropertyAvailableNominalSampleRates, &propertySize, &rates);
GST_DEBUG
- ("Getting available sample rates: Status: %d number of ranges: %d\n",
+ ("Getting available sample rates: Status: %ld number of ranges: %lu",
status, propertySize / sizeof (AudioValueRange));
for (i = 0; i < propertySize / sizeof (AudioValueRange); i++) {
- g_print ("Range from %f to %f\n", rates[i].mMinimum, rates[i].mMaximum);
+ GST_LOG_OBJECT (osxsink, "Range from %f to %f", rates[i].mMinimum,
+ rates[i].mMaximum);
}
return caps;
@@ -274,9 +275,9 @@ gst_osx_audio_sink_create_ringbuffer (GstBaseAudioSink * sink)
osxsink = GST_OSX_AUDIO_SINK (sink);
if (!osxsink->ringbuffer) {
- GST_DEBUG ("Creating ringbuffer\n");
+ GST_DEBUG ("Creating ringbuffer");
osxsink->ringbuffer = g_object_new (GST_TYPE_OSX_RING_BUFFER, NULL);
- GST_DEBUG ("osx sink 0x%x element 0x%x ioproc 0x%x\n", osxsink,
+ GST_DEBUG ("osx sink 0x%p element 0x%p ioproc 0x%p", osxsink,
GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsink),
(void *) gst_osx_audio_sink_io_proc);
osxsink->ringbuffer->element =
@@ -333,9 +334,9 @@ plugin_init (GstPlugin * plugin)
gboolean ret;
ret = gst_element_register (plugin, "osxaudiosink",
- GST_RANK_NONE, GST_TYPE_OSX_AUDIO_SINK);
+ GST_RANK_PRIMARY, GST_TYPE_OSX_AUDIO_SINK);
return ret && gst_element_register (plugin, "osxaudiosrc",
- GST_RANK_NONE, GST_TYPE_OSX_AUDIO_SRC);
+ GST_RANK_PRIMARY, GST_TYPE_OSX_AUDIO_SRC);
}
/* this is the structure that gstreamer looks for to register plugins