Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems when both GST 1.0 and Phonon are installed #39

Open
chemaper opened this issue Mar 15, 2016 · 1 comment
Open

problems when both GST 1.0 and Phonon are installed #39

chemaper opened this issue Mar 15, 2016 · 1 comment

Comments

@chemaper
Copy link

Hi,

I've installed ldoce5viewer in CentOS7 and it works great, but there is a problem with the sound that I've fixed modifying the source code. It occurs when both Gstreamer 1.0 and Qt-Phonon are available. This is the case of CentOS7, because PyQt4-4.10.1-13.el7.x86_64 depends on phonon-backend-gstreamer.

The problem is at file ldoce5viewer/qtgui/utils/soundplayer.py. It tries several engines, including Gstreamer 1.0 and Qt-Phonon and finally uses Phonon. The problem is that when detecting Gstreamer 1.0, it run Gst.init(None). This causes a hang later in the line:

self._player = Phonon.createPlayer(Phonon.NoCategory)

And the following messages are printed:

/usr/lib/python2.7/site-packages/ldoce5viewer/qtgui/utils/soundplayer.py:220: Warning: cannot register existing type 'GstObject' self._player = Phonon.createPlayer(Phonon.NoCategory) /usr/lib/python2.7/site-packages/ldoce5viewer/qtgui/utils/soundplayer.py:220: Warning: g_once_init_leave: assertion 'result != 0' failed self._player = Phonon.createPlayer(Phonon.NoCategory) /usr/lib/python2.7/site-packages/ldoce5viewer/qtgui/utils/soundplayer.py:220: Warning: g_type_register_static: assertion 'parent_type > 0' failed self._player = Phonon.createPlayer(Phonon.NoCategory) /usr/lib/python2.7/site-packages/ldoce5viewer/qtgui/utils/soundplayer.py:220: Warning: g_object_newv: assertion 'G_TYPE_IS_OBJECT (object_type)' failed self._player = Phonon.createPlayer(Phonon.NoCategory)

A quick workaround is to change the order of engines in create_soundplayer, to use GStreamer 1.0 instead of Phonon it both are available. But probably the real solution if moving Gst.init(None) to the init method of the GST 1.0 engine, but I don't know if the code of other platforms may be affected.

@chemaper chemaper changed the title problems when problems when both GST 1.0 and Phonon are installed Mar 15, 2016
@chemaper
Copy link
Author

A python file to show how the code works/fails depending of the call to Gst.init(None)
test.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant