--- a/qtmobility/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp Mon May 03 13:18:40 2010 +0300
+++ b/qtmobility/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp Fri May 14 16:41:33 2010 +0300
@@ -51,7 +51,7 @@
#include <qmediaplayer.h>
#include <qaudiocapturesource.h>
-QTM_USE_NAMESPACE
+QT_USE_NAMESPACE
class MockMediaService : public QMediaService
{
Q_OBJECT
@@ -68,8 +68,8 @@
public QMediaServiceSupportedDevicesInterface
{
Q_OBJECT
- Q_INTERFACES(QtMobility::QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QtMobility::QMediaServiceSupportedDevicesInterface)
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
public:
QStringList keys() const
{
@@ -90,16 +90,16 @@
delete service;
}
- QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
{
if (codecs.contains(QLatin1String("mpeg4")))
- return QtMedia::NotSupported;
+ return QtMediaServices::NotSupported;
if (mimeType == "audio/ogg") {
- return QtMedia::ProbablySupported;
+ return QtMediaServices::ProbablySupported;
}
- return QtMedia::MaybeSupported;
+ return QtMediaServices::MaybeSupported;
}
QStringList supportedMimeTypes() const
@@ -127,8 +127,8 @@
public QMediaServiceFeaturesInterface
{
Q_OBJECT
- Q_INTERFACES(QtMobility::QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QtMobility::QMediaServiceFeaturesInterface)
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceFeaturesInterface)
public:
QStringList keys() const
{
@@ -148,14 +148,14 @@
delete service;
}
- QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
{
Q_UNUSED(codecs);
if (mimeType == "audio/wav")
- return QtMedia::PreferredService;
+ return QtMediaServices::PreferredService;
- return QtMedia::NotSupported;
+ return QtMediaServices::NotSupported;
}
QStringList supportedMimeTypes() const
@@ -177,7 +177,7 @@
public QMediaServiceSupportedDevicesInterface
{
Q_OBJECT
- Q_INTERFACES(QtMobility::QMediaServiceSupportedDevicesInterface)
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
public:
QStringList keys() const
{
@@ -222,8 +222,8 @@
public QMediaServiceFeaturesInterface
{
Q_OBJECT
- Q_INTERFACES(QtMobility::QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QtMobility::QMediaServiceFeaturesInterface)
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceFeaturesInterface)
public:
QStringList keys() const
{
@@ -243,15 +243,15 @@
delete service;
}
- QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
{
if (codecs.contains(QLatin1String("jpeg2000")))
- return QtMedia::NotSupported;
+ return QtMediaServices::NotSupported;
if (supportedMimeTypes().contains(mimeType))
- return QtMedia::ProbablySupported;
+ return QtMediaServices::ProbablySupported;
- return QtMedia::MaybeSupported;
+ return QtMediaServices::MaybeSupported;
}
QStringList supportedMimeTypes() const
@@ -338,7 +338,7 @@
{
MockMediaServiceProvider mockProvider;
QCOMPARE(mockProvider.hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
- QtMedia::MaybeSupported);
+ QtMediaServices::MaybeSupported);
QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
@@ -346,44 +346,44 @@
QSKIP("No default provider", SkipSingle);
QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
- QtMedia::MaybeSupported);
+ QtMediaServices::MaybeSupported);
QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/ogg", QStringList()),
- QtMedia::ProbablySupported);
+ QtMediaServices::ProbablySupported);
//while the service returns PreferredService, provider should return ProbablySupported
QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/wav", QStringList()),
- QtMedia::ProbablySupported);
+ QtMediaServices::ProbablySupported);
//even while all the plugins with "hasSupport" returned NotSupported,
//MockServicePlugin3 has no "hasSupport" interface, so MaybeSupported
QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/avi",
QStringList() << "mpeg4"),
- QtMedia::MaybeSupported);
+ QtMediaServices::MaybeSupported);
QCOMPARE(provider->hasSupport(QByteArray("non existing service"), "video/ogv", QStringList()),
- QtMedia::NotSupported);
+ QtMediaServices::NotSupported);
- QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMedia::MaybeSupported);
- QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMedia::ProbablySupported);
- QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMedia::ProbablySupported);
+ QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMediaServices::MaybeSupported);
+ QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMediaServices::ProbablySupported);
+ QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMediaServices::ProbablySupported);
//test low latency flag support
QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::LowLatency),
- QtMedia::ProbablySupported);
+ QtMediaServices::ProbablySupported);
//plugin1 probably supports audio/ogg, it checked because it doesn't provide features iface
QCOMPARE(QMediaPlayer::hasSupport("audio/ogg", QStringList(), QMediaPlayer::LowLatency),
- QtMedia::ProbablySupported);
+ QtMediaServices::ProbablySupported);
//Plugin4 is not checked here, sine it's known not support low latency
QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::LowLatency),
- QtMedia::MaybeSupported);
+ QtMediaServices::MaybeSupported);
//test streaming flag support
QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::StreamPlayback),
- QtMedia::ProbablySupported);
+ QtMediaServices::ProbablySupported);
//Plugin2 is not checked here, sine it's known not support streaming
QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::StreamPlayback),
- QtMedia::MaybeSupported);
+ QtMediaServices::MaybeSupported);
//ensure the correct media player plugin is choosen for mime type
QMediaPlayer simplePlayer(0, QMediaPlayer::LowLatency);