GNOME Bugzilla – Bug 574509
list_tracks causes assertion with pulsemixer, but not with alsamixer
Last modified: 2009-09-08 17:33:18 UTC
Hey, I tried the pulsemixer and got a failure. When invoking list_tracks, I didn't get a tracklist as I would have expected. This script: #!/usr/bin/python import gst alsa = gst.element_factory_make('alsamixer') alsa.probe_property_name('device') alsa.device = alsa.probe_get_values_name("device")[0] alsa.set_state(gst.STATE_PLAYING) print alsa.list_tracks() alsa.set_state(gst.STATE_NULL) pulse = gst.element_factory_make('pulsemixer') pulse.probe_property_name('device') devices = pulse.probe_get_values_name('device') pulse.device = devices[0] pulse.set_state(gst.STATE_PLAYING) print pulse.list_tracks() pulse.set_state(gst.STATE_NULL) Resulted in this: mblaesing@enterprise:~$ python test4.py [<__main__.GstAlsaMixerTrack object at 0xa0c093c (GstAlsaMixerTrack at 0xa40d000)>, <__main__.GstAlsaMixerTrack object at 0xa0c0964 (GstAlsaMixerTrack at 0xa40d0b8)>] ** (test4.py:2452): CRITICAL **: _wrap_gst_mixer_list_tracks: assertion `GST_IS_MIXER (self->obj)' failed [] mblaesing@enterprise:~$ My assumtions would have been to get a list like in the alsa case. I had a look at gnome-volume-control. This seems to use gstreamer for volume control (at least I interpret that from the ldd output). There the pulse devices are visible and showing the volume tracks. This led me to the conclusion that the problem lies probably somewhere in the python bindings. If you need more info - just ask - I run this test on debian SID and Ubuntu Jaunty. Thanks in advance Matthias Bläsing
Resetting component, as this can be equally found with the java bindings - these are pretty explicit: Exception in thread "main" java.lang.IllegalArgumentException: Element does not implement interface at org.gstreamer.interfaces.GstInterface.<init>(GstInterface.java:41) at org.gstreamer.interfaces.Mixer.<init>(Mixer.java:51) at org.gstreamer.interfaces.Mixer.wrap(Mixer.java:42) at TestVolume.main(TestVolume.java:12) It seems, as if pulsemixer does not declare itself to be a mixer...
The code is wrong, to access element properties, use <element>.props.<propertyname> so: pulse.device = devices[0] should be: pulse.props.device = devices[0]