View Single Post
Posts: 20 | Thanked: 16 times | Joined on Jun 2010
#2
121 Views and still no answer, damn

Doesn't anyone has an idea at least what could cause that behavior?
As far as I noticed, other "homebrew" programs like pannucci and someplayer show the same problem. Is there no way to get around that? Or am I the only one experiencing the pausing of any playback when the power button is pressed?

Here's the code I used to test gstreamer:

Code:
#!/usr/bin/env python

import gst
import gobject

player = gst.element_factory_make("playbin2", "player")
vis = gst.element_factory_make("goom","vis")
videosink = gst.element_factory_make("fakesink", 'videosink')

videosink.set_property('async', False)

audiosink = gst.element_factory_make("autoaudiosink", 'audiosink')
audiosink.set_property('async-handling', True)

player.set_property("vis-plugin", vis)
player.set_property("video-sink", videosink)
player.set_property("audio-sink", audiosink)
player.set_property("uri", 'file:///home/user/MyDocs/test.mp3') #exchange with your own file
player.set_state(gst.STATE_PLAYING)
gobject.MainLoop().run()
The file plays fine, but pauses/is silenced for a second if I press the power button, then continues. This is slowly driving me mad, as I often use the power button to unlock my N900, not the lock slider.

Regards,
Eagle_Linux