src/3rdparty/phonon/ds9/backend.h
changeset 0 1918ee327afb
child 3 41300fa6a67c
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /*  This file is part of the KDE project.
       
     2 
       
     3 Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 
       
     5 This library is free software: you can redistribute it and/or modify
       
     6 it under the terms of the GNU Lesser General Public License as published by
       
     7 the Free Software Foundation, either version 2.1 or 3 of the License.
       
     8 
       
     9 This library is distributed in the hope that it will be useful,
       
    10 but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 GNU Lesser General Public License for more details.
       
    13 
       
    14 You should have received a copy of the GNU Lesser General Public License
       
    15 along with this library.  If not, see <http://www.gnu.org/licenses/>.
       
    16 */
       
    17 
       
    18 #ifndef PHONON_BACKEND_H
       
    19 #define PHONON_BACKEND_H
       
    20 
       
    21 #include "phononds9_namespace.h"
       
    22 #include <phonon/backendinterface.h>
       
    23 #include <phonon/phononnamespace.h>
       
    24 
       
    25 #include <QtCore/QList>
       
    26 #include <QtCore/QMutex>
       
    27 
       
    28 #include "compointer.h"
       
    29 #include "backendnode.h"
       
    30 
       
    31 QT_BEGIN_NAMESPACE
       
    32 
       
    33 namespace Phonon
       
    34 {
       
    35     namespace DS9
       
    36     {
       
    37         class AudioOutput;
       
    38         class MediaObject;
       
    39 
       
    40         typedef Phonon::ObjectDescriptionType ObjectDescriptionType;
       
    41 
       
    42         class Backend : public QObject, public Phonon::BackendInterface
       
    43         {
       
    44             Q_OBJECT
       
    45                 Q_INTERFACES(Phonon::BackendInterface)
       
    46         public:
       
    47             Backend(QObject *parent = 0, const QVariantList & = QVariantList());
       
    48             virtual ~Backend();
       
    49 
       
    50             QObject *createObject(Phonon::BackendInterface::Class, QObject *parent, const QList<QVariant> &args);
       
    51 
       
    52             bool supportsVideo() const;
       
    53             QStringList availableMimeTypes() const;
       
    54 
       
    55             QList<int> objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const;
       
    56             QHash<QByteArray, QVariant> objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const;
       
    57 
       
    58             bool connectNodes(QObject *, QObject *);
       
    59             bool disconnectNodes(QObject *, QObject *);
       
    60 
       
    61             //transaction management
       
    62             bool startConnectionChange(QSet<QObject *>);
       
    63             bool endConnectionChange(QSet<QObject *>);
       
    64 
       
    65             Filter getAudioOutputFilter(int index) const;
       
    66 
       
    67             static QMutex *directShowMutex();
       
    68 
       
    69         Q_SIGNALS:
       
    70             void objectDescriptionChanged(ObjectDescriptionType);
       
    71 
       
    72         private:
       
    73             class AudioMoniker : public ComPointer<IMoniker>
       
    74             {
       
    75             public:
       
    76                 bool operator==(const AudioMoniker &other);
       
    77             };
       
    78             mutable QVector<AudioMoniker> m_audioOutputs;
       
    79             mutable QVector<CLSID> m_audioEffects;
       
    80             mutable QMutex m_directShowMutex;
       
    81         };
       
    82     }
       
    83 }
       
    84 
       
    85 QT_END_NAMESPACE
       
    86 
       
    87 #endif // PHONON_BACKEND_H