- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Namespace List
- Namespace Members

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

# Phonon Namespace Reference

The KDE Multimedia classes. More...

## Namespaces
namespace | Experimental
namespace | BackendCapabilities
| Collection of functions describing the capabilities of the Backend.
## Classes
class | AbstractAudioOutput
| Common base class for all audio outputs. More...
class | AbstractMediaStream
| Base class for custom media data streams. More...
class | AbstractVideoOutput
| Common base class for all video outputs. More...
class | AddonInterface
| Interface for Menu, Chapter, Angle and Title/Track control. More...
class | AudioDataOutput
| This class gives you the audio data (for visualizations). More...
class | AudioDataOutputInterface
class | AudioOutput
| Class for audio output to the soundcard. More...
class | AudioOutputInterface40
class | AudioOutputInterface42
class | BackendInterface
| Main Backend class interface. More...
class | Effect
| Effects that can be inserted into a Path. More...
class | EffectInterface
| Interface for Effect objects. More...
class | EffectParameter
| This class describes one parameter of an effect. More...
class | EffectWidget
| Widget to control the parameters of an Effect. More...
class | GlobalConfig
class | MediaController
| Controls optional features of a media file/device like title, chapter, angle. More...
class | MediaNode
class | MediaObject
| Interface for media playback of a given URL. More...
class | MediaObjectInterface
| Backend interface for media sources. More...
class | MediaSource
| Note that all constructors of this class are implicit, so that you can simply write. More...
class | ObjectDescriptionData
| Data class for objects describing devices or features of the backend. More...
class | ObjectDescription
| Provides a tuple of enduser visible name and description. More...
class | ObjectDescriptionModelData
| Data class for models for ObjectDescription objects. More...
class | ObjectDescriptionModel
| The ObjectDescriptionModel class provides a model from a list of ObjectDescription objects. More...
class | Path
| Connection object providing convenient effect insertion. More...
class | PlatformPlugin
class | PulseSupport
class | SeekSlider
| Widget providing a slider for seeking in MediaObject objects. More...
class | StreamInterface
| Backend interface to handle media streams (AbstractMediaStream). More...
class | VideoPlayer
| Playback class for simple tasks. More...
class | VideoWidget
| Widget to display video. More...
class | VideoWidgetInterface44
class | VolumeFaderEffect
| Audio effect to gradually fade the audio volume. More...
class | VolumeSlider
| Widget providing a slider to control the volume of an AudioOutput. More...
## Typedefs
typedef AudioOutputInterface40 | AudioOutputInterface
typedef ObjectDescription < AudioOutputDeviceType > | AudioOutputDevice
typedef ObjectDescription < AudioCaptureDeviceType > | AudioCaptureDevice
typedef ObjectDescription < EffectType > | EffectDescription
typedef ObjectDescription < AudioChannelType > | AudioChannelDescription
typedef ObjectDescription < SubtitleType > | SubtitleDescription
typedef ObjectDescriptionModel < AudioOutputDeviceType > | AudioOutputDeviceModel
typedef ObjectDescriptionModel < AudioCaptureDeviceType > | AudioCaptureDeviceModel
typedef ObjectDescriptionModel < EffectType > | EffectDescriptionModel
typedef ObjectDescriptionModel < AudioChannelType > | AudioChannelDescriptionModel
typedef ObjectDescriptionModel < SubtitleType > | SubtitleDescriptionModel
typedef VideoWidgetInterface | VideoWidgetInterfaceLatest
## Enumerations
enum | ObjectDescriptionType { AudioOutputDeviceType, EffectType, AudioChannelType, SubtitleType, AudioCaptureDeviceType }
| Defines the type of information that is contained in a ObjectDescription object. More...
enum | DiscType { NoDisc = -1, Cd = 0, Dvd = 1, Vcd = 2 }
| Enum to identify the media discs supported by MediaObject. More...
enum | MetaData { ArtistMetaData, AlbumMetaData, TitleMetaData, DateMetaData, GenreMetaData, TracknumberMetaData, DescriptionMetaData, MusicBrainzDiscIdMetaData }
| Provided as keys for MediaObject::metaData for convenience, in addition to the strings defined in the Ogg Vorbis specification. More...
enum | State { LoadingState, StoppedState, PlayingState, BufferingState, PausedState, ErrorState }
| The state the media producing object is in at the moment. More...
enum | Category { NoCategory = -1, NotificationCategory = 0, MusicCategory = 1, VideoCategory = 2, CommunicationCategory = 3, GameCategory = 4, AccessibilityCategory = 5, LastCategory = AccessibilityCategory }
| Set's the category your program should be listed in in the mixer. More...
enum | ErrorType { NoError = 0, NormalError = 1, FatalError = 2 }
| Tells your program how to recover from an error. More...
## Functions
uint PHONON_EXPORT | qHash (const Phonon::EffectParameter &param)
PHONON_EXPORT MediaObject * | createPlayer (Phonon::Category category, const MediaSource &source=MediaSource())
| Convenience function to create a MediaObject and AudioOutput connected by a path.
template<ObjectDescriptionType T>
QDebug | operator<< (QDebug s, const ObjectDescription< T > &o)
PHONON_EXPORT const char * | phononVersion ()
PHONON_EXPORT QString | categoryToString (Category c)
| Returns a (translated) string to show to the user identifying the given Category.
virtual void | setAspectRatio (Phonon::VideoWidget::AspectRatio)=0
virtual qreal | brightness () const =0
virtual void | setBrightness (qreal)=0
virtual Phonon::VideoWidget::ScaleMode | scaleMode () const =0
virtual void | setScaleMode (Phonon::VideoWidget::ScaleMode)=0
virtual qreal | contrast () const =0
virtual void | setContrast (qreal)=0
virtual qreal | hue () const =0
virtual void | setHue (qreal)=0
virtual qreal | saturation () const =0
virtual void | setSaturation (qreal)=0
virtual QWidget * | widget ()=0
virtual void | setVolume (float)
virtual Phonon::VolumeFaderEffect::FadeCurve | fadeCurve () const
virtual void | setFadeCurve (Phonon::VolumeFaderEffect::FadeCurve)
virtual void | fadeTo (float, int)
## Variables
D | __pad0__

## Detailed Description

The KDE Multimedia classes.

In this Namespace you find the classes to access Multimedia functions for audio and video playback. Those classes are not dependent on any specific framework (like they were in pre KDE4 times) but rather use exchangeable backends to do the work.

If you want to write a new backend take a look at phonon_backend_development_page.

Author:
  Matthias Kretz <kretz@kde.org>

## Typedef Documentation

typedef AudioOutputInterface40 AudioOutputInterface

Search for all occurrences

Definition at line 143 of file audiooutputinterface.h.

typedef ObjectDescription<AudioOutputDeviceType> AudioOutputDevice

Search for all occurrences

Definition at line 272 of file objectdescription.h.

typedef ObjectDescription<AudioCaptureDeviceType> AudioCaptureDevice

Search for all occurrences

Definition at line 277 of file objectdescription.h.

typedef ObjectDescription<EffectType> EffectDescription

Search for all occurrences

Definition at line 291 of file objectdescription.h.

typedef ObjectDescription<AudioChannelType> AudioChannelDescription

Search for all occurrences

Definition at line 311 of file objectdescription.h.

typedef ObjectDescription<SubtitleType> SubtitleDescription

Search for all occurrences

Definition at line 312 of file objectdescription.h.

typedef ObjectDescriptionModel<AudioOutputDeviceType> AudioOutputDeviceModel

Search for all occurrences

Definition at line 366 of file objectdescriptionmodel.h.

typedef ObjectDescriptionModel<AudioCaptureDeviceType> AudioCaptureDeviceModel

Search for all occurrences

Definition at line 367 of file objectdescriptionmodel.h.

typedef ObjectDescriptionModel<EffectType> EffectDescriptionModel

Search for all occurrences

Definition at line 368 of file objectdescriptionmodel.h.

typedef ObjectDescriptionModel<AudioChannelType> AudioChannelDescriptionModel

Search for all occurrences

Definition at line 369 of file objectdescriptionmodel.h.

typedef ObjectDescriptionModel<SubtitleType> SubtitleDescriptionModel

Search for all occurrences

Definition at line 370 of file objectdescriptionmodel.h.

typedef VideoWidgetInterface VideoWidgetInterfaceLatest

Search for all occurrences

Definition at line 67 of file videowidgetinterface.h.

## Enumeration Type Documentation

enum ObjectDescriptionType

Search for all occurrences

Defines the type of information that is contained in a ObjectDescription object.

Enumerator:

  AudioOutputDeviceType | Audio output devices. This can be soundcards (with different drivers), soundservers or other virtual outputs like playback on a different computer on the network. For Hardware devices the backend should use libkaudiodevicelist (AudioDevice and AudioDeviceEnumerator) which will list removable devices even when they are unplugged and provide a unique identifier that can make backends use the same identifiers. Search for all occurrences
  EffectType | Lists all processing effects the backend supports. Search for all occurrences
  AudioChannelType | Search for all occurrences
  SubtitleType | Search for all occurrences
  AudioCaptureDeviceType | Audio capture devices. This can be soundcards (with different drivers), soundservers or other virtual inputs like capture on a different computer on the network. For Hardware devices the backend should use libkaudiodevicelist (AudioDevice and AudioDeviceEnumerator) which will list removable devices even when they are unplugged and provide a unique identifier that can make backends use the same identifiers. Search for all occurrences

Definition at line 48 of file objectdescription.h.

        {
            AudioOutputDeviceType,

            EffectType,
            AudioChannelType,
            SubtitleType,

            AudioCaptureDeviceType

            //VideoOutputDeviceType,
            //VideoCaptureDeviceType,
            //AudioCodecType,
            //VideoCodecType,
            //ContainerFormatType,
            //VisualizationType,
        };

enum DiscType

Search for all occurrences

Enum to identify the media discs supported by MediaObject.

See also:
  MediaSource(Phonon::DiscType, const QString &deviceName)

Enumerator:

  NoDisc | No disc was selected. This is only useful as a return value from MediaSource::distType(); Search for all occurrences
  Cd | Identifies Audio CDs. Search for all occurrences
  Dvd | Identifies DVDs (not arbitrary data DVDs, only movie DVDs). Search for all occurrences
  Vcd | Identifies Video CDs. Search for all occurrences

Definition at line 77 of file phononnamespace.h.

                      {
            NoDisc = -1,
            Cd = 0,
            Dvd = 1,
            Vcd = 2
        };

enum MetaData

Search for all occurrences

Provided as keys for MediaObject::metaData for convenience, in addition to the strings defined in the Ogg Vorbis specification.

Enumerator:

  ArtistMetaData | The artist generally considered responsible for the work. In popular music this is usually the performing band or singer. For classical music it would be the composer. For an audio book it would be the author of the original text. Search for all occurrences
  AlbumMetaData | The collection name to which this track belongs. Search for all occurrences
  TitleMetaData | Track/Work name. Search for all occurrences
  DateMetaData | Date the track was recorded. Search for all occurrences
  GenreMetaData | A short text indication of music genre. Search for all occurrences
  TracknumberMetaData | The track number of this piece if part of a specific larger collection or album. Search for all occurrences
  DescriptionMetaData | A short text description of the contents. Search for all occurrences
  MusicBrainzDiscIdMetaData | Search for all occurrences

Examples:
  PtexExtractor/ptex/PtexReader.cpp, PtexExtractor/ptex/PtexReader.h, PtexImporter/ptex/PtexReader.cpp, and PtexImporter/ptex/PtexReader.h.

Definition at line 101 of file phononnamespace.h.

                      {
            ArtistMetaData,
            AlbumMetaData,
            TitleMetaData,
            DateMetaData,
            GenreMetaData,
            TracknumberMetaData,
            DescriptionMetaData,
            MusicBrainzDiscIdMetaData
        };

enum State

Search for all occurrences

The state the media producing object is in at the moment.

See also:
  MediaObject

Enumerator:

  LoadingState | After construction it might take a while before the Player is ready to play(). Normally this doesn't happen for local files, but can happen for remote files where the asynchronous mimetype detection and prebuffering can take a while. Search for all occurrences
  StoppedState | The Player has a valid media file loaded and is ready for playing. Search for all occurrences
  PlayingState | The Player is playing a media file. Search for all occurrences
  BufferingState | The Player is waiting for data to be able to continue playing. Search for all occurrences
  PausedState | The Player is currently paused. Search for all occurrences
  ErrorState | An unrecoverable error occurred. The Object is unusable in this state. Search for all occurrences

Definition at line 142 of file phononnamespace.h.

        {
            LoadingState,
            StoppedState,
            PlayingState,
            BufferingState,
            PausedState,
            ErrorState
        };

enum Category

Search for all occurrences

Set's the category your program should be listed in in the mixer.

A Jukebox will set this to Music, a VoIP program to Communication, a DVD player to video, and so on.

Note:
  These categories can also become useful for an application that controls the volumes automatically, like turning down the music when a call comes in, or turning down the notifications when the media player knows it's playing classical music.

See also:
  AudioOutput::setCategory

Enumerator:

  NoCategory | Will make use of the default device. Search for all occurrences
  NotificationCategory | If the sounds produced are notifications (bing, beep and such) you should use this category. Search for all occurrences
  MusicCategory | If your application is a music player (like a jukebox or media player playing an audio file). Search for all occurrences
  VideoCategory | If the sound is the audio channel of a video. Search for all occurrences
  CommunicationCategory | If your applications produces sounds from communication with somebody else (VoIP, voice chat). Search for all occurrences
  GameCategory | Sound produced by a computer game should go into this category. Search for all occurrences
  AccessibilityCategory | Sounds produced for accessibility (e.g. Text-To-Speech) Search for all occurrences
  LastCategory | Holds the largest value of categories. Search for all occurrences

Definition at line 188 of file phononnamespace.h.

        {
            NoCategory = -1,
            NotificationCategory = 0,
            MusicCategory = 1,
            VideoCategory = 2,
            CommunicationCategory = 3,
            GameCategory = 4,
            AccessibilityCategory = 5,
            LastCategory = AccessibilityCategory
        };

enum ErrorType

Search for all occurrences

Tells your program how to recover from an error.

See also:
  MediaObject::errorType()

Enumerator:

  NoError | No error. MediaObject::errorType() returns this if MediaObject::state() != Phonon::ErrorState. Search for all occurrences
  NormalError | Playback should work, and trying with another URL should work. Search for all occurrences
  FatalError | Something important does not work. Your program cannot continue playback or capture or whatever it was trying to do without help from the user. Search for all occurrences

Definition at line 233 of file phononnamespace.h.

                       {
            NoError = 0,
            NormalError = 1,
            FatalError = 2
        };

## Function Documentation

uint PHONON_EXPORT Phonon::qHash | ( | const Phonon::EffectParameter & | param | ) |

Search for all occurrences

PHONON_EXPORT MediaObject* Phonon::createPlayer | ( | Phonon::Category | category,
|  | const MediaSource & | source = `MediaSource()`
| ) |  |

Search for all occurrences

Convenience function to create a MediaObject and AudioOutput connected by a path.

QDebug Phonon::operator<< | ( | QDebug | s,
|  | const ObjectDescription< T > & | o
| ) |  | `[inline]`

Definition at line 264 of file objectdescription.h.

    {
        return s << o.name();
    }

PHONON_EXPORT const char* Phonon::phononVersion | ( |  | ) |

Search for all occurrences

PHONON_EXPORT QString Phonon::categoryToString | ( | Category | c | ) |

Search for all occurrences

Returns a (translated) string to show to the user identifying the given Category.

virtual void Phonon::setAspectRatio | ( | Phonon::VideoWidget::AspectRatio |  | ) | `[pure virtual]`

Search for all occurrences

virtual qreal Phonon::brightness | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual void Phonon::setBrightness | ( | qreal |  | ) | `[pure virtual]`

Search for all occurrences

virtual Phonon::VideoWidget::ScaleMode Phonon::scaleMode | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual void Phonon::setScaleMode | ( | Phonon::VideoWidget::ScaleMode |  | ) | `[pure virtual]`

Search for all occurrences

virtual qreal Phonon::contrast | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual void Phonon::setContrast | ( | qreal |  | ) | `[pure virtual]`

Search for all occurrences

virtual qreal Phonon::hue | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual void Phonon::setHue | ( | qreal |  | ) | `[pure virtual]`

Search for all occurrences

virtual qreal Phonon::saturation | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual void Phonon::setSaturation | ( | qreal |  | ) | `[pure virtual]`

Search for all occurrences

virtual QWidget* Phonon::widget | ( |  | ) | `[pure virtual]`

Search for all occurrences

virtual void Phonon::setVolume | ( | float |  | ) | `[virtual]`

Search for all occurrences

Definition at line 43 of file volumefaderinterface.h.

    {

virtual Phonon::VolumeFaderEffect::FadeCurve Phonon::fadeCurve | ( |  | ) | const `[virtual]`

Search for all occurrences

Definition at line 44 of file volumefaderinterface.h.

                                                                        {}

virtual void Phonon::setFadeCurve | ( | Phonon::VolumeFaderEffect::FadeCurve |  | ) | `[virtual]`

Search for all occurrences

Definition at line 47 of file volumefaderinterface.h.

    {}

virtual void Phonon::fadeTo | ( | float | ,
|  | int |
| ) |  | `[virtual]`

Search for all occurrences

Definition at line 48 of file volumefaderinterface.h.

## Variable Documentation

D __pad0__

Search for all occurrences

Definition at line 37 of file abstractaudiooutput.h.