diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-04-16 00:12:15 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-04-16 00:12:15 (GMT) |
commit | 655088bc1942698ee060ca5237a4220365e49ee1 (patch) | |
tree | 908437dbe06f9639534bc3546a9f3fe619d53449 /src/multimedia | |
parent | 06d71fb79ad850c62a1b95fbeec607dfc4220489 (diff) | |
parent | 07f724cd5abd0548fb32ed3469bde113daf028c4 (diff) | |
download | Qt-655088bc1942698ee060ca5237a4220365e49ee1.zip Qt-655088bc1942698ee060ca5237a4220365e49ee1.tar.gz Qt-655088bc1942698ee060ca5237a4220365e49ee1.tar.bz2 |
Merge branch '4.7' of ../../qt/4.7 into 4.7
Conflicts:
configure
Diffstat (limited to 'src/multimedia')
3 files changed, 23 insertions, 1 deletions
diff --git a/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp b/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp index 05070f8..8494c2e 100644 --- a/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp +++ b/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp @@ -52,6 +52,8 @@ #include <QtOpenGL/qgl.h> #endif +#ifndef QT_NO_GRAPHICSVIEW + QT_BEGIN_NAMESPACE @@ -434,4 +436,7 @@ bool QGraphicsVideoItem::sceneEvent(QEvent *event) } QT_END_NAMESPACE + +#endif // QT_NO_GRAPHICSVIEW + #include "moc_qgraphicsvideoitem.cpp" diff --git a/src/multimedia/mediaservices/base/qgraphicsvideoitem.h b/src/multimedia/mediaservices/base/qgraphicsvideoitem.h index c0d8f7a..62e66e8 100644 --- a/src/multimedia/mediaservices/base/qgraphicsvideoitem.h +++ b/src/multimedia/mediaservices/base/qgraphicsvideoitem.h @@ -46,6 +46,7 @@ #include <QtMediaservices/qvideowidget.h> +#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW QT_BEGIN_HEADER @@ -109,4 +110,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_GRAPHICSVIEW + #endif diff --git a/src/multimedia/mediaservices/playback/qmediaplayer.cpp b/src/multimedia/mediaservices/playback/qmediaplayer.cpp index 676a6eb..b15464f 100644 --- a/src/multimedia/mediaservices/playback/qmediaplayer.cpp +++ b/src/multimedia/mediaservices/playback/qmediaplayer.cpp @@ -145,7 +145,9 @@ public: QMediaPlaylist *playlist; QPointer<QVideoWidget> videoWidget; +#ifndef QT_NO_GRAPHICSVIEW QPointer<QGraphicsVideoItem> videoItem; +#endif void _q_stateChanged(QMediaPlayer::State state); void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status); @@ -618,26 +620,36 @@ void QMediaPlayer::bind(QObject *obj) } QVideoWidget *videoWidget = qobject_cast<QVideoWidget*>(obj); +#ifndef QT_NO_GRAPHICSVIEW QGraphicsVideoItem *videoItem = qobject_cast<QGraphicsVideoItem*>(obj); +#endif - if (videoWidget || videoItem) { + if (videoWidget +#ifndef QT_NO_GRAPHICSVIEW + || videoItem +#endif + ) { //detach the current video output if (d->videoWidget) { d->videoWidget->setMediaObject(0); d->videoWidget = 0; } +#ifndef QT_NO_GRAPHICSVIEW if (d->videoItem) { d->videoItem->setMediaObject(0); d->videoItem = 0; } +#endif } if (videoWidget) d->videoWidget = videoWidget; +#ifndef QT_NO_GRAPHICSVIEW if (videoItem) d->videoItem = videoItem; +#endif } } @@ -651,8 +663,10 @@ void QMediaPlayer::unbind(QObject *obj) if (obj == d->videoWidget) { d->videoWidget = 0; +#ifndef QT_NO_GRAPHICSVIEW } else if (obj == d->videoItem) { d->videoItem = 0; +#endif } else if (obj == d->playlist) { disconnect(d->playlist, SIGNAL(currentMediaChanged(QMediaContent)), this, SLOT(_q_updateMedia(QMediaContent))); |