File indexing completed on 2024-04-28 04:43:20

0001 /*
0002     Copyright (C) 2013 Harald Sitter <sitter@kde.org>
0003 
0004     This library is free software; you can redistribute it and/or
0005     modify it under the terms of the GNU Lesser General Public
0006     License as published by the Free Software Foundation; either
0007     version 2.1 of the License, or (at your option) any later version.
0008 
0009     This library is distributed in the hope that it will be useful,
0010     but WITHOUT ANY WARRANTY; without even the implied warranty of
0011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012     Lesser General Public License for more details.
0013 
0014     You should have received a copy of the GNU Lesser General Public
0015     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0016 */
0017 
0018 #ifndef PHONON_VLC_EQUALIZEREFFECT_H
0019 #define PHONON_VLC_EQUALIZEREFFECT_H
0020 
0021 #include <QtCore/QObject>
0022 
0023 #include <phonon/effectinterface.h>
0024 #include <phonon/effectparameter.h>
0025 
0026 #include <vlc/vlc.h>
0027 
0028 #include "sinknode.h"
0029 
0030 namespace Phonon {
0031 namespace VLC {
0032 
0033 class EqualizerEffect : public QObject, public SinkNode, public EffectInterface
0034 {
0035     Q_OBJECT
0036     Q_INTERFACES(Phonon::EffectInterface)
0037 public:
0038     explicit EqualizerEffect(QObject *parent = nullptr);
0039     ~EqualizerEffect();
0040 
0041     QList<EffectParameter> parameters() const override;
0042     QVariant parameterValue(const EffectParameter &parameter) const override;
0043     void setParameterValue(const EffectParameter &parameter, const QVariant &newValue) override;
0044 
0045     void handleConnectToMediaObject(MediaObject *mediaObject) override;
0046 
0047 private:
0048     libvlc_equalizer_t *m_equalizer;
0049     QList <EffectParameter> m_bands;
0050 };
0051 
0052 } // namespace VLC
0053 } // namespace Phonon
0054 
0055 #endif // PHONON_VLC_EQUALIZEREFFECT_H