diff options
Diffstat (limited to 'src')
210 files changed, 2944 insertions, 536 deletions
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp index 753fc431f..2de7401c9 100644 --- a/src/imports/multimedia/multimedia.cpp +++ b/src/imports/multimedia/multimedia.cpp @@ -48,6 +48,8 @@ #include "qdeclarativemediametadata_p.h" #include "qdeclarativeaudio_p.h" #include "qdeclarativevideooutput_p.h" +#include "qdeclarativeradio_p.h" +#include "qdeclarativebackgroundaudio_p.h" #include "qdeclarativecamera_p.h" #include "qdeclarativecamerapreviewprovider_p.h" #include "qdeclarativecameraexposure_p.h" @@ -72,6 +74,8 @@ public: qmlRegisterType<QDeclarativeAudio>(uri, 4, 0, "Audio"); qmlRegisterType<QDeclarativeAudio>(uri, 4, 0, "MediaPlayer"); qmlRegisterType<QDeclarativeVideoOutput>(uri, 4, 0, "VideoOutput"); + qmlRegisterType<QDeclarativeRadio>(uri, 4, 0, "Radio"); + qmlRegisterType<QDeclarativeBackgroundAudio>(uri, 4, 0, "BackgroundAudio"); qmlRegisterType<QDeclarativeCamera>(uri, 4, 0, "Camera"); qmlRegisterUncreatableType<QDeclarativeCameraCapture>(uri, 4, 0, "CameraCapture", trUtf8("CameraCapture is only provided by Camera element")); diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro index c300e9846..4574d0247 100644 --- a/src/imports/multimedia/multimedia.pro +++ b/src/imports/multimedia/multimedia.pro @@ -16,6 +16,8 @@ HEADERS += \ qsgvideonode_p.h \ qsgvideonode_i420.h \ qsgvideonode_rgb32.h \ + qdeclarativeradio_p.h \ + qdeclarativebackgroundaudio_p.h \ qdeclarativecamera_p.h \ qdeclarativecameracapture_p.h \ qdeclarativecamerarecorder_p.h \ @@ -25,7 +27,6 @@ HEADERS += \ qdeclarativecameraimageprocessing_p.h \ qdeclarativecamerapreviewprovider_p.h - SOURCES += \ multimedia.cpp \ qdeclarativeaudio.cpp \ @@ -34,6 +35,8 @@ SOURCES += \ qsgvideonode.cpp \ qsgvideonode_i420.cpp \ qsgvideonode_rgb32.cpp \ + qdeclarativeradio.cpp \ + qdeclarativebackgroundaudio.cpp \ qdeclarativecamera.cpp \ qdeclarativecameracapture.cpp \ qdeclarativecamerarecorder.cpp \ diff --git a/src/imports/multimedia/qdeclarativebackgroundaudio.cpp b/src/imports/multimedia/qdeclarativebackgroundaudio.cpp new file mode 100644 index 000000000..d56e9992f --- /dev/null +++ b/src/imports/multimedia/qdeclarativebackgroundaudio.cpp @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "qdeclarativebackgroundaudio_p.h" +#include <qmediabackgroundplaybackcontrol.h> +#include <qmediaservice.h> + +void QDeclarativeBackgroundAudio::classBegin() +{ +} + +void QDeclarativeBackgroundAudio::componentComplete() +{ + setObject(this, QMediaServiceProviderHint(QMediaServiceProviderHint::BackgroundPlayback)); + if (m_mediaService) { + m_backgroundPlaybackControl = + static_cast<QMediaBackgroundPlaybackControl*>( + m_mediaService->requestControl(QMediaBackgroundPlaybackControl_iid)); + if (m_backgroundPlaybackControl) { + connect(m_backgroundPlaybackControl, SIGNAL(acquired()), this, SIGNAL(acquiredChanged())); + connect(m_backgroundPlaybackControl, SIGNAL(lost()), this, SIGNAL(acquiredChanged())); + if (!m_contextId.isEmpty()) + m_backgroundPlaybackControl->setContextId(m_contextId); + } else { + qWarning("can not get QMediaBackgroundPlaybackControl!"); + } + } + QDeclarativeMediaBase::componentComplete(); +} + +QDeclarativeBackgroundAudio::QDeclarativeBackgroundAudio(QObject *parent) + : QDeclarativeAudio(parent) + , m_backgroundPlaybackControl(0) +{ + +} + +QDeclarativeBackgroundAudio::~QDeclarativeBackgroundAudio() +{ + if (m_backgroundPlaybackControl) + m_mediaService->releaseControl(m_backgroundPlaybackControl); +} + +/*! + \qmlproperty string BackgroundAudio::contextId + + This property holds the unique contextId for the application + + When a new contextId is set, the previously set contextId will be released automatically. +*/ +QString QDeclarativeBackgroundAudio::contextId() const +{ + return m_contextId; +} + +void QDeclarativeBackgroundAudio::setContextId(QString contextId) +{ + if (m_contextId == contextId) + return; + m_contextId = contextId; + if (m_backgroundPlaybackControl) + m_backgroundPlaybackControl->setContextId(m_contextId); + emit contextIdChanged(); +} + +/*! + \qmlproperty bool BackgroundAudio::acquired + + This property indicates whether the application holds the playback resource in music daemon +*/ +bool QDeclarativeBackgroundAudio::isAcquired() const +{ + if (!m_backgroundPlaybackControl) + return false; + return m_backgroundPlaybackControl->isAcquired(); +} + +/*! + \qmlmethod BackgroundAudio::acquire() + + try to acquire the playback resource in music daemon +*/ +void QDeclarativeBackgroundAudio::acquire() +{ + if (isAcquired() || !m_backgroundPlaybackControl) + return; + m_backgroundPlaybackControl->acquire(); +} + +/*! + \qmlmethod BackgroundAudio::acquire() + + try to release the playback resource in music daemon +*/ +void QDeclarativeBackgroundAudio::release() +{ + if (!isAcquired() || !m_backgroundPlaybackControl) + return; + m_backgroundPlaybackControl->release(); +} diff --git a/src/imports/multimedia/qdeclarativebackgroundaudio_p.h b/src/imports/multimedia/qdeclarativebackgroundaudio_p.h new file mode 100644 index 000000000..f7f6778f9 --- /dev/null +++ b/src/imports/multimedia/qdeclarativebackgroundaudio_p.h @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef QDECLARATIVEBACKGROUNDAUDIO_P_H +#define QDECLARATIVEBACKGROUNDAUDIO_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qdeclarativeaudio_p.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QMediaBackgroundPlaybackControl; +class QDeclarativeBackgroundAudio : public QDeclarativeAudio +{ + Q_OBJECT + Q_PROPERTY(QString contextId READ contextId WRITE setContextId NOTIFY contextIdChanged) + Q_PROPERTY(bool acquired READ isAcquired NOTIFY acquiredChanged) +public: + QDeclarativeBackgroundAudio(QObject *parent = 0); + ~QDeclarativeBackgroundAudio(); + + void classBegin(); + void componentComplete(); + + QString contextId() const; + void setContextId(QString contextId); + bool isAcquired() const; + +public Q_SLOTS: + void acquire(); + void release(); + +Q_SIGNALS: + void contextIdChanged(); + void acquiredChanged(); + +private: + Q_DISABLE_COPY(QDeclarativeBackgroundAudio) + QString m_contextId; + QMediaBackgroundPlaybackControl *m_backgroundPlaybackControl; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeBackgroundAudio)) + +QT_END_HEADER + +#endif // QDECLARATIVEBACKGROUNDAUDIO_P_H diff --git a/src/imports/multimedia/qdeclarativemediabase.cpp b/src/imports/multimedia/qdeclarativemediabase.cpp index 82e127407..a7435029b 100644 --- a/src/imports/multimedia/qdeclarativemediabase.cpp +++ b/src/imports/multimedia/qdeclarativemediabase.cpp @@ -260,12 +260,13 @@ void QDeclarativeMediaBase::shutdown() } -void QDeclarativeMediaBase::setObject(QObject *object) +void QDeclarativeMediaBase::setObject(QObject *object, const QMediaServiceProviderHint& hint) { m_qmlObject = object; if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider()) != 0) { - if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER)) != 0) { + m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER, hint); + if (m_mediaService != 0) { m_playerControl = qobject_cast<QMediaPlayerControl *>( m_mediaService->requestControl(QMediaPlayerControl_iid)); m_metaDataControl = qobject_cast<QMetaDataReaderControl *>( @@ -315,9 +316,12 @@ void QDeclarativeMediaBase::setObject(QObject *object) void QDeclarativeMediaBase::componentComplete() { - m_playerControl->setVolume(m_vol * 100); - m_playerControl->setMuted(m_muted); - m_playerControl->setPlaybackRate(m_playbackRate); + if (!qFuzzyCompare(m_vol, qreal(1.0))) + m_playerControl->setVolume(m_vol * 100); + if (m_muted) + m_playerControl->setMuted(m_muted); + if (!qFuzzyCompare(m_playbackRate, qreal(1.0))) + m_playerControl->setPlaybackRate(m_playbackRate); if (!m_source.isEmpty() && (m_autoLoad || m_playing)) // Override autoLoad if playing set m_playerControl->setMedia(m_source, 0); diff --git a/src/imports/multimedia/qdeclarativemediabase_p.h b/src/imports/multimedia/qdeclarativemediabase_p.h index cfbe0c554..70e349c97 100644 --- a/src/imports/multimedia/qdeclarativemediabase_p.h +++ b/src/imports/multimedia/qdeclarativemediabase_p.h @@ -123,7 +123,7 @@ public: protected: void shutdown(); - void setObject(QObject *object); + void setObject(QObject *object, const QMediaServiceProviderHint& hint = QMediaServiceProviderHint()); virtual void sourceChanged() = 0; virtual void autoLoadChanged() = 0; diff --git a/src/imports/multimedia/qdeclarativeradio.cpp b/src/imports/multimedia/qdeclarativeradio.cpp new file mode 100644 index 000000000..5cac32e6f --- /dev/null +++ b/src/imports/multimedia/qdeclarativeradio.cpp @@ -0,0 +1,212 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativeradio_p.h" + +QT_BEGIN_NAMESPACE + +QDeclarativeRadio::QDeclarativeRadio(QObject *parent) : + QObject(parent), + m_radioTuner(0) +{ + m_radioTuner = new QRadioTuner(this); + + connect(m_radioTuner, SIGNAL(stateChanged(QRadioTuner::State)), this, SLOT(_q_stateChanged(QRadioTuner::State))); + connect(m_radioTuner, SIGNAL(bandChanged(QRadioTuner::Band)), this, SLOT(_q_bandChanged(QRadioTuner::Band))); + + connect(m_radioTuner, SIGNAL(frequencyChanged(int)), this, SIGNAL(frequencyChanged(int))); + connect(m_radioTuner, SIGNAL(stereoStatusChanged(bool)), this, SIGNAL(stereoStatusChanged(bool))); + connect(m_radioTuner, SIGNAL(searchingChanged(bool)), this, SIGNAL(searchingChanged(bool))); + connect(m_radioTuner, SIGNAL(signalStrengthChanged(int)), this, SIGNAL(signalStrengthChanged(int))); + connect(m_radioTuner, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int))); + connect(m_radioTuner, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool))); + + connect(m_radioTuner, SIGNAL(error(QRadioTuner::Error)), this, SLOT(_q_error(QRadioTuner::Error))); +} + +QDeclarativeRadio::~QDeclarativeRadio() +{ +} + +QDeclarativeRadio::State QDeclarativeRadio::state() const +{ + return static_cast<QDeclarativeRadio::State>(m_radioTuner->state()); +} + +QDeclarativeRadio::Band QDeclarativeRadio::band() const +{ + return static_cast<QDeclarativeRadio::Band>(m_radioTuner->band()); +} + +int QDeclarativeRadio::frequency() const +{ + return m_radioTuner->frequency(); +} + +QDeclarativeRadio::StereoMode QDeclarativeRadio::stereoMode() const +{ + return static_cast<QDeclarativeRadio::StereoMode>(m_radioTuner->stereoMode()); +} + +int QDeclarativeRadio::volume() const +{ + return m_radioTuner->volume(); +} + +bool QDeclarativeRadio::muted() const +{ + return m_radioTuner->isMuted(); +} + +bool QDeclarativeRadio::stereo() const +{ + return m_radioTuner->isStereo(); +} + +int QDeclarativeRadio::signalStrength() const +{ + return m_radioTuner->signalStrength(); +} + +bool QDeclarativeRadio::searching() const +{ + return m_radioTuner->isSearching(); +} + +int QDeclarativeRadio::frequencyStep() const +{ + return m_radioTuner->frequencyStep(m_radioTuner->band()); +} + +int QDeclarativeRadio::minimumFrequency() const +{ + return m_radioTuner->frequencyRange(m_radioTuner->band()).first; +} + +int QDeclarativeRadio::maximumFrequency() const +{ + return m_radioTuner->frequencyRange(m_radioTuner->band()).second; +} + +bool QDeclarativeRadio::isAvailable() const +{ + return m_radioTuner->isAvailable(); +} + +void QDeclarativeRadio::setBand(QDeclarativeRadio::Band band) +{ + m_radioTuner->setBand(static_cast<QRadioTuner::Band>(band)); +} + +void QDeclarativeRadio::setFrequency(int frequency) +{ + m_radioTuner->setFrequency(frequency); +} + +void QDeclarativeRadio::setStereoMode(QDeclarativeRadio::StereoMode stereoMode) +{ + m_radioTuner->setStereoMode(static_cast<QRadioTuner::StereoMode>(stereoMode)); +} + +void QDeclarativeRadio::setVolume(int volume) +{ + m_radioTuner->setVolume(volume); +} + +void QDeclarativeRadio::setMuted(bool muted) +{ + m_radioTuner->setMuted(muted); +} + +void QDeclarativeRadio::cancelScan() +{ + m_radioTuner->cancelSearch(); +} + +void QDeclarativeRadio::scanDown() +{ + m_radioTuner->searchBackward(); +} + +void QDeclarativeRadio::scanUp() +{ + m_radioTuner->searchForward(); +} + +void QDeclarativeRadio::tuneDown() +{ + int f = frequency(); + f = f - frequencyStep(); + setFrequency(f); +} + +void QDeclarativeRadio::tuneUp() +{ + int f = frequency(); + f = f + frequencyStep(); + setFrequency(f); +} + +void QDeclarativeRadio::start() +{ + m_radioTuner->start(); +} + +void QDeclarativeRadio::stop() +{ + m_radioTuner->stop(); +} + +void QDeclarativeRadio::_q_stateChanged(QRadioTuner::State state) +{ + emit stateChanged(static_cast<QDeclarativeRadio::State>(state)); +} + +void QDeclarativeRadio::_q_bandChanged(QRadioTuner::Band band) +{ + emit bandChanged(static_cast<QDeclarativeRadio::Band>(band)); +} + +void QDeclarativeRadio::_q_error(QRadioTuner::Error errorCode) +{ + emit error(static_cast<QDeclarativeRadio::Error>(errorCode)); + emit errorChanged(); +} diff --git a/src/imports/multimedia/qdeclarativeradio_p.h b/src/imports/multimedia/qdeclarativeradio_p.h new file mode 100644 index 000000000..eddf93bfc --- /dev/null +++ b/src/imports/multimedia/qdeclarativeradio_p.h @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVERADIO_P_H +#define QDECLARATIVERADIO_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtDeclarative/qdeclarative.h> +#include <qradiotuner.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QDeclarativeRadio : public QObject +{ + Q_OBJECT + Q_PROPERTY(State state READ state NOTIFY stateChanged) + Q_PROPERTY(Band band READ band WRITE setBand NOTIFY bandChanged) + Q_PROPERTY(int frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged) + Q_PROPERTY(bool stereo READ stereo NOTIFY stereoStatusChanged) + Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode) + Q_PROPERTY(int signalStrength READ signalStrength NOTIFY signalStrengthChanged) + Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged) + Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged) + Q_PROPERTY(bool searching READ searching NOTIFY searchingChanged) + Q_PROPERTY(int frequencyStep READ frequencyStep NOTIFY bandChanged) + Q_PROPERTY(int minimumFrequency READ minimumFrequency NOTIFY bandChanged) + Q_PROPERTY(int maximumFrequency READ maximumFrequency NOTIFY bandChanged) + Q_ENUMS(State) + Q_ENUMS(Band) + Q_ENUMS(Error) + Q_ENUMS(StereoMode) + +public: + enum State { + ActiveState = QRadioTuner::ActiveState, + StoppedState = QRadioTuner::StoppedState + }; + + enum Band { + AM = QRadioTuner::AM, + FM = QRadioTuner::FM, + SW = QRadioTuner::SW, + LW = QRadioTuner::LW, + FM2 = QRadioTuner::FM2 + }; + + enum Error { + NoError = QRadioTuner::NoError, + ResourceError = QRadioTuner::ResourceError, + OpenError = QRadioTuner::OpenError, + OutOfRangeError = QRadioTuner::OutOfRangeError + }; + + enum StereoMode { + ForceStereo = QRadioTuner::ForceStereo, + ForceMono = QRadioTuner::ForceMono, + Auto = QRadioTuner::Auto + }; + + QDeclarativeRadio(QObject *parent = 0); + ~QDeclarativeRadio(); + + QDeclarativeRadio::State state() const; + QDeclarativeRadio::Band band() const; + int frequency() const; + QDeclarativeRadio::StereoMode stereoMode() const; + int volume() const; + bool muted() const; + + bool stereo() const; + int signalStrength() const; + bool searching() const; + + int frequencyStep() const; + int minimumFrequency() const; + int maximumFrequency() const; + + Q_INVOKABLE bool isAvailable() const; + +public Q_SLOTS: + void setBand(QDeclarativeRadio::Band band); + void setFrequency(int frequency); + void setStereoMode(QDeclarativeRadio::StereoMode stereoMode); + void setVolume(int volume); + void setMuted(bool muted); + + void cancelScan(); + void scanDown(); + void scanUp(); + void tuneUp(); + void tuneDown(); + void start(); + void stop(); + +Q_SIGNALS: + void stateChanged(QDeclarativeRadio::State state); + void bandChanged(QDeclarativeRadio::Band band); + void frequencyChanged(int frequency); + void stereoStatusChanged(bool stereo); + void searchingChanged(bool searching); + void signalStrengthChanged(int signalStrength); + void volumeChanged(int volume); + void mutedChanged(bool muted); + + void errorChanged(); + void error(QDeclarativeRadio::Error errorCode); + +private Q_SLOTS: + void _q_stateChanged(QRadioTuner::State state); + void _q_bandChanged(QRadioTuner::Band band); + void _q_error(QRadioTuner::Error errorCode); + +private: + Q_DISABLE_COPY(QDeclarativeRadio) + + QRadioTuner *m_radioTuner; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeRadio)) + +QT_END_HEADER + +#endif // QDECLARATIVERADIO_P_H diff --git a/src/imports/multimedia/qsgvideonode_i420.cpp b/src/imports/multimedia/qsgvideonode_i420.cpp index 0342de565..11135c14b 100644 --- a/src/imports/multimedia/qsgvideonode_i420.cpp +++ b/src/imports/multimedia/qsgvideonode_i420.cpp @@ -41,7 +41,8 @@ #include "qsgvideonode_i420.h" #include <QtDeclarative/qsgtexturematerial.h> #include <QtDeclarative/qsgmaterial.h> - +#include <QtGui/QOpenGLContext> +#include <QtGui/QOpenGLFunctions> #include <QtOpenGL/qglshaderprogram.h> QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_I420::supportedPixelFormats( @@ -254,7 +255,7 @@ void QSGVideoNode_I420::setCurrentFrame(const QVideoFrame &frame) void QSGVideoNode_I420::bindTexture(int id, int unit, int w, int h, const uchar *bits) { - QGLFunctions *functions = QGLContext::currentContext()->functions(); + QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions(); functions->glActiveTexture(unit); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, w, h, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, bits); @@ -271,7 +272,7 @@ void QSGVideoMaterialShader_YUV420::updateState(const RenderState &state, { Q_UNUSED(oldMaterial); - QGLFunctions *functions = state.context()->functions(); + QOpenGLFunctions *functions = state.context()->functions(); QSGVideoMaterial_YUV420 *mat = static_cast<QSGVideoMaterial_YUV420 *>(newMaterial); program()->setUniformValue(m_id_yTexture, 0); program()->setUniformValue(m_id_uTexture, 1); diff --git a/src/imports/multimedia/qsgvideonode_rgb32.cpp b/src/imports/multimedia/qsgvideonode_rgb32.cpp index 1c6738d28..dbb2e8b50 100644 --- a/src/imports/multimedia/qsgvideonode_rgb32.cpp +++ b/src/imports/multimedia/qsgvideonode_rgb32.cpp @@ -42,6 +42,9 @@ #include <QtDeclarative/qsgtexture.h> +#include <QtGui/QOpenGLContext> +#include <QtGui/QOpenGLFunctions> + QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_RGB32::supportedPixelFormats( QAbstractVideoBuffer::HandleType handleType) const { @@ -101,7 +104,7 @@ void QSGVideoTexture_RGB32::bind() } if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) { - QGLFunctions *functions = QGLContext::currentContext()->functions(); + QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions(); const uchar *bits = m_frame.bits(); functions->glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_textureId); diff --git a/src/multimediakit/audio/qaudio.h b/src/multimediakit/audio/qaudio.h index b420d878c..16accfef9 100644 --- a/src/multimediakit/audio/qaudio.h +++ b/src/multimediakit/audio/qaudio.h @@ -51,6 +51,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + //QTM_SYNC_HEADER_EXPORT QAudio namespace QAudio diff --git a/src/multimediakit/audio/qaudio_mac_p.h b/src/multimediakit/audio/qaudio_mac_p.h index 4acff79d0..06ce43010 100644 --- a/src/multimediakit/audio/qaudio_mac_p.h +++ b/src/multimediakit/audio/qaudio_mac_p.h @@ -65,6 +65,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + extern QDebug operator<<(QDebug dbg, const QAudioFormat& audioFormat); diff --git a/src/multimediakit/audio/qaudiodevicefactory_p.h b/src/multimediakit/audio/qaudiodevicefactory_p.h index 74104bb73..16ddb573a 100644 --- a/src/multimediakit/audio/qaudiodevicefactory_p.h +++ b/src/multimediakit/audio/qaudiodevicefactory_p.h @@ -65,6 +65,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractAudioInput; class QAbstractAudioOutput; class QAbstractAudioDeviceInfo; diff --git a/src/multimediakit/audio/qaudiodeviceinfo.cpp b/src/multimediakit/audio/qaudiodeviceinfo.cpp index 4b71b273b..6b6f7951e 100644 --- a/src/multimediakit/audio/qaudiodeviceinfo.cpp +++ b/src/multimediakit/audio/qaudiodeviceinfo.cpp @@ -188,8 +188,6 @@ bool QAudioDeviceInfo::isNull() const Device names vary depending on the platform/audio plugin being used. - XXX - They are a unique string identifier for the audio device. eg. default, Intel, U0x46d0x9a4 diff --git a/src/multimediakit/audio/qaudiodeviceinfo.h b/src/multimediakit/audio/qaudiodeviceinfo.h index 703447910..e8616ce35 100644 --- a/src/multimediakit/audio/qaudiodeviceinfo.h +++ b/src/multimediakit/audio/qaudiodeviceinfo.h @@ -59,6 +59,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioDeviceFactory; class QAudioDeviceInfoPrivate; diff --git a/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h b/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h index 5afc8f8c4..cf19d2554 100644 --- a/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h +++ b/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h @@ -65,8 +65,13 @@ #include "qaudiodeviceinfo.h" #include "qaudiosystem.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -117,5 +122,8 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h b/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h index 099d7fd61..3b9ca4676 100644 --- a/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h +++ b/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h @@ -62,6 +62,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioDeviceInfoInternal : public QAbstractAudioDeviceInfo { public: diff --git a/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h b/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h index 9ed3b66d5..2d4e27106 100644 --- a/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h +++ b/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h @@ -63,8 +63,13 @@ #include <qaudiosystem.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -109,4 +114,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudioformat.h b/src/multimediakit/audio/qaudioformat.h index ebee33a7b..c6600cdcf 100644 --- a/src/multimediakit/audio/qaudioformat.h +++ b/src/multimediakit/audio/qaudioformat.h @@ -53,6 +53,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioFormatPrivate; diff --git a/src/multimediakit/audio/qaudioinput.cpp b/src/multimediakit/audio/qaudioinput.cpp index bb4f89653..4a6bfaefd 100644 --- a/src/multimediakit/audio/qaudioinput.cpp +++ b/src/multimediakit/audio/qaudioinput.cpp @@ -57,12 +57,6 @@ QT_BEGIN_NAMESPACE \ingroup multimedia \since 1.0 - XXX Needs more blurb about use cases etc - Link to terminology etc - Push/Pull mode - State diagram - - You can construct an audio input with the system's \l{QAudioDeviceInfo::defaultInputDevice()}{default audio input device}. It is also possible to create QAudioInput with a diff --git a/src/multimediakit/audio/qaudioinput.h b/src/multimediakit/audio/qaudioinput.h index 13d3cb015..8684a10fe 100644 --- a/src/multimediakit/audio/qaudioinput.h +++ b/src/multimediakit/audio/qaudioinput.h @@ -57,6 +57,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractAudioInput; diff --git a/src/multimediakit/audio/qaudioinput_alsa_p.h b/src/multimediakit/audio/qaudioinput_alsa_p.h index 2a5b3df1a..a05f6954d 100644 --- a/src/multimediakit/audio/qaudioinput_alsa_p.h +++ b/src/multimediakit/audio/qaudioinput_alsa_p.h @@ -67,8 +67,13 @@ #include "qaudiodeviceinfo.h" #include "qaudiosystem.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class InputPrivate; class RingBuffer @@ -180,4 +185,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudioinput_mac_p.h b/src/multimediakit/audio/qaudioinput_mac_p.h index cc0e62b11..99e8ad061 100644 --- a/src/multimediakit/audio/qaudioinput_mac_p.h +++ b/src/multimediakit/audio/qaudioinput_mac_p.h @@ -72,6 +72,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QTimer; class QIODevice; class QAbstractAudioDeviceInfo; diff --git a/src/multimediakit/audio/qaudioinput_win32_p.h b/src/multimediakit/audio/qaudioinput_win32_p.h index 0fc1ae8a6..10d41a552 100644 --- a/src/multimediakit/audio/qaudioinput_win32_p.h +++ b/src/multimediakit/audio/qaudioinput_win32_p.h @@ -69,8 +69,13 @@ #include <qaudiosystem.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + // For compat with 4.6 #if !defined(QT_WIN_CALLBACK) # if defined(Q_CC_MINGW) @@ -168,4 +173,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudiooutput.cpp b/src/multimediakit/audio/qaudiooutput.cpp index 10496bd98..ea9dcb11f 100644 --- a/src/multimediakit/audio/qaudiooutput.cpp +++ b/src/multimediakit/audio/qaudiooutput.cpp @@ -58,8 +58,6 @@ QT_BEGIN_NAMESPACE \ingroup multimedia \since 1.0 - XXX - You can construct an audio output with the system's \l{QAudioDeviceInfo::defaultOutputDevice()}{default audio output device}. It is also possible to create QAudioOutput with a @@ -148,7 +146,7 @@ QAudioOutput::QAudioOutput(const QAudioDeviceInfo &audioDevice, const QAudioForm /*! Destroys this audio output. - XXX This will release any system resources used and free any buffers. + This will release any system resources used and free any buffers. */ QAudioOutput::~QAudioOutput() { @@ -207,7 +205,6 @@ QIODevice* QAudioOutput::start() /*! Stops the audio output, detaching from the system resource. - XXX Sets error() to QAudio::NoError, state() to QAudio::StoppedState and emit stateChanged() signal. \since 1.0 @@ -220,7 +217,6 @@ void QAudioOutput::stop() /*! Drops all audio data in the buffers, resets buffers to zero. - XXX what about state \since 1.0 */ void QAudioOutput::reset() @@ -231,8 +227,6 @@ void QAudioOutput::reset() /*! Stops processing audio data, preserving buffered audio data. - XXX - Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and emits stateChanged() signal. \since 1.0 @@ -245,8 +239,6 @@ void QAudioOutput::suspend() /*! Resumes processing audio data after a suspend(). -XXX - Sets error() to QAudio::NoError. Sets state() to QAudio::ActiveState if you previously called start(QIODevice*). Sets state() to QAudio::IdleState if you previously called start(). diff --git a/src/multimediakit/audio/qaudiooutput.h b/src/multimediakit/audio/qaudiooutput.h index bc7fa62db..b61c4d9f3 100644 --- a/src/multimediakit/audio/qaudiooutput.h +++ b/src/multimediakit/audio/qaudiooutput.h @@ -57,6 +57,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractAudioOutput; diff --git a/src/multimediakit/audio/qaudiooutput_alsa_p.h b/src/multimediakit/audio/qaudiooutput_alsa_p.h index 953dc7ae7..f914ded2c 100644 --- a/src/multimediakit/audio/qaudiooutput_alsa_p.h +++ b/src/multimediakit/audio/qaudiooutput_alsa_p.h @@ -66,8 +66,13 @@ #include "qaudiodeviceinfo.h" #include "qaudiosystem.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class OutputPrivate; class QAudioOutputPrivate : public QAbstractAudioOutput @@ -164,4 +169,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudiooutput_mac_p.h b/src/multimediakit/audio/qaudiooutput_mac_p.h index 8e7a11919..d1cf680b1 100644 --- a/src/multimediakit/audio/qaudiooutput_mac_p.h +++ b/src/multimediakit/audio/qaudiooutput_mac_p.h @@ -72,6 +72,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QIODevice; class QAbstractAudioDeviceInfo; diff --git a/src/multimediakit/audio/qaudiooutput_win32_p.h b/src/multimediakit/audio/qaudiooutput_win32_p.h index 6ca6fc562..aa86d4e9b 100644 --- a/src/multimediakit/audio/qaudiooutput_win32_p.h +++ b/src/multimediakit/audio/qaudiooutput_win32_p.h @@ -76,8 +76,13 @@ # endif #endif +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioOutputPrivate : public QAbstractAudioOutput { Q_OBJECT @@ -164,4 +169,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/audio/qaudiopluginloader.cpp b/src/multimediakit/audio/qaudiopluginloader.cpp index 2807fcf9d..4aa24d57b 100644 --- a/src/multimediakit/audio/qaudiopluginloader.cpp +++ b/src/multimediakit/audio/qaudiopluginloader.cpp @@ -43,7 +43,7 @@ #include "qaudiopluginloader_p.h" #include <QtCore/qcoreapplication.h> -#include <QtGui/qapplication.h> +#include <QtWidgets/qapplication.h> #include <QtCore/qpluginloader.h> #include <QtCore/qfactoryinterface.h> #include <QtCore/qdir.h> @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE QAudioPluginLoader::QAudioPluginLoader(const char *iid, const QString &location, Qt::CaseSensitivity): m_iid(iid) { - m_location = location + "/"; + m_location = location + QLatin1Char('/'); load(); } diff --git a/src/multimediakit/audio/qaudiopluginloader_p.h b/src/multimediakit/audio/qaudiopluginloader_p.h index 89d9679d8..a0f130fd1 100644 --- a/src/multimediakit/audio/qaudiopluginloader_p.h +++ b/src/multimediakit/audio/qaudiopluginloader_p.h @@ -61,8 +61,13 @@ #include <QtCore/qpluginloader.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioPluginLoader { public: @@ -89,4 +94,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QAUDIOPLUGINLOADER_H diff --git a/src/multimediakit/audio/qaudiosystem.h b/src/multimediakit/audio/qaudiosystem.h index 6773343ad..7430528a8 100644 --- a/src/multimediakit/audio/qaudiosystem.h +++ b/src/multimediakit/audio/qaudiosystem.h @@ -53,6 +53,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QAbstractAudioDeviceInfo : public QObject { Q_OBJECT diff --git a/src/multimediakit/audio/qaudiosystemplugin.h b/src/multimediakit/audio/qaudiosystemplugin.h index 13e642fde..5a876dedb 100644 --- a/src/multimediakit/audio/qaudiosystemplugin.h +++ b/src/multimediakit/audio/qaudiosystemplugin.h @@ -58,6 +58,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + struct Q_MULTIMEDIA_EXPORT QAudioSystemFactoryInterface : public QFactoryInterface { virtual QList<QByteArray> availableDevices(QAudio::Mode) const = 0; diff --git a/src/multimediakit/effects/qsamplecache_p.cpp b/src/multimediakit/effects/qsamplecache_p.cpp index da550e8ae..1610a4382 100644 --- a/src/multimediakit/effects/qsamplecache_p.cpp +++ b/src/multimediakit/effects/qsamplecache_p.cpp @@ -297,7 +297,7 @@ void QSample::addRef() // Called in loading thread void QSample::readSample() { - Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread"); + Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread")); QMutexLocker m(&m_mutex); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSample: readSample"; @@ -316,7 +316,7 @@ void QSample::readSample() // Called in loading thread void QSample::decoderReady() { - Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread"); + Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread")); QMutexLocker m(&m_mutex); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSample: decoder ready"; @@ -343,7 +343,7 @@ QSample::State QSample::state() const // Essentially a second ctor, doesn't need locks (?) void QSample::load() { - Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread"); + Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread")); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSample: load [" << m_url << "]"; #endif @@ -358,7 +358,7 @@ void QSample::load() // Called in loading thread void QSample::decoderError() { - Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread"); + Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread")); QMutexLocker m(&m_mutex); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSample: decoder error"; @@ -371,7 +371,7 @@ void QSample::decoderError() // Called in loading thread from decoder when sample is done. Locked already. void QSample::onReady() { - Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread"); + Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread")); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSample: load ready"; #endif diff --git a/src/multimediakit/effects/qsamplecache_p.h b/src/multimediakit/effects/qsamplecache_p.h index fbe246008..91ca457e6 100644 --- a/src/multimediakit/effects/qsamplecache_p.h +++ b/src/multimediakit/effects/qsamplecache_p.h @@ -66,6 +66,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QNetworkAccessManager; class QSampleCache; class QWaveDecoder; diff --git a/src/multimediakit/effects/qsoundeffect_p.h b/src/multimediakit/effects/qsoundeffect_p.h index de8de12a3..4d6764742 100644 --- a/src/multimediakit/effects/qsoundeffect_p.h +++ b/src/multimediakit/effects/qsoundeffect_p.h @@ -63,6 +63,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QSoundEffectPrivate; class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject diff --git a/src/multimediakit/effects/qsoundeffect_pulse_p.cpp b/src/multimediakit/effects/qsoundeffect_pulse_p.cpp index f65fd9995..4570f8fd5 100644 --- a/src/multimediakit/effects/qsoundeffect_pulse_p.cpp +++ b/src/multimediakit/effects/qsoundeffect_pulse_p.cpp @@ -359,6 +359,8 @@ void QSoundEffectPrivate::setSource(const QUrl &url) case QSample::Error: decoderError(); break; + default: + break; } } diff --git a/src/multimediakit/effects/qsoundeffect_pulse_p.h b/src/multimediakit/effects/qsoundeffect_pulse_p.h index 6653f0533..c78bcdec5 100644 --- a/src/multimediakit/effects/qsoundeffect_pulse_p.h +++ b/src/multimediakit/effects/qsoundeffect_pulse_p.h @@ -66,6 +66,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QSoundEffectPrivate : public QObject { Q_OBJECT diff --git a/src/multimediakit/effects/qsoundeffect_qmedia_p.h b/src/multimediakit/effects/qsoundeffect_qmedia_p.h index 9e5dd25db..adafa04a2 100644 --- a/src/multimediakit/effects/qsoundeffect_qmedia_p.h +++ b/src/multimediakit/effects/qsoundeffect_qmedia_p.h @@ -62,6 +62,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QSoundEffectPrivate : public QObject { diff --git a/src/multimediakit/effects/qsoundeffect_qsound_p.cpp b/src/multimediakit/effects/qsoundeffect_qsound_p.cpp index 1706af9f1..0b9082eb5 100644 --- a/src/multimediakit/effects/qsoundeffect_qsound_p.cpp +++ b/src/multimediakit/effects/qsoundeffect_qsound_p.cpp @@ -53,7 +53,7 @@ #include "qsoundeffect_qsound_p.h" #include <QtCore/qcoreapplication.h> -#include <QtGui/qsound.h> +#include <QtWidgets/qsound.h> #include <QtCore/qstringlist.h> diff --git a/src/multimediakit/effects/qsoundeffect_qsound_p.h b/src/multimediakit/effects/qsoundeffect_qsound_p.h index 085a97ea2..c98ad79ce 100644 --- a/src/multimediakit/effects/qsoundeffect_qsound_p.h +++ b/src/multimediakit/effects/qsoundeffect_qsound_p.h @@ -62,6 +62,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QSound; class QSoundEffectPrivate : public QObject diff --git a/src/multimediakit/effects/qwavedecoder_p.h b/src/multimediakit/effects/qwavedecoder_p.h index d2e438fe7..6c4c00c25 100644 --- a/src/multimediakit/effects/qwavedecoder_p.h +++ b/src/multimediakit/effects/qwavedecoder_p.h @@ -61,6 +61,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QWaveDecoder : public QIODevice { diff --git a/src/multimediakit/multimediakit.pro b/src/multimediakit/multimediakit.pro index 4cc1dbfdc..968832651 100644 --- a/src/multimediakit/multimediakit.pro +++ b/src/multimediakit/multimediakit.pro @@ -9,7 +9,6 @@ CONFIG += module MODULE_PRI += ../../modules/qt_multimediakit.pri contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) { - QT += opengl } else { DEFINES += QT_NO_OPENGL } @@ -21,6 +20,7 @@ load(qt_module_config) HEADERS += qtmultimediakitversion.h + PRIVATE_HEADERS += \ qmediacontrol_p.h \ qmediaobject_p.h \ @@ -28,9 +28,7 @@ PRIVATE_HEADERS += \ qmediaplaylist_p.h \ qmediaplaylistprovider_p.h \ qmediaimageviewerservice_p.h \ - qvideowidget_p.h \ qmediapluginloader_p.h \ - qpaintervideosurface_p.h \ qvideosurfaceoutput_p.h PUBLIC_HEADERS += \ @@ -46,6 +44,7 @@ PUBLIC_HEADERS += \ qmediaplaylistnavigator.h \ qmediaplaylistprovider.h \ qmediaplaylistioplugin.h \ + qmediabackgroundplaybackcontrol.h \ qmediacontent.h \ qmediaresource.h \ qmediarecorder.h \ @@ -59,9 +58,6 @@ PUBLIC_HEADERS += \ qradiotuner.h \ qradiotunercontrol.h \ qtmedianamespace.h \ - qvideowidget.h \ - qvideowindowcontrol.h \ - qvideowidgetcontrol.h \ qaudioencodercontrol.h \ qvideoencodercontrol.h \ qimageencodercontrol.h \ @@ -71,7 +67,6 @@ PUBLIC_HEADERS += \ qmediaplaylistsourcecontrol.h \ qaudioendpointselector.h \ qvideodevicecontrol.h \ - qgraphicsvideoitem.h \ qvideorenderercontrol.h \ qmediatimerange.h \ qmedianetworkaccesscontrol.h \ @@ -102,9 +97,6 @@ SOURCES += qmediacontrol.cpp \ qmediastreamscontrol.cpp \ qradiotuner.cpp \ qradiotunercontrol.cpp \ - qvideowidget.cpp \ - qvideowindowcontrol.cpp \ - qvideowidgetcontrol.cpp \ qaudioencodercontrol.cpp \ qvideoencodercontrol.cpp \ qimageencodercontrol.cpp \ @@ -115,16 +107,15 @@ SOURCES += qmediacontrol.cpp \ qaudioendpointselector.cpp \ qvideodevicecontrol.cpp \ qmediapluginloader.cpp \ - qpaintervideosurface.cpp \ qvideorenderercontrol.cpp \ qmediatimerange.cpp \ qmedianetworkaccesscontrol.cpp \ - qvideosurfaceoutput.cpp + qvideosurfaceoutput.cpp \ + qmediabackgroundplaybackcontrol.cpp #Camera PUBLIC_HEADERS += \ qcamera.h \ - qcameraviewfinder.h \ qcameraimagecapture.h \ qcameraimagecapturecontrol.h \ qcameraexposure.h \ @@ -141,7 +132,6 @@ PUBLIC_HEADERS += \ SOURCES += \ qcamera.cpp \ - qcameraviewfinder.cpp \ qcameraexposure.cpp \ qcamerafocus.cpp \ qcameraimageprocessing.cpp \ @@ -161,29 +151,7 @@ include(video/video.pri) include(effects/effects.pri) mac:!qpa { -!simulator { - HEADERS += qpaintervideosurface_mac_p.h - OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm -} LIBS += -framework AppKit -framework QuartzCore -framework QTKit } -maemo6 { - isEqual(QT_ARCH,armv6) { - HEADERS += qeglimagetexturesurface_p.h - SOURCES += qeglimagetexturesurface.cpp - - SOURCES += qgraphicsvideoitem_maemo6.cpp - - LIBS += -lX11 - } else { - SOURCES += qgraphicsvideoitem.cpp - } -} - -!maemo* { - SOURCES += qgraphicsvideoitem.cpp -} - HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS - diff --git a/src/multimediakit/qaudiocapturesource.h b/src/multimediakit/qaudiocapturesource.h index 7f2200895..e27450514 100644 --- a/src/multimediakit/qaudiocapturesource.h +++ b/src/multimediakit/qaudiocapturesource.h @@ -55,8 +55,13 @@ #include "qmediaserviceprovider.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioCaptureSourcePrivate; class Q_MULTIMEDIA_EXPORT QAudioCaptureSource : public QMediaObject @@ -92,4 +97,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QAUDIOCAPTURESOURCE_H diff --git a/src/multimediakit/qaudioencodercontrol.h b/src/multimediakit/qaudioencodercontrol.h index e464bc055..2e3a4bf87 100644 --- a/src/multimediakit/qaudioencodercontrol.h +++ b/src/multimediakit/qaudioencodercontrol.h @@ -47,7 +47,12 @@ #include <QtCore/qlist.h> #include <QtCore/qpair.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QStringList; class QAudioFormat; QT_END_NAMESPACE @@ -84,4 +89,7 @@ Q_MEDIA_DECLARE_CONTROL(QAudioEncoderControl, QAudioEncoderControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QAUDIOCAPTUREPROPERTIESCONTROL_H diff --git a/src/multimediakit/qaudioendpointselector.cpp b/src/multimediakit/qaudioendpointselector.cpp index 9bbe267a3..8f2f28f56 100644 --- a/src/multimediakit/qaudioendpointselector.cpp +++ b/src/multimediakit/qaudioendpointselector.cpp @@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE endpoints available on a system and allows one to be selected as the audio of a media service. - XXX why do I care - The interface name of QAudioEndpointSelector is \c com.nokia.Qt.QAudioEndpointSelector/1.0 as defined in QAudioEndpointSelector_iid. diff --git a/src/multimediakit/qaudioendpointselector.h b/src/multimediakit/qaudioendpointselector.h index 1fc10904c..00250bc54 100644 --- a/src/multimediakit/qaudioendpointselector.h +++ b/src/multimediakit/qaudioendpointselector.h @@ -45,8 +45,13 @@ #include <qaudio.h> #include <qmediacontrol.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QAudioEndpointSelector : public QMediaControl { Q_OBJECT @@ -75,4 +80,7 @@ Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelector, QAudioEndpointSelector_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QAUDIOENDPOINTSELECTOR_H diff --git a/src/multimediakit/qcamera.cpp b/src/multimediakit/qcamera.cpp index d7fb532db..7870c2494 100644 --- a/src/multimediakit/qcamera.cpp +++ b/src/multimediakit/qcamera.cpp @@ -52,8 +52,6 @@ #include <qcameraimageprocessingcontrol.h> #include <qcameraimagecapturecontrol.h> #include <qvideodevicecontrol.h> -#include <qvideowidget.h> -#include <qgraphicsvideoitem.h> #include <qvideosurfaceoutput_p.h> QT_USE_NAMESPACE @@ -365,7 +363,7 @@ QCamera::QCamera(const QByteArray& device, QObject *parent): if (d->service != 0) { //pass device name to service if (d->deviceControl) { - QString deviceName(device); + QString deviceName = QString::fromLatin1(device); for (int i=0; i<d->deviceControl->deviceCount(); i++) { if (d->deviceControl->deviceName(i) == deviceName) { @@ -470,6 +468,8 @@ QCameraImageProcessing *QCamera::imageProcessing() const The previously set viewfinder is detached. \since 1.1 */ + +// QVideoWidget is forward declared void QCamera::setViewfinder(QVideoWidget *viewfinder) { Q_D(QCamera); @@ -478,7 +478,10 @@ void QCamera::setViewfinder(QVideoWidget *viewfinder) if (d->viewfinder) unbind(d->viewfinder); - d->viewfinder = viewfinder && bind(viewfinder) ? viewfinder : 0; + // We don't know (in this library) that QVideoWidget inherits QObject + QObject *viewFinderObject = reinterpret_cast<QObject*>(viewfinder); + + d->viewfinder = viewFinderObject && bind(viewFinderObject) ? viewFinderObject : 0; } /*! @@ -486,6 +489,7 @@ void QCamera::setViewfinder(QVideoWidget *viewfinder) The previously set viewfinder is detached. \since 1.1 */ +// QGraphicsVideoItem is forward declared void QCamera::setViewfinder(QGraphicsVideoItem *viewfinder) { Q_D(QCamera); @@ -494,7 +498,11 @@ void QCamera::setViewfinder(QGraphicsVideoItem *viewfinder) if (d->viewfinder) unbind(d->viewfinder); - d->viewfinder = viewfinder && bind(viewfinder) ? viewfinder : 0; + // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject + // but QObject inheritance depends on QObject coming first, so try this out. + QObject *viewFinderObject = reinterpret_cast<QObject*>(viewfinder); + + d->viewfinder = viewFinderObject && bind(viewFinderObject) ? viewFinderObject : 0; } /*! diff --git a/src/multimediakit/qcamera.h b/src/multimediakit/qcamera.h index 268e09e6a..5091759ab 100644 --- a/src/multimediakit/qcamera.h +++ b/src/multimediakit/qcamera.h @@ -59,8 +59,13 @@ #include <qmediaserviceprovider.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractVideoSurface; class QVideoWidget; class QGraphicsVideoItem; @@ -228,4 +233,6 @@ Q_MEDIA_ENUM_DEBUG(QCamera, LockType) Q_MEDIA_ENUM_DEBUG(QCamera, LockStatus) Q_MEDIA_ENUM_DEBUG(QCamera, LockChangeReason) +QT_END_HEADER + #endif // QCAMERA_H diff --git a/src/multimediakit/qcameracapturebufferformatcontrol.h b/src/multimediakit/qcameracapturebufferformatcontrol.h index cf296e60e..81079a77d 100644 --- a/src/multimediakit/qcameracapturebufferformatcontrol.h +++ b/src/multimediakit/qcameracapturebufferformatcontrol.h @@ -45,8 +45,13 @@ #include <qmediacontrol.h> #include <qcameraimagecapture.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraCaptureBufferFormatControl : public QMediaControl { Q_OBJECT @@ -69,5 +74,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraCaptureBufferFormatControl, QCameraCaptureBufferF QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qcameracapturedestinationcontrol.h b/src/multimediakit/qcameracapturedestinationcontrol.h index 7dcae365f..cdd769a4d 100644 --- a/src/multimediakit/qcameracapturedestinationcontrol.h +++ b/src/multimediakit/qcameracapturedestinationcontrol.h @@ -45,8 +45,13 @@ #include <qmediacontrol.h> #include <qcameraimagecapture.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraCaptureDestinationControl : public QMediaControl { Q_OBJECT @@ -69,5 +74,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraCaptureDestinationControl, QCameraCaptureDestinat QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qcameracontrol.h b/src/multimediakit/qcameracontrol.h index e64f77a64..dfc2b3743 100644 --- a/src/multimediakit/qcameracontrol.h +++ b/src/multimediakit/qcameracontrol.h @@ -47,8 +47,13 @@ #include <qcamera.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraControl : public QMediaControl { Q_OBJECT @@ -89,5 +94,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraControl, QCameraControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERACONTROL_H diff --git a/src/multimediakit/qcameraexposure.h b/src/multimediakit/qcameraexposure.h index 590f73402..088e7c036 100644 --- a/src/multimediakit/qcameraexposure.h +++ b/src/multimediakit/qcameraexposure.h @@ -45,8 +45,13 @@ #include <qmediaobject.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QCamera; class QCameraExposurePrivate; @@ -175,4 +180,6 @@ Q_MEDIA_ENUM_DEBUG(QCameraExposure, ExposureMode) Q_MEDIA_ENUM_DEBUG(QCameraExposure, FlashMode) Q_MEDIA_ENUM_DEBUG(QCameraExposure, MeteringMode) +QT_END_HEADER + #endif // QCAMERAEXPOSURE_H diff --git a/src/multimediakit/qcameraexposurecontrol.h b/src/multimediakit/qcameraexposurecontrol.h index b764a9112..ff60784bf 100644 --- a/src/multimediakit/qcameraexposurecontrol.h +++ b/src/multimediakit/qcameraexposurecontrol.h @@ -49,8 +49,13 @@ #include <qcamera.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraExposureControl : public QMediaControl { Q_OBJECT @@ -112,5 +117,8 @@ Q_MEDIA_ENUM_DEBUG(QCameraExposureControl, ExposureParameter) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERAEXPOSURECONTROL_H diff --git a/src/multimediakit/qcameraflashcontrol.cpp b/src/multimediakit/qcameraflashcontrol.cpp index 1633a6481..27bf09a7c 100644 --- a/src/multimediakit/qcameraflashcontrol.cpp +++ b/src/multimediakit/qcameraflashcontrol.cpp @@ -60,8 +60,6 @@ QT_BEGIN_NAMESPACE You can retrieve this control from the camera object in the usual way: - XXX snippet for retrieving control - Some camera devices may not have flash hardware, or may not be configurable. In that case, there will be no QCameraFlashControl available. diff --git a/src/multimediakit/qcameraflashcontrol.h b/src/multimediakit/qcameraflashcontrol.h index d2b393990..89b3b9d06 100644 --- a/src/multimediakit/qcameraflashcontrol.h +++ b/src/multimediakit/qcameraflashcontrol.h @@ -48,8 +48,13 @@ #include <qcameraexposure.h> #include <qcamera.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraFlashControl : public QMediaControl { Q_OBJECT @@ -75,5 +80,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraFlashControl, QCameraFlashControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERAFLASHCONTROL_H diff --git a/src/multimediakit/qcamerafocus.h b/src/multimediakit/qcamerafocus.h index 78ca75406..064af7aa1 100644 --- a/src/multimediakit/qcamerafocus.h +++ b/src/multimediakit/qcamerafocus.h @@ -52,8 +52,13 @@ #include <qmediaobject.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QCamera; class QCameraFocusZoneData; @@ -173,4 +178,6 @@ Q_DECLARE_METATYPE(QCameraFocus::FocusPointMode) Q_MEDIA_ENUM_DEBUG(QCameraFocus, FocusMode) Q_MEDIA_ENUM_DEBUG(QCameraFocus, FocusPointMode) +QT_END_HEADER + #endif // QCAMERAFOCUS_H diff --git a/src/multimediakit/qcamerafocuscontrol.h b/src/multimediakit/qcamerafocuscontrol.h index 7962435a3..20ffe6af1 100644 --- a/src/multimediakit/qcamerafocuscontrol.h +++ b/src/multimediakit/qcamerafocuscontrol.h @@ -47,8 +47,13 @@ #include <qcamerafocus.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraFocusControl : public QMediaControl { Q_OBJECT @@ -91,5 +96,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraFocusControl, QCameraFocusControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERAFOCUSCONTROL_H diff --git a/src/multimediakit/qcameraimagecapture.h b/src/multimediakit/qcameraimagecapture.h index 0e33f37fb..f4a5a9c11 100644 --- a/src/multimediakit/qcameraimagecapture.h +++ b/src/multimediakit/qcameraimagecapture.h @@ -49,7 +49,12 @@ #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QSize; QT_END_NAMESPACE @@ -159,5 +164,7 @@ Q_DECLARE_METATYPE(QCameraImageCapture::CaptureDestinations) Q_MEDIA_ENUM_DEBUG(QCameraImageCapture, Error) Q_MEDIA_ENUM_DEBUG(QCameraImageCapture, CaptureDestination) +QT_END_HEADER + #endif diff --git a/src/multimediakit/qcameraimagecapturecontrol.h b/src/multimediakit/qcameraimagecapturecontrol.h index 6915b5dd2..b9ac599f6 100644 --- a/src/multimediakit/qcameraimagecapturecontrol.h +++ b/src/multimediakit/qcameraimagecapturecontrol.h @@ -45,7 +45,12 @@ #include <qmediacontrol.h> #include <qcameraimagecapture.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QImage; QT_END_NAMESPACE @@ -87,5 +92,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraImageCaptureControl, QCameraImageCaptureControl_i QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERAIMAGECAPTURECONTROL_H diff --git a/src/multimediakit/qcameraimageprocessing.h b/src/multimediakit/qcameraimageprocessing.h index aba38a3dc..42a7eb589 100644 --- a/src/multimediakit/qcameraimageprocessing.h +++ b/src/multimediakit/qcameraimageprocessing.h @@ -53,8 +53,13 @@ #include <qmediaservice.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QCamera; class QCameraImageProcessingPrivate; @@ -114,4 +119,6 @@ Q_DECLARE_METATYPE(QCameraImageProcessing::WhiteBalanceMode) Q_MEDIA_ENUM_DEBUG(QCameraImageProcessing, WhiteBalanceMode) +QT_END_HEADER + #endif // QCAMERAIMAGEPROCESSING_H diff --git a/src/multimediakit/qcameraimageprocessingcontrol.h b/src/multimediakit/qcameraimageprocessingcontrol.h index db77f09ac..8c739287c 100644 --- a/src/multimediakit/qcameraimageprocessingcontrol.h +++ b/src/multimediakit/qcameraimageprocessingcontrol.h @@ -48,8 +48,13 @@ #include <qcamera.h> #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraImageProcessingControl : public QMediaControl { Q_OBJECT @@ -89,5 +94,7 @@ Q_DECLARE_METATYPE(QCameraImageProcessingControl::ProcessingParameter) Q_MEDIA_ENUM_DEBUG(QCameraImageProcessingControl, ProcessingParameter) +QT_END_HEADER + #endif diff --git a/src/multimediakit/qcameralockscontrol.h b/src/multimediakit/qcameralockscontrol.h index 0d6e1a224..93120ee1a 100644 --- a/src/multimediakit/qcameralockscontrol.h +++ b/src/multimediakit/qcameralockscontrol.h @@ -47,8 +47,13 @@ #include <qcamera.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QCameraLocksControl : public QMediaControl { Q_OBJECT @@ -74,5 +79,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraLocksControl, QCameraLocksControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERALOCKSCONTROL_H diff --git a/src/multimediakit/qimageencodercontrol.h b/src/multimediakit/qimageencodercontrol.h index cebcecb33..c8a8261a4 100644 --- a/src/multimediakit/qimageencodercontrol.h +++ b/src/multimediakit/qimageencodercontrol.h @@ -48,7 +48,12 @@ #include <QtCore/qsize.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QByteArray; class QStringList; QT_END_NAMESPACE @@ -80,4 +85,7 @@ Q_MEDIA_DECLARE_CONTROL(QImageEncoderControl, QImageEncoderControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qlocalmediaplaylistprovider.h b/src/multimediakit/qlocalmediaplaylistprovider.h index 32b50cfe2..e712a3f73 100644 --- a/src/multimediakit/qlocalmediaplaylistprovider.h +++ b/src/multimediakit/qlocalmediaplaylistprovider.h @@ -44,8 +44,13 @@ #include "qmediaplaylistprovider.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QLocalMediaPlaylistProviderPrivate; class Q_MULTIMEDIA_EXPORT QLocalMediaPlaylistProvider : public QMediaPlaylistProvider { @@ -76,4 +81,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QLOCALMEDIAPAYLISTSOURCE_H diff --git a/src/multimediakit/qmediabackgroundplaybackcontrol.cpp b/src/multimediakit/qmediabackgroundplaybackcontrol.cpp new file mode 100644 index 000000000..0413fba01 --- /dev/null +++ b/src/multimediakit/qmediabackgroundplaybackcontrol.cpp @@ -0,0 +1,149 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmediabackgroundplaybackcontrol.h" +#include "qmediacontrol_p.h" + +QT_BEGIN_NAMESPACE + + +/*! + \class QMediaBackgroundPlaybackControl + \inmodule QtMultimediaKit + \ingroup multimedia + \since 5.0 + + + \brief The QMediaBackgroundPlaybackControl class provides access to the background playback + related control of a QMediaService. + + If a QMediaService can play media in background, it should implement QMediaBackgroundPlaybackControl. + This control provides a means to set the \l {setContextId()}{contextId} for application, + \l {acquire()}{acquire the resource for playback} and \l {release()} {release the playback resource}. + + The interface name of QMediaBackgroundPlaybackControl is \c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0 as + defined in QMediaBackgroundPlaybackControl_iid. + + \sa QMediaService::requestControl(), QMediaPlayer +*/ + +/*! + \macro QMediaBackgroundPlaybackControl_iid + + \c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0 + + Defines the interface name of the QMediaBackgroundPlaybackControl class. + + \relates QMediaBackgroundPlaybackControl +*/ + +/*! + Destroys a media background playback control. +*/ +QMediaBackgroundPlaybackControl::~QMediaBackgroundPlaybackControl() +{ +} + +/*! + Constructs a new media background playback control with the given \a parent. +*/ +QMediaBackgroundPlaybackControl::QMediaBackgroundPlaybackControl(QObject *parent): + QMediaControl(*new QMediaControlPrivate, parent) +{ +} + +/*! + \fn QMediaBackgroundPlaybackControl::setContextId(const QString& contextId) + + Sets the contextId for the application, the last contextId will be released if previously set. + \l {acquire()}{acquire method} will be automatically invoked after setting a new contextId. + + contextId is an unique string set by the application and is used by the background daemon to + distinguish and manage different context for different application. + + \since 1.0 +*/ + +/*! + \fn QMediaBackgroundPlaybackControl::acquire() + + Try to acquire the playback resource for current application + \since 1.0 +*/ + +/*! + \fn QMediaBackgroundPlaybackControl::release() + + Give up the playback resource if current applicaiton holds it. + \since 1.0 +*/ + +/*! + \property QMediaBackgroundPlaybackControl::isAcquired() + \brief indicate whether the background playback resource is granted or not + + It may take sometime for the backend to actually update this value before the first use. + + By default this property is false + + \since 1.0 +*/ + +/*! + \fn QMediaBackgroundPlaybackControl::acquired() + + Signals that the playback resource is acquired + + \since 1.0 +*/ + +/*! + \fn QMediaBackgroundPlaybackControl::lost() + + Signals that the playback resource is lost + + \since 1.0 +*/ + +#include "moc_qmediabackgroundplaybackcontrol.cpp" +QT_END_NAMESPACE + + diff --git a/src/multimediakit/qmediabackgroundplaybackcontrol.h b/src/multimediakit/qmediabackgroundplaybackcontrol.h new file mode 100644 index 000000000..2cf8d1935 --- /dev/null +++ b/src/multimediakit/qmediabackgroundplaybackcontrol.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMEDIABACKGROUNDPLAYBACKCONTROL_H +#define QMEDIABACKGROUNDPLAYBACKCONTROL_H + +#include "qmediacontrol.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + + +class Q_MULTIMEDIA_EXPORT QMediaBackgroundPlaybackControl : public QMediaControl +{ + Q_OBJECT + +public: + virtual ~QMediaBackgroundPlaybackControl(); + + virtual void setContextId(const QString& contextId) = 0; + virtual void acquire() = 0; + virtual void release() = 0; + + virtual bool isAcquired() const = 0; + +Q_SIGNALS: + void acquired(); + void lost(); + +protected: + QMediaBackgroundPlaybackControl(QObject* parent = 0); +}; + +#define QMediaBackgroundPlaybackControl_iid "com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0" +Q_MEDIA_DECLARE_CONTROL(QMediaBackgroundPlaybackControl, QMediaBackgroundPlaybackControl_iid) + +QT_END_NAMESPACE + +QT_END_HEADER + + +#endif // QMEDIABACKGROUNDPLAYBACKCONTROL_H diff --git a/src/multimediakit/qmediabindableinterface.h b/src/multimediakit/qmediabindableinterface.h index 68e11fa2d..02b5b1a21 100644 --- a/src/multimediakit/qmediabindableinterface.h +++ b/src/multimediakit/qmediabindableinterface.h @@ -44,8 +44,13 @@ #include <qmediaobject.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaObject; class Q_MULTIMEDIA_EXPORT QMediaBindableInterface @@ -66,4 +71,7 @@ Q_DECLARE_INTERFACE(QMediaBindableInterface, QMediaBindableInterface_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIABINDABLEINTERFACE_H diff --git a/src/multimediakit/qmediacontainercontrol.h b/src/multimediakit/qmediacontainercontrol.h index 162b9af25..af48605d0 100644 --- a/src/multimediakit/qmediacontainercontrol.h +++ b/src/multimediakit/qmediacontainercontrol.h @@ -45,8 +45,13 @@ #include "qmediacontrol.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMediaContainerControl : public QMediaControl { Q_OBJECT @@ -69,4 +74,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaContainerControl, QMediaContainerControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIACONTAINERCONTROL_H diff --git a/src/multimediakit/qmediacontent.h b/src/multimediakit/qmediacontent.h index 73e156f0d..99471f305 100644 --- a/src/multimediakit/qmediacontent.h +++ b/src/multimediakit/qmediacontent.h @@ -50,8 +50,13 @@ #include <qtmultimediakitdefs.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaContentPrivate; class Q_MULTIMEDIA_EXPORT QMediaContent { @@ -85,6 +90,6 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QMediaContent) - +QT_END_HEADER #endif // QMEDIACONTENT_H diff --git a/src/multimediakit/qmediacontrol.cpp b/src/multimediakit/qmediacontrol.cpp index b47d694c1..b7dfb3dc5 100644 --- a/src/multimediakit/qmediacontrol.cpp +++ b/src/multimediakit/qmediacontrol.cpp @@ -63,8 +63,6 @@ QT_BEGIN_NAMESPACE the core functionality of the service and a number of optional controls which expose any additional functionality. - XXX concrete example of this relationship - A pointer to a control implemented by a media service can be obtained using the \l {QMediaService::requestControl()} member of QMediaService. If the service doesn't implement a control it will instead return a null pointer. diff --git a/src/multimediakit/qmediacontrol.h b/src/multimediakit/qmediacontrol.h index 171e95bae..47cc13524 100644 --- a/src/multimediakit/qmediacontrol.h +++ b/src/multimediakit/qmediacontrol.h @@ -49,8 +49,13 @@ #include <QtCore/qvariant.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaControlPrivate; class Q_MULTIMEDIA_EXPORT QMediaControl : public QObject { @@ -76,4 +81,7 @@ template <typename T> const char *qmediacontrol_iid() { return 0; } QT_END_NAMESPACE +QT_END_HEADER + + #endif // QABSTRACTMEDIACONTROL_H diff --git a/src/multimediakit/qmediacontrol_p.h b/src/multimediakit/qmediacontrol_p.h index baf5b8e5c..cde6cc688 100644 --- a/src/multimediakit/qmediacontrol_p.h +++ b/src/multimediakit/qmediacontrol_p.h @@ -55,8 +55,13 @@ #include <qtmultimediakitdefs.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaControl; class QMediaControlPrivate @@ -69,4 +74,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaencodersettings.h b/src/multimediakit/qmediaencodersettings.h index a37d11202..14edc08f3 100644 --- a/src/multimediakit/qmediaencodersettings.h +++ b/src/multimediakit/qmediaencodersettings.h @@ -48,8 +48,13 @@ #include <qtmultimediakitdefs.h> #include "qtmedianamespace.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioEncoderSettingsPrivate; class Q_MULTIMEDIA_EXPORT QAudioEncoderSettings @@ -157,4 +162,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaimageviewer.cpp b/src/multimediakit/qmediaimageviewer.cpp index 1a5e659f1..cac508f8d 100644 --- a/src/multimediakit/qmediaimageviewer.cpp +++ b/src/multimediakit/qmediaimageviewer.cpp @@ -44,12 +44,10 @@ #include "qmediaobject_p.h" #include "qmediaimageviewerservice_p.h" -#include <qgraphicsvideoitem.h> #include <qmediaplaylist.h> #include <qmediaplaylistsourcecontrol.h> #include <qmediacontent.h> #include <qmediaresource.h> -#include <qvideowidget.h> #include <qvideosurfaceoutput_p.h> #include <QtCore/qcoreevent.h> @@ -411,7 +409,10 @@ void QMediaImageViewer::setVideoOutput(QVideoWidget *widget) if (d->videoOutput) unbind(d->videoOutput); - d->videoOutput = bind(widget) ? widget : 0; + // We don't know (in this library) that QVideoWidget inherits QObject + QObject *widgetObject = reinterpret_cast<QObject*>(widget); + + d->videoOutput = widgetObject && bind(widgetObject) ? widgetObject : 0; } /*! @@ -428,7 +429,11 @@ void QMediaImageViewer::setVideoOutput(QGraphicsVideoItem *item) if (d->videoOutput) unbind(d->videoOutput); - d->videoOutput = bind(item) ? item : 0; + // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject + // but QObject inheritance depends on QObject coming first, so try this out. + QObject *itemObject = reinterpret_cast<QObject*>(item); + + d->videoOutput = itemObject && bind(itemObject) ? itemObject : 0; } /*! diff --git a/src/multimediakit/qmediaimageviewer.h b/src/multimediakit/qmediaimageviewer.h index 8c6116851..7010fad3f 100644 --- a/src/multimediakit/qmediaimageviewer.h +++ b/src/multimediakit/qmediaimageviewer.h @@ -46,8 +46,13 @@ #include "qmediacontent.h" #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractVideoSurface; class QGraphicsVideoItem; class QMediaPlaylist; @@ -132,4 +137,6 @@ Q_DECLARE_METATYPE(QMediaImageViewer::MediaStatus) Q_MEDIA_ENUM_DEBUG(QMediaImageViewer, State) Q_MEDIA_ENUM_DEBUG(QMediaImageViewer, MediaStatus) +QT_END_HEADER + #endif diff --git a/src/multimediakit/qmediaimageviewerservice.cpp b/src/multimediakit/qmediaimageviewerservice.cpp index 869872c54..65de7a81b 100644 --- a/src/multimediakit/qmediaimageviewerservice.cpp +++ b/src/multimediakit/qmediaimageviewerservice.cpp @@ -48,13 +48,11 @@ #include <qmediaresource.h> #include <qmediaobject_p.h> #include <qvideorenderercontrol.h> -#include <qvideowidgetcontrol.h> #include <QtCore/qdebug.h> #include <QtCore/qurl.h> #include <QtGui/qimagereader.h> -#include <QtGui/qpainter.h> #include <QtNetwork/qnetworkaccessmanager.h> #include <QtNetwork/qnetworkreply.h> diff --git a/src/multimediakit/qmediaimageviewerservice_p.h b/src/multimediakit/qmediaimageviewerservice_p.h index 55d36c8cb..e40cdc5f4 100644 --- a/src/multimediakit/qmediaimageviewerservice_p.h +++ b/src/multimediakit/qmediaimageviewerservice_p.h @@ -57,13 +57,16 @@ #include <qmediaservice.h> #include <qmediaimageviewer.h> #include <qvideorenderercontrol.h> -#include <qvideowidget.h> -#include <qvideowidgetcontrol.h> #include <QtCore/qpointer.h> #include <QtGui/qimage.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QAbstractVideoSurface; class QNetworkAccessManager; QT_END_NAMESPACE @@ -138,4 +141,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmedianetworkaccesscontrol.h b/src/multimediakit/qmedianetworkaccesscontrol.h index f16edfb8e..22ee95711 100644 --- a/src/multimediakit/qmedianetworkaccesscontrol.h +++ b/src/multimediakit/qmedianetworkaccesscontrol.h @@ -48,8 +48,13 @@ #include <QtCore/qlist.h> #include <QtNetwork/qnetworkconfiguration.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMediaNetworkAccessControl : public QMediaControl { Q_OBJECT @@ -72,4 +77,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaNetworkAccessControl, QMediaNetworkAccessControl_i QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaobject.cpp b/src/multimediakit/qmediaobject.cpp index 3276a2b44..2f6840e04 100644 --- a/src/multimediakit/qmediaobject.cpp +++ b/src/multimediakit/qmediaobject.cpp @@ -74,8 +74,6 @@ void QMediaObjectPrivate::_q_notify() \ingroup multimedia \since 1.0 - XXX why do I care - QMediaObject derived classes provide access to the functionality of a QMediaService. Each media object hosts a QMediaService and uses the QMediaControl interfaces implemented by the service to implement its @@ -156,8 +154,6 @@ void QMediaObject::setNotifyInterval(int milliSeconds) that wrap this functionality, so this function rarely needs to be called directly. - XXX for example - The object passed must implement the QMediaBindableInterface interface. \since 1.0 diff --git a/src/multimediakit/qmediaobject.h b/src/multimediakit/qmediaobject.h index 081764f1e..0fcf4cdee 100644 --- a/src/multimediakit/qmediaobject.h +++ b/src/multimediakit/qmediaobject.h @@ -48,8 +48,13 @@ #include <qtmultimediakitdefs.h> #include "qtmedianamespace.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaService; class QMediaBindableInterface; @@ -107,4 +112,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QABSTRACTMEDIAOBJECT_H diff --git a/src/multimediakit/qmediaobject_p.h b/src/multimediakit/qmediaobject_p.h index 53225d6c0..f27420cf0 100644 --- a/src/multimediakit/qmediaobject_p.h +++ b/src/multimediakit/qmediaobject_p.h @@ -59,8 +59,13 @@ #include "qmediaobject.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMetaDataReaderControl; #define Q_DECLARE_NON_CONST_PUBLIC(Class) \ @@ -88,4 +93,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaplayer.cpp b/src/multimediakit/qmediaplayer.cpp index 75e414f6d..4e87e9c42 100644 --- a/src/multimediakit/qmediaplayer.cpp +++ b/src/multimediakit/qmediaplayer.cpp @@ -55,9 +55,7 @@ #include <qmediaplaylist.h> #include <qmediaplaylistcontrol.h> #include <qmediaplaylistsourcecontrol.h> -#include <qvideowidget.h> #include <qvideosurfaceoutput_p.h> -#include <qgraphicsvideoitem.h> #include <qmedianetworkaccesscontrol.h> QT_BEGIN_NAMESPACE @@ -748,7 +746,10 @@ void QMediaPlayer::setVideoOutput(QVideoWidget *output) if (d->videoOutput) unbind(d->videoOutput); - d->videoOutput = output && bind(output) ? output : 0; + // We don't know (in this library) that QVideoWidget inherits QObject + QObject *outputObject = reinterpret_cast<QObject*>(output); + + d->videoOutput = outputObject && bind(outputObject) ? outputObject : 0; } /*! @@ -767,7 +768,11 @@ void QMediaPlayer::setVideoOutput(QGraphicsVideoItem *output) if (d->videoOutput) unbind(d->videoOutput); - d->videoOutput = output && bind(output) ? output : 0; + // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject + // but QObject inheritance depends on QObject coming first, so try this out. + QObject *outputObject = reinterpret_cast<QObject*>(output); + + d->videoOutput = outputObject && bind(outputObject) ? outputObject : 0; } /*! diff --git a/src/multimediakit/qmediaplayer.h b/src/multimediakit/qmediaplayer.h index 8361c3efa..af096147f 100644 --- a/src/multimediakit/qmediaplayer.h +++ b/src/multimediakit/qmediaplayer.h @@ -52,8 +52,13 @@ QT_BEGIN_HEADER +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractVideoSurface; class QMediaPlaylist; class QVideoWidget; diff --git a/src/multimediakit/qmediaplayercontrol.h b/src/multimediakit/qmediaplayercontrol.h index c83099d8c..a6e02ee9a 100644 --- a/src/multimediakit/qmediaplayercontrol.h +++ b/src/multimediakit/qmediaplayercontrol.h @@ -48,8 +48,13 @@ #include <QtCore/qpair.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylist; class Q_MULTIMEDIA_EXPORT QMediaPlayerControl : public QMediaControl @@ -119,5 +124,8 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYERCONTROL_H diff --git a/src/multimediakit/qmediaplaylist.h b/src/multimediakit/qmediaplaylist.h index ea48c3deb..7b4b62260 100644 --- a/src/multimediakit/qmediaplaylist.h +++ b/src/multimediakit/qmediaplaylist.h @@ -50,8 +50,13 @@ #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylistProvider; class QMediaPlaylistPrivate; @@ -144,4 +149,6 @@ Q_DECLARE_METATYPE(QMediaPlaylist::Error) Q_MEDIA_ENUM_DEBUG(QMediaPlaylist, PlaybackMode) Q_MEDIA_ENUM_DEBUG(QMediaPlaylist, Error) +QT_END_HEADER + #endif // QMEDIAPLAYLIST_H diff --git a/src/multimediakit/qmediaplaylist_p.h b/src/multimediakit/qmediaplaylist_p.h index 12a257f04..c04483c02 100644 --- a/src/multimediakit/qmediaplaylist_p.h +++ b/src/multimediakit/qmediaplaylist_p.h @@ -66,8 +66,13 @@ # pragma Q_MOC_EXPAND_MACROS #endif +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylistControl; class QMediaPlaylistProvider; class QMediaPlaylistReader; @@ -166,4 +171,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLIST_P_H diff --git a/src/multimediakit/qmediaplaylistcontrol.h b/src/multimediakit/qmediaplaylistcontrol.h index 5a65fef59..2cce448fa 100644 --- a/src/multimediakit/qmediaplaylistcontrol.h +++ b/src/multimediakit/qmediaplaylistcontrol.h @@ -47,8 +47,13 @@ #include "qmediaplaylistnavigator.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylistProvider; class Q_MULTIMEDIA_EXPORT QMediaPlaylistControl : public QMediaControl @@ -87,4 +92,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistControl, QMediaPlaylistControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTCONTROL_H diff --git a/src/multimediakit/qmediaplaylistioplugin.h b/src/multimediakit/qmediaplaylistioplugin.h index 2d792df16..4234fb8ea 100644 --- a/src/multimediakit/qmediaplaylistioplugin.h +++ b/src/multimediakit/qmediaplaylistioplugin.h @@ -50,7 +50,12 @@ #include "qmediacontent.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QString; class QUrl; class QByteArray; @@ -115,4 +120,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTIOPLUGIN_H diff --git a/src/multimediakit/qmediaplaylistnavigator.h b/src/multimediakit/qmediaplaylistnavigator.h index 4f2e15dbf..72e452072 100644 --- a/src/multimediakit/qmediaplaylistnavigator.h +++ b/src/multimediakit/qmediaplaylistnavigator.h @@ -46,8 +46,13 @@ #include "qmediaplaylist.h" #include <QtCore/qobject.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylistNavigatorPrivate; class Q_MULTIMEDIA_EXPORT QMediaPlaylistNavigator : public QObject { @@ -104,4 +109,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTNAVIGATOR_H diff --git a/src/multimediakit/qmediaplaylistprovider.h b/src/multimediakit/qmediaplaylistprovider.h index 07723810c..79167e8ba 100644 --- a/src/multimediakit/qmediaplaylistprovider.h +++ b/src/multimediakit/qmediaplaylistprovider.h @@ -47,7 +47,12 @@ #include "qmediacontent.h" #include "qmediaplaylist.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QString; QT_END_NAMESPACE @@ -104,4 +109,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTPROVIDER_H diff --git a/src/multimediakit/qmediaplaylistprovider_p.h b/src/multimediakit/qmediaplaylistprovider_p.h index 1ca28f9e9..71fb86f20 100644 --- a/src/multimediakit/qmediaplaylistprovider_p.h +++ b/src/multimediakit/qmediaplaylistprovider_p.h @@ -55,8 +55,13 @@ #include "qmediaplaylist.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylistProviderPrivate { public: @@ -68,5 +73,8 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTSOURCE_P_H diff --git a/src/multimediakit/qmediaplaylistsourcecontrol.h b/src/multimediakit/qmediaplaylistsourcecontrol.h index e55287fbc..040bb6431 100644 --- a/src/multimediakit/qmediaplaylistsourcecontrol.h +++ b/src/multimediakit/qmediaplaylistsourcecontrol.h @@ -45,8 +45,13 @@ #include <qmediacontrol.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaPlaylist; class Q_MULTIMEDIA_EXPORT QMediaPlaylistSourceControl : public QMediaControl @@ -71,4 +76,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistSourceControl, QMediaPlaylistSourceControl QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLAYLISTCONTROL_H diff --git a/src/multimediakit/qmediapluginloader_p.h b/src/multimediakit/qmediapluginloader_p.h index 0c4ad767b..2f0a4d939 100644 --- a/src/multimediakit/qmediapluginloader_p.h +++ b/src/multimediakit/qmediapluginloader_p.h @@ -60,8 +60,13 @@ #include <QtCore/qmap.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaServiceProviderPlugin; class Q_AUTOTEST_EXPORT QMediaPluginLoader @@ -88,4 +93,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIAPLUGINLOADER_H diff --git a/src/multimediakit/qmediarecorder.h b/src/multimediakit/qmediarecorder.h index 53e829526..1e99b95c6 100644 --- a/src/multimediakit/qmediarecorder.h +++ b/src/multimediakit/qmediarecorder.h @@ -50,7 +50,12 @@ #include <QtCore/qpair.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QUrl; class QSize; class QAudioFormat; @@ -187,4 +192,6 @@ Q_DECLARE_METATYPE(QMediaRecorder::Error) Q_MEDIA_ENUM_DEBUG(QMediaRecorder, State) Q_MEDIA_ENUM_DEBUG(QMediaRecorder, Error) +QT_END_HEADER + #endif // QMEDIARECORDER_H diff --git a/src/multimediakit/qmediarecordercontrol.h b/src/multimediakit/qmediarecordercontrol.h index f7ef516b9..26f244c08 100644 --- a/src/multimediakit/qmediarecordercontrol.h +++ b/src/multimediakit/qmediarecordercontrol.h @@ -45,7 +45,12 @@ #include "qmediacontrol.h" #include "qmediarecorder.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QUrl; QT_END_NAMESPACE @@ -90,4 +95,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaRecorderControl, QMediaRecorderControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaresource.h b/src/multimediakit/qmediaresource.h index 6b2738181..02469e04c 100644 --- a/src/multimediakit/qmediaresource.h +++ b/src/multimediakit/qmediaresource.h @@ -48,8 +48,13 @@ #include <qtmultimediakitdefs.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMediaResource { public: @@ -124,5 +129,6 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QMediaResource) Q_DECLARE_METATYPE(QMediaResourceList) +QT_END_HEADER #endif diff --git a/src/multimediakit/qmediaservice.h b/src/multimediakit/qmediaservice.h index 77e1615ae..7bf90ba4f 100644 --- a/src/multimediakit/qmediaservice.h +++ b/src/multimediakit/qmediaservice.h @@ -48,8 +48,13 @@ #include "qmediacontrol.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaServicePrivate; class Q_MULTIMEDIA_EXPORT QMediaService : public QObject { @@ -85,5 +90,8 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QABSTRACTMEDIASERVICE_H diff --git a/src/multimediakit/qmediaservice_p.h b/src/multimediakit/qmediaservice_p.h index a0f0b6b7f..83fd7287f 100644 --- a/src/multimediakit/qmediaservice_p.h +++ b/src/multimediakit/qmediaservice_p.h @@ -53,8 +53,13 @@ // We mean it. // +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAudioDeviceControl; class QMediaServicePrivate @@ -68,5 +73,8 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qmediaserviceprovider.cpp b/src/multimediakit/qmediaserviceprovider.cpp index dab7fe00d..e9ac801c0 100644 --- a/src/multimediakit/qmediaserviceprovider.cpp +++ b/src/multimediakit/qmediaserviceprovider.cpp @@ -110,6 +110,9 @@ public: \value VideoSurface The service is capable of renderering to a QAbstractVideoSurface output. + + \value BackgroundPlayback + The service is capable of doing playback in the background */ /*! @@ -289,7 +292,7 @@ class QPluginServiceProvider : public QMediaServiceProvider public: QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint) { - QString key(type); + QString key(QLatin1String(type.constData())); QList<QMediaServiceProviderPlugin *>plugins; foreach (QObject *obj, loader()->instances(key)) { @@ -404,7 +407,7 @@ public: const QStringList& codecs, int flags) const { - QList<QObject*> instances = loader()->instances(serviceType); + QList<QObject*> instances = loader()->instances(QLatin1String(serviceType)); if (instances.isEmpty()) return QtMultimediaKit::NotSupported; @@ -456,7 +459,7 @@ public: QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const { - QList<QObject*> instances = loader()->instances(serviceType); + QList<QObject*> instances = loader()->instances(QLatin1String(serviceType)); QStringList supportedTypes; @@ -505,7 +508,7 @@ public: { QList<QByteArray> res; - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj); @@ -519,7 +522,7 @@ public: QString deviceDescription(const QByteArray &serviceType, const QByteArray &device) { - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj); diff --git a/src/multimediakit/qmediaserviceprovider.h b/src/multimediakit/qmediaserviceprovider.h index d9a789bf4..6305796b0 100644 --- a/src/multimediakit/qmediaserviceprovider.h +++ b/src/multimediakit/qmediaserviceprovider.h @@ -47,8 +47,13 @@ #include <qtmultimediakitdefs.h> #include "qtmedianamespace.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaService; class QMediaServiceProviderHintPrivate; @@ -61,7 +66,8 @@ public: LowLatencyPlayback = 0x01, RecordingSupport = 0x02, StreamPlayback = 0x04, - VideoSurface = 0x08 + VideoSurface = 0x08, + BackgroundPlayback = 0x10, }; Q_DECLARE_FLAGS(Features, Feature) @@ -167,4 +173,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIASERVICEPROVIDER_H diff --git a/src/multimediakit/qmediaserviceproviderplugin.h b/src/multimediakit/qmediaserviceproviderplugin.h index 6cf45fda4..5d150a22b 100644 --- a/src/multimediakit/qmediaserviceproviderplugin.h +++ b/src/multimediakit/qmediaserviceproviderplugin.h @@ -52,8 +52,13 @@ # pragma Q_MOC_EXPAND_MACROS #endif +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaService; struct Q_MULTIMEDIA_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface @@ -117,5 +122,8 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIASERVICEPROVIDERPLUGIN_H diff --git a/src/multimediakit/qmediastreamscontrol.h b/src/multimediakit/qmediastreamscontrol.h index dd5468ee2..10c38e130 100644 --- a/src/multimediakit/qmediastreamscontrol.h +++ b/src/multimediakit/qmediastreamscontrol.h @@ -48,8 +48,13 @@ #include "qtmultimediakitdefs.h" #include <qmediaenumdebug.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMediaStreamsControl : public QMediaControl { Q_OBJECT @@ -84,5 +89,7 @@ Q_DECLARE_METATYPE(QMediaStreamsControl::StreamType) Q_MEDIA_ENUM_DEBUG(QMediaStreamsControl, StreamType) +QT_END_HEADER + #endif // QMEDIASTREAMSCONTROL_H diff --git a/src/multimediakit/qmediatimerange.h b/src/multimediakit/qmediatimerange.h index 15ef12691..927801f34 100644 --- a/src/multimediakit/qmediatimerange.h +++ b/src/multimediakit/qmediatimerange.h @@ -46,8 +46,13 @@ #include "qtmedianamespace.h" #include <QtCore/qshareddata.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaTimeRangePrivate; class Q_MULTIMEDIA_EXPORT QMediaTimeInterval @@ -129,4 +134,7 @@ Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QMediaTimeRange &); QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMEDIATIMERANGE_H diff --git a/src/multimediakit/qmetadatareadercontrol.h b/src/multimediakit/qmetadatareadercontrol.h index cb0ed7387..4689e30bc 100644 --- a/src/multimediakit/qmetadatareadercontrol.h +++ b/src/multimediakit/qmetadatareadercontrol.h @@ -50,8 +50,13 @@ #include <qtmultimediakitdefs.h> #include "qtmedianamespace.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMetaDataReaderControl : public QMediaControl { @@ -81,4 +86,7 @@ Q_MEDIA_DECLARE_CONTROL(QMetaDataReaderControl, QMetaDataReaderControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QMETADATAPROVIDER_H diff --git a/src/multimediakit/qmetadatawritercontrol.h b/src/multimediakit/qmetadatawritercontrol.h index 417e91abb..41a2fbba7 100644 --- a/src/multimediakit/qmetadatawritercontrol.h +++ b/src/multimediakit/qmetadatawritercontrol.h @@ -50,8 +50,13 @@ #include <qtmultimediakitdefs.h> #include "qtmedianamespace.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QMetaDataWriterControl : public QMediaControl { @@ -86,4 +91,7 @@ Q_MEDIA_DECLARE_CONTROL(QMetaDataWriterControl, QMetaDataWriterControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qradiotuner.h b/src/multimediakit/qradiotuner.h index e88f8488d..c0f94125f 100644 --- a/src/multimediakit/qradiotuner.h +++ b/src/multimediakit/qradiotuner.h @@ -50,8 +50,13 @@ #include <QPair> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QRadioTunerPrivate; class Q_MULTIMEDIA_EXPORT QRadioTuner : public QMediaObject { @@ -148,4 +153,6 @@ Q_MEDIA_ENUM_DEBUG(QRadioTuner, Band) Q_MEDIA_ENUM_DEBUG(QRadioTuner, Error) Q_MEDIA_ENUM_DEBUG(QRadioTuner, StereoMode) +QT_END_HEADER + #endif // QRADIOPLAYER_H diff --git a/src/multimediakit/qradiotunercontrol.h b/src/multimediakit/qradiotunercontrol.h index 6f9471700..ae6990ddc 100644 --- a/src/multimediakit/qradiotunercontrol.h +++ b/src/multimediakit/qradiotunercontrol.h @@ -45,8 +45,13 @@ #include "qmediacontrol.h" #include "qradiotuner.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QRadioTunerControl : public QMediaControl { Q_OBJECT @@ -97,7 +102,7 @@ Q_SIGNALS: void bandChanged(QRadioTuner::Band band); void frequencyChanged(int frequency); void stereoStatusChanged(bool stereo); - void searchingChanged(bool stereo); + void searchingChanged(bool searching); void signalStrengthChanged(int signalStrength); void volumeChanged(int volume); void mutedChanged(bool muted); @@ -112,4 +117,7 @@ Q_MEDIA_DECLARE_CONTROL(QRadioTunerControl, QRadioTunerControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QRADIOTUNERCONTROL_H diff --git a/src/multimediakit/qtmedianamespace.h b/src/multimediakit/qtmedianamespace.h index 9e71617e2..cadbc28d9 100644 --- a/src/multimediakit/qtmedianamespace.h +++ b/src/multimediakit/qtmedianamespace.h @@ -47,8 +47,13 @@ #include <qtmultimediakitdefs.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + namespace QtMultimediaKit { enum MetaData @@ -187,4 +192,7 @@ namespace QtMultimediaKit QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qtmultimediakitdefs.h b/src/multimediakit/qtmultimediakitdefs.h index d6ac059db..5ddc3e91c 100644 --- a/src/multimediakit/qtmultimediakitdefs.h +++ b/src/multimediakit/qtmultimediakitdefs.h @@ -73,7 +73,7 @@ # endif #endif -#if !defined(Q_SERVICEFW_EXPORT) +#if !defined(Q_MULTIMEDIA_EXPORT) # if defined(QT_SHARED) # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT # else diff --git a/src/multimediakit/qvideodevicecontrol.h b/src/multimediakit/qvideodevicecontrol.h index 260c15868..6f44c4671 100644 --- a/src/multimediakit/qvideodevicecontrol.h +++ b/src/multimediakit/qvideodevicecontrol.h @@ -44,8 +44,12 @@ #include "qmediacontrol.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl { Q_OBJECT @@ -77,7 +81,8 @@ protected: #define QVideoDeviceControl_iid "com.nokia.Qt.QVideoDeviceControl/1.0" Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid) - QT_END_NAMESPACE +QT_END_HEADER + #endif // QVIDEODEVICECONTROL_H diff --git a/src/multimediakit/qvideoencodercontrol.h b/src/multimediakit/qvideoencodercontrol.h index bf37a8364..343af8039 100644 --- a/src/multimediakit/qvideoencodercontrol.h +++ b/src/multimediakit/qvideoencodercontrol.h @@ -48,7 +48,12 @@ #include <QtCore/qpair.h> #include <QtCore/qsize.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QByteArray; class QStringList; QT_END_NAMESPACE @@ -87,4 +92,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoEncoderControl, QVideoEncoderControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qvideorenderercontrol.h b/src/multimediakit/qvideorenderercontrol.h index 70bc64f69..b3a70837c 100644 --- a/src/multimediakit/qvideorenderercontrol.h +++ b/src/multimediakit/qvideorenderercontrol.h @@ -44,7 +44,12 @@ #include "qmediacontrol.h" +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QAbstractVideoSurface; QT_END_NAMESPACE @@ -70,4 +75,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif // QVIDEORENDERERCONTROL_H diff --git a/src/multimediakit/qvideosurfaceoutput_p.h b/src/multimediakit/qvideosurfaceoutput_p.h index d74f73082..76ec5e84d 100644 --- a/src/multimediakit/qvideosurfaceoutput_p.h +++ b/src/multimediakit/qvideosurfaceoutput_p.h @@ -46,8 +46,13 @@ #include <QtCore/qsharedpointer.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractVideoSurface; class QVideoRendererControl; @@ -75,4 +80,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/video/qabstractvideobuffer.cpp b/src/multimediakit/video/qabstractvideobuffer.cpp index 8704e40fc..88c00f6a5 100644 --- a/src/multimediakit/video/qabstractvideobuffer.cpp +++ b/src/multimediakit/video/qabstractvideobuffer.cpp @@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE video data. Creating a subclass of QAbstractVideoBuffer will allow you to construct video frames from preallocated or static buffers. - XXX where do these come from? - The contents of a buffer can be accessed by mapping the buffer to memory using the map() function which returns a pointer to memory containing the contents of the the video buffer. The memory returned by map() is released by calling the unmap() function. @@ -64,8 +62,6 @@ QT_BEGIN_NAMESPACE The handle() of a buffer may also be used to manipulate its contents using type specific APIs. The type of a buffer's handle is given by the handleType() function. - XXX example of handle stuff (opengl etc) - \sa QVideoFrame */ @@ -194,8 +190,6 @@ QAbstractVideoBuffer::HandleType QAbstractVideoBuffer::handleType() const The type of the handle is given by handleType() function. - XXX put a table here too - \since 1.0 \sa handleType() */ diff --git a/src/multimediakit/video/qabstractvideobuffer.h b/src/multimediakit/video/qabstractvideobuffer.h index 25e63825a..5662ee140 100644 --- a/src/multimediakit/video/qabstractvideobuffer.h +++ b/src/multimediakit/video/qabstractvideobuffer.h @@ -52,6 +52,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QVariant; class QAbstractVideoBufferPrivate; diff --git a/src/multimediakit/video/qabstractvideobuffer_p.h b/src/multimediakit/video/qabstractvideobuffer_p.h index 2d2107e8a..80c37222b 100644 --- a/src/multimediakit/video/qabstractvideobuffer_p.h +++ b/src/multimediakit/video/qabstractvideobuffer_p.h @@ -60,8 +60,13 @@ #include <qtmedianamespace.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QAbstractVideoBufferPrivate { public: @@ -77,4 +82,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/video/qabstractvideosurface.cpp b/src/multimediakit/video/qabstractvideosurface.cpp index 13c2b25de..62a8acf57 100644 --- a/src/multimediakit/video/qabstractvideosurface.cpp +++ b/src/multimediakit/video/qabstractvideosurface.cpp @@ -61,8 +61,6 @@ Q_DECLARE_METATYPE(QAbstractVideoSurface::Error) A video surface presents a continuous stream of identically formatted frames, where the format of each frame is compatible with a stream format supplied when starting a presentation. - XXX Why do I carE? - The QAbstractVideoSurface class defines the standard interface that video producers use to inter-operate with video presentation surfaces. It is not supposed to be instantiated directly. Instead, you should subclass it to create new video surfaces. @@ -78,8 +76,6 @@ Q_DECLARE_METATYPE(QAbstractVideoSurface::Error) hold a reference to the buffer of a presented video frame until a new frame is presented or streaming is stopped. The stop() function will disable a surface and a release any video buffers it holds references to. - - XXX Example? */ /*! diff --git a/src/multimediakit/video/qabstractvideosurface.h b/src/multimediakit/video/qabstractvideosurface.h index d473a9263..37c4d385f 100644 --- a/src/multimediakit/video/qabstractvideosurface.h +++ b/src/multimediakit/video/qabstractvideosurface.h @@ -49,6 +49,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QRectF; class QVideoSurfaceFormat; diff --git a/src/multimediakit/video/qimagevideobuffer_p.h b/src/multimediakit/video/qimagevideobuffer_p.h index 2432f5dcf..dae952ed4 100644 --- a/src/multimediakit/video/qimagevideobuffer_p.h +++ b/src/multimediakit/video/qimagevideobuffer_p.h @@ -55,8 +55,13 @@ #include <qabstractvideobuffer.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QImage; class QImageVideoBufferPrivate; @@ -76,4 +81,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/video/qmemoryvideobuffer_p.h b/src/multimediakit/video/qmemoryvideobuffer_p.h index 06d7d70cf..d5bc4e3c8 100644 --- a/src/multimediakit/video/qmemoryvideobuffer_p.h +++ b/src/multimediakit/video/qmemoryvideobuffer_p.h @@ -57,8 +57,13 @@ QT_BEGIN_HEADER +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMemoryVideoBufferPrivate; class Q_MULTIMEDIA_EXPORT QMemoryVideoBuffer : public QAbstractVideoBuffer @@ -78,4 +83,7 @@ QT_END_NAMESPACE QT_END_HEADER + +QT_END_HEADER + #endif diff --git a/src/multimediakit/video/qvideoframe.cpp b/src/multimediakit/video/qvideoframe.cpp index 9286f898f..7c6bbdb11 100644 --- a/src/multimediakit/video/qvideoframe.cpp +++ b/src/multimediakit/video/qvideoframe.cpp @@ -120,8 +120,6 @@ private: A QVideoFrame encapsulates the data of a video frame, and information about the frame. - XXX why do I care - The contents of a video frame can be mapped to memory using the map() function. While mapped, the video data can accessed using the bits() function, which returns a pointer to a buffer. The total size of this buffer is given by the mappedBytes() function, and the size of each line is given @@ -133,8 +131,6 @@ private: \note QVideoFrame is explicitly shared, any change made to video frame will also apply to any copies. - - XXX example */ /*! @@ -343,8 +339,6 @@ QVideoFrame::QVideoFrame(const QImage &image) /*! Constructs a copy of \a other. - XXX reference count - \since 1.0 */ QVideoFrame::QVideoFrame(const QVideoFrame &other) @@ -365,8 +359,6 @@ QVideoFrame &QVideoFrame::operator =(const QVideoFrame &other) /*! Destroys a video frame. - - XXX reference count */ QVideoFrame::~QVideoFrame() { @@ -397,8 +389,6 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormat() const /*! Returns the type of a video frame's handle. - XXX What about it? - \since 1.0 */ QAbstractVideoBuffer::HandleType QVideoFrame::handleType() const @@ -536,8 +526,6 @@ QAbstractVideoBuffer::MapMode QVideoFrame::mapMode() const Returns true if the buffer was mapped to memory in the given \a mode and false otherwise. - XXX examples and why do I care - \since 1.0 \sa unmap(), mapMode(), bits() */ @@ -581,8 +569,6 @@ void QVideoFrame::unmap() \note This is the bytes per line of the first plane only. The bytes per line of subsequent planes should be calculated as per the frame type. - XXX examples of these calculations - This value is only valid while the frame data is \l {map()}{mapped}. \since 1.0 @@ -643,8 +629,6 @@ int QVideoFrame::mappedBytes() const For an OpenGL texture this would be the texture ID. - XXX Perhaps a table with corresondence - \since 1.0 \sa QAbstractVideoBuffer::handle() */ @@ -674,7 +658,6 @@ void QVideoFrame::setStartTime(qint64 time) /*! Returns the presentation time when a frame should stop being displayed. - XXX example? if start=end what happens? \since 1.0 */ qint64 QVideoFrame::endTime() const diff --git a/src/multimediakit/video/qvideoframe.h b/src/multimediakit/video/qvideoframe.h index 20890b4e8..6dffaf59d 100644 --- a/src/multimediakit/video/qvideoframe.h +++ b/src/multimediakit/video/qvideoframe.h @@ -51,6 +51,8 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + class QSize; class QVariant; diff --git a/src/multimediakit/video/qvideosurfaceformat.cpp b/src/multimediakit/video/qvideosurfaceformat.cpp index da27b5f41..4d198e186 100644 --- a/src/multimediakit/video/qvideosurfaceformat.cpp +++ b/src/multimediakit/video/qvideosurfaceformat.cpp @@ -142,9 +142,6 @@ public: A video surface presents a stream of video frames. The surface's format describes the type of the frames and determines how they should be presented. - XXX Why do I care - XXX why isn't it videostreamformat then? - The core properties of a video stream required to setup a video surface are the pixel format given by pixelFormat(), and the frame dimensions given by frameSize(). diff --git a/src/multimediakit/video/qvideosurfaceformat.h b/src/multimediakit/video/qvideosurfaceformat.h index 3fed1991e..f830b80a6 100644 --- a/src/multimediakit/video/qvideosurfaceformat.h +++ b/src/multimediakit/video/qvideosurfaceformat.h @@ -53,6 +53,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QDebug; class QVideoSurfaceFormatPrivate; diff --git a/src/multimediakitwidgets/multimediakitwidgets.pro b/src/multimediakitwidgets/multimediakitwidgets.pro new file mode 100644 index 000000000..5adda10d7 --- /dev/null +++ b/src/multimediakitwidgets/multimediakitwidgets.pro @@ -0,0 +1,68 @@ +load(qt_module) + +# distinct from QtMultimediaKit +TARGET = QtMultimediaKitWidgets +QPRO_PWD = $$PWD +QT = core gui multimediakit-private + +CONFIG += module no_private_qt_headers_warning +MODULE_PRI += ../../modules/qt_multimediakitwidgets.pri + +contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) { + QT += opengl +} else { + DEFINES += QT_NO_OPENGL +} + +!static:DEFINES += QT_MAKEDLL +DEFINES += QT_BUILD_MULTIMEDIAWIDGETS_LIB + +load(qt_module_config) + +PRIVATE_HEADERS += \ + qvideowidget_p.h \ + qpaintervideosurface_p.h \ + +PUBLIC_HEADERS += \ + qtmultimediakitwidgetdefs.h \ + qtmultimediakitwidgetsversion.h \ + qcameraviewfinder.h \ + qgraphicsvideoitem.h \ + qvideowidgetcontrol.h \ + qvideowidget.h \ + qvideowindowcontrol.h + +SOURCES += \ + qcameraviewfinder.cpp \ + qpaintervideosurface.cpp \ + qvideowidgetcontrol.cpp \ + qvideowidget.cpp \ + qvideowindowcontrol.cpp \ + +mac:!qpa { +!simulator { + PRIVATE_HEADERS += qpaintervideosurface_mac_p.h + OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm +} + LIBS += -framework AppKit -framework QuartzCore -framework QTKit +} + +maemo6 { + isEqual(QT_ARCH,armv6) { + PRIVATE_HEADERS += qeglimagetexturesurface_p.h + SOURCES += qeglimagetexturesurface.cpp + + SOURCES += qgraphicsvideoitem_maemo6.cpp + + LIBS += -lX11 + } else { + SOURCES += qgraphicsvideoitem.cpp + } +} + +!maemo* { + SOURCES += qgraphicsvideoitem.cpp +} + +HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS + diff --git a/src/multimediakit/qcameraviewfinder.cpp b/src/multimediakitwidgets/qcameraviewfinder.cpp index c4df95934..42167ebb4 100644 --- a/src/multimediakit/qcameraviewfinder.cpp +++ b/src/multimediakitwidgets/qcameraviewfinder.cpp @@ -41,7 +41,7 @@ #include <QDebug> -#include <qmediaobject_p.h> +#include <private/qmediaobject_p.h> #include <qcamera.h> #include <qcameraviewfinder.h> diff --git a/src/multimediakit/qcameraviewfinder.h b/src/multimediakitwidgets/qcameraviewfinder.h index 0feee37c1..4ac39ebb9 100644 --- a/src/multimediakit/qcameraviewfinder.h +++ b/src/multimediakitwidgets/qcameraviewfinder.h @@ -55,8 +55,13 @@ #include <qmediaserviceprovider.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QCamera; class QCameraViewfinderPrivate; @@ -79,4 +84,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif // QCAMERA_H diff --git a/src/multimediakit/qeglimagetexturesurface.cpp b/src/multimediakitwidgets/qeglimagetexturesurface.cpp index 685ae031f..dfab86c90 100644 --- a/src/multimediakit/qeglimagetexturesurface.cpp +++ b/src/multimediakitwidgets/qeglimagetexturesurface.cpp @@ -46,7 +46,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> #include <QtGui/qpainter.h> -#include <QtGui/qx11info_x11.h> +#include <QtWidgets/qx11info_x11.h> #include <qvideosurfaceformat.h> diff --git a/src/multimediakit/qeglimagetexturesurface_p.h b/src/multimediakitwidgets/qeglimagetexturesurface_p.h index d8aceb74d..9e941049d 100644 --- a/src/multimediakit/qeglimagetexturesurface_p.h +++ b/src/multimediakitwidgets/qeglimagetexturesurface_p.h @@ -53,7 +53,7 @@ // We mean it. // -#include <qtmultimediakitdefs.h> +#include <qtmultimediakitwidgetdefs.h> #include <QtCore/qsize.h> #include <QtGui/qimage.h> #include <QtGui/qmatrix4x4.h> @@ -65,7 +65,12 @@ #include <qvideosurfaceformat.h> #include <qvideoframe.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QGLContext; class QGLShaderProgram; class QPainterVideoSurface; @@ -139,4 +144,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qgraphicsvideoitem.cpp b/src/multimediakitwidgets/qgraphicsvideoitem.cpp index 1f8f6db61..1f8f6db61 100644 --- a/src/multimediakit/qgraphicsvideoitem.cpp +++ b/src/multimediakitwidgets/qgraphicsvideoitem.cpp diff --git a/src/multimediakit/qgraphicsvideoitem.h b/src/multimediakitwidgets/qgraphicsvideoitem.h index 309ec4ddb..cf8913417 100644 --- a/src/multimediakit/qgraphicsvideoitem.h +++ b/src/multimediakitwidgets/qgraphicsvideoitem.h @@ -42,12 +42,17 @@ #ifndef QGRAPHICSVIDEOITEM_H #define QGRAPHICSVIDEOITEM_H -#include <QtGui/qgraphicsitem.h> +#include <QtWidgets/qgraphicsitem.h> #include <qvideowidget.h> #include <qmediabindableinterface.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QVideoSurfaceFormat; QT_END_NAMESPACE @@ -104,4 +109,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qgraphicsvideoitem_maemo6.cpp b/src/multimediakitwidgets/qgraphicsvideoitem_maemo6.cpp index e0f812ca6..387a25042 100644 --- a/src/multimediakit/qgraphicsvideoitem_maemo6.cpp +++ b/src/multimediakitwidgets/qgraphicsvideoitem_maemo6.cpp @@ -45,7 +45,7 @@ #include <QtCore/qpointer.h> #include <QtCore/qbasictimer.h> -#include <QtGui/qgraphicsscene.h> +#include <QtWidgets/qgraphicsscene.h> #include <qmediaobject.h> #include <qmediaservice.h> diff --git a/src/multimediakit/qpaintervideosurface.cpp b/src/multimediakitwidgets/qpaintervideosurface.cpp index bd82f7841..bd82f7841 100644 --- a/src/multimediakit/qpaintervideosurface.cpp +++ b/src/multimediakitwidgets/qpaintervideosurface.cpp diff --git a/src/multimediakit/qpaintervideosurface_mac.mm b/src/multimediakitwidgets/qpaintervideosurface_mac.mm index 02eabfe7d..02eabfe7d 100644 --- a/src/multimediakit/qpaintervideosurface_mac.mm +++ b/src/multimediakitwidgets/qpaintervideosurface_mac.mm diff --git a/src/multimediakit/qpaintervideosurface_mac_p.h b/src/multimediakitwidgets/qpaintervideosurface_mac_p.h index 667d4b5e3..d650d9ad7 100644 --- a/src/multimediakit/qpaintervideosurface_mac_p.h +++ b/src/multimediakitwidgets/qpaintervideosurface_mac_p.h @@ -61,6 +61,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QVideoSurfaceCoreGraphicsPainter : public QVideoSurfacePainter { public: diff --git a/src/multimediakit/qpaintervideosurface_p.h b/src/multimediakitwidgets/qpaintervideosurface_p.h index 19361ed5f..9b46e0395 100644 --- a/src/multimediakit/qpaintervideosurface_p.h +++ b/src/multimediakitwidgets/qpaintervideosurface_p.h @@ -53,7 +53,7 @@ // We mean it. // -#include <qtmultimediakitdefs.h> +#include <qtmultimediakitwidgetdefs.h> #include <QtCore/qsize.h> #include <QtGui/qimage.h> #include <QtGui/qmatrix4x4.h> @@ -61,7 +61,12 @@ #include <qabstractvideosurface.h> #include <qvideoframe.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + class QGLContext; QT_END_NAMESPACE @@ -180,4 +185,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QPainterVideoSurface::ShaderTypes) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h b/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h new file mode 100644 index 000000000..c9d3202a8 --- /dev/null +++ b/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** 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 Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QTMULTIMEDIAKITWIDGETS_P_H +#define QTMULTIMEDIAKITWIDGETS_P_H + +#include <QtCore/qglobal.h> + +#if defined(Q_OS_WIN) +# if defined(QT_NODLL) +# undef QT_MAKEDLL +# undef QT_DLL +# elif defined(QT_MAKEDLL) +# if defined(QT_DLL) +# undef QT_DLL +# endif +# if defined(QT_BUILD_MULTIMEDIA_LIB) +# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_EXPORT +# else +# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_IMPORT +# endif +# elif defined(QT_DLL) /* use a Qt DLL library */ +# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_IMPORT +# endif +#endif + +#if !defined(Q_MULTIMEDIAWIDGETS_EXPORT) +# if defined(QT_SHARED) +# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_EXPORT +# else +# define Q_MULTIMEDIAWIDGETS_EXPORT +# endif +#endif + +#endif // QMULTIMEDIAKITWIDGETS_P_H + diff --git a/src/multimediakit/qvideowidget.cpp b/src/multimediakitwidgets/qvideowidget.cpp index 6ed9209c2..6ed9209c2 100644 --- a/src/multimediakit/qvideowidget.cpp +++ b/src/multimediakitwidgets/qvideowidget.cpp diff --git a/src/multimediakit/qvideowidget.h b/src/multimediakitwidgets/qvideowidget.h index 43c603ed4..c0675c6e2 100644 --- a/src/multimediakit/qvideowidget.h +++ b/src/multimediakitwidgets/qvideowidget.h @@ -42,13 +42,18 @@ #ifndef QVIDEOWIDGET_H #define QVIDEOWIDGET_H -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> -#include <qtmultimediakitdefs.h> +#include <qtmultimediakitwidgetdefs.h> #include <qmediabindableinterface.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaObject; class QVideoWidgetPrivate; @@ -128,4 +133,7 @@ private: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qvideowidget_p.h b/src/multimediakitwidgets/qvideowidget_p.h index 4676cb6b9..ca9bc767a 100644 --- a/src/multimediakit/qvideowidget_p.h +++ b/src/multimediakitwidgets/qvideowidget_p.h @@ -53,7 +53,7 @@ // We mean it. // -#include <qtmultimediakitdefs.h> +#include <qtmultimediakitwidgetdefs.h> #include "qvideowidget.h" #ifndef QT_NO_OPENGL @@ -64,8 +64,13 @@ #include <QtCore/qpointer.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QMediaService; class QVideoWidgetControlInterface @@ -279,4 +284,7 @@ public: QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qvideowidgetcontrol.cpp b/src/multimediakitwidgets/qvideowidgetcontrol.cpp index cd29cbd8c..d85c64def 100644 --- a/src/multimediakit/qvideowidgetcontrol.cpp +++ b/src/multimediakitwidgets/qvideowidgetcontrol.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qvideowidgetcontrol.h" -#include "qmediacontrol_p.h" +#include "private/qmediacontrol_p.h" QT_BEGIN_NAMESPACE diff --git a/src/multimediakit/qvideowidgetcontrol.h b/src/multimediakitwidgets/qvideowidgetcontrol.h index d5797918d..c5ac880fa 100644 --- a/src/multimediakit/qvideowidgetcontrol.h +++ b/src/multimediakitwidgets/qvideowidgetcontrol.h @@ -45,10 +45,15 @@ #include "qvideowidget.h" #include "qmediacontrol.h" -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> + +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class QVideoWidgetControlPrivate; class Q_MULTIMEDIA_EXPORT QVideoWidgetControl : public QMediaControl @@ -94,4 +99,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoWidgetControl, QVideoWidgetControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/multimediakit/qvideowindowcontrol.cpp b/src/multimediakitwidgets/qvideowindowcontrol.cpp index 0adcfec06..0adcfec06 100644 --- a/src/multimediakit/qvideowindowcontrol.cpp +++ b/src/multimediakitwidgets/qvideowindowcontrol.cpp diff --git a/src/multimediakit/qvideowindowcontrol.h b/src/multimediakitwidgets/qvideowindowcontrol.h index c48294d85..590ce64be 100644 --- a/src/multimediakit/qvideowindowcontrol.h +++ b/src/multimediakitwidgets/qvideowindowcontrol.h @@ -45,10 +45,15 @@ #include "qmediacontrol.h" #include "qvideowidget.h" -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> + +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +QT_MODULE(Multimedia) + + class Q_MULTIMEDIA_EXPORT QVideoWindowControl : public QMediaControl { Q_OBJECT @@ -101,4 +106,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoWindowControl, QVideoWindowControl_iid) QT_END_NAMESPACE +QT_END_HEADER + + #endif diff --git a/src/plugins/directshow/camera/dscameraservice.cpp b/src/plugins/directshow/camera/dscameraservice.cpp index 01da662c0..3b42a18d1 100644 --- a/src/plugins/directshow/camera/dscameraservice.cpp +++ b/src/plugins/directshow/camera/dscameraservice.cpp @@ -41,7 +41,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> #include <QVideoWidgetControl.h> diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp index 243e8403d..11da5d357 100644 --- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp +++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp @@ -41,7 +41,7 @@ #include <QDebug> #include <QFile> -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include "dsvideodevicecontrol.h" #include "dscamerasession.h" diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.h b/src/plugins/directshow/camera/dsvideowidgetcontrol.h index 35048ab79..62eb502f4 100644 --- a/src/plugins/directshow/camera/dsvideowidgetcontrol.h +++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.h @@ -43,7 +43,7 @@ #define DSVIDEOWIDGETCONTROL_H #include <QtCore/qobject.h> -#include <QtGui> +#include <QtWidgets> #include <QtMultimedia/qvideoframe.h> #include <QtMultimedia/qabstractvideosurface.h> #include <QtMultimedia/qvideosurfaceformat.h> diff --git a/src/plugins/fakeradio/fakeradio.pro b/src/plugins/fakeradio/fakeradio.pro new file mode 100644 index 000000000..f6a495aac --- /dev/null +++ b/src/plugins/fakeradio/fakeradio.pro @@ -0,0 +1,23 @@ +load(qt_module) + +TARGET = qtmedia_fakeradio +QT += multimediakit-private +PLUGIN_TYPE = mediaservice + +load(qt_plugin) +DESTDIR = $$QT.multimediakit.plugins/$${PLUGIN_TYPE} + +HEADERS += \ + fakeradioserviceplugin.h \ + fakeradioservice.h \ + fakeradiotunercontrol.h + +SOURCES += \ + fakeradioserviceplugin.cpp \ + fakeradioservice.cpp \ + fakeradiotunercontrol.cpp + + +target.path += $$[QT_INSTALL_PLUGINS]/$${PLUGIN_TYPE} +INSTALLS += target + diff --git a/src/plugins/fakeradio/fakeradioservice.cpp b/src/plugins/fakeradio/fakeradioservice.cpp new file mode 100644 index 000000000..144e3b3c7 --- /dev/null +++ b/src/plugins/fakeradio/fakeradioservice.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/qvariant.h> +#include <QtCore/qdebug.h> +#include <QtCore/qfile.h> +#include <QtWidgets/qwidget.h> + +#include "fakeradioservice.h" +#include "fakeradiotunercontrol.h" + +FakeRadioService::FakeRadioService(QObject *parent): + QMediaService(parent) +{ + m_control = new FakeRadioTunerControl(this); +} + +FakeRadioService::~FakeRadioService() +{ +} + +QMediaControl *FakeRadioService::requestControl(const char* name) +{ + if (qstrcmp(name,QRadioTunerControl_iid) == 0) + return m_control; + + return 0; +} + + +void FakeRadioService::releaseControl(QMediaControl *) +{ +} diff --git a/src/plugins/fakeradio/fakeradioservice.h b/src/plugins/fakeradio/fakeradioservice.h new file mode 100644 index 000000000..6b55d5380 --- /dev/null +++ b/src/plugins/fakeradio/fakeradioservice.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FAKERADIOSERVICE_H +#define FAKERADIOSERVICE_H + +#include <QtCore/qobject.h> + +#include <qmediaservice.h> +QT_USE_NAMESPACE + +class FakeRadioTunerControl; + +class FakeRadioService : public QMediaService +{ + Q_OBJECT + +public: + FakeRadioService(QObject *parent = 0); + ~FakeRadioService(); + + QMediaControl *requestControl(const char* name); + void releaseControl(QMediaControl *); + +private: + FakeRadioTunerControl *m_control; +}; + +#endif // FAKERADIOSERVICE_H diff --git a/src/plugins/fakeradio/fakeradioserviceplugin.cpp b/src/plugins/fakeradio/fakeradioserviceplugin.cpp new file mode 100644 index 000000000..d4881195c --- /dev/null +++ b/src/plugins/fakeradio/fakeradioserviceplugin.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/qstring.h> +#include <QtCore/qfile.h> +#include <QtCore/qdebug.h> +#include <QtCore/qdir.h> + +#include "fakeradioserviceplugin.h" +#include "fakeradioservice.h" + +#include <qmediaserviceprovider.h> + + +QStringList FakeRadioServicePlugin::keys() const +{ + return QStringList() << + QLatin1String(Q_MEDIASERVICE_RADIO); +} + +QMediaService* FakeRadioServicePlugin::create(QString const& key) +{ + if (key == QLatin1String(Q_MEDIASERVICE_RADIO)) + return new FakeRadioService; + + return 0; +} + +void FakeRadioServicePlugin::release(QMediaService *service) +{ + delete service; +} + +QList<QByteArray> FakeRadioServicePlugin::devices(const QByteArray &service) const +{ + Q_UNUSED(service); + return QList<QByteArray>(); +} + +QString FakeRadioServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device) +{ + Q_UNUSED(service); + Q_UNUSED(device); + return QString(); +} + + +Q_EXPORT_PLUGIN2(qtmedia_fakeradio, FakeRadioServicePlugin); + diff --git a/src/plugins/fakeradio/fakeradioserviceplugin.h b/src/plugins/fakeradio/fakeradioserviceplugin.h new file mode 100644 index 000000000..50b912838 --- /dev/null +++ b/src/plugins/fakeradio/fakeradioserviceplugin.h @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef FAKERADIOSERVICEPLUGIN_H +#define FAKERADIOSERVICEPLUGIN_H + +#include <qmediaserviceproviderplugin.h> + +QT_USE_NAMESPACE + +class FakeRadioServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface +{ + Q_OBJECT + Q_INTERFACES(QMediaServiceSupportedDevicesInterface) +public: + QStringList keys() const; + QMediaService* create(QString const& key); + void release(QMediaService *service); + + QList<QByteArray> devices(const QByteArray &service) const; + QString deviceDescription(const QByteArray &service, const QByteArray &device); +}; + +#endif // FAKERADIOSERVICEPLUGIN_H diff --git a/src/plugins/fakeradio/fakeradiotunercontrol.cpp b/src/plugins/fakeradio/fakeradiotunercontrol.cpp new file mode 100644 index 000000000..4686692af --- /dev/null +++ b/src/plugins/fakeradio/fakeradiotunercontrol.cpp @@ -0,0 +1,335 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "fakeradiotunercontrol.h" +#include "fakeradioservice.h" + +#include <QtCore/qdebug.h> + +FakeRadioTunerControl::FakeRadioTunerControl(QObject *parent) + :QRadioTunerControl(parent) +{ + m_state = QRadioTuner::StoppedState; + m_freqMin = 520000; + m_freqMax = 108000000; + m_currentBand = QRadioTuner::FM; + m_currentFreq = 0; + m_stereo = true; + m_stereoMode = QRadioTuner::Auto; + m_signalStrength = 0; + m_volume = 50; + m_muted = false; + + m_searching = false; + m_forward = true; + m_searchTimer = new QTimer(this); + m_searchTimer->setSingleShot(true); + connect(m_searchTimer, SIGNAL(timeout()), this, SLOT(searchEnded())); + + QTimer::singleShot(300, this, SLOT(delayedInit())); + + qsrand(QTime::currentTime().msec()); +} + +FakeRadioTunerControl::~FakeRadioTunerControl() +{ + m_searchTimer->stop(); +} + +bool FakeRadioTunerControl::isAvailable() const +{ + return true; +} + +QtMultimediaKit::AvailabilityError FakeRadioTunerControl::availabilityError() const +{ + return QtMultimediaKit::NoError; +} + +QRadioTuner::State FakeRadioTunerControl::state() const +{ + return m_state; +} + +QRadioTuner::Band FakeRadioTunerControl::band() const +{ + return m_currentBand; +} + +bool FakeRadioTunerControl::isBandSupported(QRadioTuner::Band b) const +{ + switch (b) { + case QRadioTuner::FM: + if (m_freqMin <= 87500000 && m_freqMax >= 108000000) + return true; + break; + case QRadioTuner::LW: + if (m_freqMin <= 148500 && m_freqMax >= 283500) + return true; + case QRadioTuner::AM: + if (m_freqMin <= 520000 && m_freqMax >= 1610000) + return true; + default: + if (m_freqMin <= 1711000 && m_freqMax >= 30000000) + return true; + } + + return false; +} + +void FakeRadioTunerControl::setBand(QRadioTuner::Band b) +{ + if (isBandSupported(b)) { + m_currentBand = b; + emit bandChanged(m_currentBand); + + int f = m_currentFreq; + QPair<int, int> fRange = frequencyRange(m_currentBand); + + if (f < fRange.first) + f = fRange.first; + if (f > fRange.second) + f = fRange.second; + + if (f != m_currentFreq) { + m_currentFreq = f; + emit frequencyChanged(m_currentFreq); + } + } +} + +int FakeRadioTunerControl::frequency() const +{ + return m_currentFreq; +} + +int FakeRadioTunerControl::frequencyStep(QRadioTuner::Band b) const +{ + int step = 0; + + if (b == QRadioTuner::FM) + step = 100000; // 100kHz steps + else if (b == QRadioTuner::LW) + step = 1000; // 1kHz steps + else if (b == QRadioTuner::AM) + step = 1000; // 1kHz steps + else if (b == QRadioTuner::SW) + step = 500; // 500Hz steps + + return step; +} + +QPair<int,int> FakeRadioTunerControl::frequencyRange(QRadioTuner::Band b) const +{ + if (b == QRadioTuner::FM) + return qMakePair<int,int>(87500000,108000000); + else if (b == QRadioTuner::LW) + return qMakePair<int,int>(148500,283500); + else if (b == QRadioTuner::AM) + return qMakePair<int,int>(520000,1710000); + else if (b == QRadioTuner::SW) + return qMakePair<int,int>(1711111,30000000); + + return qMakePair<int,int>(0,0); +} + +void FakeRadioTunerControl::setFrequency(int frequency) +{ + qint64 f = frequency; + QPair<int, int> fRange = frequencyRange(m_currentBand); + + if (frequency < fRange.first) + f = fRange.first; + if (frequency > fRange.second) + f = fRange.second; + + m_currentFreq = f; + emit frequencyChanged(m_currentFreq); +} + +bool FakeRadioTunerControl::isStereo() const +{ + return m_stereo; +} + +QRadioTuner::StereoMode FakeRadioTunerControl::stereoMode() const +{ + return m_stereoMode; +} + +void FakeRadioTunerControl::setStereoMode(QRadioTuner::StereoMode mode) +{ + bool stereo = true; + + if (mode == QRadioTuner::ForceMono) + stereo = false; + else + stereo = true; + + m_stereo = stereo; + m_stereoMode = mode; + + emit stereoStatusChanged(stereo); +} + +int FakeRadioTunerControl::signalStrength() const +{ + return m_signalStrength; +} + +int FakeRadioTunerControl::volume() const +{ + return m_volume; +} + +void FakeRadioTunerControl::setVolume(int volume) +{ + int v = volume; + + if (v < 0) + v = 0; + if (100 > v) + v = 100; + + m_volume = v; +} + +bool FakeRadioTunerControl::isMuted() const +{ + return m_muted; +} + +void FakeRadioTunerControl::setMuted(bool muted) +{ + if (muted != m_muted) { + m_muted = muted; + emit mutedChanged(m_muted); + } +} + +bool FakeRadioTunerControl::isSearching() const +{ + return m_searching; +} + +void FakeRadioTunerControl::cancelSearch() +{ + m_searching = false; + m_searchTimer->stop(); + emit searchingChanged(m_searching); +} + +void FakeRadioTunerControl::searchForward() +{ + m_forward = true; + performSearch(); +} + +void FakeRadioTunerControl::searchBackward() +{ + m_forward = false; + performSearch(); +} + +void FakeRadioTunerControl::start() +{ + if (isAvailable() && m_state != QRadioTuner::ActiveState) { + m_state = QRadioTuner::ActiveState; + emit stateChanged(m_state); + } +} + +void FakeRadioTunerControl::stop() +{ + if (m_state != QRadioTuner::StoppedState) { + m_state = QRadioTuner::StoppedState; + emit stateChanged(m_state); + } +} + +QRadioTuner::Error FakeRadioTunerControl::error() const +{ + return QRadioTuner::NoError; +} + +QString FakeRadioTunerControl::errorString() const +{ + return QString(); +} + +void FakeRadioTunerControl::delayedInit() +{ + m_signalStrength = 50; + emit signalStrengthChanged(m_signalStrength); +} + +void FakeRadioTunerControl::performSearch() +{ + m_searching = true; + m_searchTimer->start(qrand() % 1000); + emit searchingChanged(m_searching); +} + +void FakeRadioTunerControl::searchEnded() +{ + int minFreq, maxFreq, newFreq; + QPair<int, int> fRange = frequencyRange(m_currentBand); + + if (m_forward) { + minFreq = m_currentFreq; + maxFreq = fRange.second; + } else { + minFreq = fRange.first; + maxFreq = m_currentFreq; + } + + if ((qreal)(maxFreq - minFreq) / (qreal)(fRange.second - fRange.first) < 0.02) { // don't want to do anything if we have less than 2% of the range to move + return; + } + + newFreq = (qrand() % (maxFreq - minFreq)) + minFreq; + newFreq -= newFreq % frequencyStep(m_currentBand); + + m_searching = false; + m_currentFreq = newFreq; + emit searchingChanged(m_searching); + emit frequencyChanged(m_currentFreq); +} diff --git a/src/plugins/fakeradio/fakeradiotunercontrol.h b/src/plugins/fakeradio/fakeradiotunercontrol.h new file mode 100644 index 000000000..a2faf2c02 --- /dev/null +++ b/src/plugins/fakeradio/fakeradiotunercontrol.h @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FAKERADIOTUNERCONTROL_H +#define FAKERADIOTUNERCONTROL_H + +#include <QtCore/qobject.h> +#include <QtCore/qtimer.h> +#include <QtCore/qdatetime.h> + +#include <qradiotunercontrol.h> + +QT_USE_NAMESPACE + +class FakeRadioService; + +class FakeRadioTunerControl : public QRadioTunerControl +{ + Q_OBJECT +public: + FakeRadioTunerControl(QObject *parent = 0); + ~FakeRadioTunerControl(); + + bool isAvailable() const; + QtMultimediaKit::AvailabilityError availabilityError() const; + + QRadioTuner::State state() const; + + QRadioTuner::Band band() const; + void setBand(QRadioTuner::Band b); + bool isBandSupported(QRadioTuner::Band b) const; + + int frequency() const; + int frequencyStep(QRadioTuner::Band b) const; + QPair<int,int> frequencyRange(QRadioTuner::Band b) const; + void setFrequency(int frequency); + + bool isStereo() const; + QRadioTuner::StereoMode stereoMode() const; + void setStereoMode(QRadioTuner::StereoMode mode); + + int signalStrength() const; + + int volume() const; + void setVolume(int volume); + + bool isMuted() const; + void setMuted(bool muted); + + bool isSearching() const; + void cancelSearch(); + + void searchForward(); + void searchBackward(); + + void start(); + void stop(); + + QRadioTuner::Error error() const; + QString errorString() const; + +private slots: + void delayedInit(); + void performSearch(); + void searchEnded(); + +private: //data + QRadioTuner::State m_state; + QRadioTuner::Band m_currentBand; + qint64 m_freqMin; + qint64 m_freqMax; + qint64 m_currentFreq; + bool m_stereo; + QRadioTuner::StereoMode m_stereoMode; + int m_signalStrength; + int m_volume; + bool m_muted; + + // searching + bool m_searching; + bool m_forward; + QTimer *m_searchTimer; +}; + +#endif // FAKERADIOTUNERCONTROL_H diff --git a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp index 149524b73..df5583d14 100644 --- a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp @@ -41,10 +41,6 @@ #include "camerabinresourcepolicy.h" -#ifdef Q_WS_MAEMO_6 -#define HAVE_RESOURCE_POLICY -#endif - //#define DEBUG_RESOURCE_POLICY #include <QtCore/qdebug.h> #include <QtCore/qset.h> diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp index 74fb40cb9..3c994b0ff 100644 --- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp @@ -114,6 +114,7 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent): m_videoRenderer = new QGstreamerVideoRenderer(this); #endif +#if defined(Q_WS_X11) && !defined(QT_NO_XVIDEO) #ifdef Q_WS_MAEMO_6 m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink"); @@ -124,6 +125,8 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent): m_videoWidgetControl = new QGstreamerVideoWidgetControl(this); +#endif + } if (!m_captureSession) { diff --git a/src/plugins/gstreamer/camerabuttonlistener_meego.cpp b/src/plugins/gstreamer/camerabuttonlistener_meego.cpp index c5cdf2ff9..5ee1daf42 100644 --- a/src/plugins/gstreamer/camerabuttonlistener_meego.cpp +++ b/src/plugins/gstreamer/camerabuttonlistener_meego.cpp @@ -41,9 +41,9 @@ #include "camerabuttonlistener_meego.h" -#include <QtGui/qapplication.h> +#include <QtWidgets/qapplication.h> #include <QtGui/qevent.h> -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> #include <QtCore/qdebug.h> CameraButtonListener::CameraButtonListener(QObject *parent) : diff --git a/src/plugins/gstreamer/gstreamer.pro b/src/plugins/gstreamer/gstreamer.pro index ef3b0ab40..550040ecf 100644 --- a/src/plugins/gstreamer/gstreamer.pro +++ b/src/plugins/gstreamer/gstreamer.pro @@ -2,7 +2,7 @@ load(qt_module) TARGET = qgstengine -QT += multimediakit-private network +QT += multimediakit-private network multimediakitwidgets-private PLUGIN_TYPE=mediaservice load(qt_plugin) @@ -27,11 +27,16 @@ PKGCONFIG += \ maemo*:PKGCONFIG +=gstreamer-plugins-bad-0.10 contains(config_test_gstreamer_appsrc, yes): PKGCONFIG += gstreamer-app-0.10 +contains(config_test_resourcepolicy, yes) { + DEFINES += HAVE_RESOURCE_POLICY + PKGCONFIG += libresourceqt1 +} + maemo6 { HEADERS += camerabuttonlistener_meego.h SOURCES += camerabuttonlistener_meego.cpp - PKGCONFIG += qmsystem2 libresourceqt1 + PKGCONFIG += qmsystem2 isEqual(QT_ARCH,armv6) { HEADERS += qgstreamergltexturerenderer.h diff --git a/src/plugins/gstreamer/gstvideoconnector.c b/src/plugins/gstreamer/gstvideoconnector.c index c3f969fa5..d5b56c7c9 100644 --- a/src/plugins/gstreamer/gstvideoconnector.c +++ b/src/plugins/gstreamer/gstvideoconnector.c @@ -131,6 +131,7 @@ static void gst_video_connector_init (GstVideoConnector *element, GstVideoConnectorClass *g_class) { + (void) g_class; element->sinkpad = gst_pad_new_from_static_template (&gst_video_connector_sink_factory, "sink"); @@ -269,6 +270,9 @@ gst_video_connector_resend_new_segment(GstElement * element, gboolean emitFailed static gboolean gst_video_connector_new_buffer_probe(GstObject *pad, GstBuffer *buffer, guint * object) { + (void) pad; + (void) buffer; + GstVideoConnector *element = GST_VIDEO_CONNECTOR (object); /* diff --git a/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp b/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp index 730427a8d..8b49cfce3 100644 --- a/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp +++ b/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp @@ -41,10 +41,6 @@ #include "playerresourcepolicy.h" -#ifdef Q_WS_MAEMO_6 -#define HAVE_RESOURCE_POLICY -#endif - //#define DEBUG_RESOURCE_POLICY #include <QtCore/qdebug.h> diff --git a/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp b/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp index ba36f560b..dc1f21ea2 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp @@ -182,6 +182,7 @@ bool QGstAppSrc::doSeek(qint64 value) gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer userdata) { + Q_UNUSED(element); QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata); if (self && self->isStreamValid()) { if (!self->stream()->isSequential()) @@ -195,6 +196,7 @@ gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer use void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata) { + Q_UNUSED(element); QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata); if (self) self->enoughData() = true; @@ -202,6 +204,7 @@ void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata) void QGstAppSrc::on_need_data(GstAppSrc *element, guint arg0, gpointer userdata) { + Q_UNUSED(element); QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata); if (self) { self->dataRequested() = true; diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp index 1cd595ef6..7c017e284 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp @@ -41,7 +41,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> #include "qgstreamerplayerservice.h" #include "qgstreamerplayercontrol.h" diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp index 9e4e8bc69..d3d582332 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp @@ -103,8 +103,8 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) m_lastPosition(0), m_duration(-1), m_durationQueries(0), - m_everPlayed(false) , m_sourceType(UnknownSrc), + m_everPlayed(false), m_isLiveSource(false) { #ifdef USE_PLAYBIN2 @@ -195,6 +195,9 @@ GstElement *QGstreamerPlayerSession::playbin() const #if defined(HAVE_GST_APPSRC) void QGstreamerPlayerSession::configureAppSrcElement(GObject* object, GObject *orig, GParamSpec *pspec, QGstreamerPlayerSession* self) { + Q_UNUSED(object); + Q_UNUSED(pspec); + if (self->appsrc()->isReady()) return; diff --git a/src/plugins/gstreamer/qgstcodecsinfo.cpp b/src/plugins/gstreamer/qgstcodecsinfo.cpp index f823281d5..34c18a18a 100644 --- a/src/plugins/gstreamer/qgstcodecsinfo.cpp +++ b/src/plugins/gstreamer/qgstcodecsinfo.cpp @@ -93,7 +93,8 @@ QGstCodecsInfo::QGstCodecsInfo(QGstCodecsInfo::ElementType elementType) gst_caps_remove_structure(caps, 0); } - +#else + Q_UNUSED(elementType); #endif // GST_CHECK_VERSION(0,10,31) } diff --git a/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp b/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp index 3605c576d..9433850bd 100644 --- a/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp +++ b/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp @@ -41,7 +41,7 @@ #include "qgstreameraudioinputendpointselector.h" -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include <QtCore/QDir> #include <QtCore/QDebug> diff --git a/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp b/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp index af68096bd..615d23d82 100644 --- a/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp +++ b/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp @@ -44,8 +44,8 @@ #include "qgstutils.h" #include <QtGui/qevent.h> -#include <QtGui/qapplication.h> -#include <QtGui/qx11info_x11.h> +#include <QtWidgets/qapplication.h> +#include <QtWidgets/qx11info_x11.h> #include <QtCore/qdebug.h> #include <QtCore/qthread.h> diff --git a/src/plugins/gstreamer/qgstreamerserviceplugin.cpp b/src/plugins/gstreamer/qgstreamerserviceplugin.cpp index c4ca9cdda..baa5bae06 100644 --- a/src/plugins/gstreamer/qgstreamerserviceplugin.cpp +++ b/src/plugins/gstreamer/qgstreamerserviceplugin.cpp @@ -41,7 +41,7 @@ #include <QtCore/qstring.h> #include <QtCore/qdebug.h> -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include <QtCore/QDir> #include <QtCore/QDebug> diff --git a/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp b/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp index d0280346a..ec9e9baf4 100644 --- a/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp +++ b/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp @@ -41,7 +41,7 @@ #include "qgstreamervideoinputdevicecontrol.h" -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include <QtCore/QDir> #include <QtCore/QDebug> diff --git a/src/plugins/gstreamer/qgstreamervideorenderer.cpp b/src/plugins/gstreamer/qgstreamervideorenderer.cpp index d32e98ddb..e924f8353 100644 --- a/src/plugins/gstreamer/qgstreamervideorenderer.cpp +++ b/src/plugins/gstreamer/qgstreamervideorenderer.cpp @@ -44,7 +44,7 @@ #include "qabstractvideosurface.h" #include <QEvent> -#include <QApplication> +#include <QtWidgets/QApplication> #include <QDebug> #include <gst/gst.h> diff --git a/src/plugins/gstreamer/qgstreamervideowidget.cpp b/src/plugins/gstreamer/qgstreamervideowidget.cpp index e1bf0037d..61c47f01b 100644 --- a/src/plugins/gstreamer/qgstreamervideowidget.cpp +++ b/src/plugins/gstreamer/qgstreamervideowidget.cpp @@ -44,7 +44,7 @@ #include <QtCore/qcoreevent.h> #include <QtCore/qdebug.h> -#include <QtGui/qapplication.h> +#include <QtWidgets/qapplication.h> #include <QtGui/qpainter.h> #ifdef Q_WS_X11 diff --git a/src/plugins/gstreamer/qgstxvimagebuffer.cpp b/src/plugins/gstreamer/qgstxvimagebuffer.cpp index 55e58e2e0..31839920b 100644 --- a/src/plugins/gstreamer/qgstxvimagebuffer.cpp +++ b/src/plugins/gstreamer/qgstxvimagebuffer.cpp @@ -42,7 +42,7 @@ #include <QtCore/qdebug.h> #include <QtCore/qthread.h> #include <QtCore/qvariant.h> -#include <QtGui/qx11info_x11.h> +#include <QtWidgets/qx11info_x11.h> #include "qgstxvimagebuffer.h" #include "qvideosurfacegstsink.h" diff --git a/src/plugins/gstreamer/qvideosurfacegstsink.cpp b/src/plugins/gstreamer/qvideosurfacegstsink.cpp index 58fabeda4..6ccc1b1c5 100644 --- a/src/plugins/gstreamer/qvideosurfacegstsink.cpp +++ b/src/plugins/gstreamer/qvideosurfacegstsink.cpp @@ -49,7 +49,7 @@ #include "qgstvideobuffer.h" #if defined(Q_WS_X11) && !defined(QT_NO_XVIDEO) -#include <QtGui/qx11info_x11.h> +#include <QtWidgets/qx11info_x11.h> #include "qgstxvimagebuffer.h" #endif diff --git a/src/plugins/gstreamer/qx11videosurface.cpp b/src/plugins/gstreamer/qx11videosurface.cpp index 035f9452d..f12be3e1b 100644 --- a/src/plugins/gstreamer/qx11videosurface.cpp +++ b/src/plugins/gstreamer/qx11videosurface.cpp @@ -41,7 +41,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> -#include <QtGui/qx11info_x11.h> +#include <QtWidgets/qx11info_x11.h> #include <qvideosurfaceformat.h> #ifndef QT_NO_XVIDEO diff --git a/src/plugins/gstreamer/qx11videosurface.h b/src/plugins/gstreamer/qx11videosurface.h index cac7a757e..ecc84e368 100644 --- a/src/plugins/gstreamer/qx11videosurface.h +++ b/src/plugins/gstreamer/qx11videosurface.h @@ -42,7 +42,7 @@ #ifndef QX11VIDEOSURFACE_H #define QX11VIDEOSURFACE_H -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> #include <qabstractvideosurface.h> #ifndef QT_NO_XVIDEO diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index bc82c60b3..15a25b3d5 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -33,7 +33,8 @@ unix:!mac { SUBDIRS += audiocapture } - !maemo*:SUBDIRS += v4l + # v4l is turned off because it is not supported in Qt 5 + # !maemo*:SUBDIRS += v4l contains(config_test_pulseaudio, yes) { SUBDIRS += pulseaudio @@ -44,3 +45,7 @@ mac:!simulator { SUBDIRS += audiocapture !qpa: SUBDIRS += qt7 } + +# fake radio to test the radio APIs +SUBDIRS += fakeradio + diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.cpp b/src/plugins/pulseaudio/qaudioinput_pulse.cpp index d528cb106..d2ee31679 100644 --- a/src/plugins/pulseaudio/qaudioinput_pulse.cpp +++ b/src/plugins/pulseaudio/qaudioinput_pulse.cpp @@ -359,7 +359,7 @@ qint64 QPulseAudioInput::read(char *data, qint64 len) emit stateChanged(m_deviceState); } - size_t readBytes = 0; + int readBytes = 0; if (!m_pullMode && !m_tempBuffer.isEmpty()) { readBytes = qMin(static_cast<int>(len), m_tempBuffer.size()); diff --git a/src/plugins/qt7/mediaplayer/qt7playercontrol.h b/src/plugins/qt7/mediaplayer/qt7playercontrol.h index 15ea20a4a..54b9f4e87 100644 --- a/src/plugins/qt7/mediaplayer/qt7playercontrol.h +++ b/src/plugins/qt7/mediaplayer/qt7playercontrol.h @@ -47,7 +47,7 @@ #include <qmediaplayercontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/qt7/mediaplayer/qt7playersession.h b/src/plugins/qt7/mediaplayer/qt7playersession.h index de49a2398..c6e01151a 100644 --- a/src/plugins/qt7/mediaplayer/qt7playersession.h +++ b/src/plugins/qt7/mediaplayer/qt7playersession.h @@ -50,7 +50,7 @@ #include <qmediaplayercontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/qt7/qt7.pro b/src/plugins/qt7/qt7.pro index a8d2b4653..5be085eb2 100644 --- a/src/plugins/qt7/qt7.pro +++ b/src/plugins/qt7/qt7.pro @@ -1,7 +1,7 @@ load(qt_module) TARGET = qqt7engine -QT += multimediakit-private network +QT += multimediakit-private multimediakitwidgets-private network PLUGIN_TYPE = mediaservice load(qt_plugin) diff --git a/src/plugins/qt7/qt7movierenderer.h b/src/plugins/qt7/qt7movierenderer.h index 0dc100da3..705515833 100644 --- a/src/plugins/qt7/qt7movierenderer.h +++ b/src/plugins/qt7/qt7movierenderer.h @@ -50,7 +50,7 @@ #include <qvideorenderercontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> #include "qt7videooutput.h" #include <QuartzCore/CVOpenGLTexture.h> diff --git a/src/plugins/qt7/qt7movievideowidget.h b/src/plugins/qt7/qt7movievideowidget.h index 8556e1866..d3e607801 100644 --- a/src/plugins/qt7/qt7movievideowidget.h +++ b/src/plugins/qt7/qt7movievideowidget.h @@ -48,7 +48,7 @@ #include <qvideowindowcontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> #include "qt7videooutput.h" #include <QuartzCore/CVOpenGLTexture.h> diff --git a/src/plugins/qt7/qt7movieviewoutput.h b/src/plugins/qt7/qt7movieviewoutput.h index dffbbddbb..d48255d34 100644 --- a/src/plugins/qt7/qt7movieviewoutput.h +++ b/src/plugins/qt7/qt7movieviewoutput.h @@ -47,7 +47,7 @@ #include <qvideowindowcontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> #include "qt7videooutput.h" diff --git a/src/plugins/qt7/qt7movieviewrenderer.h b/src/plugins/qt7/qt7movieviewrenderer.h index 65eebf7f6..6d5cef7da 100644 --- a/src/plugins/qt7/qt7movieviewrenderer.h +++ b/src/plugins/qt7/qt7movieviewrenderer.h @@ -48,7 +48,7 @@ #include <qvideowindowcontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> #include "qt7videooutput.h" #include <qvideoframe.h> diff --git a/src/plugins/qt7/qt7videooutput.h b/src/plugins/qt7/qt7videooutput.h index 34feb391b..15b93c937 100644 --- a/src/plugins/qt7/qt7videooutput.h +++ b/src/plugins/qt7/qt7videooutput.h @@ -50,7 +50,7 @@ #include <qvideorenderercontrol.h> #include <qmediaplayer.h> -#include <QtGui/qmacdefines_mac.h> +#include <QtWidgets/qmacdefines_mac.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp b/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp index 55f9c9f45..95c4e2da9 100644 --- a/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp +++ b/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp @@ -41,7 +41,7 @@ #include "simulatorvideoinputdevicecontrol.h" -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include <QtCore/QDir> #include <QtCore/QDebug> #include <QtCore/QStringList> diff --git a/src/plugins/simulator/qsimulatorserviceplugin.cpp b/src/plugins/simulator/qsimulatorserviceplugin.cpp index 2971f59f7..e0e6d1293 100644 --- a/src/plugins/simulator/qsimulatorserviceplugin.cpp +++ b/src/plugins/simulator/qsimulatorserviceplugin.cpp @@ -41,7 +41,7 @@ #include <QtCore/qstring.h> #include <QtCore/qdebug.h> -#include <QtGui/QIcon> +#include <QtWidgets/QIcon> #include <QtCore/QDir> #include <QtCore/QDebug> diff --git a/src/plugins/v4l/radio/v4lradioservice.cpp b/src/plugins/v4l/radio/v4lradioservice.cpp index 122993229..1d9ad2fcb 100644 --- a/src/plugins/v4l/radio/v4lradioservice.cpp +++ b/src/plugins/v4l/radio/v4lradioservice.cpp @@ -42,7 +42,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> #include <QtCore/qfile.h> -#include <QtGui/qwidget.h> +#include <QtWidgets/qwidget.h> #include "v4lradioservice.h" #include "v4lradiocontrol.h" diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.cpp b/src/plugins/wmf/player/evr9videowindowcontrol.cpp index 0b705b743..e653dd9c2 100644 --- a/src/plugins/wmf/player/evr9videowindowcontrol.cpp +++ b/src/plugins/wmf/player/evr9videowindowcontrol.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.h b/src/plugins/wmf/player/evr9videowindowcontrol.h index a39d75041..a4152432d 100644 --- a/src/plugins/wmf/player/evr9videowindowcontrol.h +++ b/src/plugins/wmf/player/evr9videowindowcontrol.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp index dac5a0abf..c1d8bd3b9 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp @@ -1,35 +1,35 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.h b/src/plugins/wmf/player/mfaudioendpointcontrol.h index b4aa6f797..67f77566f 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.h +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfmetadatacontrol.cpp b/src/plugins/wmf/player/mfmetadatacontrol.cpp index 21cc7032b..4d62b9091 100644 --- a/src/plugins/wmf/player/mfmetadatacontrol.cpp +++ b/src/plugins/wmf/player/mfmetadatacontrol.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfmetadatacontrol.h b/src/plugins/wmf/player/mfmetadatacontrol.h index 59eddade7..c666aaf5b 100644 --- a/src/plugins/wmf/player/mfmetadatacontrol.h +++ b/src/plugins/wmf/player/mfmetadatacontrol.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfplayercontrol.cpp b/src/plugins/wmf/player/mfplayercontrol.cpp index 3eb0764fb..cb76a037a 100644 --- a/src/plugins/wmf/player/mfplayercontrol.cpp +++ b/src/plugins/wmf/player/mfplayercontrol.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include "mfplayercontrol.h" #include <qtcore/qdebug.h> diff --git a/src/plugins/wmf/player/mfplayercontrol.h b/src/plugins/wmf/player/mfplayercontrol.h index c2399504b..0256b89c6 100644 --- a/src/plugins/wmf/player/mfplayercontrol.h +++ b/src/plugins/wmf/player/mfplayercontrol.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp index 81fdf5792..bda86a342 100644 --- a/src/plugins/wmf/player/mfplayerservice.cpp +++ b/src/plugins/wmf/player/mfplayerservice.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include "qmediacontent.h" #include <QtCore/qdebug.h> diff --git a/src/plugins/wmf/player/mfplayerservice.h b/src/plugins/wmf/player/mfplayerservice.h index 7fef10784..1e8a617b8 100644 --- a/src/plugins/wmf/player/mfplayerservice.h +++ b/src/plugins/wmf/player/mfplayerservice.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index bb5b4bd2b..42b4f60d2 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include "qmediacontent.h" #include "qmediaplayercontrol.h" diff --git a/src/plugins/wmf/player/mfplayersession.h b/src/plugins/wmf/player/mfplayersession.h index e6e46ada2..933c865f9 100644 --- a/src/plugins/wmf/player/mfplayersession.h +++ b/src/plugins/wmf/player/mfplayersession.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfstream.cpp b/src/plugins/wmf/player/mfstream.cpp index fab854e4a..be9117540 100644 --- a/src/plugins/wmf/player/mfstream.cpp +++ b/src/plugins/wmf/player/mfstream.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfstream.h b/src/plugins/wmf/player/mfstream.h index 985d42e96..226bda9bb 100644 --- a/src/plugins/wmf/player/mfstream.h +++ b/src/plugins/wmf/player/mfstream.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #ifndef MFSTREAM_H #define MFSTREAM_H @@ -146,4 +147,4 @@ protected: IMFAsyncResult *m_currentReadResult; }; -#endif
\ No newline at end of file +#endif diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp index ef9ac7821..18deb8af7 100644 --- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp +++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.h b/src/plugins/wmf/player/mfvideorenderercontrol.h index f34b5bf95..ad0277211 100644 --- a/src/plugins/wmf/player/mfvideorenderercontrol.h +++ b/src/plugins/wmf/player/mfvideorenderercontrol.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/sourceresolver.cpp b/src/plugins/wmf/player/sourceresolver.cpp index 1b98365b5..9c62fa8c6 100644 --- a/src/plugins/wmf/player/sourceresolver.cpp +++ b/src/plugins/wmf/player/sourceresolver.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/player/sourceresolver.h b/src/plugins/wmf/player/sourceresolver.h index 60bee69f1..18eb737a0 100644 --- a/src/plugins/wmf/player/sourceresolver.h +++ b/src/plugins/wmf/player/sourceresolver.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro index 5eccc80d5..0bb1743a7 100644 --- a/src/plugins/wmf/wmf.pro +++ b/src/plugins/wmf/wmf.pro @@ -1,7 +1,7 @@ load(qt_module) TARGET = wmfengine -QT += multimediakit-private network +QT += multimediakit-private network multimediakitwidgets-private PLUGIN_TYPE=mediaservice load(qt_plugin) diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp index 31910fd3a..ccc4ada00 100644 --- a/src/plugins/wmf/wmfserviceplugin.cpp +++ b/src/plugins/wmf/wmfserviceplugin.cpp @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h index cfaaef58c..9bcffaf1a 100644 --- a/src/plugins/wmf/wmfserviceplugin.h +++ b/src/plugins/wmf/wmfserviceplugin.h @@ -7,29 +7,29 @@ ** 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. +** 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 +** 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. -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. ** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. ** ** ** diff --git a/src/src.pro b/src/src.pro index 6ee33f358..cad13103e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -2,7 +2,11 @@ TEMPLATE = subdirs CONFIG += ordered +library_qtmmkwidgets.subdir = $$IN_PWD/multimediakitwidgets +library_qtmmkwidgets.depends = multimediakit + SUBDIRS += multimediakit +SUBDIRS += library_qtmmkwidgets SUBDIRS += imports SUBDIRS += plugins |