Gst player backend: fixed prerolled frames rendering

Don't use queued render request if it's called from
the object own thread.

Change-Id: I61ac11f5cf68edf82d0681c95123e804869d0647
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Lev Zelenskiy
2012-02-03 13:01:38 +10:00
committed by Qt by Nokia
parent c0fd63d143
commit 7415e4c879

View File

@@ -208,15 +208,18 @@ GstFlowReturn QVideoSurfaceGstDelegate::render(GstBuffer *buffer)
m_frame.setEndTime((startTime + duration)/G_GINT64_CONSTANT (1000000));
}
QMetaObject::invokeMethod(this, "queuedRender", Qt::QueuedConnection);
m_renderReturn = GST_FLOW_OK;
if (!m_renderCondition.wait(&m_mutex, 300)) {
m_frame = QVideoFrame();
return GST_FLOW_OK;
if (QThread::currentThread() == thread()) {
if (!m_surface.isNull())
m_surface->present(m_frame);
} else {
return m_renderReturn;
QMetaObject::invokeMethod(this, "queuedRender", Qt::QueuedConnection);
m_renderCondition.wait(&m_mutex, 300);
}
m_frame = QVideoFrame();
return m_renderReturn;
}
void QVideoSurfaceGstDelegate::queuedStart()