Some general issues with Phonon...

Tanguy Krotoff tkrotoff at gmail.com
Fri Apr 18 16:06:28 CEST 2008


Hello

While still working on VLC and MPlayer backends, I encounter some issues.
(btw MPlayer backend start to be nice: audio channel support already
and subtitles are on the way)

- About naming: AudioChannel and AudioStream, I think it's confusing.
For me it is the same thing (or I missed something)

- All the Phonon CMakeLists.txt uses KDE stuffs (KDEMacros.cmake,
kde4_add_plugin...), even the tests (KApplication, KAboutData...).
As a whole, Phonon is very KDEish and it makes it difficult to get the
latest Phonon svn and run the tests on Qt only platform (Windows).
Ideal would be to make Phonon only depend on Qt and remove KDE
dependencies. I don't think having KAboutData in the test apps is very
"value added" oriented.
I can send a patch about this if you want: with the use of if
(KDE4_FOUND) so there is both: KDE support and Qt only support.

- Impossible to use KDE-Phonon without instantiate KApplication
I have to #ifdef my test apps to replace QApplication by KApplication
otherwise KDE-Phonon doesn't start
Is there a simpler way to solve this?

- Q_EXPORT_PLUGIN2 is not enough to generate a backend compatible with
KDE, I have to write this:
#ifdef KDE4_FOUND
	#include <kpluginfactory.h>
	#include <kpluginloader.h>
	K_PLUGIN_FACTORY(VLCBackendFactory,
registerPlugin<Phonon::VLC_MPlayer::Backend>();)
	K_EXPORT_PLUGIN(VLCBackendFactory("vlcbackend"))
#else
	Q_EXPORT_PLUGIN2(phonon_vlc, Phonon::VLC_MPlayer::Backend);
#endif

- I've tested the Xine backend (KDE-4.0.3) with a little app that runs
several videos at the same time and the videos are quite buggy.
It might be caused by Xine. Anyway, testing several MediaObject
playing at the same time is not a bad idea.
Here is a small Phonon app that does that:
http://code.google.com/p/phonon-vlc-mplayer/source/browse/trunk/tests/multiplevideoplayer/

- Seek is not smooth
When the user moves the seek bar, it sends a lot of
MediaObject::seek() to the backend + the backend sends a lot of tick()
signals making the seek bar behave choppy.
I checked several media player and here is how some of them work
(winamp, smplayer...):
- user moves the seek bar
- media continues to play as before
- user release the seek bar (MouseRelease event)
- then (and only now): send a seek()
There is another solution (more complex to implement) used by youtube,
dailymotion... I let you check about this.

The problem is very sensible while seeking a DVD or a network stream.
It's even worth with the MPlayer backend as MPlayer seek() is slow
(MPlayer backend uses mplayer binary + stdin that's why seek is slow)

Thanks

-- 
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24


More information about the Phonon-backends mailing list