diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-11 11:57:28 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-11 11:58:44 (GMT) |
commit | 78f64021650372f177a62d1b46e5cd33dc3a3250 (patch) | |
tree | fe9430ab13c552299f638498df94429ccf560898 /src/3rdparty | |
parent | e437363c6fbf938364e2a734fa16d4303bc40f3d (diff) | |
download | Qt-78f64021650372f177a62d1b46e5cd33dc3a3250.zip Qt-78f64021650372f177a62d1b46e5cd33dc3a3250.tar.gz Qt-78f64021650372f177a62d1b46e5cd33dc3a3250.tar.bz2 |
Phonon: Video widget on Windows flickers when going to next video
Now we just disable the updates during a short amount of time. This
should give enough time to the video to start.
Task-number: 251776
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/ds9/videowidget.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp index 34ff8cb..07b9cf3 100644 --- a/src/3rdparty/phonon/ds9/videowidget.cpp +++ b/src/3rdparty/phonon/ds9/videowidget.cpp @@ -84,7 +84,19 @@ namespace Phonon void setCurrentRenderer(AbstractVideoRenderer *renderer) { m_currentRenderer = renderer; - update(); + //we disallow repaint on that widget for just a fraction of second + //this allows better transition between videos + setUpdatesEnabled(false); + m_flickerFreeTimer.start(20, this); + } + + void timerEvent(QTimerEvent *e) + { + if (e->timerId() == m_flickerFreeTimer.timerId()) { + m_flickerFreeTimer.stop(); + setUpdatesEnabled(true); + } + QWidget::timerEvent(e); } QSize sizeHint() const @@ -160,6 +172,7 @@ namespace Phonon VideoWidget *m_node; AbstractVideoRenderer *m_currentRenderer; QVariant m_restoreScreenSaverActive; + QBasicTimer m_flickerFreeTimer; }; VideoWidget::VideoWidget(QWidget *parent) |