From 2e43064a2f408c493380e265863bc8b0db25ae18 Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Fri, 14 Dec 2012 00:45:35 +0200 Subject: [PATCH] Don't ignore errors while stopping the pipeline. This reverts commit 4b5634ce74ce85fbf0a5dbbcf85bd89bc3b1b42e manually. --- lib/qtcamdevice.cpp | 4 ---- lib/qtcamdevice_p.h | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/qtcamdevice.cpp b/lib/qtcamdevice.cpp index 7d5acbf..a492287 100644 --- a/lib/qtcamdevice.cpp +++ b/lib/qtcamdevice.cpp @@ -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; } diff --git a/lib/qtcamdevice_p.h b/lib/qtcamdevice_p.h index 914928b..45205c4 100644 --- a/lib/qtcamdevice_p.h +++ b/lib/qtcamdevice_p.h @@ -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 */ -- 2.34.1