diff --git a/src/phonon/mediasource.cpp b/src/phonon/mediasource.cpp index 0c9184089..5e009079d 100644 --- a/src/phonon/mediasource.cpp +++ b/src/phonon/mediasource.cpp @@ -422,8 +422,12 @@ QDebug operator <<(QDebug dbg, const Phonon::MediaSource &source) } case MediaSource::CaptureDevice: case MediaSource::AudioVideoCapture: +#ifndef QT_NO_PHONON_EFFECT dbg.nospace() << "AudioVideoCapture(A:" << source.audioCaptureDevice().name() << "/V: " << source.videoCaptureDevice().name() << ")"; +#else + dbg.nospace() << "AudioVideoCapture(A:/V: )"; +#endif break; case MediaSource::Empty: dbg.nospace() << "Empty()"; diff --git a/src/phonon/phonon-vlc/audio/volumefadereffect.h b/src/phonon/phonon-vlc/audio/volumefadereffect.h index e05ed94cd..b0e95f138 100644 --- a/src/phonon/phonon-vlc/audio/volumefadereffect.h +++ b/src/phonon/phonon-vlc/audio/volumefadereffect.h @@ -19,6 +19,8 @@ #ifndef PHONON_VLC_VOLUMEFADEREFFECT_H #define PHONON_VLC_VOLUMEFADEREFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include #include @@ -68,4 +70,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_VOLUMEFADEREFFECT_H diff --git a/src/phonon/phonon-vlc/backend.cpp b/src/phonon/phonon-vlc/backend.cpp index 6fc84595c..306672b82 100644 --- a/src/phonon/phonon-vlc/backend.cpp +++ b/src/phonon/phonon-vlc/backend.cpp @@ -63,7 +63,9 @@ Backend *Backend::self; Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) , m_deviceManager(0) +#ifndef QT_NO_PHONON_EFFECT , m_effectManager(0) +#endif // QT_NO_PHONON_EFFECT { self = this; @@ -135,7 +137,9 @@ Backend::Backend(QObject *parent, const QVariantList &) } m_deviceManager = new DeviceManager(this); +#ifndef QT_NO_PHONON_EFFECT m_effectManager = new EffectManager(this); +#endif // QT_NO_PHONON_EFFECT } Backend::~Backend() @@ -172,8 +176,10 @@ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const case VideoGraphicsObjectClass: return new VideoGraphicsObject(parent); #endif +#ifndef QT_NO_PHONON_EFFECT case EffectClass: return effectManager()->createEffect(args[0].toInt(), parent); +#endif // QT_NO_PHONON_EFFECT case VideoWidgetClass: return new VideoWidget(qobject_cast(parent)); // case VolumeFaderEffectClass: @@ -209,6 +215,7 @@ QList Backend::objectDescriptionIndexes(ObjectDescriptionType type) const return deviceManager()->deviceIds(type); } break; +#ifndef QT_NO_PHONON_EFFECT case Phonon::EffectType: { QList effectList = effectManager()->effects(); for (int eff = 0; eff < effectList.size(); ++eff) { @@ -216,6 +223,7 @@ QList Backend::objectDescriptionIndexes(ObjectDescriptionType type) const } } break; +#endif // QT_NO_PHONON_EFFECT case Phonon::SubtitleType: { list << GlobalSubtitles::instance()->globalIndexes(); } @@ -243,6 +251,7 @@ QHash Backend::objectDescriptionProperties(ObjectDescripti return deviceManager()->deviceProperties(index); } break; +#ifndef QT_NO_PHONON_EFFECT case Phonon::EffectType: { const QList effectList = effectManager()->effects(); if (index >= 0 && index <= effectList.size()) { @@ -255,6 +264,7 @@ QHash Backend::objectDescriptionProperties(ObjectDescripti } } break; +#endif // QT_NO_PHONON_EFFECT case Phonon::SubtitleType: { const SubtitleDescription description = GlobalSubtitles::instance()->fromIndex(index); ret.insert("name", description.name()); @@ -293,11 +303,13 @@ bool Backend::connectNodes(QObject *source, QObject *sink) return true; } +#ifndef QT_NO_PHONON_EFFECT VolumeFaderEffect *effect = qobject_cast(source); if (effect) { sinkNode->connectToMediaObject(effect->mediaObject()); return true; } +#endif // QT_NO_PHONON_EFFECT } warning() << "Linking" << source->metaObject()->className() << "to" << sink->metaObject()->className() << "failed"; @@ -316,11 +328,13 @@ bool Backend::disconnectNodes(QObject *source, QObject *sink) return true; } +#ifndef QT_NO_PHONON_EFFECT VolumeFaderEffect *const effect = qobject_cast(source); if (effect) { sinkNode->disconnectFromMediaObject(effect->mediaObject()); return true; } +#endif // QT_NO_PHONON_EFFECT } return false; @@ -339,10 +353,12 @@ DeviceManager *Backend::deviceManager() const return m_deviceManager; } +#ifndef QT_NO_PHONON_EFFECT EffectManager *Backend::effectManager() const { return m_effectManager; } +#endif // QT_NO_PHONON_EFFECT } // namespace VLC } // namespace Phonon diff --git a/src/phonon/phonon-vlc/backend.h b/src/phonon/phonon-vlc/backend.h index c4403d649..bdd32a352 100644 --- a/src/phonon/phonon-vlc/backend.h +++ b/src/phonon/phonon-vlc/backend.h @@ -34,7 +34,9 @@ namespace Phonon namespace VLC { class DeviceManager; +#ifndef QT_NO_PHONON_EFFECT class EffectManager; +#endif // QT_NO_PHONON_EFFECT /** \brief Backend class for Phonon-VLC. * @@ -75,8 +77,10 @@ public: /// \return The device manager that is associated with this backend object DeviceManager *deviceManager() const; +#ifndef QT_NO_PHONON_EFFECT /// \return The effect manager that is associated with this backend object. EffectManager *effectManager() const; +#endif // QT_NO_PHONON_EFFECT /** * Creates a backend object of the desired class and with the desired parent. Extra arguments can be provided. @@ -148,7 +152,9 @@ private: mutable QStringList m_supportedMimeTypes; DeviceManager *m_deviceManager; +#ifndef QT_NO_PHONON_EFFECT EffectManager *m_effectManager; +#endif // QT_NO_PHONON_EFFECT }; } // namespace VLC diff --git a/src/phonon/phonon-vlc/effect.cpp b/src/phonon/phonon-vlc/effect.cpp index 69393654f..620133d58 100644 --- a/src/phonon/phonon-vlc/effect.cpp +++ b/src/phonon/phonon-vlc/effect.cpp @@ -18,6 +18,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include "effect.h" #include "effectmanager.h" @@ -225,3 +227,5 @@ void Effect::setParameterValue(const EffectParameter ¶m, const QVariant &new } // Namespace Phonon::VLC #include "phonon-vlc/moc_effect.h" + +#endif // QT_NO_PHONON_EFFECT \ No newline at end of file diff --git a/src/phonon/phonon-vlc/effect.h b/src/phonon/phonon-vlc/effect.h index 74f3f0270..60ff37680 100644 --- a/src/phonon/phonon-vlc/effect.h +++ b/src/phonon/phonon-vlc/effect.h @@ -21,6 +21,8 @@ #ifndef PHONON_VLC_EFFECT_H #define PHONON_VLC_EFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include "sinknode.h" #include "effectmanager.h" @@ -77,4 +79,6 @@ private: } } // Namespace Phonon::VLC +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_EFFECT_H diff --git a/src/phonon/phonon-vlc/effectmanager.cpp b/src/phonon/phonon-vlc/effectmanager.cpp index 94293bf1d..abea19ac8 100644 --- a/src/phonon/phonon-vlc/effectmanager.cpp +++ b/src/phonon/phonon-vlc/effectmanager.cpp @@ -19,6 +19,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include "effectmanager.h" #include @@ -133,4 +135,7 @@ void EffectManager::updateEffects() } // namespace VLC } // namespace Phonon + #include "phonon-vlc/moc_effectmanager.h" + +#endif // QT_NO_PHONON_EFFECT diff --git a/src/phonon/phonon-vlc/effectmanager.h b/src/phonon/phonon-vlc/effectmanager.h index 5293cd433..60f15e6d6 100644 --- a/src/phonon/phonon-vlc/effectmanager.h +++ b/src/phonon/phonon-vlc/effectmanager.h @@ -22,6 +22,8 @@ #ifndef Phonon_VLC_EFFECTMANAGER_H #define Phonon_VLC_EFFECTMANAGER_H +#ifndef QT_NO_PHONON_EFFECT + #include namespace Phonon { @@ -116,4 +118,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // Phonon_VLC_EFFECTMANAGER_H diff --git a/src/phonon/phonon-vlc/equalizereffect.cpp b/src/phonon/phonon-vlc/equalizereffect.cpp index dc68e724e..3f562f491 100644 --- a/src/phonon/phonon-vlc/equalizereffect.cpp +++ b/src/phonon/phonon-vlc/equalizereffect.cpp @@ -15,6 +15,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include #if (LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 0, 0)) @@ -84,3 +86,5 @@ void EqualizerEffect::handleConnectToMediaObject(MediaObject *mediaObject) #include "phonon-vlc/moc_equalizereffect.h" #endif // LIBVLC_VERSION + +#endif // QT_NO_PHONON_EFFECT \ No newline at end of file diff --git a/src/phonon/phonon-vlc/equalizereffect.h b/src/phonon/phonon-vlc/equalizereffect.h index a1b050dec..b6bd37b6e 100644 --- a/src/phonon/phonon-vlc/equalizereffect.h +++ b/src/phonon/phonon-vlc/equalizereffect.h @@ -18,6 +18,8 @@ #ifndef PHONON_VLC_EQUALIZEREFFECT_H #define PHONON_VLC_EQUALIZEREFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include #include @@ -52,4 +54,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_EQUALIZEREFFECT_H