summaryrefslogtreecommitdiffstats
path: root/ext/hal
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-04-05 12:00:46 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-04-05 12:00:46 +0000
commit3e9bbb6b6497b96cff759be19cd0ee1b479421e6 (patch)
tree3ed78a0c8a69ebfd97a5f17fe889fa9e8d9009f8 /ext/hal
parent5a7677ab241118c5049683f4678cbc3a2c7d32ed (diff)
ext/hal/hal.c: Don't munge device string to 'default:x' for capture devices.
Original commit message from CVS: * ext/hal/hal.c: (gst_hal_get_alsa_element): Don't munge device string to 'default:x' for capture devices. Fixes #525833.
Diffstat (limited to 'ext/hal')
-rw-r--r--ext/hal/hal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/hal/hal.c b/ext/hal/hal.c
index 6858aeae..d23a91a6 100644
--- a/ext/hal/hal.c
+++ b/ext/hal/hal.c
@@ -115,7 +115,9 @@ gst_hal_get_alsa_element (LibHalContext * ctx, const gchar * udi,
return NULL;
}
- if (device == 0) {
+ /* This is a bit dodgy, since it makes lots of assumptions about the way
+ * alsa is set up. In any case, only munge the device string for playback */
+ if (strcmp (element, "alsasink") == 0 && device == 0) {
/* handle default device specially to use
* dmix, dsnoop, and softvol if appropriate */
string = g_strdup_printf ("%s device=default:%d", element, card);
@@ -302,6 +304,8 @@ ctx_free:
if (string == NULL) {
GST_WARNING ("Problem finding a HAL audio device for udi %s", udi);
+ } else {
+ GST_INFO ("Using %s", string);
}
return string;