Commit fb8c36deb549ef69172b8a3258da6aa8bc669c23

Authored by Scott Klum
2 parents e5fb7e7e ae079eb7

Fixed local gui

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