summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp26
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h9
-rw-r--r--src/3rdparty/phonon/mmf/download.h2
3 files changed, 30 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index a728423..dfc5840 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -56,8 +56,10 @@ MMF::AbstractMediaPlayer::AbstractMediaPlayer
, m_mmfMaxVolume(NullMaxVolume)
, m_prefinishMarkSent(false)
, m_aboutToFinishSent(false)
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
, m_download(0)
, m_downloadStalled(false)
+#endif
{
connect(m_positionTimer.data(), SIGNAL(timeout()), this, SLOT(positionTick()));
connect(m_bufferStatusTimer.data(), SIGNAL(timeout()), this, SLOT(bufferStatusTick()));
@@ -256,7 +258,9 @@ void MMF::AbstractMediaPlayer::open()
symbianErr = openFile(*file);
if (KErrNone != symbianErr)
errorMessage = tr("Error opening file");
- } else if (url.scheme() == QLatin1String("http")) {
+ }
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
+ else if (url.scheme() == QLatin1String("http")) {
Q_ASSERT(!m_download);
m_download = new Download(url, this);
connect(m_download, SIGNAL(lengthChanged(qint64)),
@@ -264,7 +268,9 @@ void MMF::AbstractMediaPlayer::open()
connect(m_download, SIGNAL(stateChanged(Download::State)),
this, SLOT(downloadStateChanged(Download::State)));
m_download->start();
- } else {
+ }
+#endif
+ else {
symbianErr = openUrl(url.toString());
if (KErrNone != symbianErr)
errorMessage = tr("Error opening URL");
@@ -308,8 +314,10 @@ void MMF::AbstractMediaPlayer::open()
void MMF::AbstractMediaPlayer::close()
{
doClose();
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
delete m_download;
m_download = 0;
+#endif
m_position = 0;
}
@@ -419,7 +427,9 @@ void MMF::AbstractMediaPlayer::loadingComplete(int error)
bufferingComplete();
doSeek(m_position);
startPlayback();
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
m_downloadStalled = false;
+#endif
}
} else {
Q_ASSERT(Phonon::LoadingState == state());
@@ -472,12 +482,20 @@ qint64 MMF::AbstractMediaPlayer::toMilliSeconds(const TTimeIntervalMicroSeconds
bool MMF::AbstractMediaPlayer::isProgressiveDownload() const
{
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
return (0 != m_download);
+#else
+ return false;
+#endif
}
bool MMF::AbstractMediaPlayer::progressiveDownloadStalled() const
{
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
return m_downloadStalled;
+#else
+ return false;
+#endif
}
//-----------------------------------------------------------------------------
@@ -547,6 +565,7 @@ void MMF::AbstractMediaPlayer::startPlayback()
void MMF::AbstractMediaPlayer::setProgressiveDownloadStalled()
{
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
TRACE_CONTEXT(AbstractMediaPlayer::setProgressiveDownloadStalled, EAudioApi);
TRACE_ENTRY("state %d", state());
Q_ASSERT(isProgressiveDownload());
@@ -555,7 +574,6 @@ void MMF::AbstractMediaPlayer::setProgressiveDownloadStalled()
bufferingStarted();
// Video player loses window handle when closed - need to reapply it here
videoOutputChanged();
-#ifdef QT_PHONON_MMF_DOWNLOAD_DUMMY
m_download->resume();
#endif
}
@@ -569,6 +587,7 @@ void MMF::AbstractMediaPlayer::bufferStatusTick()
emit MMF::AbstractPlayer::bufferStatus(status);
}
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
void MMF::AbstractMediaPlayer::downloadLengthChanged(qint64 length)
{
TRACE_CONTEXT(AbstractMediaPlayer::downloadLengthChanged, EAudioApi);
@@ -611,6 +630,7 @@ void MMF::AbstractMediaPlayer::downloadStateChanged(Download::State state)
break;
}
}
+#endif // PHONON_MMF_PROGRESSIVE_DOWNLOAD
Phonon::State MMF::AbstractMediaPlayer::phononState(PrivateState state) const
{
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 99fc101..c3b4528 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -23,7 +23,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QScopedPointer>
#include <e32std.h>
#include "abstractplayer.h"
-#include "download.h"
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
+# include "download.h"
+#endif
class RFile;
@@ -118,8 +120,10 @@ private:
private Q_SLOTS:
void positionTick();
void bufferStatusTick();
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
void downloadLengthChanged(qint64);
void downloadStateChanged(Download::State);
+#endif
private:
MediaObject *const m_parent;
@@ -140,9 +144,10 @@ private:
// Used for playback of resource files
TPtrC8 m_buffer;
- // Used for progressive download
+#ifdef PHONON_MMF_PROGRESSIVE_DOWNLOAD
Download *m_download;
bool m_downloadStalled;
+#endif
QMultiMap<QString, QString> m_metaData;
diff --git a/src/3rdparty/phonon/mmf/download.h b/src/3rdparty/phonon/mmf/download.h
index b57348b..bda7963 100644
--- a/src/3rdparty/phonon/mmf/download.h
+++ b/src/3rdparty/phonon/mmf/download.h
@@ -70,8 +70,6 @@ public:
const QUrl &sourceUrl() const;
const QString &targetFileName() const;
void start();
-
- // Only has effect when QT_PHONON_MMF_DOWNLOAD_DUMMY is defined
void resume();
enum State {