Phonon Backend Development

Overview | Application Example | Backend Development

The backend is the most important part in Phonon to provide functionality. This document will get you started how backends work, how to start development of a new backend and how to understand existing backend code.


The first step is to understand how the Phonon frontend calls the backend: In the frontend objects all backend objects are "only" QObjects. But QObject has powerful introspection capabilities that Phonon uses to call methods in the backend. If you're interested look at QMetaObject::invokeMethod. In order to make sure that a backend is fully operational (there are no abstract classes that tell the backend developer what method signatures are wrong or what methods are missing) there are two test programs compiled with kdelibs (if KDE4_BUILD_TESTS is set in cmake) that inspects the backend.

In short that requires the backend classes to inherit from QObject and to make all methods that are to be called from the frontend slots or prefixed with Q_INVOKABLE (the latter doesn't work reliable with Qt 4.1.3 at least, so you should simply make those methods slots).

The Backend Classes

The central class that needs to be implemented is the backend factory class, throughout this documentation simply called Backend:

The classes producing media data (sources)

The path class

  • Path

The output classes

The effect classes

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 11:56:59 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.