Some general issues with Phonon...

Matthias Kretz kretz at kde.org
Fri Apr 18 16:39:53 CEST 2008


On Friday 18 April 2008, Tanguy Krotoff wrote:
> 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)

great! BTW, would you be interested in hosting your code in KDE's svn repo?

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

I have a local patch to rename all AudioStream occurences to AudioChannel. Do 
you agree with that naming?

> - 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.

Actually the main reason there is bad support for using Phonon code (other 
than libphonon) outside of KDE is that there's nobody working that way. 
Trolltech has libphonon and their three backends integrated in their 
buildsystem and the tests were built using KDE infrastructure.

So yes, patches to make that code more useful are very welcome.

> - 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?

That would be a bug. Or what exactly do you mean by KDE-Phonon?

> - 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

The real fix is in the kde platform plugin - but it should already work. The 
platform plugin should be able to load a Qt-only backend, too. But again, not 
tested that much...

> - 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/multi
>plevideoplayer/

Yes, xine is braindamaged. The supposedly global xine engine object holds the 
clock which all streams use. Xine therefore only supports playing back one 
stream at a time. :'(

> - 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()

SeekSlider::setTracking(false)

On the xine backend I implemented "seek event compression". That's important 
for e.g. a DVD where moving of the seek slider would otherwise result in a 
few minutes of seeking around.

> 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.

eh, exactly. :-)

> 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)

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/phonon-backends/attachments/20080418/878044cb/attachment.pgp 


More information about the Phonon-backends mailing list