Don't ignore errors while stopping the pipeline.
authorMohammed Sameer <msameer@foolab.org>
Thu, 13 Dec 2012 22:45:35 +0000 (00:45 +0200)
committerMohammed Sameer <msameer@foolab.org>
Thu, 13 Dec 2012 22:45:35 +0000 (00:45 +0200)
This reverts commit 4b5634ce74ce85fbf0a5dbbcf85bd89bc3b1b42e manually.

lib/qtcamdevice.cpp
lib/qtcamdevice_p.h

index 7d5acbf..a492287 100644 (file)
@@ -217,8 +217,6 @@ bool QtCamDevice::stop(bool force) {
     }
   }
 
-  d_ptr->stopping = true;
-
   // First we go to ready:
   GstStateChangeReturn st = gst_element_set_state(d_ptr->cameraBin, GST_STATE_READY);
   if (st != GST_STATE_CHANGE_FAILURE) {
@@ -231,8 +229,6 @@ bool QtCamDevice::stop(bool force) {
 
   d_ptr->viewfinder->stop();
 
-  d_ptr->stopping = false;
-
   return true;
 }
 
index 914928b..45205c4 100644 (file)
@@ -47,8 +47,7 @@ public:
     viewfinder(0),
     conf(0),
     error(false),
-    notifications(0),
-    stopping(false) {
+    notifications(0) {
 
   }
 
@@ -132,11 +131,6 @@ public:
   }
 
   void _d_error(const QString& message, int code, const QString& debug) {
-    if (stopping) {
-      // TODO: is it wise to ignore errors while stopping??
-      return;
-    }
-
     error = true;
 
     QMetaObject::invokeMethod(q_ptr, "error", Q_ARG(QString, message),
@@ -241,7 +235,6 @@ public:
   QtCamGStreamerMessageListener *listener;
   bool error;
   QtCamNotifications *notifications;
-  bool stopping;
 };
 
 #endif /* QT_CAM_DEVICE_P_H */