Phonon NamespaceThe Phonon namespace contains classes and functions for multimedia applications. More... #include <Phonon> This namespace was introduced in Qt 4.4. Namespaces
Classes
Types
Functions
Detailed DescriptionThe Phonon namespace contains classes and functions for multimedia applications. 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 and the Phonon Overview for an introductory tour of its features. Namespaces
|
Constant | Value | Description |
---|---|---|
Phonon::NoCategory | -1 | Will make use of the default device. |
Phonon::NotificationCategory | 0 | If the sounds produced are notifications (ping, beep and such) you should use this category. |
Phonon::MusicCategory | 1 | If your application is a music player (like a jukebox or media player playing an audio file). |
Phonon::VideoCategory | 2 | If the sound is the audio channel of a video. |
Phonon::CommunicationCategory | 3 | If your applications produces sounds from communication with somebody else (VoIP, voice chat). |
Phonon::GameCategory | 4 | Sound produced by a computer game should go into this category. |
Phonon::AccessibilityCategory | 5 | Sounds 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.
Enum to identify the media discs supported by MediaObject.
Constant | Value | Description |
---|---|---|
Phonon::NoDisc | -1 | No disc was selected. This is only useful as a return value from MediaSource::diskType(). |
Phonon::Cd | 0 | Identifies Audio CDs. |
Phonon::Dvd | 1 | Identifies DVDs (not arbitrary data DVDs, only movie DVDs). |
Phonon::Vcd | 2 | Identifies Video CDs. |
See also MediaSource and MediaObject.
EffectDescription gives a description of an audio effect. It is a typedef of the ObjectDescription class. Please see its class description for details.
EffectDescription is used to create audio Effects, which can be inserted into a media graph, altering an audio stream.
See also Phonon::ObjectDescription, Capabilities Example, and Media Player.
provides a item view model containing available audio effects.
This enum describes the severity when an error has occurred during playback.
After a media object has entered the ErrorState, one can query the type of error from MediaObject::errorType(). Note that you should query the error when receiving the MediaObject::stateChanged() signal, because the error type will be lost if the media object leaves the error state.
Constant | Value | Description |
---|---|---|
Phonon::NoError | 0 | No error. MediaObject::errorType() returns this if MediaObject::state() != Phonon::ErrorState. |
Phonon::NormalError | 1 | An error has occurred with the playback of the current source. It might be possible to continue playback, for instance, if only the audio stream in a video cannot be played back. The media object will then leave the error state again. |
Phonon::FatalError | 2 | . Something important does not work. Your program cannot continue the playback of the current source, but it might be possible to try another. |
See also MediaObject::errorType().
Provided as keys for Phonon::MediaObject::metaData(). The enum values matches strings defined in the Ogg Vorbis specification
Constant | Value |
---|---|
Phonon::ArtistMetaData | 0 |
Phonon::AlbumMetaData | 1 |
Phonon::TitleMetaData | 2 |
Phonon::DateMetaData | 3 |
Phonon::GenreMetaData | 4 |
Phonon::TracknumberMetaData | 5 |
Phonon::DescriptionMetaData | 6 |
Phonon::MusicBrainzDiscIdMetaData | 7 |
This enum defines the type of information that is contained in a ObjectDescription object.
Constant | Value | Description |
---|---|---|
Phonon::AudioOutputDeviceType | 0 | An audio output device (AudioOutputDevice). This can be soundcards (with different drivers), sound servers, or other virtual outputs like playback on a different computer on the network. |
Phonon::EffectType | 1 | An audio effect (EffectDescription). |
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.
Constant | Value | Description |
---|---|---|
Phonon::LoadingState | 0 | After 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::StoppedState | 1 | In 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::PlayingState | 2 | The media object is playing back its media source. |
Phonon::BufferingState | 3 | The 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::PausedState | 4 | The media player has currently paused its playback, i.e., it stops playing but keeps the current playback position in the stream. |
Phonon::ErrorState | 5 | When 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. |
This enum was introduced or modified in Qt 4.4.
See also MediaObject.
This typedef was introduced in Qt 4.7.
Returns a (translated) string to show to the user identifying the given Category (c).
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.
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.
Returns the Phonon version.
This function was introduced in Qt 4.5.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com