Phonon 4.2 and integration for Qt 4.5

Matthias Kretz kretz at kde.org
Mon Jun 16 17:02:53 BST 2008


On Monday 16 June 2008, Arnold Krille wrote:
> Am Montag, 16. Juni 2008 schrieb Matthias Kretz:
> > Attached is a patch that will keep SC for backends. If a backend wants to
> > implement the new interface it needs to either
> > add -DPHONON_BACKEND_VERSION_4_2
> > or inherit AudioOutputInterface42 and implement
> > Q_INTERFACES(Phonon::AudioOutputInterface42).
>
> I see AudioServer, AudioServerV1, AudioServerV2 and co. return. Do you
> really want to dive into that versioning hell?

It's the only way to add virtual functions without breaking BC. What I'm 
trying to do though, is to hide all the uglyness for outsiders. I.e. a 
backend now does:

#include <Phonon/AudioOutputInterface>

class AudioOutput : public QObject, public Phonon::AudioOutputInterface
{
  Q_OBJECT
  Q_INTERFACES(Phonon::AudioOutputInterface)
  ...
}

To get implement the new functions from 4.2 all it needs to do is add 
add_definitions(-DPHONON_BACKEND_VERSION_4_2) to the CMakeLists.txt. (Adding 
it to the header file, before including the interface header, should also 
work, but I don't trust moc too much wrt. preprocessor stuff.)

> Maybe its better to just use defines and maybe even make the *42 defines
> default in 4.3 ?

Like Thiago said, changing defaults can't be done as that also means breaking 
compatibility. So the default needs to be the 4.0/4.1 interface and using 
newer interfaces must be explicit.

-- 
________________________________________________________
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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080616/13a08946/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list