TL;DR: Make it work on GStreamer 1.0, get rid of warnings on GStreamer 0.10.
The media player in current Liferea (1.10RC3) doesn't work with GStreamer 1.0, and has problems on 0.10. With 0.10, when the media player plugin gets activated, this warning is seen on the console:
Traceback (most recent call last): File "/home/simon/.local/share/liferea/plugins/media-player.py", line 26, in __init__ bus.add_signal_watch_full() File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function return info.invoke(*args, **kwargs) TypeError: add_signal_watch_full() takes exactly 2 arguments (1 given)
This is because
bus.add_signal_watch_full() should really be
bus.add_signal_watch(). There's no need for the full version of the API that also includes an argument for setting event source priority. The consequence of this bug is that the message signal handler is never called and none of the code in
__init__ after this call is run. You can see this by playing a audio file until the end, the player doesn't change to "stop" mode, it just stops moving the slider. Here is a simple test case with a short audio file enclosure.
After changing this, new problems appear. You'll see lots of warning messages about how the
message variable is
None. (Possibly this is also related to the crash Lars reported here.) The problem appears to be a fundamental problem with GStreamer 0.10 and PyGObject - this simply doesn't work, and it appears that no fix is coming since it would break ABI compatibility. See: mailing list thread, pygobject bug, useful page from Novacut wiki, simple test code.
When trying to get things work properly on 0.10, all kinds of weird bugs have appeared. However, we can't easily force GStreamer 1.0 for just the media player. GStreamer is already linked to the liferea binary, WebKitGTK+ brings it in, so we have to use the same version that uses. On e.g. Ubuntu 12.04, this is GStreamer 0.10, and I think we want Liferea to be easily installed on such a recent system.
My proposed patch, then, is to:
Commit message contains another story of the changes. :-)
Regards, Simon Kågedal Reimer