]> git.sesse.net Git - vlc/blobdiff - bindings/phonon/vlc/backend.cpp
phonon: Add specific support for PulseAudio.
[vlc] / bindings / phonon / vlc / backend.cpp
index 046372256edf5887ea66f501b79b55c835ae885a..7d2e0101c16c5f70162778095393198341993921 100644 (file)
 #include "vlcloader.h"
 #include "vlcmediaobject.h"
 
+#ifdef PHONON_PULSESUPPORT
+#  include <phonon/pulsesupport.h>
+#endif
+
 #include <QtCore/QSet>
 #include <QtCore/QVariant>
 #include <QtCore/QtPlugin>
@@ -47,6 +51,13 @@ Backend::Backend(QObject *parent, const QVariantList &)
         , m_effectManager(NULL)
         , m_debugLevel(Debug)
 {
+#ifdef PHONON_PULSESUPPORT
+    // Initialise PulseAudio support
+    PulseSupport *pulse = PulseSupport::getInstance();
+    pulse->enable();
+    connect(pulse, SIGNAL(objectDescriptionChanged(ObjectDescriptionType)), SIGNAL(objectDescriptionChanged(ObjectDescriptionType)));
+#endif
+
     bool wasInit = vlcInit();
 
     setProperty("identifier",     QLatin1String("phonon_vlc"));