Commit fb8c36deb549ef69172b8a3258da6aa8bc669c23

Authored by Scott Klum
2 parents e5fb7e7e ae079eb7

Fixed local gui

openbr/plugins/gui.cpp
@@ -134,11 +134,15 @@ public: @@ -134,11 +134,15 @@ public:
134 // Connect our signals to the proxy's slots 134 // Connect our signals to the proxy's slots
135 connect(this, SIGNAL(needWindow()), gui, SLOT(createWindow()), Qt::BlockingQueuedConnection); 135 connect(this, SIGNAL(needWindow()), gui, SLOT(createWindow()), Qt::BlockingQueuedConnection);
136 <<<<<<< HEAD 136 <<<<<<< HEAD
  137 +<<<<<<< HEAD
137 connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap))); 138 connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap)));
138 // connect gui newPoint to this setPoint 139 // connect gui newPoint to this setPoint
139 ======= 140 =======
140 connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap)), Qt::BlockingQueuedConnection); 141 connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap)), Qt::BlockingQueuedConnection);
141 >>>>>>> 45e51f44421b925d4edab9671ceea12c88665793 142 >>>>>>> 45e51f44421b925d4edab9671ceea12c88665793
  143 +=======
  144 + connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap)));
  145 +>>>>>>> ae079eb71b689932c5119c6176b2d272b5f3546b
142 } 146 }
143 147
144 ~Show2Transform() 148 ~Show2Transform()
@@ -193,14 +197,14 @@ public: @@ -193,14 +197,14 @@ public:
193 void finalize(TemplateList & output) 197 void finalize(TemplateList & output)
194 { 198 {
195 (void) output; 199 (void) output;
196 - if (gui && gui->window)  
197 - gui->window->hide(); 200 + emit hideWindow();
198 } 201 }
199 202
200 void init() 203 void init()
201 { 204 {
202 emit needWindow(); 205 emit needWindow();
203 connect(this, SIGNAL(changeTitle(QString)), gui->window, SLOT(setWindowTitle(QString))); 206 connect(this, SIGNAL(changeTitle(QString)), gui->window, SLOT(setWindowTitle(QString)));
  207 + connect(this, SIGNAL(hideWindow()), gui->window, SLOT(hide()));
204 } 208 }
205 209
206 protected: 210 protected:
@@ -212,6 +216,7 @@ signals: @@ -212,6 +216,7 @@ signals:
212 void needWindow(); 216 void needWindow();
213 void updateImage(const QPixmap & input); 217 void updateImage(const QPixmap & input);
214 void changeTitle(const QString & input); 218 void changeTitle(const QString & input);
  219 + void hideWindow();
215 }; 220 };
216 221
217 BR_REGISTER(Transform, Show2Transform) 222 BR_REGISTER(Transform, Show2Transform)
openbr/plugins/stream.cpp
@@ -271,12 +271,10 @@ public: @@ -271,12 +271,10 @@ public:
271 next_idx = 0; 271 next_idx = 0;
272 basis = input; 272 basis = input;
273 video.open(input.file.name.toStdString()); 273 video.open(input.file.name.toStdString());
274 - video_ok = video.isOpened();  
275 - return video_ok; 274 + return video.isOpened();
276 } 275 }
277 - bool video_ok;  
278 276
279 - bool isOpen() { return video_ok; } 277 + bool isOpen() { return video.isOpened(); }
280 278
281 void close() { 279 void close() {
282 video.release(); 280 video.release();
@@ -298,8 +296,8 @@ private: @@ -298,8 +296,8 @@ private:
298 output.data.last().last() = output.data.last().last().clone(); 296 output.data.last().last() = output.data.last().last().clone();
299 297
300 if (!res) { 298 if (!res) {
301 - video_ok = false;  
302 - return video_ok; 299 + close();
  300 + return false;
303 } 301 }
304 output.data.last().file.set("FrameNumber", output.sequenceNumber); 302 output.data.last().file.set("FrameNumber", output.sequenceNumber);
305 return true; 303 return true;