Some general issues with Phonon...

Matthias Kretz kretz at kde.org
Fri Apr 18 18:10:10 CEST 2008


On Friday 18 April 2008, Tanguy Krotoff wrote:
> thx for your fast reply

Sorry that this doesn't always happen. :-( I still have one composer window 
opene, where I wanted to answer one of your mails...

> >  > (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?
>
> I though about it. For the moment I'm happy with Google hosting (svn).
> phonon-vlc-mplayer is still a work in progress, with an external
> hosting I can do my dirty stuffs without disturbing others.
> VLC devs propose me also to host the backend.
> Here is the thing: I noticed that there is a lot of common code
> between VLC and MPlayer backends. I don't like copy/paste so I merge
> them using a few #ifdef + specialized classes like MPlayerMediaObject,
> VLCMediaObject...
> The question might rise again in the future, when phonon-vlc-mplayer
> is stable and tested enough.

The upside of using KDE svn is more exposure == more testers, more feedback, 
more eyeballs on the code and perhaps some helping hands.

> >  I have a local patch to rename all AudioStream occurences to
> > AudioChannel. Do you agree with that naming?
>
> Sure.
> Also I've noticed something not "symmetric" is the API:
>
> 	//MediaController signals
> 	virtual void availableSubtitlesChanged() = 0;
> 	virtual void availableAudioChannelsChanged() = 0;
> 	virtual void availableAnglesChanged(int availableAngles) = 0;
> 	virtual void availableChaptersChanged(int availableChapters) = 0;
> 	virtual void availableTitlesChanged(int availableTitles) = 0;
> 	virtual void angleChanged(int angleNumber) = 0;
> 	virtual void chapterChanged(int chapterNumber) = 0;
> 	virtual void titleChanged(int titleNumber) = 0;
>
> You have availableChaptersChanged() with a parameter
> But availableSubtitlesChanged() doesn't have it. Without the parameter
> might be better.

Right, but there's still a small difference for now. Chapters, Angles and 
Titles are only an int, there's no ObjectDescription behind it.

> The int parameter is useless since you have to use
> QList<Phonon::AudioStreamDescription>

Yes, but notice that this is not true for the three that have the int 
parameter.

> Also, chapterChanged(int) and friends can be probably replaced with an
> API consistent/symmetric with audioChannels and subtitles .

Just to keep in mind: There's no replace possible anymore since 4.0 (only with 
the next major version, which nobody is planning on yet). Otherwise we'd 
break compatibility.

> >  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.
>
> I will send patches, I start to be an expert with ifdef KDEstuffs :p

Would be nice if it were possible without #ifdefs. Most of the test code in 
phonon should be kdelibs independent. Except perhaps for bit of helper code 
that could be copied from qtest_kde.h

> I think Phonon should be a Qt based library more than a KDE library.

It already is. But in addition to that it integrates into KDE automatically 
without the application having to link against KDE.

> As a Qt library I think Phonon will get more visibility and will be
> easier to use for other devs.
> I found on some French forums, people trying to use MPlayer and VLC with Qt
> cf:
> http://doc.qtfr.org/post/2007/03/21/Un-conteneur-pour-MPlayer-utilisation-d
>e-QProcess http://doc.qtfr.org/post/2007/02/21/Integration-de-VLC
> Qt releases won't probably match Phonon releases and these devs might
> be interested having the last Phonon releases. If it is easy for them
> to use/compile/deploy Phonon, they will use it, test it, debug it,
> even send patches and so.
> Have you ever though about totally removing Phonon from kdelibs?

Yes, and I'm seriously considering it. We will need at least one more release 
with kdelibs in order to make the Trolltech backends first-class citizens in 
KDE. After that phonon perhaps will move out of kdelibs and release 
independently.

> >  > - 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?
>
> KDE-Phonon: Phonon that comes with KDE (Qt-Phonon = Phonon that comes
> with Qt 4.4)
> I'm using Ubuntu Hardy with KDE-4.0.3. I didn't try with KDE svn so it
> might be fixed now...

When running a Qt-Phonon app in a KDE environment the KDE platform plugin is 
loaded and that uses some code that requires a KComponentData object. If you 
get a crash/abort please report the backtrace and debug output as a bug 
report on bugs.kde.org.


-- 
________________________________________________________
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/36a9c8e8/attachment.pgp 


More information about the Phonon-backends mailing list