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>
41 class Backend : public QObject, public BackendInterface
44 Q_INTERFACES(Phonon::BackendInterface)
48 enum DebugLevel {NoDebug, Warning, Info, Debug};
49 Backend(QObject *parent = 0, const QVariantList & = QVariantList());
52 DeviceManager* deviceManager() const;
53 EffectManager* effectManager() const;
55 QObject *createObject(BackendInterface::Class, QObject *parent, const QList<QVariant> &args);
57 bool supportsVideo() const;
58 bool supportsOSD() const;
59 bool supportsFourcc(quint32 fourcc) const;
60 bool supportsSubtitles() const;
61 QStringList availableMimeTypes() const;
63 QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const;
64 QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const;
66 bool startConnectionChange(QSet<QObject *>);
67 bool connectNodes(QObject *, QObject *);
68 bool disconnectNodes(QObject *, QObject *);
69 bool endConnectionChange(QSet<QObject *>);
71 DebugLevel debugLevel() const;
73 void logMessage(const QString &message, int priority = 2, QObject *obj = 0) const;
76 void objectDescriptionChanged(ObjectDescriptionType);
79 mutable QStringList m_supportedMimeTypes;
80 QList<QPointer<AudioOutput> > m_audioOutputs;
82 DeviceManager *m_deviceManager;
83 EffectManager *m_effectManager;
84 DebugLevel m_debugLevel;
88 } // namespace Phonon::VLC
90 #endif // Phonon_VLC_BACKEND_H