diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-08 07:53:56 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-08 07:53:56 (GMT) |
commit | 4603dc768d8c98770311a9136f956f3cefa90362 (patch) | |
tree | 239f1d6eccbd98d1ada03725897ef242929447a3 /src/multimedia/base | |
parent | da727b5aadf64128de0eb39fc1ce26e587211272 (diff) | |
download | Qt-4603dc768d8c98770311a9136f956f3cefa90362.zip Qt-4603dc768d8c98770311a9136f956f3cefa90362.tar.gz Qt-4603dc768d8c98770311a9136f956f3cefa90362.tar.bz2 |
Don't clear the video output when the video widget is hidden.
Changing the video output is a heavy task and is likely to interrupt
playback. Not really worth the cost for knowing the video isn't being
decoded while it cant be seen.
This also applies to the QGraphicsVideoItem.
Diffstat (limited to 'src/multimedia/base')
-rw-r--r-- | src/multimedia/base/qgraphicsvideoitem.cpp | 16 | ||||
-rw-r--r-- | src/multimedia/base/qvideowidget.cpp | 3 |
2 files changed, 1 insertions, 18 deletions
diff --git a/src/multimedia/base/qgraphicsvideoitem.cpp b/src/multimedia/base/qgraphicsvideoitem.cpp index 3cd0449..8aba269 100644 --- a/src/multimedia/base/qgraphicsvideoitem.cpp +++ b/src/multimedia/base/qgraphicsvideoitem.cpp @@ -408,21 +408,7 @@ void QGraphicsVideoItem::paint( */ QVariant QGraphicsVideoItem::itemChange(GraphicsItemChange change, const QVariant &value) { - Q_D(QGraphicsVideoItem); - - if (change == ItemVisibleChange && d->outputControl != 0 && d->rendererControl != 0) { - if (value.toBool()) { - d->outputControl->setOutput(QVideoOutputControl::RendererOutput); - - return d->outputControl->output() == QVideoOutputControl::RendererOutput; - } else { - d->outputControl->setOutput(QVideoOutputControl::NoOutput); - - return value; - } - } else { - return QGraphicsItem::itemChange(change, value); - } + return QGraphicsItem::itemChange(change, value); } QT_END_NAMESPACE diff --git a/src/multimedia/base/qvideowidget.cpp b/src/multimedia/base/qvideowidget.cpp index 31cfd8d..5df245e 100644 --- a/src/multimedia/base/qvideowidget.cpp +++ b/src/multimedia/base/qvideowidget.cpp @@ -868,9 +868,6 @@ void QVideoWidget::hideEvent(QHideEvent *event) if (d->currentBackend) d->currentBackend->hideEvent(event); - if (d->outputControl) - d->outputControl->setOutput(QVideoOutputControl::NoOutput); - QWidget::hideEvent(event); } |