summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-03 18:43:29 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-08 08:56:04 (GMT)
commit71af72bc037db6bac023bf9a0bbf6032c06b2d29 (patch)
treee80392dede2042da4275b718ee8622c3c9fe90ad /src/3rdparty
parentd1b6c5d5e101c9ffdfdfb7b712ea69025150ab05 (diff)
downloadQt-71af72bc037db6bac023bf9a0bbf6032c06b2d29.zip
Qt-71af72bc037db6bac023bf9a0bbf6032c06b2d29.tar.gz
Qt-71af72bc037db6bac023bf9a0bbf6032c06b2d29.tar.bz2
Added qmake check for presence of RHttpDownloadMgr header
downloadmgrclient.h is not found on S^4 baselines, causing a build failure. This commit is a temporary workaround, which disables progressive download support if the header is not found. The correct solution is to determine whether the RHttpDownloadMgr definition has moved, and if so, to modify the .pro file to include the new path. Task-number: QTBUG-10769 Reviewed-by: TrustMe
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 {