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 574509 - list_tracks causes assertion with pulsemixer, but not with alsamixer
list_tracks causes assertion with pulsemixer, but not with alsamixer
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.14
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-07 23:35 UTC by Matthias Bläsing
Modified: 2009-09-08 17:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Bläsing 2009-03-07 23:35:30 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
Comment 1 Matthias Bläsing 2009-03-15 12:23:35 UTC
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...
Comment 2 Wim Taymans 2009-09-08 17:33:18 UTC
The code is wrong, to access element properties, use <element>.props.<propertyname>

so:

 pulse.device = devices[0]

should be:

 pulse.props.device = devices[0]