summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/multimedia/base/qmediatimerange.cpp4
-rw-r--r--src/multimedia/base/qmediatimerange.h4
-rw-r--r--src/plugins/mediaservices/gstreamer/gstreamer.pro2
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri2
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp89
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.h71
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.cpp172
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.h83
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/qmediacontent/tst_qmediacontent.cpp4
-rw-r--r--tests/auto/qmediaobject/tst_qmediaobject.cpp4
-rw-r--r--tests/auto/qmediaplayer/tst_qmediaplayer.cpp4
-rw-r--r--tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp32
-rw-r--r--tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp4
-rw-r--r--tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp4
-rw-r--r--tests/auto/qmediaresource/tst_qmediaresource.cpp4
-rw-r--r--tests/auto/qmediaservice/tst_qmediaservice.cpp4
-rw-r--r--tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp58
-rw-r--r--tests/auto/qmediatimerange/tst_qmediatimerange.cpp4
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp4
20 files changed, 29 insertions, 525 deletions
diff --git a/src/multimedia/base/qmediatimerange.cpp b/src/multimedia/base/qmediatimerange.cpp
index 38a8aea..0ca1948 100644
--- a/src/multimedia/base/qmediatimerange.cpp
+++ b/src/multimedia/base/qmediatimerange.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the QtMultimedia module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/src/multimedia/base/qmediatimerange.h b/src/multimedia/base/qmediatimerange.h
index d065368..a65629e 100644
--- a/src/multimedia/base/qmediatimerange.h
+++ b/src/multimedia/base/qmediatimerange.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the QtMultimedia module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/src/plugins/mediaservices/gstreamer/gstreamer.pro b/src/plugins/mediaservices/gstreamer/gstreamer.pro
index 5a16f03..db0ee4e 100644
--- a/src/plugins/mediaservices/gstreamer/gstreamer.pro
+++ b/src/plugins/mediaservices/gstreamer/gstreamer.pro
@@ -27,7 +27,6 @@ HEADERS += \
qgstreamervideorendererinterface.h \
qgstreamervideowidget.h \
qgstreamerserviceplugin.h \
-# qgstreameraudioinputendpointselector.h \
qgstreamervideoinputdevicecontrol.h \
qgstreamervideooverlay.h \
qgstreamervideorenderer.h \
@@ -44,7 +43,6 @@ SOURCES += \
qgstreamervideorendererinterface.cpp \
qgstreamervideowidget.cpp \
qgstreamerserviceplugin.cpp \
-# qgstreameraudioinputendpointselector.cpp \
qgstreamervideoinputdevicecontrol.cpp \
qgstreamervideooverlay.cpp \
qgstreamervideorenderer.cpp \
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
index dda641c..19ff034 100644
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
@@ -6,14 +6,12 @@ HEADERS += \
$$PWD/qgstreamerplayercontrol.h \
$$PWD/qgstreamerplayerservice.h \
$$PWD/qgstreamerplayersession.h \
-# $$PWD/qgstreamerstreamscontrol.h \
$$PWD/qgstreamermetadataprovider.h
SOURCES += \
$$PWD/qgstreamerplayercontrol.cpp \
$$PWD/qgstreamerplayerservice.cpp \
$$PWD/qgstreamerplayersession.cpp \
-# $$PWD/qgstreamerstreamscontrol.cpp \
$$PWD/qgstreamermetadataprovider.cpp
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
deleted file mode 100644
index 22c0b95..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgstreamerstreamscontrol.h"
-#include "qgstreamerplayersession.h"
-
-QGstreamerStreamsControl::QGstreamerStreamsControl(QGstreamerPlayerSession *session, QObject *parent)
- :QMediaStreamsControl(parent), m_session(session)
-{
- connect(m_session, SIGNAL(streamsChanged()), SIGNAL(streamsChanged()));
-}
-
-QGstreamerStreamsControl::~QGstreamerStreamsControl()
-{
-}
-
-int QGstreamerStreamsControl::streamCount()
-{
- return m_session->streamCount();
-}
-
-QMediaStreamsControl::StreamType QGstreamerStreamsControl::streamType(int streamNumber)
-{
- return m_session->streamType(streamNumber);
-}
-
-QVariant QGstreamerStreamsControl::metaData(int streamNumber, QtMedia::MetaData key)
-{
- return m_session->streamProperties(streamNumber).value(key);
-}
-
-bool QGstreamerStreamsControl::isActive(int streamNumber)
-{
- return streamNumber != -1 && streamNumber == m_session->activeStream(streamType(streamNumber));
-}
-
-void QGstreamerStreamsControl::setActive(int streamNumber, bool state)
-{
- QMediaStreamsControl::StreamType type = m_session->streamType(streamNumber);
- if (type == QMediaStreamsControl::UnknownStream)
- return;
-
- if (state)
- m_session->setActiveStream(type, streamNumber);
- else {
- //only one active stream of certain type is supported
- if (m_session->activeStream(type) == streamNumber)
- m_session->setActiveStream(type, -1);
- }
-}
-
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
deleted file mode 100644
index c115bce..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGSTREAMERSTREAMSCONTROL_H
-#define QGSTREAMERSTREAMSCONTROL_H
-
-#include <QtMultimedia/qmediastreamscontrol.h>
-
-QTM_USE_NAMESPACE
-
-class QGstreamerPlayerSession;
-
-class QGstreamerStreamsControl : public QMediaStreamsControl
-{
- Q_OBJECT
-public:
- QGstreamerStreamsControl(QGstreamerPlayerSession *session, QObject *parent);
- virtual ~QGstreamerStreamsControl();
-
- virtual int streamCount();
- virtual StreamType streamType(int streamNumber);
-
- virtual QVariant metaData(int streamNumber, QtMedia::MetaData key);
-
- virtual bool isActive(int streamNumber);
- virtual void setActive(int streamNumber, bool state);
-
-private:
- QGstreamerPlayerSession *m_session;
-};
-
-#endif // QGSTREAMERSTREAMSCONTROL_H
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.cpp b/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.cpp
deleted file mode 100644
index ce6ab30..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgstreameraudioinputendpointselector.h"
-
-#include <QtGui/QIcon>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-#include <gst/gst.h>
-
-#ifdef HAVE_ALSA
-#include <alsa/asoundlib.h>
-#endif
-
-QGstreamerAudioInputEndpointSelector::QGstreamerAudioInputEndpointSelector(QObject *parent)
- :QAudioEndpointSelector(parent)
-{
- update();
-}
-
-QGstreamerAudioInputEndpointSelector::~QGstreamerAudioInputEndpointSelector()
-{
-}
-
-QList<QString> QGstreamerAudioInputEndpointSelector::availableEndpoints() const
-{
- return m_names;
-}
-
-QString QGstreamerAudioInputEndpointSelector::endpointDescription(const QString& name) const
-{
- QString desc;
-
- for (int i = 0; i < m_names.size(); i++) {
- if (m_names.at(i).compare(name) == 0) {
- desc = m_descriptions.at(i);
- break;
- }
- }
- return desc;
-}
-
-QString QGstreamerAudioInputEndpointSelector::defaultEndpoint() const
-{
- if (m_names.size() > 0)
- return m_names.at(0);
-
- return QString();
-}
-
-QString QGstreamerAudioInputEndpointSelector::activeEndpoint() const
-{
- return m_audioInput;
-}
-
-void QGstreamerAudioInputEndpointSelector::setActiveEndpoint(const QString& name)
-{
- if (m_audioInput.compare(name) != 0) {
- m_audioInput = name;
- emit activeEndpointChanged(name);
- }
-}
-
-void QGstreamerAudioInputEndpointSelector::update()
-{
- m_names.clear();
- m_descriptions.clear();
- updateAlsaDevices();
- updateOssDevices();
- updatePulseDevices();
- if (m_names.size() > 0)
- m_audioInput = m_names.at(0);
-}
-
-void QGstreamerAudioInputEndpointSelector::updateAlsaDevices()
-{
-#ifdef HAVE_ALSA
- void **hints, **n;
- if (snd_device_name_hint(-1, "pcm", &hints) < 0) {
- qWarning()<<"no alsa devices available";
- return;
- }
- n = hints;
-
- while (*n != NULL) {
- char *name = snd_device_name_get_hint(*n, "NAME");
- char *descr = snd_device_name_get_hint(*n, "DESC");
- char *io = snd_device_name_get_hint(*n, "IOID");
-
- if ((name != NULL) && (descr != NULL)) {
- if ( io == NULL || qstrcmp(io,"Input") == 0 ) {
- m_names.append(QLatin1String("alsa:")+QString::fromUtf8(name));
- m_descriptions.append(QString::fromUtf8(descr));
- }
- }
-
- if (name != NULL)
- free(name);
- if (descr != NULL)
- free(descr);
- if (io != NULL)
- free(io);
- n++;
- }
- snd_device_name_free_hint(hints);
-#endif
-}
-
-void QGstreamerAudioInputEndpointSelector::updateOssDevices()
-{
- QDir devDir("/dev");
- devDir.setFilter(QDir::System);
-#ifndef QT_QWS_N810
- QFileInfoList entries = devDir.entryInfoList(QStringList() << "dsp*");
- foreach(const QFileInfo& entryInfo, entries) {
- m_names.append(QLatin1String("oss:")+entryInfo.filePath());
- m_descriptions.append(QString("OSS device %1").arg(entryInfo.fileName()));
- }
-#else
- m_names.append("dsppcm");
- m_descriptions.append("PCM audio input");
-#endif
-}
-
-void QGstreamerAudioInputEndpointSelector::updatePulseDevices()
-{
- GstElementFactory *factory = gst_element_factory_find("pulsesrc");
- if (factory) {
- m_names.append("pulseaudio:");
- m_descriptions.append("PulseAudio device.");
- gst_object_unref(GST_OBJECT(factory));
- }
-}
diff --git a/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.h b/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.h
deleted file mode 100644
index 9b15939..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreameraudioinputendpointselector.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
-#define QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
-
-#include <QtMultimedia/qaudioendpointselector.h>
-#include <QtCore/qstringlist.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelector
-{
-Q_OBJECT
-public:
- QGstreamerAudioInputEndpointSelector(QObject *parent);
- ~QGstreamerAudioInputEndpointSelector();
-
- QList<QString> availableEndpoints() const;
- QString endpointDescription(const QString& name) const;
- QString defaultEndpoint() const;
- QString activeEndpoint() const;
-
-public Q_SLOTS:
- void setActiveEndpoint(const QString& name);
-
-private:
- void update();
- void updateAlsaDevices();
- void updateOssDevices();
- void updatePulseDevices();
-
- QString m_audioInput;
- QList<QString> m_names;
- QList<QString> m_descriptions;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 4eda172..e47d95c 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -311,6 +311,7 @@ SUBDIRS += \
qmediaserviceprovider \
qmediatimerange \
qvideowidget \
+ qmlaudio \
qspinbox \
qsplitter \
qsql \
diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp
index 4857672..35dd0a9 100644
--- a/tests/auto/qmediacontent/tst_qmediacontent.cpp
+++ b/tests/auto/qmediacontent/tst_qmediacontent.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp
index 0370fff..1dbb2c1 100644
--- a/tests/auto/qmediaobject/tst_qmediaobject.cpp
+++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
index 6fac409..1775ec6 100644
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
index 88a2f31..adaa56c 100644
--- a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
+++ b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -425,34 +425,6 @@ void tst_QMediaPlaylist::saveAndLoad()
QCOMPARE(errorSignal.size(), 1);
QVERIFY(playlist.error() != QMediaPlaylist::NoError);
QVERIFY(!playlist.errorString().isEmpty());
-
- res = playlist.save(&buffer, "m3u");
-
- QVERIFY(res);
- QVERIFY(buffer.pos() > 0);
- buffer.seek(0);
-
- QMediaPlaylist playlist2;
- playlist2.load(&buffer, "m3u");
- QCOMPARE(playlist.error(), QMediaPlaylist::NoError);
-
- QCOMPARE(playlist.mediaCount(), playlist2.mediaCount());
- QCOMPARE(playlist.media(0), playlist2.media(0));
- QCOMPARE(playlist.media(1), playlist2.media(1));
- QCOMPARE(playlist.media(3), playlist2.media(3));
-
- res = playlist.save(QUrl(QLatin1String("tmp.m3u")), "m3u");
- QVERIFY(res);
-
- playlist2.clear();
- QVERIFY(playlist2.isEmpty());
- playlist2.load(QUrl(QLatin1String("tmp.m3u")), "m3u");
- QCOMPARE(playlist.error(), QMediaPlaylist::NoError);
-
- QCOMPARE(playlist.mediaCount(), playlist2.mediaCount());
- QCOMPARE(playlist.media(0), playlist2.media(0));
- QCOMPARE(playlist.media(1), playlist2.media(1));
- QCOMPARE(playlist.media(3), playlist2.media(3));
}
void tst_QMediaPlaylist::playbackMode_data()
diff --git a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
index a5eb3fe..9130db0 100644
--- a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
+++ b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
index 1ed23a0..0d35b05 100644
--- a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
+++ b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaresource/tst_qmediaresource.cpp b/tests/auto/qmediaresource/tst_qmediaresource.cpp
index 127144d..546c415 100644
--- a/tests/auto/qmediaresource/tst_qmediaresource.cpp
+++ b/tests/auto/qmediaresource/tst_qmediaresource.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp
index 3c3684a..35f661d 100644
--- a/tests/auto/qmediaservice/tst_qmediaservice.cpp
+++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
index a2c1be5..671cfa4 100644
--- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
+++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -72,8 +72,7 @@ public:
QStringList keys() const
{
return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER) <<
- QLatin1String(Q_MEDIASERVICE_CAMERA);
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
}
QMediaService* create(QString const& key)
@@ -109,8 +108,6 @@ public:
QList<QByteArray> devices(const QByteArray &service) const
{
QList<QByteArray> res;
- if (service == QByteArray(Q_MEDIASERVICE_CAMERA))
- res << "camera1" << "camera2";
return res;
}
@@ -183,9 +180,7 @@ public:
QStringList keys() const
{
return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER) <<
- QLatin1String(Q_MEDIASERVICE_CAMERA) <<
- QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE);
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
}
QMediaService* create(QString const& key)
@@ -204,11 +199,6 @@ public:
QList<QByteArray> devices(const QByteArray &service) const
{
QList<QByteArray> res;
- if (service == QByteArray(Q_MEDIASERVICE_CAMERA))
- res << "camera3" << "camera4";
- else if (service == QByteArray(Q_MEDIASERVICE_AUDIOSOURCE))
- res << "audiosource1" << "audiosource2";
-
return res;
}
@@ -250,7 +240,6 @@ private slots:
void testObtainService();
void testHasSupport();
void testSupportedMimeTypes();
- void testDevices();
void testProviderHints();
private:
@@ -341,45 +330,6 @@ void tst_QMediaServiceProvider::testSupportedMimeTypes()
QVERIFY(!provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/mp3"));
}
-void tst_QMediaServiceProvider::testDevices()
-{
- MockMediaServiceProvider mockProvider;
- QVERIFY(mockProvider.devices(QByteArray(Q_MEDIASERVICE_CAMERA)).isEmpty());
- QVERIFY(mockProvider.deviceDescription(QByteArray(Q_MEDIASERVICE_CAMERA),
- QByteArray()).isEmpty());
-
- QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
-
- QList<QByteArray> cameraDevices = provider->devices(QByteArray(Q_MEDIASERVICE_CAMERA));
- QCOMPARE(cameraDevices.count(), 4);
- QVERIFY(cameraDevices.contains(QByteArray("camera1")));
- QVERIFY(cameraDevices.contains(QByteArray("camera2")));
- QVERIFY(cameraDevices.contains(QByteArray("camera3")));
- QVERIFY(cameraDevices.contains(QByteArray("camera4")));
-
- /*
- //ensure the right plugin is choosen for a device
- QCamera camera1(QByteArray("camera1"));
- QCOMPARE( camera1.service()->objectName(), QLatin1String("MockServicePlugin1") );
- QCamera camera2(QByteArray("camera2"));
- QCOMPARE( camera2.service()->objectName(), QLatin1String("MockServicePlugin1") );
- QCamera camera3(QByteArray("camera3"));
- QCOMPARE( camera3.service()->objectName(), QLatin1String("MockServicePlugin3") );
- QCamera camera4(QByteArray("camera4"));
- QCOMPARE( camera4.service()->objectName(), QLatin1String("MockServicePlugin3") );
-
- QList<QByteArray> audioSourceDevices = provider->devices(QByteArray(Q_MEDIASERVICE_AUDIOSOURCE));
- QCOMPARE(audioSourceDevices.count(), 2);
- QVERIFY(audioSourceDevices.contains(QByteArray("audiosource1")));
- QVERIFY(audioSourceDevices.contains(QByteArray("audiosource2")));
-
- QVERIFY(provider->devices(QByteArray("non existing service")).isEmpty());
- */
-}
-
-
-
-
void tst_QMediaServiceProvider::testProviderHints()
{
{
diff --git a/tests/auto/qmediatimerange/tst_qmediatimerange.cpp b/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
index a8c58db..54de3f1 100644
--- a/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
+++ b/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
index e30d16b..9da4b9e 100644
--- a/tests/auto/qvideowidget/tst_qvideowidget.cpp
+++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Mobility Components.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage