mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
ext/hal/: Check if the device UDI is set before trying to query HAL about it and give a useful error message if it wa...
Original commit message from CVS: * ext/hal/gsthalaudiosink.c: (do_toggle_element): * ext/hal/gsthalaudiosrc.c: (do_toggle_element): Check if the device UDI is set before trying to query HAL about it and give a useful error message if it wasn't set. * ext/hal/hal.c: (gst_hal_get_string): Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL gives an assertion failure in D-Bus when running with DBUS_FATAL_WARNINGS=1.
This commit is contained in:
parent
9597bb3f07
commit
16490dc0cf
5 changed files with 28 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2007-03-01 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/hal/gsthalaudiosink.c: (do_toggle_element):
|
||||
* ext/hal/gsthalaudiosrc.c: (do_toggle_element):
|
||||
Check if the device UDI is set before trying to query HAL
|
||||
about it and give a useful error message if it wasn't set.
|
||||
* ext/hal/hal.c: (gst_hal_get_string):
|
||||
Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL
|
||||
gives an assertion failure in D-Bus when running with
|
||||
DBUS_FATAL_WARNINGS=1.
|
||||
|
||||
2007-02-28 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* configure.ac:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 54c2a701c28dcddaf051abf09a360223acd096c9
|
||||
Subproject commit 9a56e28fc15440eb6852411321c46312e1d1bb73
|
|
@ -162,7 +162,11 @@ do_toggle_element (GstHalAudioSink * sink)
|
|||
}
|
||||
|
||||
GST_DEBUG_OBJECT (sink, "Creating new kid");
|
||||
if (!(sink->kid = gst_hal_get_audio_sink (sink->udi))) {
|
||||
if (!sink->udi) {
|
||||
GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
|
||||
("No UDI set for device"));
|
||||
return FALSE;
|
||||
} else if (!(sink->kid = gst_hal_get_audio_sink (sink->udi))) {
|
||||
GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
|
||||
("Failed to render audio sink from Hal"));
|
||||
return FALSE;
|
||||
|
|
|
@ -164,7 +164,11 @@ do_toggle_element (GstHalAudioSrc * src)
|
|||
}
|
||||
|
||||
GST_DEBUG_OBJECT (src, "Creating new kid");
|
||||
if (!(src->kid = gst_hal_get_audio_src (src->udi))) {
|
||||
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))) {
|
||||
GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
|
||||
("Failed to render audio source from Hal"));
|
||||
return FALSE;
|
||||
|
|
|
@ -50,6 +50,12 @@ gst_hal_get_string (const gchar * udi)
|
|||
LibHalContext *ctx;
|
||||
char *string;
|
||||
|
||||
/* Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL gives
|
||||
* an assertion failure in D-Bus when running with
|
||||
* DBUS_FATAL_WARNINGS=1. */
|
||||
if (!udi)
|
||||
return NULL;
|
||||
|
||||
dbus_error_init (&error);
|
||||
|
||||
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
|
||||
|
|
Loading…
Reference in a new issue