• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

phonon

Phonon Namespace Reference

The KDE Multimedia classes. More...

Namespaces

namespace  Experimental

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  AudioDataOutput
 This class gives you the audio data (for visualizations). More...
class  AudioOutput
 Class for audio output to the soundcard. More...
class  Effect
 Effects that can be inserted into a Path. More...
class  EffectParameter
 This class describes one parameter of an effect. More...
class  EffectWidget
 Widget to control the parameters of an Effect. More...
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  MediaSource
 Note that all constructors of this class are implicit, so that you can simply write. More...
class  ObjectDescription
 Provides a tuple of enduser visible name and description. More...
class  ObjectDescriptionData
 Data class for objects describing devices or features of the backend. More...
class  ObjectDescriptionModel
 The ObjectDescriptionModel class provides a model from a list of ObjectDescription objects. More...
class  ObjectDescriptionModelData
 Data class for models for ObjectDescription objects. More...
class  Path
 Connection object providing convenient effect insertion. More...
class  PlatformPlugin
class  SeekSlider
 Widget providing a slider for seeking in MediaObject objects. More...
class  VideoPlayer
 Playback class for simple tasks. More...
class  VideoWidget
 Widget to display video. More...
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 ObjectDescription
< AudioCaptureDeviceType > 
AudioCaptureDevice
typedef ObjectDescriptionModel
< AudioCaptureDeviceType > 
AudioCaptureDeviceModel
typedef ObjectDescription
< AudioChannelType > 
AudioChannelDescription
typedef ObjectDescriptionModel
< AudioChannelType > 
AudioChannelDescriptionModel
typedef ObjectDescription
< AudioOutputDeviceType > 
AudioOutputDevice
typedef ObjectDescriptionModel
< AudioOutputDeviceType > 
AudioOutputDeviceModel
typedef ObjectDescription
< EffectType > 
EffectDescription
typedef ObjectDescriptionModel
< EffectType > 
EffectDescriptionModel
typedef ObjectDescription
< SubtitleType > 
SubtitleDescription
typedef ObjectDescriptionModel
< SubtitleType > 
SubtitleDescriptionModel

Enumerations

enum  Category {
  NoCategory = -1, NotificationCategory = 0, MusicCategory = 1, VideoCategory = 2,
  CommunicationCategory = 3, GameCategory = 4, AccessibilityCategory = 5, LastCategory = AccessibilityCategory
}
enum  DiscType { NoDisc = -1, Cd = 0, Dvd = 1, Vcd = 2 }
enum  ErrorType { NoError = 0, NormalError = 1, FatalError = 2 }
enum  MetaData {
  ArtistMetaData, AlbumMetaData, TitleMetaData, DateMetaData,
  GenreMetaData, TracknumberMetaData, DescriptionMetaData, MusicBrainzDiscIdMetaData
}
enum  ObjectDescriptionType {
  AudioOutputDeviceType, EffectType, AudioChannelType, SubtitleType,
  AudioCaptureDeviceType
}
enum  State {
  LoadingState, StoppedState, PlayingState, BufferingState,
  PausedState, ErrorState
}

Functions

PHONON_EXPORT QString categoryToString (Category c)
PHONON_EXPORT MediaObject * createPlayer (Phonon::Category category, const MediaSource &source=MediaSource())
template<ObjectDescriptionType T>
QDebug operator<< (QDebug s, const ObjectDescription< T > &o)
PHONON_EXPORT const char * phononVersion ()
uint PHONON_EXPORT qHash (const Phonon::EffectParameter &param)

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 ObjectDescription<AudioCaptureDeviceType> Phonon::AudioCaptureDevice

Definition at line 277 of file objectdescription.h.

typedef ObjectDescriptionModel<AudioCaptureDeviceType> Phonon::AudioCaptureDeviceModel

Definition at line 363 of file objectdescriptionmodel.h.

typedef ObjectDescription<AudioChannelType> Phonon::AudioChannelDescription

Definition at line 311 of file objectdescription.h.

typedef ObjectDescriptionModel<AudioChannelType> Phonon::AudioChannelDescriptionModel

Definition at line 365 of file objectdescriptionmodel.h.

typedef ObjectDescription<AudioOutputDeviceType> Phonon::AudioOutputDevice

Definition at line 272 of file objectdescription.h.

typedef ObjectDescriptionModel<AudioOutputDeviceType> Phonon::AudioOutputDeviceModel

Definition at line 362 of file objectdescriptionmodel.h.

typedef ObjectDescription<EffectType> Phonon::EffectDescription

Definition at line 291 of file objectdescription.h.

typedef ObjectDescriptionModel<EffectType> Phonon::EffectDescriptionModel

Definition at line 364 of file objectdescriptionmodel.h.

typedef ObjectDescription<SubtitleType> Phonon::SubtitleDescription

Definition at line 312 of file objectdescription.h.

typedef ObjectDescriptionModel<SubtitleType> Phonon::SubtitleDescriptionModel

Definition at line 366 of file objectdescriptionmodel.h.


Enumeration Type Documentation

enum Phonon::Category

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.

NotificationCategory 

If the sounds produced are notifications (bing, beep and such) you should use this category.

MusicCategory 

If your application is a music player (like a jukebox or media player playing an audio file).

VideoCategory 

If the sound is the audio channel of a video.

CommunicationCategory 

If your applications produces sounds from communication with somebody else (VoIP, voice chat).

GameCategory 

Sound produced by a computer game should go into this category.

AccessibilityCategory 

Sounds produced for accessibility (e.g.

Text-To-Speech)

LastCategory 

For internal use only.

Holds the largest value of categories.

Definition at line 183 of file phononnamespace.h.in.

enum Phonon::DiscType

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();

Cd 

Identifies Audio CDs.

Dvd 

Identifies DVDs (not arbitrary data DVDs, only movie DVDs).

Vcd 

Identifies Video CDs.

Definition at line 72 of file phononnamespace.h.in.

enum Phonon::ErrorType

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.

NormalError 

Playback should work, and trying with another URL should work.

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.

Definition at line 228 of file phononnamespace.h.in.

enum Phonon::MetaData

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.

AlbumMetaData 

The collection name to which this track belongs.

TitleMetaData 

Track/Work name.

DateMetaData 

Date the track was recorded.

GenreMetaData 

A short text indication of music genre.

TracknumberMetaData 

The track number of this piece if part of a specific larger collection or album.

DescriptionMetaData 

A short text description of the contents.

MusicBrainzDiscIdMetaData 

Definition at line 96 of file phononnamespace.h.in.

enum Phonon::ObjectDescriptionType

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.

EffectType 

Lists all processing effects the backend supports.

AudioChannelType 
SubtitleType 
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.

Definition at line 48 of file objectdescription.h.

enum Phonon::State

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.

StoppedState 

The Player has a valid media file loaded and is ready for playing.

PlayingState 

The Player is playing a media file.

BufferingState 

The Player is waiting for data to be able to continue playing.

PausedState 

The Player is currently paused.

ErrorState 

An unrecoverable error occurred.

The Object is unusable in this state.

Definition at line 137 of file phononnamespace.h.in.


Function Documentation

PHONON_EXPORT QString Phonon::categoryToString ( Category  c  ) 

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

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

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

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

Definition at line 264 of file objectdescription.h.

PHONON_EXPORT const char* Phonon::phononVersion (  ) 
uint PHONON_EXPORT Phonon::qHash ( const Phonon::EffectParameter &  param  ) 

phonon

Skip menu "phonon"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal