summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/audiooutput.cpp86
-rw-r--r--src/3rdparty/phonon/mmf/audiooutput.h85
-rw-r--r--src/3rdparty/phonon/mmf/backend.cpp110
-rw-r--r--src/3rdparty/phonon/mmf/backend.h52
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp248
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h125
-rw-r--r--src/3rdparty/phonon/phonon/factory.cpp19
-rw-r--r--src/plugins/phonon/mmf/mmf.pro34
-rw-r--r--src/plugins/phonon/phonon.pro1
-rw-r--r--src/plugins/plugins.pro1
-rw-r--r--src/s60installs/qt.iby6
-rw-r--r--src/s60installs/qt_libs.pro6
12 files changed, 772 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/audiooutput.cpp b/src/3rdparty/phonon/mmf/audiooutput.cpp
new file mode 100644
index 0000000..9d1ff02
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/audiooutput.cpp
@@ -0,0 +1,86 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <DrmAudioSamplePlayer.h>
+
+#include "mediaobject.h"
+#include "audiooutput.h"
+
+using namespace Phonon;
+using namespace Phonon::MMF;
+
+MMF::AudioOutput::AudioOutput(Backend *, QObject *parent) : m_mediaObject(0)
+ , m_volume(0)
+ , m_maxVolume(-1)
+{
+ setParent(parent);
+}
+
+qreal MMF::AudioOutput::volume() const
+{
+ return 0;
+}
+
+void MMF::AudioOutput::setVolume(qreal newVolume)
+{
+ if(!m_mediaObject)
+ return;
+
+ Q_ASSERT(m_mediaObject->m_player);
+
+ if (newVolume == m_volume)
+ return;
+
+ m_volume = newVolume;
+ m_mediaObject->m_player->SetVolume(newVolume * m_maxVolume);
+ emit volumeChanged(m_volume);
+}
+
+int MMF::AudioOutput::outputDevice() const
+{
+ return 0;
+}
+
+bool MMF::AudioOutput::setOutputDevice(int)
+{
+ return true;
+}
+
+bool MMF::AudioOutput::setOutputDevice(const Phonon::AudioOutputDevice &)
+{
+ return true;
+}
+
+void MMF::AudioOutput::setMediaObject(MediaObject *mo)
+{
+ Q_ASSERT(m_mediaObject);
+ m_mediaObject = mo;
+
+ Q_ASSERT(m_mediaObject->m_player);
+ m_maxVolume = m_mediaObject->m_player->MaxVolume();
+
+ TInt mmfVolume = 0;
+ const TInt errorCode = m_mediaObject->m_player->GetVolume(mmfVolume);
+
+ if(errorCode == KErrNone)
+ return;
+
+ m_volume = mmfVolume / m_maxVolume;
+ emit volumeChanged(m_volume);
+}
+
diff --git a/src/3rdparty/phonon/mmf/audiooutput.h b/src/3rdparty/phonon/mmf/audiooutput.h
new file mode 100644
index 0000000..8c0de1f
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/audiooutput.h
@@ -0,0 +1,85 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef PHONON_MMF_AUDIOOUTPUT_H
+#define PHONON_MMF_AUDIOOUTPUT_H
+
+#include <Phonon/audiooutputinterface.h>
+
+namespace Phonon
+{
+ namespace MMF
+ {
+ class Backend;
+ class MediaObject;
+
+ /**
+ * @short AudioOutputInterface implementation for MMF.
+ *
+ * Implements the AudioOutputInterface for Symbian/S60's MMF
+ * framework.
+ *
+ * This class has a very small role, we simply access CDrmPlayerUtility
+ * in MediaObject::m_player and forward everything there.
+ *
+ * \section volume Volume
+ *
+ * Phonon's concept on volume is from 0.0 to 1.0, and from 1< it does
+ * voltage multiplication. CDrmPlayerUtility goes from 1 to
+ * CDrmPlayerUtility::MaxVolume(). We apply some basic math to convert
+ * between the two.
+ *
+ * @author Frans Englich<frans.englich@nokia.com>
+ */
+ class AudioOutput : public QObject
+ , public AudioOutputInterface
+ {
+ Q_OBJECT
+ Q_INTERFACES(Phonon::AudioOutputInterface)
+
+ public:
+ AudioOutput(Backend *backend, QObject *parent);
+ virtual qreal volume() const;
+ virtual void setVolume(qreal);
+
+ virtual int outputDevice() const;
+
+ /**
+ * Has no effect.
+ */
+ virtual bool setOutputDevice(int);
+
+ /**
+ * Has no effect.
+ */
+ virtual bool setOutputDevice(const Phonon::AudioOutputDevice &);
+
+ void setMediaObject(MediaObject *mo);
+
+ Q_SIGNALS:
+ void volumeChanged(qreal newVolume);
+
+ private:
+ MediaObject * m_mediaObject;
+ qreal m_volume;
+ TInt m_maxVolume;
+ };
+ }
+}
+
+#endif
diff --git a/src/3rdparty/phonon/mmf/backend.cpp b/src/3rdparty/phonon/mmf/backend.cpp
new file mode 100644
index 0000000..4324409
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/backend.cpp
@@ -0,0 +1,110 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <QStringList>
+#include <QtPlugin>
+
+#include "backend.h"
+#include "audiooutput.h"
+#include "mediaobject.h"
+
+using namespace Phonon;
+using namespace Phonon::MMF;
+
+Backend::Backend(QObject *parent)
+{
+ qDebug() << Q_FUNC_INFO;
+ setParent(parent);
+
+ setProperty("identifier", QLatin1String("phonon_mmf"));
+ setProperty("backendName", QLatin1String("MMF"));
+ setProperty("backendComment", QLatin1String("Backend using Nokia's S60 Multimedia Framework Architecture (MMF)."));
+ setProperty("backendVersion", QLatin1String("0.1"));
+ setProperty("backendWebsite", QLatin1String("http://www.qtsoftware.com/"));
+}
+
+QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &)
+{
+ switch(c)
+ {
+ case AudioOutputClass:
+ return new AudioOutput(this, parent);
+ case MediaObjectClass:
+ return new MediaObject(parent);
+ case VolumeFaderEffectClass:
+ /* Fallthrough. */
+ case VisualizationClass:
+ /* Fallthrough. */
+ case VideoDataOutputClass:
+ /* Fallthrough. */
+ case EffectClass:
+ /* Fallthrough. */
+ case VideoWidgetClass:
+ return 0;
+ }
+
+ Q_ASSERT_X(false, Q_FUNC_INFO,
+ "This line should never be reached.");
+ return 0;
+}
+
+QList<int> Backend::objectDescriptionIndexes(ObjectDescriptionType) const
+{
+ return QList<int>();
+}
+
+QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescriptionType, int) const
+{
+ return QHash<QByteArray, QVariant>();
+}
+
+bool Backend::startConnectionChange(QSet<QObject *>)
+{
+ return false;
+}
+
+bool Backend::connectNodes(QObject *source, QObject *target)
+{
+ MediaObject *const mo = qobject_cast<MediaObject *>(source);
+ AudioOutput *const ao = qobject_cast<AudioOutput *>(target);
+
+ if(!mo || !ao)
+ return false;
+
+ ao->setMediaObject(mo);
+
+ return true;
+}
+
+bool Backend::disconnectNodes(QObject *, QObject *)
+{
+ return true;
+}
+
+bool Backend::endConnectionChange(QSet<QObject *>)
+{
+ return true;
+}
+
+QStringList Backend::availableMimeTypes() const
+{
+ return QStringList();
+}
+
+Q_EXPORT_PLUGIN2(phonon_mmf, Phonon::MMF::Backend);
+
diff --git a/src/3rdparty/phonon/mmf/backend.h b/src/3rdparty/phonon/mmf/backend.h
new file mode 100644
index 0000000..4fff204
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/backend.h
@@ -0,0 +1,52 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef PHONON_MMF_BACKEND_H
+#define PHONON_MMF_BACKEND_H
+
+#include <Phonon/MediaSource>
+#include <Phonon/BackendInterface>
+
+namespace Phonon
+{
+ namespace MMF
+ {
+ class Backend : public QObject
+ , public BackendInterface
+ {
+ Q_OBJECT
+ Q_INTERFACES(Phonon::BackendInterface)
+ public:
+ Backend(QObject *parent = 0);
+
+ virtual QObject *createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args);
+ virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const;
+ virtual QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const;
+ virtual bool startConnectionChange(QSet<QObject *>);
+ virtual bool connectNodes(QObject *, QObject *);
+ virtual bool disconnectNodes(QObject *, QObject *);
+ virtual bool endConnectionChange(QSet<QObject *>);
+ virtual QStringList availableMimeTypes() const;
+
+ Q_SIGNALS:
+ void objectDescriptionChanged(ObjectDescriptionType);
+ };
+ }
+}
+
+#endif
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
new file mode 100644
index 0000000..0763c42
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -0,0 +1,248 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <QUrl>
+#include <private/qcore_symbian_p.h>
+
+#include "mediaobject.h"
+
+using namespace Phonon;
+using namespace Phonon::MMF;
+
+MMF::MediaObject::MediaObject(QObject *parent) : m_player(0)
+ , m_error(NoError)
+ , m_state(StoppedState)
+{
+ Q_UNUSED(parent);
+ m_player = CDrmPlayerUtility::NewL(*this, 0, EMdaPriorityPreferenceNone);
+
+ m_player->RegisterForAudioLoadingNotification(*this);
+}
+
+MMF::MediaObject::~MediaObject()
+{
+ delete m_player;
+}
+
+void MMF::MediaObject::play()
+{
+ transitTo(PlayingState);
+ m_player->Play();
+}
+
+void MMF::MediaObject::pause()
+{
+ transitTo(PausedState);
+ m_player->Pause();
+}
+
+void MMF::MediaObject::stop()
+{
+ transitTo(StoppedState);
+ m_player->Stop();
+}
+
+void MMF::MediaObject::seek(qint64 milliseconds)
+{
+ m_player->SetPosition(toMicroSeconds(milliseconds));
+}
+
+qint32 MMF::MediaObject::tickInterval() const
+{
+ return 0;
+}
+
+void MMF::MediaObject::setTickInterval(qint32 interval)
+{
+ Q_UNUSED(interval);
+}
+
+bool MMF::MediaObject::hasVideo() const
+{
+ return false;
+}
+
+bool MMF::MediaObject::isSeekable() const
+{
+ return false;
+}
+
+qint64 MMF::MediaObject::currentTime() const
+{
+ TTimeIntervalMicroSeconds mss;
+ const TInt retcode = m_player->GetPosition(mss);
+
+ if(retcode == KErrNone)
+ return toMilliSeconds(m_player->Duration());
+ else {
+ // TODO Should we enter/emit error state? Tricky
+ // since we're in a const function.
+ return -1;
+ }
+}
+
+QString MMF::MediaObject::errorString() const
+{
+ return QString();
+}
+
+Phonon::ErrorType MMF::MediaObject::errorType() const
+{
+ return m_error;
+}
+
+qint64 MMF::MediaObject::toMilliSeconds(const TTimeIntervalMicroSeconds &in)
+{
+ return in.Int64() / 1000;
+}
+
+TTimeIntervalMicroSeconds MMF::MediaObject::toMicroSeconds(qint64 ms)
+{
+ return TTimeIntervalMicroSeconds(TInt64(ms));
+}
+
+qint64 MMF::MediaObject::totalTime() const
+{
+ return toMilliSeconds(m_player->Duration());
+}
+
+MediaSource MMF::MediaObject::source() const
+{
+ return m_mediaSource;
+}
+
+void MMF::MediaObject::setSource(const MediaSource &source)
+{
+ stop();
+ m_mediaSource = source;
+
+ switch(m_mediaSource.type())
+ {
+ case MediaSource::LocalFile:
+ {
+ const QHBufC filename(source.fileName());
+ m_player->OpenFileL(*filename);
+ break;
+ }
+ case MediaSource::Url:
+ {
+ const QHBufC filename(source.url().toString());
+ m_player->OpenUrlL(*filename);
+ break;
+ }
+ case MediaSource::Invalid:
+ /* Fallthrough. */
+ case MediaSource::Disc:
+ /* Fallthrough. */
+ case MediaSource::Stream:
+ /* Fallthrough. */
+ case MediaSource::Empty:
+ {
+ transitTo(ErrorState);
+ return;
+ }
+ }
+
+ transitTo(LoadingState);
+}
+
+void MMF::MediaObject::setNextSource(const MediaSource &source)
+{
+ m_nextSource = source;
+ Q_UNUSED(source);
+}
+
+qint32 MMF::MediaObject::prefinishMark() const
+{
+ return 0;
+}
+
+void MMF::MediaObject::setPrefinishMark(qint32)
+{
+}
+
+qint32 MMF::MediaObject::transitionTime() const
+{
+ return 0;
+}
+
+void MMF::MediaObject::setTransitionTime(qint32)
+{
+}
+
+void MMF::MediaObject::MdapcInitComplete(TInt aError,
+ const TTimeIntervalMicroSeconds &)
+{
+ if(aError == KErrNone) {
+ m_error = NormalError;
+ m_state = ErrorState;
+ }
+
+ emit totalTimeChanged();
+ transitTo(StoppedState);
+}
+
+void MMF::MediaObject::MdapcPlayComplete(TInt aError)
+{
+ if(aError == KErrNone) {
+ if(m_nextSource.type() == MediaSource::Empty) {
+ emit finished();
+ } else {
+ setSource(m_nextSource);
+ m_nextSource = MediaSource();
+ }
+
+ transitTo(StoppedState);
+ }
+ else {
+ m_error = NormalError;
+ transitTo(ErrorState);
+ }
+}
+
+void MMF::MediaObject::transitTo(Phonon::State newState)
+{
+ emit stateChanged(m_state, newState);
+ m_state = newState;
+}
+
+Phonon::State MMF::MediaObject::state() const
+{
+ return m_state;
+}
+
+void MMF::MediaObject::MaloLoadingComplete()
+{
+ transitTo(StoppedState);
+}
+
+void MMF::MediaObject::MaloLoadingStarted()
+{
+ transitTo(LoadingState);
+}
+
+void MMF::MediaObject::MvloLoadingComplete()
+{
+ transitTo(StoppedState);
+}
+
+void MMF::MediaObject::MvloLoadingStarted()
+{
+ transitTo(LoadingState);
+}
+
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
new file mode 100644
index 0000000..0631e4a
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -0,0 +1,125 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef PHONON_MMF_MEDIAOBJECT_H
+#define PHONON_MMF_MEDIAOBJECT_H
+
+/* We use the extra qualification include/ to avoid picking up the include
+ * Phonon has. */
+#include <include/VideoPlayer.h>
+
+#include <DrmAudioSamplePlayer.h>
+
+#include <Phonon/MediaSource>
+#include <Phonon/mediaobjectinterface.h>
+
+class CDrmPlayerUtility;
+class TTimeIntervalMicroSeconds;
+
+namespace Phonon
+{
+ namespace MMF
+ {
+ class AudioOutput;
+
+ /**
+ *
+ * See
+ * <a href="http://wiki.forum.nokia.com/index.php/How_to_play_a_video_file_using_CVideoPlayerUtility">How to
+ * play a video file using CVideoPlayerUtility</a>
+ */
+ class MediaObject : public QObject
+ , public MediaObjectInterface
+ , public MDrmAudioPlayerCallback
+ , public MAudioLoadingObserver
+ , public MVideoLoadingObserver
+ //, public MVideoPlayerUtilityObserver
+ {
+ Q_OBJECT
+ Q_INTERFACES(Phonon::MediaObjectInterface)
+
+ public:
+ MediaObject(QObject *parent);
+ virtual ~MediaObject();
+
+ // MediaObjectInterface
+ virtual void play();
+ virtual void pause();
+ virtual void stop();
+ virtual void seek(qint64 milliseconds);
+ virtual qint32 tickInterval() const;
+ virtual void setTickInterval(qint32 interval);
+ virtual bool hasVideo() const;
+ virtual bool isSeekable() const;
+ virtual qint64 currentTime() const;
+ virtual Phonon::State state() const;
+ virtual QString errorString() const;
+ virtual Phonon::ErrorType errorType() const;
+ virtual qint64 totalTime() const;
+ virtual MediaSource source() const;
+ virtual void setSource(const MediaSource &);
+ virtual void setNextSource(const MediaSource &source);
+ virtual qint32 prefinishMark() const;
+ virtual void setPrefinishMark(qint32);
+ virtual qint32 transitionTime() const;
+ virtual void setTransitionTime(qint32);
+
+ // MDrmAudioPlayerCallback
+ virtual void MdapcInitComplete(TInt aError,
+ const TTimeIntervalMicroSeconds &aDuration);
+ virtual void MdapcPlayComplete(TInt aError);
+
+ // MAudioLoadingObserver
+ virtual void MaloLoadingComplete();
+ virtual void MaloLoadingStarted();
+
+ // MVideoLoadingObserver
+ virtual void MvloLoadingComplete();
+ virtual void MvloLoadingStarted();
+
+ Q_SIGNALS:
+ void totalTimeChanged();
+ void stateChanged(Phonon::State oldState,
+ Phonon::State newState);
+
+ void finished();
+
+ private:
+ friend class AudioOutput;
+ static inline qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
+ static inline TTimeIntervalMicroSeconds toMicroSeconds(qint64 ms);
+
+ /**
+ * Changes state() to \a newState, and emits stateChanged().
+ */
+ inline void transitTo(Phonon::State newState);
+
+ CDrmPlayerUtility * m_player;
+ ErrorType m_error;
+
+ /**
+ * Never update this state by assigning to it. Call transitTo().
+ */
+ State m_state;
+ MediaSource m_mediaSource;
+ MediaSource m_nextSource;
+ };
+ }
+}
+
+#endif
diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp
index fef88f0..e0b245e 100644
--- a/src/3rdparty/phonon/phonon/factory.cpp
+++ b/src/3rdparty/phonon/phonon/factory.cpp
@@ -133,6 +133,25 @@ bool FactoryPrivate::createBackend()
continue;
}
+#ifdef Q_OS_SYMBIAN
+ /* On Symbian OS we might have two plugins, one which uses Symbian
+ * MMF framework("phonon_mmf"), and one which uses Real Networks's
+ * Helix("hxphonon"). We prefer the latter because it's more
+ * sophisticated, so we make sure the Helix backend is attempted
+ * to be loaded first, and the MMF backend is used for backup. */
+ {
+ const int hxphonon = plugins.indexOf(QLatin1String("hxphonon"));
+ if (hxphonon != -1)
+ plugins.move(hxphonon, 0);
+
+ // Code for debugging the MMF backend.
+ if(hxphonon != -1) {
+ qDebug() << "Found hxphonon backend and removed it from the lookup list.";
+ plugins.removeAll(QLatin1String("hxphonon"));
+ }
+ }
+#endif
+
const QStringList files = dir.entryList(QDir::Files);
for (int i = 0; i < files.count(); ++i) {
QPluginLoader pluginLoader(libPath + files.at(i));
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
new file mode 100644
index 0000000..6d404f2
--- /dev/null
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -0,0 +1,34 @@
+QT += phonon
+TARGET = phonon_mmf
+PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf
+LIBS += -lDrmAudioPlayUtility.lib
+
+HEADERS += \
+ $$PHONON_MMF_DIR/audiooutput.h \
+ $$PHONON_MMF_DIR/backend.h \
+ $$PHONON_MMF_DIR/mediaobject.h
+
+SOURCES += \
+ $$PHONON_MMF_DIR/audiooutput.cpp \
+ $$PHONON_MMF_DIR/backend.cpp \
+ $$PHONON_MMF_DIR/mediaobject.cpp
+
+# This is needed for having the .qtplugin file properly created on Symbian.
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
+
+target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
+INSTALLS += target
+
+include(../../qpluginbase.pri)
+
+# In the internal 5th SDK, DrmAudioSamplePlayer.h is placed in this folder, as
+# opposed to the public, where it is placed in epoc32/include.
+INCLUDEPATH *= /epoc32/include/osextensions
+
+# We need this to be able to resolve ambiguity for VideoPlayer.h. Phonon and
+# the SDK has the header.
+INCLUDEPATH *= /epoc32
+
+# Temporary steal one of the reserved, until we know that this MMF plugin is
+# turning into something at all.
+symbian:TARGET.UID3=0x2001E627
diff --git a/src/plugins/phonon/phonon.pro b/src/plugins/phonon/phonon.pro
index e43a4c2..814a062 100644
--- a/src/plugins/phonon/phonon.pro
+++ b/src/plugins/phonon/phonon.pro
@@ -7,3 +7,4 @@ mac:contains(QT_CONFIG, phonon-backend): SUBDIRS *= qt7
win32:!wince*:contains(QT_CONFIG, phonon-backend): SUBDIRS *= ds9
wince*:contains(QT_CONFIG, phonon-backend): SUBDIRS *= waveout
wince*:contains(QT_CONFIG, directshow): SUBDIRS *= ds9
+symbian:contains(QT_CONFIG, phonon-backend): SUBDIRS *= mmf
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 004b816..db2e534 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -8,7 +8,6 @@ unix:!symbian {
}
!embedded:SUBDIRS *= graphicssystems
embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
-!win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
contains(QT_CONFIG, multimedia): SUBDIRS *= audio
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index dc9ec43..3a7f008 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -71,6 +71,9 @@ file=ABI_DIR\BUILD_DIR\qtwcodecs.dll SHARED_LIB_DIR\qtwcodecs.dll PAG
// iconengines
file=ABI_DIR\BUILD_DIR\qsvgicon.dll SHARED_LIB_DIR\qsvgicon.dll PAGED
+// Phonon MMF backend
+file=ABI_DIR\BUILD_DIR\phonon_mmf.dll SHARED_LIB_DIR\phonon_mmf.dll PAGED
+
// graphicssystems
file=ABI_DIR\BUILD_DIR\qvggraphicssystem.dll SHARED_LIB_DIR\qvggraphicssystem.dll PAGED
@@ -93,6 +96,9 @@ data=\epoc32\winscw\c\resource\qt\plugins\codecs\qtwcodecs.qtplugin res
// iconengines stubs
data=\epoc32\winscw\c\resource\qt\plugins\iconengines\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin
+// Phonon MMF backend
+data=\epoc32\winscw\c\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin
+
// graphicssystems
data=\epoc32\winscw\c\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro
index cb03a05..cd4219a 100644
--- a/src/s60installs/qt_libs.pro
+++ b/src/s60installs/qt_libs.pro
@@ -67,6 +67,12 @@ symbian: {
codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll
codecs_plugins.path = $$QT_PLUGINS_BASE_DIR/codecs
+ contains(QT_CONFIG, phonon_backend) {
+ phonon_backend_plugins.sources += phonon_mmf.dll
+ phonon_backend_plugins.path = $$QT_PLUGINS_BASE_DIR/phonon_backend
+ DEPLOYMENT += phonon_backend_plugins
+ }
+
DEPLOYMENT += qtresources qtlibraries imageformats_plugins codecs_plugins graphicssystems_plugins
contains(QT_CONFIG, svg): {