Allow gst video capture startup without viewfinder attached.
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Fri, 29 Jun 2012 02:13:58 +0000 (12:13 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 29 Jun 2012 05:28:14 +0000 (07:28 +0200)
Change-Id: I5f0b7dc12f4ee8e988d6107047d963949bcdb5bf
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp

index 050a678..e2dc63b 100644 (file)
@@ -764,7 +764,8 @@ void QGstreamerCaptureSession::setVideoPreview(QObject *viewfinder)
 
 bool QGstreamerCaptureSession::isReady() const
 {
-    return m_viewfinderInterface != 0 && m_viewfinderInterface->isReady();
+    //it's possible to use QCamera without any viewfinder attached
+    return !m_viewfinderInterface || m_viewfinderInterface->isReady();
 }
 
 QGstreamerCaptureSession::State QGstreamerCaptureSession::state() const