phonon 5 backends, interfaces and their compatibility
Harald Sitter
sitter at kde.org
Mon May 27 15:26:03 BST 2013
in my attempt to slay all macros in phonon's source I have come to a halt
with a very elemental question that I think we should agree on as a
community.
right now (in theory) you can build phonon-vlc 0.1 against phonon 4.6
because former retains old interface defintions and constantly everywhere
tries to use old interfaces whenever casting to the present interface is
not working.
to illustrate this quickly:
class iInterface1 {
void play() = 0;
}
class iInterface2 : public iInterface1 {
void pause() = 0;
}
if a backend does not implement 2 a qobject_cast will fail, so phonon4 then
tries to cast to 1.
this allows backends to not implement new functions immediately but remain
buildable against a new phonon.
I personally believe this to be a bad idea as it makes it more confusing
what you can expect from a version of phonon and in its current
implementation even causes runtime overhead due to many casts. at the same
time running against an old backend will render phonon not working (though
I suppose we can detect that and display a warning), so this is also not
making my heart smile.
also in practice this did not work out as intended as numerous internal
cmake changes made old backends not build with a new phonon so it's
effectively useless right now
thoughts?
should we keep trying to retain this compatibility feature for backends or
drop it?
HS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20130527/f7a2adb2/attachment.htm>
-------------- 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