diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 11:11:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 11:11:44 (GMT) |
commit | 00721d83b20a5e1e66c46cefe98311ee2882b198 (patch) | |
tree | fce9a3f1652eb25dade776d438af0d16a06d6647 /demos | |
parent | 15088d236924bccee787953e04214f87392e8e55 (diff) | |
parent | 6a56b0222c15116150dd78883204f65708a927ca (diff) | |
download | Qt-00721d83b20a5e1e66c46cefe98311ee2882b198.zip Qt-00721d83b20a5e1e66c46cefe98311ee2882b198.tar.gz Qt-00721d83b20a5e1e66c46cefe98311ee2882b198.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: (27 commits)
Remove trace code from directshowaudioendpointcontrol.h.
New configure.exe binary
Add support for MSBuild, which is the project format for MSVC 2010
Only add qvideowidget test once.
Multimedia causes build failure when Qt is configured with -embedded
Player demo: load not only local files but playlists and urls passed as
Gstreamer media backend: preserve playback rate after seeks and media
QT7 mediaservice; fix leaking strings.
Fixed Qt build with mediaservices disabled.
Multimedia tests; fix for missing dependency
Disabled QMediaPlayer states debug output.
Fixed typo in QMediaPlayer::play() error reporting
Fixed QVideoWidget test, waiting for video surface painted.
Tests; Fix media tests, make sure they are using mediaservies.
Fix warning about illegal empty declaration.
Three fixes from Shane after QtMultimedia was split into two dlls.
Fix compile errors in Direct Show media service.
Add EXPORT defines for QtMediaServices library.
Fixed configure check for gstreamer.
WebKit; build with change to mediaservices.
...
Diffstat (limited to 'demos')
-rw-r--r-- | demos/multimedia/multimedia.pro | 3 | ||||
-rw-r--r-- | demos/multimedia/player/player.cpp | 33 | ||||
-rw-r--r-- | demos/multimedia/player/player.pro | 9 | ||||
-rw-r--r-- | demos/multimedia/player/playercontrols.h | 2 | ||||
-rw-r--r-- | demos/multimedia/player/videowidget.h | 2 |
5 files changed, 30 insertions, 19 deletions
diff --git a/demos/multimedia/multimedia.pro b/demos/multimedia/multimedia.pro index 042650f..fa29a12 100644 --- a/demos/multimedia/multimedia.pro +++ b/demos/multimedia/multimedia.pro @@ -1,4 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = player - +contains(QT_CONFIG, mediaservices): SUBDIRS = player diff --git a/demos/multimedia/player/player.cpp b/demos/multimedia/player/player.cpp index af30a97..bf314ee 100644 --- a/demos/multimedia/player/player.cpp +++ b/demos/multimedia/player/player.cpp @@ -45,8 +45,8 @@ #include "playlistmodel.h" #include "videowidget.h" -#include <QtMultimedia/qmediaservice.h> -#include <QtMultimedia/qmediaplaylist.h> +#include <QtMediaServices/qmediaservice.h> +#include <QtMediaServices/qmediaplaylist.h> #include <QtGui> @@ -171,11 +171,22 @@ Player::Player(QWidget *parent) metaDataChanged(); - QStringList fileNames = qApp->arguments(); - fileNames.removeAt(0); - foreach (QString const &fileName, fileNames) { - if (QFileInfo(fileName).exists()) - playlist->addMedia(QUrl::fromLocalFile(fileName)); + QStringList arguments = qApp->arguments(); + arguments.removeAt(0); + foreach (QString const &argument, arguments) { + QFileInfo fileInfo(argument); + if (fileInfo.exists()) { + QUrl url = QUrl::fromLocalFile(fileInfo.absoluteFilePath()); + if (fileInfo.suffix().toLower() == QLatin1String("m3u")) { + playlist->load(url); + } else + playlist->addMedia(url); + } else { + QUrl url(argument); + if (url.isValid()) { + playlist->addMedia(url); + } + } } } @@ -204,14 +215,14 @@ void Player::positionChanged(qint64 progress) void Player::metaDataChanged() { - //qDebug() << "update metadata" << player->metaData(QtMultimedia::Title).toString(); + //qDebug() << "update metadata" << player->metaData(QtMediaServices::Title).toString(); if (player->isMetaDataAvailable()) { setTrackInfo(QString("%1 - %2") - .arg(player->metaData(QtMultimedia::AlbumArtist).toString()) - .arg(player->metaData(QtMultimedia::Title).toString())); + .arg(player->metaData(QtMediaServices::AlbumArtist).toString()) + .arg(player->metaData(QtMediaServices::Title).toString())); if (coverLabel) { - QUrl url = player->metaData(QtMultimedia::CoverArtUrlLarge).value<QUrl>(); + QUrl url = player->metaData(QtMediaServices::CoverArtUrlLarge).value<QUrl>(); coverLabel->setPixmap(!url.isEmpty() ? QPixmap(url.toString()) diff --git a/demos/multimedia/player/player.pro b/demos/multimedia/player/player.pro index 929f3cd..0b868bd 100644 --- a/demos/multimedia/player/player.pro +++ b/demos/multimedia/player/player.pro @@ -1,5 +1,7 @@ +TEMPLATE = app +TARGET = player -QT += multimedia +QT += gui mediaservices HEADERS = \ player.h \ @@ -15,9 +17,8 @@ SOURCES = \ videowidget.cpp target.path = $$[QT_INSTALL_DEMOS]/multimedia/player - -sources.files = $$SOURCES $$HEADERS -sources.path = $$[QT_INSTALL_DEMOS]/multimedia/player player.pro +sources.files = $$SOURCES $$HEADERS *.pro +sources.path = $$[QT_INSTALL_DEMOS]/multimedia/player INSTALLS += target sources diff --git a/demos/multimedia/player/playercontrols.h b/demos/multimedia/player/playercontrols.h index 99894ff..d2229bd 100644 --- a/demos/multimedia/player/playercontrols.h +++ b/demos/multimedia/player/playercontrols.h @@ -42,7 +42,7 @@ #ifndef PLAYERCONTROLS_H #define PLAYERCONTROLS_H -#include <QtMultimedia/qmediaplayer.h> +#include <QtMediaServices/qmediaplayer.h> #include <QtGui/qwidget.h> diff --git a/demos/multimedia/player/videowidget.h b/demos/multimedia/player/videowidget.h index 543e1e0..b5bf581 100644 --- a/demos/multimedia/player/videowidget.h +++ b/demos/multimedia/player/videowidget.h @@ -41,7 +41,7 @@ #ifndef VIDEOWIDGET_H #define VIDEOWIDGET_H -#include <QtMultimedia/qvideowidget.h> +#include <QtMediaServices/qvideowidget.h> QT_BEGIN_HEADER |