1 /*****************************************************************************
2 * VLC backend for the Phonon library *
3 * Copyright (C) 2007-2008 Tanguy Krotoff <tkrotoff@gmail.com> *
4 * Copyright (C) 2008 Lukas Durfina <lukas.durfina@gmail.com> *
5 * Copyright (C) 2009 Fathi Boudra <fabo@kde.org> *
7 * This program is free software; you can redistribute it and/or *
8 * modify it under the terms of the GNU Lesser General Public *
9 * License as published by the Free Software Foundation; either *
10 * version 3 of the License, or (at your option) any later version. *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15 * Lesser General Public License for more details. *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with this package; if not, write to the Free Software *
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
20 *****************************************************************************/
22 #ifndef Phonon_VLC_BACKEND_H
23 #define Phonon_VLC_BACKEND_H
25 #include "devicemanager.h"
26 #include "audiooutput.h"
28 #include <phonon/objectdescription.h>
29 #include <phonon/backendinterface.h>
31 #include <QtCore/QList>
32 #include <QtCore/QPointer>
33 #include <QtCore/QStringList>
35 #ifdef MAKE_PHONON_VLC_LIB // We are building this library
36 # define PHONON_VLC_EXPORT Q_DECL_EXPORT
37 #else // We are using this library
38 # define PHONON_VLC_EXPORT Q_DECL_IMPORT
47 class Backend : public QObject, public BackendInterface
50 Q_INTERFACES(Phonon::BackendInterface)
54 enum DebugLevel {NoDebug, Warning, Info, Debug};
55 Backend(QObject *parent = 0, const QVariantList & = QVariantList());
58 DeviceManager* deviceManager() const;
59 EffectManager* effectManager() const;
61 QObject *createObject(BackendInterface::Class, QObject *parent, const QList<QVariant> &args);
63 bool supportsVideo() const;
64 bool supportsOSD() const;
65 bool supportsFourcc(quint32 fourcc) const;
66 bool supportsSubtitles() const;
67 QStringList availableMimeTypes() const;
69 QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const;
70 QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const;
72 bool startConnectionChange(QSet<QObject *>);
73 bool connectNodes(QObject *, QObject *);
74 bool disconnectNodes(QObject *, QObject *);
75 bool endConnectionChange(QSet<QObject *>);
77 DebugLevel debugLevel() const;
79 void logMessage(const QString &message, int priority = 2, QObject *obj = 0) const;
82 void objectDescriptionChanged(ObjectDescriptionType);
85 mutable QStringList m_supportedMimeTypes;
86 QList<QPointer<AudioOutput> > m_audioOutputs;
88 DeviceManager *m_deviceManager;
89 EffectManager *m_effectManager;
90 DebugLevel m_debugLevel;
94 } // namespace Phonon::VLC
96 #endif // Phonon_VLC_BACKEND_H