After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329106 - HAL sound device wrapper plugins
HAL sound device wrapper plugins
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: High enhancement
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 329069
Blocks: 329112
 
 
Reported: 2006-01-29 17:36 UTC by Jürg Billeter
Modified: 2006-02-15 12:25 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to add halaudiosink and halaudiosrc plugins (31.45 KB, patch)
2006-01-29 19:00 UTC, Jürg Billeter
needs-work Details | Review
Add basic documentation, use default alsa device (31.33 KB, patch)
2006-02-08 18:53 UTC, Jürg Billeter
none Details | Review
Complete patch (36.69 KB, patch)
2006-02-13 17:25 UTC, Jürg Billeter
none Details | Review

Description Jürg Billeter 2006-01-29 17:36:02 UTC
It's currently not possible to specify one specific ALSA device in a pipeline
such that the same pipeline is guaranteed to work across machine reboots. The
problem is that ALSA card numbers are generated on each system startup. The
result depends on the random order of which kernel module gets loaded first.
When hotplugging USB audio devices, the card number changes may even happen
without machine reboots.

I propose to use HAL's UDI (Unique Device Id) as persistent ALSA sound device
identifier. A patch to make HAL's UDI independent of ALSA's card number has
already been committed to HAL CVS HEAD.

Patch will follow soon. This bug is part of my sound configuration patches to
allow sane graphical selection of sound cards in GNOME.
Comment 1 Jürg Billeter 2006-01-29 19:00:05 UTC
Created attachment 58341 [details] [review]
Patch to add halaudiosink and halaudiosrc plugins

First attempt to create halaudiosink and halaudiosrc plugins.
Comment 2 Andy Wingo 2006-01-31 10:31:37 UTC
Looks pretty good to me. For it to go into -good you will need documentation support and example pipelines -- see http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-xvimagesink.html for example output, and http://cvs.freedesktop.org/gstreamer/gst-plugins-base/sys/xvimage/xvimagesink.c?view=annotate on how to write the docs.

Note that render_from_description and get_unconnected_pad will soon be going into core via bug #329069, please remove them from your patch.
Comment 3 Christian Fredrik Kalager Schaller 2006-02-08 18:32:19 UTC
Jurg, we would really like to see this go in, any chance of an update of the patch per Wingo's request?
Comment 4 Jürg Billeter 2006-02-08 18:53:30 UTC
Created attachment 58953 [details] [review]
Add basic documentation, use default alsa device

The patch update is almost complete. The only missing part is integrating the plugin documentation with the build system, I hadn't yet time to look where I have to reference it. I've attached my current patch. I'm probably able to look into it on Friday or is this too late for the next release? A pointer which files have to be modified would of course help, too ;)

An additional change I've integrated is to use the "default:X" PCM/capture device instead of "plughw:X,Y" if device 0 is requested. This avoids the problem that dmix/dsnoop set-up by alsa-lib get ignored.
Comment 5 Christian Fredrik Kalager Schaller 2006-02-09 14:09:37 UTC
Tested the patch today on my FC5 system. I am able to play sound find when sending it to halaudiosink. Getting this message on the console though:

20440: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 793.
This is normally a bug in some application using the D-BUS library.
libhal.c 1058 : Couldn't allocate D-BUS message
Comment 6 Jürg Billeter 2006-02-13 17:25:38 UTC
Created attachment 59273 [details] [review]
Complete patch

Sorry for the delay. I've attached a first candidate patch including basic documentation hooked up.

(In reply to comment #5)
> Tested the patch today on my FC5 system. I am able to play sound find when
> sending it to halaudiosink. Getting this message on the console though:
> 
> 20440: arguments to dbus_message_new_method_call() were incorrect, assertion
> "path != NULL" failed in file dbus-message.c line 793.
> This is normally a bug in some application using the D-BUS library.
> libhal.c 1058 : Couldn't allocate D-BUS message
> 

I haven't seen this error message before, running hal 0.5.6 and dbus 0.60 here. But it rather looks like a bug in libhal, not in the GStreamer plugins.
Comment 7 Wim Taymans 2006-02-15 12:21:04 UTC
        * configure.ac:
        * docs/plugins/Makefile.am:
        * docs/plugins/gst-plugins-good-plugins-docs.sgml:
        * docs/plugins/gst-plugins-good-plugins-sections.txt:
        * docs/plugins/gst-plugins-good-plugins.hierarchy:
        * ext/Makefile.am:
        * ext/hal/Makefile.am:
        * ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_base_init),
        (gst_hal_audio_sink_class_init), (gst_hal_audio_sink_reset),
        (gst_hal_audio_sink_init), (gst_hal_audio_sink_dispose),
        (do_toggle_element), (gst_hal_audio_sink_set_property),
        (gst_hal_audio_sink_get_property),
        (gst_hal_audio_sink_change_state):
        * ext/hal/gsthalaudiosink.h:
        * ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_base_init),
        (gst_hal_audio_src_class_init), (gst_hal_audio_src_reset),
        (gst_hal_audio_src_init), (gst_hal_audio_src_dispose),
        (do_toggle_element), (gst_hal_audio_src_set_property),
        (gst_hal_audio_src_get_property), (gst_hal_audio_src_change_state):
        * ext/hal/gsthalaudiosrc.h:
        * ext/hal/gsthalelements.c: (plugin_init):
        * ext/hal/gsthalelements.h:
        * ext/hal/hal.c: (gst_hal_get_string),
        (gst_hal_render_bin_from_udi), (gst_hal_get_audio_sink),
        (gst_hal_get_audio_src):
        * ext/hal/hal.h:
        Add HAL sound device wrapper plugins. Closes #329106