diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-04-19 16:10:33 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-08 17:31:30 +0000 |
commit | 18010674c34fcda241e7c9e436c4dd06edc1e361 (patch) | |
tree | fe22f3692de13b0532b0f354c710034ca2b2a277 /src/multimedia/playback/qmediaplayer.cpp | |
parent | 6c18b2085e9d738b48a5bec3bdc9c96db2e7e4d7 (diff) | |
download | qtmultimedia-18010674c34fcda241e7c9e436c4dd06edc1e361.tar.gz |
Fix build for -no-feature-temporaryfile
If a backend does not support streaming then playing from qrc is
impossible for -no-feature-temporaryfile case.
Change-Id: Ibb0518c4afe0598c6f3a1c03b75cc00e76b8eead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/multimedia/playback/qmediaplayer.cpp')
-rw-r--r-- | src/multimedia/playback/qmediaplayer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index c9b9b4fc1..16fdec8ea 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -362,6 +362,7 @@ void QMediaPlayerPrivate::setMedia(const QMediaContent &media, QIODevice *stream } else if (hasStreamPlaybackFeature) { control->setMedia(media, file.data()); } else { +#if QT_CONFIG(temporaryfile) QTemporaryFile *tempFile = new QTemporaryFile; // Preserve original file extension, some backends might not load the file if it doesn't @@ -383,6 +384,9 @@ void QMediaPlayerPrivate::setMedia(const QMediaContent &media, QIODevice *stream file.reset(tempFile); control->setMedia(QMediaContent(QUrl::fromLocalFile(file->fileName())), 0); +#else + qWarning("Qt was built with -no-feature-temporaryfile: playback from resource file is not supported!"); +#endif } } else { qrcMedia = QMediaContent(); |