]> git.sesse.net Git - vlc/blob - bindings/phonon/vlc/effectmanager.h
Phonon Backend using VLC
[vlc] / bindings / phonon / vlc / effectmanager.h
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>                            *
6  *                                                                           *
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.          *
11  *                                                                           *
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.                           *
16  *                                                                           *
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  *****************************************************************************/
21
22 #ifndef Phonon_VLC_EFFECTMANAGER_H
23 #define Phonon_VLC_EFFECTMANAGER_H
24
25 #include <phonon/effectinterface.h>
26 #include <phonon/effectparameter.h>
27
28 #include <QtCore/QObject>
29
30 namespace Phonon
31 {
32 namespace VLC {
33 class Backend;
34 class EffectManager;
35
36 class EffectInfo
37 {
38 public:
39
40     enum Type {AudioEffect, VideoEffect};
41
42     EffectInfo(const QString &name,
43                const QString &description,
44                const QString &author,
45                int filter,
46                Type type);
47
48     QString name() const {
49         return m_name;
50     }
51
52     QString description() const {
53         return m_description;
54     }
55
56     QString author() const {
57         return m_author;
58     }
59
60     int filter() const {
61         return m_filter;
62     }
63
64     Type type() const {
65         return m_type;
66     }
67
68 private:
69     QString m_name;
70     QString m_description;
71     QString m_author;
72     int m_filter;
73     Type m_type;
74 };
75
76 class EffectManager : public QObject
77 {
78     Q_OBJECT
79
80 public:
81     EffectManager(Backend *parent);
82     virtual ~EffectManager();
83
84     const QList<EffectInfo *> audioEffects() const;
85     const QList<EffectInfo *> videoEffects() const;
86     const QList<EffectInfo *> effects() const;
87
88 private:
89     void updateEffects();
90
91     Backend *m_backend;
92     QList<EffectInfo *> m_effectList;
93     QList<EffectInfo *> m_audioEffectList;
94     QList<EffectInfo *> m_videoEffectList;
95     bool m_equalizerEnabled;
96 };
97
98 }
99 } // namespace Phonon::VLC
100
101 #endif // Phonon_VLC_EFFECTMANAGER_H