summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMithra Pattison <mithra.pattison@nokia.com>2011-12-19 19:23:21 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-21 07:36:27 +0100
commitf33731fe5a265bad8cfbe6a0c83d3d3806d730f8 (patch)
tree124bb70d6a944798fc6cc3864cff0c69fc2ac40f /src/plugins
parent3d7dff4f6151a65c3f3e0de7c8d97904acb91030 (diff)
Fix readyChanged signal emit in gstreamervideorenderer
Modified handling of source update in gstreamervideorenderer as the existing logic meant that it would never emit the readyChanged signal. Change-Id: I0a1488cfc151388fe0145d231001e502e9f45f0e Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gstreamer/qgstreamervideorenderer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/gstreamer/qgstreamervideorenderer.cpp b/src/plugins/gstreamer/qgstreamervideorenderer.cpp
index ead0bdcc0..ac3d4a192 100644
--- a/src/plugins/gstreamer/qgstreamervideorenderer.cpp
+++ b/src/plugins/gstreamer/qgstreamervideorenderer.cpp
@@ -90,20 +90,19 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface)
disconnect(m_surface, SIGNAL(supportedFormatsChanged()),
this, SLOT(handleFormatChange()));
}
-
- m_surface = surface;
- if (surface && !m_surface)
- emit readyChanged(true);
+ bool wasReady = isReady();
- if (!surface && m_surface)
- emit readyChanged(false);
+ m_surface = surface;
if (m_surface) {
connect(m_surface, SIGNAL(supportedFormatsChanged()),
this, SLOT(handleFormatChange()));
}
+ if (wasReady != isReady())
+ emit readyChanged(isReady());
+
emit sinkChanged();
}
}