GNOME Bugzilla – Bug 589075
[playbin2] changing volume doesn't work after stream restarted.
Last modified: 2009-07-20 08:40:16 UTC
I recently switched my python program to playbin2. When I play an initial stream on playbin2 the volume seems to work fine, but when I set the state to gst.STATE_READY and then back to gst.STATE_PLAYING, attempting to change the volume doesn't have any effect on the output anymore. While debugging I noticed that reading the volume level from playbin2 still gives the expected volume level even though the actual output level is unchanged. I've also tested with alsa and pulseaudio audio sinks with the same result. I ran a test in the python console to make sure this wasn't just my bad programming skills: Python 2.6.2 (r262:71600, Jul 13 2009, 02:03:19) [GCC 4.4.0 20090630 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gst >>> playbin = gst.element_factory_make('playbin2') >>> playbin.set_property('uri', $URI) >>> playbin.set_state(gst.STATE_PLAYING) <enum GST_STATE_CHANGE_ASYNC of type GstStateChangeReturn> >>> playbin.set_property('volume',1) >>> playbin.set_property('volume',.5) >>> playbin.set_property('volume',.2) >>> # These volume changes work as expected. >>> playbin.set_state(gst.STATE_READY) <enum GST_STATE_CHANGE_SUCCESS of type GstStateChangeReturn> >>> playbin.set_state(gst.STATE_PLAYING) <enum GST_STATE_CHANGE_ASYNC of type GstStateChangeReturn> >>> playbin.set_property('volume',1) >>> playbin.set_property('volume',.2) >>> # These volume changes have no effect. >>> playbin.set_state(gst.STATE_READY)
I think this might be a duplicate of bug #584020, or some other bug that's fixed in git. It works fine for me with the current -base prerelease / git at last.