diff options
Diffstat (limited to 'src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp')
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp index e2dc63bb0..ec8351202 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp @@ -773,17 +773,6 @@ QGstreamerCaptureSession::State QGstreamerCaptureSession::state() const return m_state; } -void QGstreamerCaptureSession::waitForStopped() -{ - GstState state = GST_STATE_PLAYING; - gst_element_get_state(m_pipeline, &state, 0, 0); - - while (state != GST_STATE_NULL) { - qApp->processEvents(); - gst_element_get_state(m_pipeline, &state, 0, 0); - } -} - void QGstreamerCaptureSession::setState(QGstreamerCaptureSession::State newState) { if (newState == m_pendingState && !m_waitingForEos) @@ -829,9 +818,6 @@ void QGstreamerCaptureSession::setState(QGstreamerCaptureSession::State newState gst_element_set_state(m_pipeline, GST_STATE_NULL); - //It would be better to do this async. but - //gstreamer doesn't notify about pipeline went to NULL state - waitForStopped(); if (!rebuildGraph(newMode)) { m_pendingState = StoppedState; m_state = StoppedState; |