Phonon (software)

Phonon
Developer(s)Matthias Kretz u.a.[citation needed]
Initial releaseJanuary 11, 2008; 16 years ago (2008-01-11)[1]
Stable release
4.11.1 / September 26, 2019; 5 years ago (2019-09-26)[2]
Repositoryinvent.kde.org/libraries/phonon
Written inC++
Operating systemLinux, BSD, macOS, Solaris, Windows
TypeMultimedia framework
LicenseGNU Lesser General Public License 2.1
Websiteuserbase.kde.org/Phonon

Phonon is the multimedia API provided by KDE and is the standard abstraction for handling multimedia streams within KDE software and also used by several Qt applications.

Phonon was originally created to allow KDE and Qt software to be independent of any single multimedia framework such as GStreamer or xine and to provide a stable API for a major version's lifetime. It was done for various reasons: to create a simple KDE/Qt style multimedia API, to better support native multimedia frameworks on Windows and macOS, and to fix problems of frameworks becoming unmaintained or having API or ABI instability.

For example, a file can be played in four lines of C++ code,[3] compared to 30 lines in the old audio framework for KDE (aRts)[4]

Phonon::MediaObject* media = new Phonon::MediaObject(this);
createPath(media, new Phonon::AudioOutput(Phonon::MusicCategory, this));
media->setCurrentSource(QUrl("/tmp/example.wav"));
media->play();

Phonon is not designed to have every conceivable multimedia feature, but rather as a simple way to perform common functions of computer media players. Developers that require more control over a given media backend than Phonon can provide are recommended to use the native media API or the GStreamer API on systems for which it is available.[4]

  1. ^ "KDE 4.0 Released". 2018-01-11. Retrieved 2019-10-23.
  2. ^ "Release announcement for Phonon 4.11.1". 2019-09-26. Retrieved 2019-10-23.
  3. ^ Kretz, Matthias. "MediaObject Class Reference". Archived from the original on 2008-04-26. Retrieved 2007-12-19.
  4. ^ a b Sanders, N. (2006-05-09). "Phonon and the future of KDE multimedia". Retrieved 2007-12-19.