summaryrefslogtreecommitdiffstats
path: root/ext/hal/gsthalaudiosrc.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-03-01 21:50:36 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-03-01 21:50:36 +0000
commit8b65d9d1829c454c3a229062184f00f663486c30 (patch)
tree281d9c85c9378c7b5bfb30b1c11c54fe77075d29 /ext/hal/gsthalaudiosrc.c
parent84c6cb989a6d124debe22a9b587e0b98a153ba85 (diff)
ext/hal/: Having NULL as UDI previously selected the default sink/src. Change this back but mention it in the debug o...
Original commit message from CVS: * ext/hal/gsthalaudiosink.c: (do_toggle_element): * ext/hal/gsthalaudiosrc.c: (do_toggle_element): Having NULL as UDI previously selected the default sink/src. Change this back but mention it in the debug output. * ext/hal/hal.c: (gst_hal_get_alsa_element), (gst_hal_get_oss_element), (gst_hal_get_string), (gst_hal_render_bin_from_udi), (gst_hal_get_audio_sink), (gst_hal_get_audio_src): * ext/hal/hal.h: Refactor a bit, check all error conditions, greatly improve debugging and fix some possible memory leaks. Also implement OSS support and allow specifying an UDI that points to a real device. For this the child device which supports ALSA (preferred) or OSS is used. As a side effect this makes it impossible now to get a alsasink in halaudiosrc and a alsasrc in halaudiosink.
Diffstat (limited to 'ext/hal/gsthalaudiosrc.c')
-rw-r--r--ext/hal/gsthalaudiosrc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/hal/gsthalaudiosrc.c b/ext/hal/gsthalaudiosrc.c
index ed887544..b745bef1 100644
--- a/ext/hal/gsthalaudiosrc.c
+++ b/ext/hal/gsthalaudiosrc.c
@@ -27,8 +27,9 @@
* HalAudioSrc allows access to input of sound devices by specifying the
* corresponding persistent Unique Device Id (UDI) from the Hardware Abstraction
* Layer (HAL) in the <link linkend="GstHalAudioSrc--udi">udi</link> property.
- * It currently always embeds alsasrc as HAL doesn't support other sound systems
- * yet.
+ * It currently always embeds alsasrc or osssrc as HAL doesn't support other
+ * sound systems yet. You can also specify the UDI of a device that has ALSA or
+ * OSS subdevices. If both are present ALSA is preferred.
* </para>
* <title>Examples</title>
* <para>
@@ -164,11 +165,10 @@ do_toggle_element (GstHalAudioSrc * src)
}
GST_DEBUG_OBJECT (src, "Creating new kid");
- if (!src->udi) {
- GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
- ("No UDI set for device"));
- return FALSE;
- } else if (!(src->kid = gst_hal_get_audio_src (src->udi))) {
+ if (!src->udi)
+ GST_INFO_OBJECT (src, "No UDI set for device, using default one");
+
+ if (!(src->kid = gst_hal_get_audio_src (src->udi))) {
GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
("Failed to render audio source from Hal"));
return FALSE;