KDE::Multimedia::Factory Class Reference
Factory to access the preferred Backend. More...
#include <factory.h>
Inheritance diagram for KDE::Multimedia::Factory:


Signals | |
| void | deleteYourObjects () |
| void | recreateObjects () |
DCOP Member Functions | |
| void | kdemmBackendChanged () |
Public Member Functions | |
| Player * | createPlayer () |
| VideoPlayer * | createVideoPlayer () |
| bool | playSoundEvent (const KURL &url) |
| Channel * | createChannel (const QString &title, const QString &channeltype=QString::fromLatin1("default"), Channel::Direction direction=Channel::Output) |
| QStringList | availableChannels (Channel::Direction direction=Channel::Output) const |
| QStringList | playableMimeTypes () const |
| bool | isMimeTypePlayable (const QString &mimetype) const |
| QString | backendName () const |
| QString | backendComment () const |
| QString | backendVersion () const |
| QString | backendIcon () const |
| QString | backendWebsite () const |
Static Public Member Functions | |
| static Factory * | self () |
Protected Member Functions | |
| Factory () | |
| ~Factory () | |
Detailed Description
Factory to access the preferred Backend.This class is your entry point to KDE Multimedia usage. It provides the necessary objects for playing audio and video.
For simple access to just playing an audio file see SimplePlayer.
- Remarks:
- Extensions to the existing functionality can either be added by using the reserved virtual functions in Backend or by adding a new interface e.g. BackendV2 and creating a BackendV2 instance when the Backend instance is created.
- Author:
- Matthias Kretz <kretz@kde.org>
- Since:
- 4.0
Definition at line 67 of file factory.h.
Member Function Documentation
|
|
Returns a pointer to the factory. Use this function to get an instance of KLibLoader.
Definition at line 115 of file factory.cpp. References Factory(). Referenced by KDE::Multimedia::SimplePlayer::SimplePlayer(). |
|
|
Create a new Player. You need to call it like this: Factory::self()->createPlayer();
Definition at line 175 of file factory.cpp. References QObject::connect(), and QObject::destroyed(). Referenced by KDE::Multimedia::SimplePlayer::SimplePlayer(). |
|
|
Create a new VideoPlayer object. The Backend does not have to implement this functionality so you have to check that it didn't return 0.
Definition at line 188 of file factory.cpp. References QObject::connect(), and QObject::destroyed(). |
|
|
Play the specified sound-file with no further control. Returns immediatly.
Definition at line 201 of file factory.cpp. |
|
||||||||||||||||
|
Creates a new Channel object that you can use for a Player object to play to.
Definition at line 209 of file factory.cpp. References QObject::connect(), and QObject::destroyed(). Referenced by KDE::Multimedia::SimplePlayer::SimplePlayer(). |
|
|
Returns the names of the channels that can be used to play or record, depending on the value of
Definition at line 223 of file factory.cpp. |
|
|
Returns the mimetypes that can be played.
Definition at line 231 of file factory.cpp. Referenced by isMimeTypePlayable(). |
|
|
Checks whether a certain mimetype is playable.
Definition at line 239 of file factory.cpp. References KMimeType::mimeType(), and playableMimeTypes(). |
|
|
Get the name of the Backend. It's the name from the .desktop file. Definition at line 252 of file factory.cpp. |
|
|
Get the comment of the Backend. It's the comment from the .desktop file. Definition at line 260 of file factory.cpp. |
|
|
Get the version of the Backend. It's the version from the .desktop file. The version is especially interesting if there are several versions available for binary incompatible versions of the backend's media framework. Definition at line 268 of file factory.cpp. |
|
|
Get the icon (name) of the Backend. It's the icon from the .desktop file. Definition at line 276 of file factory.cpp. |
|
|
Get the website of the Backend. It's the website from the .desktop file. Definition at line 284 of file factory.cpp. |
|
|
This signal is emitted when the user changes the backend. You then have to free all your references to Player or Channel objects. |
|
|
After you got a deleteYourObjects() signal the backend is changed internally. Then you will receive this signal, and only then should you reconstruct all your objects again. This time they will internally use the new backend. |
The documentation for this class was generated from the following files:
