1 | /* |
2 | Copyright (C) 2013 Harald Sitter <sitter@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) any later version. |
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 GNU |
12 | Lesser General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU Lesser General Public |
15 | License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | #ifndef PHONON_VLC_EQUALIZEREFFECT_H |
19 | #define PHONON_VLC_EQUALIZEREFFECT_H |
20 | |
21 | #include <QtCore/QObject> |
22 | |
23 | #include <phonon/effectinterface.h> |
24 | #include <phonon/effectparameter.h> |
25 | |
26 | #include <vlc/vlc.h> |
27 | |
28 | #include "sinknode.h" |
29 | |
30 | namespace Phonon { |
31 | namespace VLC { |
32 | |
33 | class EqualizerEffect : public QObject, public SinkNode, public EffectInterface |
34 | { |
35 | Q_OBJECT |
36 | Q_INTERFACES(Phonon::EffectInterface) |
37 | public: |
38 | explicit EqualizerEffect(QObject *parent = nullptr); |
39 | ~EqualizerEffect(); |
40 | |
41 | QList<EffectParameter> parameters() const override; |
42 | QVariant parameterValue(const EffectParameter ¶meter) const override; |
43 | void setParameterValue(const EffectParameter ¶meter, const QVariant &newValue) override; |
44 | |
45 | void handleConnectToMediaObject(MediaObject *mediaObject) override; |
46 | |
47 | private: |
48 | libvlc_equalizer_t *m_equalizer; |
49 | QList <EffectParameter> m_bands; |
50 | }; |
51 | |
52 | } // namespace VLC |
53 | } // namespace Phonon |
54 | |
55 | #endif // PHONON_VLC_EQUALIZEREFFECT_H |
56 | |