winrt: Fix synchronization problems to render thread

QWinRTAbstractVideoRendererControl::setActive was using
QThread::requestInterrupt previously to indicate to the render thread
that it is supposed to quit.

However, when switching cameras you cannot tell the render thread to
continue rendering. Instead start() is called and then the render thread
recognized the previous interrupt request, resulting in a quit and no
further rendering happening.

Instead we wait for the render thread to complete by using shutdown().

Task-number: QTBUG-53722
Change-Id: Ibee2ed4f64400ca14c788984a73df4be0653ed2b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Maurice Kalinowski
2016-06-08 11:52:40 +02:00
parent 20299cfc4a
commit bff19dbe67

View File

@@ -360,7 +360,7 @@ void QWinRTAbstractVideoRendererControl::setActive(bool active)
return;
}
d->renderThread.requestInterruption();
shutdown();
if (d->surface && d->surface->isActive())
d->surface->stop();
}