diff options
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/base/qmediacontent.cpp | 13 | ||||
-rw-r--r-- | src/multimedia/base/qmediacontent.h | 2 | ||||
-rw-r--r-- | src/multimedia/base/qmediaserviceprovider.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qml/multimediadeclarative.cpp | 71 | ||||
-rw-r--r-- | src/multimedia/qml/multimediadeclarative.h | 62 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativeaudio_p.h | 11 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativemediabase_p.h | 10 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativevideo_p.h | 11 | ||||
-rw-r--r-- | src/multimedia/qml/qmetadatacontrolmetaobject_p.h | 11 | ||||
-rw-r--r-- | src/multimedia/qml/qml.pri | 4 | ||||
-rw-r--r-- | src/multimedia/qml/wavedecoder_p.h | 11 |
11 files changed, 204 insertions, 4 deletions
diff --git a/src/multimedia/base/qmediacontent.cpp b/src/multimedia/base/qmediacontent.cpp index 3e32af0..fd519c6 100644 --- a/src/multimedia/base/qmediacontent.cpp +++ b/src/multimedia/base/qmediacontent.cpp @@ -109,6 +109,19 @@ QMediaContent::QMediaContent(const QUrl &url): } /*! + Constructs a media content with \a request providing a reference to the content. + + This constructor can be used to reference media content via network protocols such as HTTP. + This may include additional information required to obtain the resource, such as Cookies or HTTP headers. +*/ + +QMediaContent::QMediaContent(const QNetworkRequest &request): + d(new QMediaContentPrivate) +{ + d->resources << QMediaResource(request); +} + +/*! Constructs a media content with \a resource providing a reference to the content. */ diff --git a/src/multimedia/base/qmediacontent.h b/src/multimedia/base/qmediacontent.h index 1ea4898..b6f3017 100644 --- a/src/multimedia/base/qmediacontent.h +++ b/src/multimedia/base/qmediacontent.h @@ -46,6 +46,7 @@ #include <QtCore/qshareddata.h> #include <QtMultimedia/qmediaresource.h> +#include <QtNetwork/qnetworkrequest.h> QT_BEGIN_HEADER @@ -60,6 +61,7 @@ class Q_MULTIMEDIA_EXPORT QMediaContent public: QMediaContent(); QMediaContent(const QUrl &contentUrl); + QMediaContent(const QNetworkRequest &contentRequest); QMediaContent(const QMediaResource &contentResource); QMediaContent(const QMediaResourceList &resources); QMediaContent(const QMediaContent &other); diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index 76377d9..02c9b29 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -594,8 +594,6 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() #endif } -QT_END_NAMESPACE - /*! \class QMediaServiceProviderPlugin \preliminary diff --git a/src/multimedia/qml/multimediadeclarative.cpp b/src/multimedia/qml/multimediadeclarative.cpp new file mode 100644 index 0000000..ba4036f --- /dev/null +++ b/src/multimedia/qml/multimediadeclarative.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** 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 QtMultimedia module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtMultimedia/qdeclarative.h> +#include <QtMultimedia/private/qsoundeffect_p.h> +#include <QtMultimedia/private/qdeclarativeaudio_p.h> +#include <QtMultimedia/private/qdeclarativevideo_p.h> + + +QT_BEGIN_NAMESPACE + +namespace QtMultimedia +{ + +/*! + Register the Multimedia QML elements. + \internal +*/ + +void qRegisterDeclarativeElements(QDeclarativeEngine *engine, const char *uri) +{ + Q_UNUSED(engine) + Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); + + qmlRegisterType<QSoundEffect>("Qt.multimedia", 4, 7, "SoundEffect"); + qmlRegisterType<QDeclarativeAudio>("Qt.multimedia", 4, 7, "Audio"); + qmlRegisterType<QDeclarativeVideo>("Qt.multimedia", 4, 7, "Video"); +} + +} + +QT_END_NAMESPACE + diff --git a/src/multimedia/qml/multimediadeclarative.h b/src/multimedia/qml/multimediadeclarative.h new file mode 100644 index 0000000..befddb6 --- /dev/null +++ b/src/multimedia/qml/multimediadeclarative.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** 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 QtMultimedia module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTMULTIMEDIA_QML_H +#define QTMULTIMEDIA_QML_H + +#include <QtCore/qglobal.h> + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QDeclarativeEngine; + +namespace QtMultimedia +{ +extern void Q_MULTIMEDIA_EXPORT qRegisterDeclarativeElements(QDeclarativeEngine* engine, const char *uri); +} + +QT_END_NAMESPACE +QT_END_HEADER + +#endif // ifndef QTMULTIMEDIA_QML_H diff --git a/src/multimedia/qml/qdeclarativeaudio_p.h b/src/multimedia/qml/qdeclarativeaudio_p.h index d28c1dd..d1fb275 100644 --- a/src/multimedia/qml/qdeclarativeaudio_p.h +++ b/src/multimedia/qml/qdeclarativeaudio_p.h @@ -42,6 +42,17 @@ #ifndef QDECLARATIVEAUDIO_P_H #define QDECLARATIVEAUDIO_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 <QtMultimedia/private/qdeclarativemediabase_p.h> #include <QtCore/qbasictimer.h> diff --git a/src/multimedia/qml/qdeclarativemediabase_p.h b/src/multimedia/qml/qdeclarativemediabase_p.h index cee190c..2fc48db 100644 --- a/src/multimedia/qml/qdeclarativemediabase_p.h +++ b/src/multimedia/qml/qdeclarativemediabase_p.h @@ -42,6 +42,16 @@ #ifndef QDECLARATIVEMEDIABASE_P_H #define QDECLARATIVEMEDIABASE_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 <QtCore/qbasictimer.h> #include <QtMultimedia/qmediaplayer.h> diff --git a/src/multimedia/qml/qdeclarativevideo_p.h b/src/multimedia/qml/qdeclarativevideo_p.h index 164edae..d5ebde1 100644 --- a/src/multimedia/qml/qdeclarativevideo_p.h +++ b/src/multimedia/qml/qdeclarativevideo_p.h @@ -42,6 +42,17 @@ #ifndef QDECLARATIVEVIDEO_H #define QDECLARATIVEVIDEO_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 <QtMultimedia/private/qdeclarativemediabase_p.h> #include <QtMultimedia/qgraphicsvideoitem.h> diff --git a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h b/src/multimedia/qml/qmetadatacontrolmetaobject_p.h index c0fd4e8..ec4df05 100644 --- a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h +++ b/src/multimedia/qml/qmetadatacontrolmetaobject_p.h @@ -42,6 +42,17 @@ #ifndef QMETADATACONTROLMETAOBJECT_P_H #define QMETADATACONTROLMETAOJBECT_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 <QtCore/qmetaobject.h> #include <QtMultimedia/qtmedianamespace.h> diff --git a/src/multimedia/qml/qml.pri b/src/multimedia/qml/qml.pri index dfc006e..d0ff71d 100644 --- a/src/multimedia/qml/qml.pri +++ b/src/multimedia/qml/qml.pri @@ -17,7 +17,7 @@ contains(QT_CONFIG, declarative) { } HEADERS += \ - $$PWD/qdeclarative.h \ + $$PWD/multimediadeclarative.h \ $$PWD/qmetadatacontrolmetaobject_p.h \ $$PWD/qdeclarativeaudio_p.h \ $$PWD/qdeclarativevideo_p.h \ @@ -26,7 +26,7 @@ contains(QT_CONFIG, declarative) { $$PWD/wavedecoder_p.h SOURCES += \ - $$PWD/qdeclarative.cpp \ + $$PWD/multimediadeclarative.cpp \ $$PWD/qmetadatacontrolmetaobject.cpp \ $$PWD/qdeclarativeaudio.cpp \ $$PWD/qdeclarativevideo.cpp \ diff --git a/src/multimedia/qml/wavedecoder_p.h b/src/multimedia/qml/wavedecoder_p.h index 3bcd90d..00aa14e 100644 --- a/src/multimedia/qml/wavedecoder_p.h +++ b/src/multimedia/qml/wavedecoder_p.h @@ -42,6 +42,17 @@ #ifndef WAVEDECODER_H #define WAVEDECODER_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 <QtCore/qiodevice.h> #include <QtMultimedia/qaudioformat.h> |