Phonon

backendcapabilities.h
1/* This file is part of the KDE project
2 Copyright (C) 2005-2006 Matthias Kretz <kretz@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) version 3, or any
8 later version accepted by the membership of KDE e.V. (or its
9 successor approved by the membership of KDE e.V.), Nokia Corporation
10 (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 act as a proxy defined in Section 6 of version 3 of the license.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21*/
22
23#ifndef Phonon_BACKENDCAPABILITIES_H
24#define Phonon_BACKENDCAPABILITIES_H
25
26#include "phonon_export.h"
27#include "objectdescription.h"
28
29#include <QObject>
30#include <QStringList>
31
32#ifdef __QT_SYNCQT__
33// Tell syncqt that the BackendCapabilities namespace should be treated like a class
34#pragma qt_class(Phonon::BackendCapabilities)
35#pragma qt_sync_stop_processing
36#endif
37
38template<class T> class QList;
39
40namespace Phonon
41{
42
43/**
44 * Collection of functions describing the capabilities of the Backend.
45 *
46 * \ingroup BackendInformation
47 * \author Matthias Kretz <kretz@kde.org>
48 */
49namespace BackendCapabilities
50{
51 /** \class Notifier backendcapabilities.h phonon/BackendCapabilities
52 * Notifications about backend capabilities.
53 *
54 * \ingroup BackendInformation
55 */
56 class Notifier : public QObject
57 {
60 /**
61 * This signal is emitted if the capabilities have changed. This can
62 * happen if the user has requested a backend change.
63 */
65
66 /**
67 * This signal is emitted when audio output devices were plugged or
68 * unplugged.
69 *
70 * Check BackendCapabilities::availableAudioOutputDevices to get the
71 * current list of available devices.
72 */
74
75#ifndef PHONON_NO_AUDIOCAPTURE
76 /**
77 * This signal is emitted when audio capture devices were plugged or
78 * unplugged.
79 *
80 * Check BackendCapabilities::availableAudioCaptureDevices to get the
81 * current list of available devices.
82 */
84#endif //PHONON_NO_AUDIOCAPTURE
85
86#ifndef PHONON_NO_VIDEOCAPTURE
87 /**
88 * This signal is emitted when video capture devices were plugged or
89 * unplugged.
90 *
91 * Check BackendCapabilities::availableVideoCaptureDevices to get the
92 * current list of available devices.
93 */
95#endif //PHONON_NO_VIDEOCAPTURE
96 };
97
98 /**
99 * Use this function to get a QObject pointer to connect to one of the Notifier signals.
100 *
101 * \return a pointer to a QObject.
102 *
103 * To connect to the signal do the following:
104 * \code
105 * QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ...
106 * \endcode
107 *
108 * \see Notifier::capabilitiesChanged()
109 * \see Notifier::availableAudioOutputDevicesChanged()
110 * \see Notifier::availableAudioCaptureDevicesChanged()
111 * \see Notifier::availableVideoCaptureDevicesChanged()
112 */
113 PHONON_EXPORT Notifier *notifier();
114
115 /**
116 * Returns a list of mime types that the Backend can decode.
117 *
118 * \see isMimeTypeAvailable()
119 */
120 PHONON_EXPORT QStringList availableMimeTypes();
121
122 /**
123 * Often all you want to know is whether one given MIME type can be
124 * decoded by the backend. Use this method in favor of availableMimeTypes()
125 * as it can give you a negative answer without having a backend loaded.
126 *
127 * \see availableMimeTypes();
128 */
129 PHONON_EXPORT bool isMimeTypeAvailable(const QString &mimeType);
130
131 /**
132 * Returns the audio output devices the backend supports.
133 *
134 * \return A list of AudioOutputDevice objects that give a name and
135 * description for every supported audio output device.
136 */
138
139#ifndef PHONON_NO_AUDIOCAPTURE
140 /**
141 * Returns the audio capture devices the backend supports.
142 *
143 * \return A list of AudioCaptureDevice objects that give a name and
144 * description for every supported audio capture device.
145 */
147#endif //PHONON_NO_AUDIOCAPTURE
148
149 /**
150 * Returns the video output devices the backend supports.
151 *
152 * \return A list of VideoOutputDevice objects that give a name and
153 * description for every supported video output device.
154 */
155// PHONON_EXPORT QList<VideoOutputDevice> availableVideoOutputDevices();
156
157#ifndef PHONON_NO_VIDEOCAPTURE
158 /**
159 * Returns the video capture devices the backend supports.
160 *
161 * \return A list of VideoCaptureDevice objects that give a name and
162 * description for every supported video capture device.
163 */
165#endif //PHONON_NO_VIDEOCAPTURE
166
167 /**
168 * Returns the video capture devices that have audio capture capabilities
169 * that the backend supports. In effect, these are both video and audio
170 * capture devices and one can connect them to both a VideoWidget and an
171 * AudioOutput, for example.
172 *
173 * The resulting VideoCaptureDevices have a "hasaudio" property to true.
174 *
175 * \note These devices appear both in availableVideoCaptureDevices() and
176 * availableAudioCaptureDevices()
177 *
178 * \warning Creating two separate MediaObject instances for the same capture
179 * device, one for video and the other for audio, most probably doesn't work.
180 * But, if there are two separate devices, use Experimental::AVCapture.
181 *
182 * \see availableVideoCaptureDevices()
183 * \see availableAudioCaptureDevices()
184 * \see Experimental::AVCapture
185 */
186#if !defined(PHONON_NO_VIDEOCAPTURE) && !defined(PHONON_NO_AUDIOCAPTURE)
188#endif // NOT PHONON_NO_VIDEOCAPTURE AND NOT PHONON_NO_AUDIOCAPTURE
189
190 /**
191 * Returns the visualization effects the backend supports.
192 *
193 * \return A list of VisualizationEffect objects that give a name and
194 * description for every supported visualization effect.
195 */
196// PHONON_EXPORT QList<VisualizationDescription> availableVisualizations();
197
198#ifndef QT_NO_PHONON_EFFECT
199 /**
200 * Returns descriptions for the audio effects the backend supports.
201 *
202 * \return A list of AudioEffectDescription objects that give a name and
203 * description for every supported audio effect.
204 */
206#endif //QT_NO_PHONON_EFFECT
207
208//X /**
209//X * Returns descriptions for the video effects the backend supports.
210//X *
211//X * \return A list of VideoEffectDescription objects that give a name and
212//X * description for every supported video effect.
213//X */
214//X PHONON_EXPORT QList<EffectDescription> availableVideoEffects();
215
216 /**
217 * Returns descriptions for the audio codecs the backend supports.
218 *
219 * \return A list of AudioCodec objects that give a name and
220 * description for every supported audio codec.
221 */
222// PHONON_EXPORT QList<AudioCodecDescription> availableAudioCodecs();
223
224 /**
225 * Returns descriptions for the video codecs the backend supports.
226 *
227 * \return A list of VideoCodec objects that give a name and
228 * description for every supported video codec.
229 */
230// PHONON_EXPORT QList<VideoCodecDescription> availableVideoCodecs();
231
232 /**
233 * Returns descriptions for the container formats the backend supports.
234 *
235 * \return A list of ContainerFormat objects that give a name and
236 * description for every supported container format.
237 */
238// PHONON_EXPORT QList<ContainerFormatDescription> availableContainerFormats();
239} // namespace BackendCapabilities
240} // namespace Phonon
241
242
243#endif // Phonon_BACKENDCAPABILITIES_H
244// vim: sw=4 ts=4 tw=80
Notifications about backend capabilities.
void availableVideoCaptureDevicesChanged()
This signal is emitted when video capture devices were plugged or unplugged.
void availableAudioOutputDevicesChanged()
This signal is emitted when audio output devices were plugged or unplugged.
void availableAudioCaptureDevicesChanged()
This signal is emitted when audio capture devices were plugged or unplugged.
void capabilitiesChanged()
This signal is emitted if the capabilities have changed.
PHONON_EXPORT QList< EffectDescription > availableAudioEffects()
Returns the visualization effects the backend supports.
PHONON_EXPORT bool isMimeTypeAvailable(const QString &mimeType)
Often all you want to know is whether one given MIME type can be decoded by the backend.
PHONON_EXPORT QList< AudioCaptureDevice > availableAudioCaptureDevices()
Returns the audio capture devices the backend supports.
PHONON_EXPORT QList< VideoCaptureDevice > availableVideoCaptureDevices()
Returns the video output devices the backend supports.
PHONON_EXPORT QStringList availableMimeTypes()
Returns a list of mime types that the Backend can decode.
PHONON_EXPORT QList< VideoCaptureDevice > availableAVCaptureDevices()
Returns the video capture devices that have audio capture capabilities that the backend supports.
PHONON_EXPORT Notifier * notifier()
Use this function to get a QObject pointer to connect to one of the Notifier signals.
PHONON_EXPORT QList< AudioOutputDevice > availableAudioOutputDevices()
Returns the audio output devices the backend supports.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.