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
@@ -90,20 +90,19 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface)
|
|||||||
disconnect(m_surface, SIGNAL(supportedFormatsChanged()),
|
disconnect(m_surface, SIGNAL(supportedFormatsChanged()),
|
||||||
this, SLOT(handleFormatChange()));
|
this, SLOT(handleFormatChange()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wasReady = isReady();
|
||||||
|
|
||||||
m_surface = surface;
|
m_surface = surface;
|
||||||
|
|
||||||
if (surface && !m_surface)
|
|
||||||
emit readyChanged(true);
|
|
||||||
|
|
||||||
if (!surface && m_surface)
|
|
||||||
emit readyChanged(false);
|
|
||||||
|
|
||||||
if (m_surface) {
|
if (m_surface) {
|
||||||
connect(m_surface, SIGNAL(supportedFormatsChanged()),
|
connect(m_surface, SIGNAL(supportedFormatsChanged()),
|
||||||
this, SLOT(handleFormatChange()));
|
this, SLOT(handleFormatChange()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wasReady != isReady())
|
||||||
|
emit readyChanged(isReady());
|
||||||
|
|
||||||
emit sinkChanged();
|
emit sinkChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user