1/*
2 Copyright (C) 2007-2008 Tanguy Krotoff <tkrotoff@gmail.com>
3 Copyright (C) 2008 Lukas Durfina <lukas.durfina@gmail.com>
4 Copyright (C) 2009 Fathi Boudra <fabo@kde.org>
5 Copyright (C) 2009-2011 vlc-phonon AUTHORS <kde-multimedia@kde.org>
6
7 This library 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 2.1 of the License, or (at your option) any later version.
11
12 This library 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 library. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef PHONON_VLC_EFFECT_H
22#define PHONON_VLC_EFFECT_H
23
24#include "sinknode.h"
25#include "effectmanager.h"
26
27#include <phonon/effectinterface.h>
28#include <phonon/effectparameter.h>
29
30namespace Phonon
31{
32namespace VLC
33{
34
35class EffectManager;
36
37/** \brief Effect implementation for Phonon-VLC
38 *
39 * There are methods to get or set the effect parameters, implemented for
40 * the EffectInterface. See the Phonon documentation for details.
41 *
42 * As a sink node, it provides methods to handle the connection to a media object.
43 *
44 * An effect manager is the parent of each effect.
45 *
46 * \see EffectManager
47 * \see VolumeFaderEffect
48 */
49class Effect : public QObject, public SinkNode, public EffectInterface
50{
51 Q_OBJECT
52 Q_INTERFACES(Phonon::EffectInterface)
53
54public:
55
56 Effect(EffectManager *p_em, int i_effectId, QObject *p_parent);
57 ~Effect();
58
59 void setupEffectParams();
60 QList<EffectParameter> parameters() const override;
61 QVariant parameterValue(const EffectParameter &param) const override;
62 void setParameterValue(const EffectParameter &param, const QVariant &newValue) override;
63
64 /** \reimp */
65 void handleConnectToMediaObject(MediaObject *p_media_object) override;
66 /** \reimp */
67 void handleDisconnectFromMediaObject(MediaObject *p_media_object) override;
68
69private:
70
71 EffectManager *p_effectManager;
72 int i_effect_filter;
73 EffectInfo::Type effect_type;
74 QList<Phonon::EffectParameter> parameterList;
75};
76
77}
78} // Namespace Phonon::VLC
79
80#endif // PHONON_VLC_EFFECT_H
81

source code of phonon-vlc/src/effect.h