Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

Phonon Namespace Reference

The KDE Multimedia classes More...

 #include <Phonon>

Namespaces

Classes

Types

Functions


Detailed Description

Author: Matthias Kretz <kretz@kde.org>

The KDE Multimedia classes

This namespace contains classes to access multimedia functions for audio and video playback. Those classes are not dependent on any specific framework, but rather use exchangeable backends to do the work.

See the Phonon Module page for general information about the framework.


Namespaces

namespace Phonon::BackendCapabilities

Collection of functions describing the capabilities of the Backend.

Author: Matthias Kretz <kretz@kde.org>


Classes

class AbstractAudioOutput

Provides a common base class for all audio outputs. More...

class AbstractMediaStream

Base class for custom media data streams. Author: Matthias Kretz <kretz@kde.org> More...

class AbstractVideoOutput

Common base class for all video outputs. More...

class AbstractVideoOutputPrivate

class AudioOutput

outputs audio to the soundcard. More...

class Effect

transforms audio streams. More...

class EffectParameter

This class describes one parameter of an effect. More...

class EffectWidget

Widget to control the parameters of an Effect. More...

class ListModelHelper

class MediaController

Controls optional features of a media file/device like title, chapter, angle. More...

class MediaNodeDestructionHandler

class MediaObject

provides an interface for media playback. Author: Matthias Kretz <kretz@kde.org> More...

class MediaSource

provides multimedia data for MediaObjects. More...

class ObjectDescription

This class provides a tuple of end user visible name and description. Author: Matthias Kretz <kretz@kde.org> 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 SeekSlider

provides a slider for seeking in MediaObjects. More...

class VideoPlayer

provides playback of video. More...

class VideoWidget

Widget to display video. More...

class VolumeFaderEffect

Audio effect to gradually fade the audio volume. Author: Matthias Kretz <kretz@kde.org> More...

class VolumeSlider

provides a slider to control the volume of an AudioOutput. More...


Type Documentation

typedef Phonon::AudioOutputDevice

Audio output devices. This can be soundcards (with different drivers), sound servers 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.

A list of available devices is given by the backend with Backendcapabilities::availableAudioOutputDevices()

typedef Phonon::AudioOutputDeviceModel

provides an item view model containing available audio output devices.

enum Phonon::Category

Sets the category your program should be listed in in the mixer.

ConstantValueDescription
Phonon::NoCategory-1Will make use of the default device.
Phonon::NotificationCategory0If the sounds produced are notifications (ping, beep and such) you should use this category.
Phonon::MusicCategory1If your application is a music player (like a jukebox or media player playing an audio file).
Phonon::VideoCategory2If the sound is the audio channel of a video.
Phonon::CommunicationCategory3If your applications produces sounds from communication with somebody else (VoIP, voice chat).
Phonon::GameCategory4Sound produced by a computer game should go into this category.
Phonon::AccessibilityCategory5Sounds produced for accessibility (e.g., Text-To-Speech) Holds the largest value of categories.

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.

typedef Phonon::CleanUpFunction

enum Phonon::DiscType

Enum to identify the media discs supported by MediaObject.

ConstantValueDescription
Phonon::NoDisc-1No disc was selected. This is only useful as a return value from MediaSource::distType().
Phonon::Cd0Identifies Audio CDs.
Phonon::Dvd1Identifies DVDs (not arbitrary data DVDs, only movie DVDs).
Phonon::Vcd2Identifies Video CDs.

See also MediaSource.

typedef Phonon::EffectDescription

describes the parameters of an audio effect.

typedef Phonon::EffectDescriptionModel

provides a item view model containing available audio effects.

enum Phonon::ErrorType

Tells your program how to recover from an error.

ConstantValueDescription
Phonon::NoError0No error. MediaObject::errorType() returns this if MediaObject::state() != Phonon::ErrorState.
Phonon::NormalError1Playback should work, and trying with another URL should work.
Phonon::FatalError2Something important does not work. Your program cannot continue playback or capture or whatever it was trying to do without help from the user.

See also MediaObject::errorType().

enum Phonon::MetaData

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

ConstantValue
Phonon::ArtistMetaData0
Phonon::AlbumMetaData1
Phonon::TitleMetaData2
Phonon::DateMetaData3
Phonon::GenreMetaData4
Phonon::TracknumberMetaData5
Phonon::DescriptionMetaData6

enum Phonon::ObjectDescriptionType

This enum defines the type of information that is contained in a ObjectDescription object.

ConstantValueDescription
Phonon::AudioOutputDeviceType0Audio output devices. This can be soundcards (with different drivers), sound servers 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.

ConstantValueDescription
Phonon::EffectType1Lists all processing effects the backend supports.

enum Phonon::State

The state enum describes the different states a media object can take. Several functions of MediaObject are asynchronous, so even if a you have requested a state change through a function call, e.g., through play(), you cannot be sure that the change has taken place before you receive the stateChanged() signal.

A media object can at any time change into any state, regardless of the state it previously had.

ConstantValueDescription
Phonon::LoadingState0After construction it might take a while before the media object is ready to play(). This state is commonly used by backends to initialize the media graph and loading the source. When the object leaves the loading state, it will enter the StoppedState unless an error occurred or another state is requested through a function call, e.g., MediaObject::play().
Phonon::StoppedState1In the stopped state, the media object is ready to play its current media source. The current position in the media stream is then 0.
Phonon::PlayingState2The media object is playing back its media source.
Phonon::BufferingState3The Player is waiting for data to be able to start or continue playing. This state is commonly used to wait for media data over a network connection.
Phonon::PausedState4The media player has currently paused its playback, i.e., it stops playing but keeps the current playback position in the stream.
Phonon::ErrorState5When a media object enters the error state a problem with the playback has occurred. The possible errors are grouped into two categories by Phonon::ErrorType, and the type can be queried through errorType(). A FatalError implies that the playback cannot continue, but one can still try with a new media source. With a NormalError it might be possible to continue playback, and a media object may therefore change state from the ErrorState.

See also MediaObject.


Function Documentation

QString Phonon::categoryToString ( Category c )

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

Path Phonon::createPath ( MediaNode * source, MediaNode * sink )

Creates a new Path connecting the two MediaNodes source and sink.

The implementation will automatically select the right format and media type. E.g. connecting a MediaObject and AudioOutput will create a Path object connecting the audio. This might be represented as PCM or perhaps even AC3 depending on the AudioOutput object.

source The MediaNode to connect an output from sink The MediaNode to connect to.

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

Convenience function to create a MediaObject and AudioOutput connected by a path. The MediaObject return will have source set as its current source and the specified category.

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

QDebug Phonon::operator<< ( QDebug s, const ObjectDescription<T> & o )


Copyright © 2008 Trolltech Trademarks
Qt 4.4.0-beta1