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>
This commit is contained in:
committed by
Qt by Nokia
parent
3d7dff4f61
commit
f33731fe5a
@@ -91,19 +91,18 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface)
|
||||
this, SLOT(handleFormatChange()));
|
||||
}
|
||||
|
||||
bool wasReady = isReady();
|
||||
|
||||
m_surface = surface;
|
||||
|
||||
if (surface && !m_surface)
|
||||
emit readyChanged(true);
|
||||
|
||||
if (!surface && m_surface)
|
||||
emit readyChanged(false);
|
||||
|
||||
if (m_surface) {
|
||||
connect(m_surface, SIGNAL(supportedFormatsChanged()),
|
||||
this, SLOT(handleFormatChange()));
|
||||
}
|
||||
|
||||
if (wasReady != isReady())
|
||||
emit readyChanged(isReady());
|
||||
|
||||
emit sinkChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user