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> *
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. *
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. *
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 *****************************************************************************/
22 #include "effectmanager.h"
29 EffectInfo::EffectInfo(const QString &name, const QString &description, const QString &author, int filter, Type type)
31 , m_description(description)
36 EffectManager::EffectManager(Backend *backend)
40 // m_equalizerEnabled = false;
42 // Audio effects - equalizer
43 // Only one of them can be used => last set
44 // It is clever used with combobox
46 // audioEffectList.append(new EffectInfo("(Audio) Equalizer", EQUALIZER, EffectInfo::AudioEffect));
48 // audioEffectList.append(new EffectInfo("(Audio) Headphone spalization",
49 // HEADPHONE_SPALIZATION, EffectInfo::AudioEffect,
50 // "This effect gives you the feeling that you are standing in a room "
51 // "with a complete 7.1 speaker set when using only a headphone, "
52 // "providing a more realistic sound experience. It should also be "
53 // "more comfortable and less tiring when listening to music for "
54 // "long periods of time.\nIt works with any source format from mono "
57 // audioEffectList.append(new EffectInfo("(Audio) Parametric equalizer",
58 // PARAMETRIC_EQUALIZER, EffectInfo::AudioEffect));
60 // audioEffectList.append(new EffectInfo("(Audio) Scaletempo",
61 // SCALETEMPO, EffectInfo::AudioEffect,
62 // "Scale audio tempo in sync with playback rate"));
64 // audioEffectList.append(new EffectInfo("(Audio) Spatializer",
65 // SPATIALIZER, EffectInfo::AudioEffect));
67 // audioEffectList.append(new EffectInfo("(Audio) Volume normalizer",
68 // VOLUME_NORMALIZER, EffectInfo::AudioEffect));
70 // audioEffectList.append(new EffectInfo("(Audio) Flat", FLAT, EffectInfo::AudioEffect));
71 // audioEffectList.append(new EffectInfo("(Audio) Classical", CLASSICAL, EffectInfo::AudioEffect));
72 // audioEffectList.append(new EffectInfo("(Audio) Club", CLUB, EffectInfo::AudioEffect));
73 // audioEffectList.append(new EffectInfo("(Audio) Dance", DANCE, EffectInfo::AudioEffect));
74 // audioEffectList.append(new EffectInfo("(Audio) Fullbass", FULLBASS, EffectInfo::AudioEffect));
75 // audioEffectList.append(new EffectInfo("(Audio) Fullbasstreble", FULLBASSTREBLE, EffectInfo::AudioEffect));
76 // audioEffectList.append(new EffectInfo("(Audio) Fulltreble", FULLTREBLE, EffectInfo::AudioEffect));
77 // audioEffectList.append(new EffectInfo("(Audio) Headphones", HEADPHONES, EffectInfo::AudioEffect));
78 // audioEffectList.append(new EffectInfo("(Audio) Large hall", LARGEHALL, EffectInfo::AudioEffect));
79 // audioEffectList.append(new EffectInfo("(Audio) Live", LIVE, EffectInfo::AudioEffect));
80 // audioEffectList.append(new EffectInfo("(Audio) Party", PARTY, EffectInfo::AudioEffect));
81 // audioEffectList.append(new EffectInfo("(Audio) Pop", POP, EffectInfo::AudioEffect));
82 // audioEffectList.append(new EffectInfo("(Audio) Reggae", REGGAE, EffectInfo::AudioEffect));
83 // audioEffectList.append(new EffectInfo("(Audio) Rock", ROCK, EffectInfo::AudioEffect));
84 // audioEffectList.append(new EffectInfo("(Audio) Ska", SKA, EffectInfo::AudioEffect));
85 // audioEffectList.append(new EffectInfo("(Audio) Soft", SOFT, EffectInfo::AudioEffect));
86 // audioEffectList.append(new EffectInfo("(Audio) Softrock", SOFTROCK, EffectInfo::AudioEffect));
87 // audioEffectList.append(new EffectInfo("(Audio) Techno", TECHNO, EffectInfo::AudioEffect));
90 // More than one can be used simultaneously
91 // It is clever used with checkbox
93 // videoEffectList.append(new EffectInfo("(Video) Atmo light", ATMOLIGHT, EffectInfo::VideoEffect,
94 // "AtmoLight Filter - "
95 // "This module allows to control an so called AtmoLight device "
96 // "connected to your computer.\n"
97 // "AtmoLight is the homegrown version of what Philips calls AmbiLight.\n"
98 // "If you need further information feel free to visit us at\n\n"
99 // "http://www.vdr-wiki.de/wiki/index.php/Atmo-plugin\n "
100 // "http://www.vdr-wiki.de/wiki/index.php/AtmoWin\n\n"
101 // "You can find there detailed descriptions on how to build it for yourself "
102 // "and where to get the required parts.\n"
103 // "You can also have a look at pictures and some movies showing such a device "
104 // "in live action.",
105 // "André Weber (WeberAndre@gmx.de)"));
107 // videoEffectList.append(new EffectInfo("(Video) Bluescreen", BLUESCREEN, EffectInfo::VideoEffect,
108 // "Bluescreen video filter", "Antoine Cellerier <dionoea at videolan tod org>"));
110 // videoEffectList.append(new EffectInfo("(Video) Color threshold", COLORTHRESHOLD, EffectInfo::VideoEffect,
111 // "Color threshold filter", "Sigmund Augdal <dnumgis@videolan.org>"));
113 // videoEffectList.append(new EffectInfo("(Video) Deinterlace", DEINTERLACE, EffectInfo::VideoEffect,
114 // "Deinterlacing video filter", "Sam Hocevar <sam@zoy.org"));
116 // videoEffectList.append(new EffectInfo("(Video) Erase", ERASE, EffectInfo::VideoEffect,
117 // "Erase video filter", "Antoine Cellerier <dionoea at videolan dot org>"));
119 // videoEffectList.append(new EffectInfo("(Video) Extract", EXTRACT, EffectInfo::VideoEffect,
120 // "Extract RGB component video filter",
121 // "Antoine Cellerier <dionoea at videolan dot org>"));
123 // videoEffectList.append(new EffectInfo("(Video) Gaussian blur", GAUSSIAN_BLUR, EffectInfo::VideoEffect,
124 // "Erase video filter", "Antoine Cellerier <dionoea at videolan dot org>"));
126 // videoEffectList.append(new EffectInfo("(Video) Gradient", GRADIENT, EffectInfo::VideoEffect,
127 // "Gradient video filter",
128 // "Samuel Hocevar <sam@zoy.org>, "
129 // "Antoine Cellerier <dionoea at videolan dot org>"));
131 // videoEffectList.append(new EffectInfo("(Video) Grain", GRAIN, EffectInfo::VideoEffect,
132 // "Grain video filter", "Antoine Cellerier <dionoea at videolan dot org>"));
134 // videoEffectList.append(new EffectInfo("(Video) Invert", INVERT, EffectInfo::VideoEffect,
135 // "Invert video filter - color inversion",
136 // "Samuel Hocevar <sam@zoy.org>"));
138 // videoEffectList.append(new EffectInfo("(Video) Motion blur", MOTIONBLUR, EffectInfo::VideoEffect,
139 // "Motion blur filter",
140 // "Sigmund Augdal Helberg <dnumgis@videolan.org>, "
141 // "Antoine Cellerier <dionoea at videolan dot org>"));
143 // videoEffectList.append(new EffectInfo("(Video) Motion detect", MOTIONDETECT, EffectInfo::VideoEffect,
144 // "Motion detect video filter",
145 // "Antoine Cellerier <dionoea at videolan dot org>"));
147 // videoEffectList.append(new EffectInfo("(Video) Noise", NOISE, EffectInfo::VideoEffect,
148 // "Noise video filter - add noise to image",
149 // "Antoine Cellerier <dionoea at videolan dot org>"));
151 // videoEffectList.append(new EffectInfo("(Video) Postprocess", POSTPROCESS, EffectInfo::VideoEffect,
152 // "Video post processing filter",
153 // "Laurent Aimar <fenrir@via.ecp.fr>, "
154 // "Gildas Bazin <gbazin@netcourrier.com>, "
155 // "Antoine Cellerier <dionoea at videolan dot org>"));
157 // videoEffectList.append(new EffectInfo("(Video) Psychedelic", PSYCHEDELIC, EffectInfo::VideoEffect,
158 // "Psychedelic video filter",
159 // "Samuel Hocevar <sam@zoy.org>, "
160 // "Antoine Cellerier <dionoea at videolan dot org>"));
162 // videoEffectList.append(new EffectInfo("(Video) Ripple", RIPPLE, EffectInfo::VideoEffect,
163 // "Ripple video filter",
164 // "Samuel Hocevar <sam@zoy.org>, "
165 // "Antoine Cellerier <dionoea at videolan dot org>"));
167 // videoEffectList.append(new EffectInfo("(Video) Rotate", ROTATE, EffectInfo::VideoEffect,
168 // "Rotate video filter",
169 // "Antoine Cellerier <dionoea at videolan dot org>"));
171 // videoEffectList.append(new EffectInfo("(Video) Seam carving", SEAM_CARVING, EffectInfo::VideoEffect,
172 // "Seam Carving for Content-Aware Image Resizing",
173 // "Antoine Cellerier <dionoea at videolan dot org>"));
175 // videoEffectList.append(new EffectInfo("(Video) Sharpen", SHARPEN, EffectInfo::VideoEffect,
176 // "Sharpen video filter - Augment contrast between contours.",
177 // "Jérémy DEMEULE <dj_mulder at djduron dot no-ip dot org>, "
178 // "Jean-Baptiste Kempf <jb at videolan dot org>"));
180 // videoEffectList.append(new EffectInfo("(Video) Wave", WAVE, EffectInfo::VideoEffect,
181 // "Wave video filter",
182 // "Samuel Hocevar <sam@zoy.org>, "
183 // "Antoine Cellerier <dionoea at videolan dot org>"));
188 EffectManager::~EffectManager()
190 qDeleteAll(m_audioEffectList);
191 m_audioEffectList.clear();
192 qDeleteAll(m_videoEffectList);
193 m_videoEffectList.clear();
194 qDeleteAll(m_effectList);
195 m_effectList.clear();
199 * Returns a list of available audio effects
201 const QList<EffectInfo *> EffectManager::audioEffects() const
203 return m_audioEffectList;
207 * Returns a list of available video effects
209 const QList<EffectInfo *> EffectManager::videoEffects() const
211 return m_videoEffectList;
215 * Returns a list of available effects
217 const QList<EffectInfo *> EffectManager::effects() const
222 void EffectManager::updateEffects()
224 m_effectList.clear();
225 m_effectList += m_audioEffectList;
226 m_effectList += m_videoEffectList;
230 } // namespace Phonon::VLC