38
38
* \author Matthias Kretz <kretz@kde.org>
40
class PHONONCORE_EXPORT BackendCapabilities : public QObject
40
namespace BackendCapabilities
42
friend void ::KStaticDeleter<BackendCapabilities>::destructObject();
47
* Use this function to get the QObject pointer for connecting the
48
* capabilitiesChanged signal.
50
* \return a pointer to the BackendCapabilities instance. If no instance existed before a new
53
static BackendCapabilities* self();
56
* Tells whether the backend is audio only or can handle video files
57
* and display of videos.
59
* If the backend does not support video the classes
60
* VideoPath, VideoEffect and all AbstractVideoOutput subclasses won't
63
static bool supportsVideo();
66
* Tells whether the backend implements the OSD interfaces.
68
* \todo there's no interfaces for it at this point
70
static bool supportsOSD();
73
* Tells whether the backend supports subtitle rendering on the
76
* \todo there's no interfaces for it at this point
78
static bool supportsSubtitles();
81
* Returns a list of mime types that the Backend can decode.
83
* \see isMimeTypeKnown()
85
static QStringList knownMimeTypes();
88
* Often all you want to know is whether one given MIME type can be
89
* decoded by the backend. Use this method in favor of knownMimeTypes()
90
* as it can give you a negative answer without having a backend loaded.
92
* \see knownMimeTypes();
94
static bool isMimeTypeKnown( const QString& mimeType );
43
* Notifications about backend capabilities.
45
class Notifier : public QObject
50
* This signal is emitted if the capabilities have changed. This can
51
* happen if the user has requested a backend change.
53
void capabilitiesChanged();
57
* Use this function to get a QObject pointer to connect to the capabilitiesChanged signal.
59
* \return a pointer to a QObject.
61
* The capabilitiesChanged signal is emitted if the capabilities have changed. This can
62
* happen if the user has requested a backend change.
64
* To connect to this signal do the following:
66
* QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ...
69
* \see Notifier::capabilitiesChanged()
71
PHONONCORE_EXPORT Notifier *notifier();
74
* Tells whether the backend is audio only or can handle video files
75
* and display of videos.
77
* If the backend does not support video the classes
78
* VideoPath, VideoEffect and all AbstractVideoOutput subclasses won't
81
PHONONCORE_EXPORT bool supportsVideo();
84
* Tells whether the backend implements the OSD interfaces.
86
* \todo there's no interfaces for it at this point
88
PHONONCORE_EXPORT bool supportsOSD();
91
* Tells whether the backend supports subtitle rendering on the
94
* \todo there's no interfaces for it at this point
96
PHONONCORE_EXPORT bool supportsSubtitles();
99
* Returns a list of mime types that the Backend can decode.
101
* \see isMimeTypeKnown()
103
PHONONCORE_EXPORT QStringList knownMimeTypes();
106
* Often all you want to know is whether one given MIME type can be
107
* decoded by the backend. Use this method in favor of knownMimeTypes()
108
* as it can give you a negative answer without having a backend loaded.
110
* \see knownMimeTypes();
112
PHONONCORE_EXPORT bool isMimeTypeKnown( const QString& mimeType );
98
* Returns the audio output devices the backend reports as usable. That
99
* doesn't have to say the device will certainly work as the backend
100
* might not be able to open the device if it's blocked by another
101
* application. But at least the device is physically available.
103
* \return A list of AudioOutputDevice objects that give a name and
104
* description for every supported audio output device.
106
* \see knownAudioOutputDevices
108
static QList<AudioOutputDevice> usableAudioOutputDevices();
116
* Returns the audio output devices the backend reports as usable. That
117
* doesn't have to say the device will certainly work as the backend
118
* might not be able to open the device if it's blocked by another
119
* application. But at least the device is physically available.
121
* \return A list of AudioOutputDevice objects that give a name and
122
* description for every supported audio output device.
124
* \see knownAudioOutputDevices
126
PHONONCORE_EXPORT QList<AudioOutputDevice> usableAudioOutputDevices();
111
* Returns the audio output devices the backend has ever reported as
114
* \return A list of AudioOutputDevice objects that give a name and
115
* description for every supported audio output device.
117
* \see usableAudioOutputDevices
119
static QList<AudioOutputDevice> knownAudioOutputDevices();
129
* Returns the audio output devices the backend has ever reported as
132
* \return A list of AudioOutputDevice objects that give a name and
133
* description for every supported audio output device.
135
* \see usableAudioOutputDevices
137
PHONONCORE_EXPORT QList<AudioOutputDevice> knownAudioOutputDevices();
122
* Returns the audio output devices the backend supports.
124
* \return A list of AudioOutputDevice objects that give a name and
125
* description for every supported audio output device.
127
static QList<AudioOutputDevice> availableAudioOutputDevices();
130
* Returns the audio capture devices the backend supports.
132
* \return A list of AudioCaptureDevice objects that give a name and
133
* description for every supported audio capture device.
135
static QList<AudioCaptureDevice> availableAudioCaptureDevices();
138
* Returns the video output devices the backend supports.
140
* \return A list of VideoOutputDevice objects that give a name and
141
* description for every supported video output device.
143
static QList<VideoOutputDevice> availableVideoOutputDevices();
146
* Returns the video capture devices the backend supports.
148
* \return A list of VideoCaptureDevice objects that give a name and
149
* description for every supported video capture device.
151
static QList<VideoCaptureDevice> availableVideoCaptureDevices();
154
* Returns the visualization effects the backend supports.
156
* \return A list of VisualizationEffect objects that give a name and
157
* description for every supported visualization effect.
159
static QList<VisualizationDescription> availableVisualizations();
162
* Returns descriptions for the audio effects the backend supports.
164
* \return A list of AudioEffectDescription objects that give a name and
165
* description for every supported audio effect.
167
static QList<AudioEffectDescription> availableAudioEffects();
170
* Returns descriptions for the video effects the backend supports.
172
* \return A list of VideoEffectDescription objects that give a name and
173
* description for every supported video effect.
175
static QList<VideoEffectDescription> availableVideoEffects();
178
* Returns descriptions for the audio codecs the backend supports.
180
* \return A list of AudioCodec objects that give a name and
181
* description for every supported audio codec.
183
static QList<AudioCodecDescription> availableAudioCodecs();
186
* Returns descriptions for the video codecs the backend supports.
188
* \return A list of VideoCodec objects that give a name and
189
* description for every supported video codec.
191
static QList<VideoCodecDescription> availableVideoCodecs();
194
* Returns descriptions for the container formats the backend supports.
196
* \return A list of ContainerFormat objects that give a name and
197
* description for every supported container format.
199
static QList<ContainerFormatDescription> availableContainerFormats();
203
* This signal is emitted if the capabilities have changed. This can
204
* happen if the user has requested a backend change.
206
* To connect to this signal use the self function:
208
* QObject::connect( BackendCapabilities::self(), SIGNAL(capabilitiesChanged()), ...
211
void capabilitiesChanged();
214
BackendCapabilities();
215
~BackendCapabilities();
218
void _k_slotBackendChanged();
221
static BackendCapabilities* m_self;
140
* Returns the audio output devices the backend supports.
142
* \return A list of AudioOutputDevice objects that give a name and
143
* description for every supported audio output device.
145
PHONONCORE_EXPORT QList<AudioOutputDevice> availableAudioOutputDevices();
148
* Returns the audio capture devices the backend supports.
150
* \return A list of AudioCaptureDevice objects that give a name and
151
* description for every supported audio capture device.
153
PHONONCORE_EXPORT QList<AudioCaptureDevice> availableAudioCaptureDevices();
156
* Returns the video output devices the backend supports.
158
* \return A list of VideoOutputDevice objects that give a name and
159
* description for every supported video output device.
161
PHONONCORE_EXPORT QList<VideoOutputDevice> availableVideoOutputDevices();
164
* Returns the video capture devices the backend supports.
166
* \return A list of VideoCaptureDevice objects that give a name and
167
* description for every supported video capture device.
169
PHONONCORE_EXPORT QList<VideoCaptureDevice> availableVideoCaptureDevices();
172
* Returns the visualization effects the backend supports.
174
* \return A list of VisualizationEffect objects that give a name and
175
* description for every supported visualization effect.
177
PHONONCORE_EXPORT QList<VisualizationDescription> availableVisualizations();
180
* Returns descriptions for the audio effects the backend supports.
182
* \return A list of AudioEffectDescription objects that give a name and
183
* description for every supported audio effect.
185
PHONONCORE_EXPORT QList<AudioEffectDescription> availableAudioEffects();
188
* Returns descriptions for the video effects the backend supports.
190
* \return A list of VideoEffectDescription objects that give a name and
191
* description for every supported video effect.
193
PHONONCORE_EXPORT QList<VideoEffectDescription> availableVideoEffects();
196
* Returns descriptions for the audio codecs the backend supports.
198
* \return A list of AudioCodec objects that give a name and
199
* description for every supported audio codec.
201
PHONONCORE_EXPORT QList<AudioCodecDescription> availableAudioCodecs();
204
* Returns descriptions for the video codecs the backend supports.
206
* \return A list of VideoCodec objects that give a name and
207
* description for every supported video codec.
209
PHONONCORE_EXPORT QList<VideoCodecDescription> availableVideoCodecs();
212
* Returns descriptions for the container formats the backend supports.
214
* \return A list of ContainerFormat objects that give a name and
215
* description for every supported container format.
217
PHONONCORE_EXPORT QList<ContainerFormatDescription> availableContainerFormats();
218
} // namespace BackendCapabilities
225
219
} // namespace Phonon
227
221
#endif // Phonon_BACKENDCAPABILITIES_H
228
// vim: sw=4 ts=4 tw=80 noet
222
// vim: sw=4 ts=4 tw=80