Phonon (KDE)

From Wikipedia, the free encyclopedia

Phonon is the cross platform multimedia API for KDE 4. Phonon was created as a solution to several problems commonly faced by unix desktops for multimedia. Phonon itself is not a multimedia framework, but interfaces with existing frameworks such as GStreamer or Xine via backends. Phonon allows all multimedia frameworks it supports to be accessed through a simple API. This prevents problems like frameworks becoming unmaintained, API instability, and KDE depending on a single framework. Phonon is not limited to unix and backends are being developed to support Windows and Mac OS X by Trolltech.

For example, a file can be played in only a few lines of C++ code[1], an order of magnitude less than required using the old audio framework (aRts)[2]

MediaObject *media = new MediaObject(this);
media->setCurrentSource("soundfile.ogg");
media->play();


Phonon reduces redundant and difficult work done by developers, while not having every conceivable multimedia feature it does provide a simple way to perform common functions of media players. Though some developers may require more control over a backend than Phonon can provide[2].

early screenshot of Phonon's setting manager
early screenshot of Phonon's setting manager

Contents

[edit] Features

  • Phonon interfaces with various backends with what developers call "engines"; each engine works with one specific backend. Each backend lets Phonon control basic functions like play, pause, and seek. Phonon will also support higher level functions such as how tracks fade into each other.[3]
  • Phonon is able to switch multimedia frameworks on the fly. The user is able to switch between frameworks even while listening to music, with only a slight pause during the switch. This change is also system wide, affecting all applications that use Phonon, so changing frameworks will be much easier.
  • Using Solid, Phonon will give the users greater control over accessories like headsets, speakers, and microphones. An example was given that you could have a VoIP conversation only be played through your headset, but have all other sounds come out through speakers.[3]. Phonon also gives developers much easier access to multimedia hardware like webcams, which Phonon will be NOT able to record from by the release of KDE 4.1.

[edit] Trolltech

Trolltech uses Phonon in its Qt 4.4 release to provide cross platform audio/video playback.

[edit] References

  1. ^ Kretz, Matthias. MediaObject Class Reference. Retrieved on 2007-12-19.
  2. ^ a b Sanders, N. (2006-5-9). Phonon and the future of KDE multimedia. Retrieved on 2007-12-19.
  3. ^ a b Unrau, Troy (2007-2-6). The Road to KDE 4: Phonon Makes Multimedia Easier. Retrieved on 2007-12-19.
  4. ^ Krotoff, Tanguy. VLC and MPlayer backends.

[edit] External links