Phonon (KDE)
Encyclopedia
Phonon is the multimedia API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 provided by Qt and is the standard abstraction for handling multimedia streams within the KDE Software Compilation 4.

Phonon was originally created to allow KDE 4 to be independent of any single multimedia framework such as GStreamer
GStreamer
GStreamer is a pipeline-based multimedia framework written in the C programming language with the type system based on GObject.GStreamer allows a programmer to create a variety of media-handling components, including simple audio playback, audio and video playback, recording, streaming and editing...

 or xine
Xine
xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library that supports different frontend player applications. Another important feature of xine is the ability to manually correct the synchronization...

 and to provide a stable API for KDE 4's lifetime. It was done for various reasons: to create a simple KDE
KDE
KDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems...

/Qt style multimedia API, to better support native multimedia frameworks on Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, and to fix problems of frameworks becoming unmaintained or having API or ABI
Application binary interface
In computer software, an application binary interface describes the low-level interface between an application program and the operating system or another application.- Description :...

 instability. Subsequently it has been moved to Qt and can therefore be used independent of KDE.

For example, a file can be played in four lines of C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 code, compared to 30 lines in the old audio framework (aRts
ARts
aRts, which stands for analog Real time synthesizer, is an audio framework that is no longer under development. It is best known for previously being used in KDE to simulate an analog synthesizer....

)

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 media players. Developers that require more control over a backend than Phonon can provide are recommended to use the native API or the GStreamer API on systems for which it is available.

History

The idea behind Phonon started at aKademy
AKademy
Akademy is an annual contributors and users conference of the KDE community. Akademy is held at varying venues in Europe....

 2004 in Ludwigsburg, where a new multimedia API had to be chosen to replace aRts. No consensus was reached but a few developers got together and decided to try to develop a new framework with multiple backends. The earliest version was called KDEMM (KDE MultiMedia) and was only supported by JuK
JuK
JuK is a free software audio player by KDE, the default player since K Desktop Environment 3.2. JuK supports collections of MP3, Ogg Vorbis, and FLAC audio files....

 and Amarok. Matthias Kretz continued to work single handed on the project as part of his university thesis, The project changed name once more but in February 2006 the name Phonon was finally chosen. The first official release was part of KDE 4.0 in January 2008, the same year Phonon was adopted by Qt
Qt (toolkit)
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...

 and released as part of Qt 4.4. Even though support for Phonon in Qt will continue for the 4.x series, Qt has already replaced Phonon with QtMultimedia and QtMobility.

Features

  • Phonon interfaces with various backends with what developers call "engines"; each engine works with one specific backend. Each backend will let Phonon control basic functions like play, pause, and seek. Phonon will also support higher level functions such as how tracks fade into each other.
  • Phonon can switch multimedia frameworks on the fly. The user can switch between frameworks even while listening to music, with only a slight pause during the switch. This change will also be system wide, affecting all applications that use Phonon, so changing frameworks will be much easier.
  • Using Solid
    Solid (KDE)
    KDE Platform is a set of frameworks by KDE that serve as technological foundation for all KDE applications. Ever since KDE’s brand repositioning the Platform is released as separate product in sync with KDE’s Plasma Workspaces as part of the KDE Software Compilation 4...

    , Phonon gives users greater control over accessories like headsets, speakers, and microphones. An example was given that one could have a VoIP
    Voice over IP
    Voice over Internet Protocol is a family of technologies, methodologies, communication protocols, and transmission techniques for the delivery of voice communications and multimedia sessions over Internet Protocol networks, such as the Internet...

     conversation only be played through one's headset, but have all other sounds come out through speakers.
  • Supported backends on most Unix-like
    Unix-like
    A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

     systems are VLC
    VLC media player
    VLC media player is a free and open source media player and multimedia framework written by the VideoLAN project.VLC is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to...

    , GStreamer, xine
    Xine
    xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library that supports different frontend player applications. Another important feature of xine is the ability to manually correct the synchronization...

     (deprecated) and MPlayer
    MPlayer
    MPlayer is a free and open source media player. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. Versions for OS/2, Syllable, AmigaOS and MorphOS are also available. The Windows version works, with some minor...

    .
  • Supported backends under Windows include DirectShow
    DirectShow
    DirectShow , codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams. It is the replacement for Microsoft's earlier Video for Windows technology...

    , VLC
    VLC media player
    VLC media player is a free and open source media player and multimedia framework written by the VideoLAN project.VLC is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to...

     and MPlayer
    MPlayer
    MPlayer is a free and open source media player. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. Versions for OS/2, Syllable, AmigaOS and MorphOS are also available. The Windows version works, with some minor...

    .
  • The backend supported under Mac OS X is QuickTime
    QuickTime
    QuickTime is an extensible proprietary multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. The classic version of QuickTime is available for Windows XP and later, as well as Mac OS X Leopard and...

    .

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK