ui: stop vipc thread before the DriverViewWindow is hidden (#26738)

This commit is contained in:
Dean Lee
2022-12-13 06:44:04 +08:00
committed by GitHub
parent 151e0d8c39
commit b1009c7f7d
2 changed files with 2 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ DriverViewWindow::DriverViewWindow(QWidget* parent) : QWidget(parent) {
}
void DriverViewWindow::mouseReleaseEvent(QMouseEvent* e) {
cameraView->stopVipcThread();
emit done();
}
@@ -35,7 +36,6 @@ void DriverViewScene::showEvent(QShowEvent* event) {
}
void DriverViewScene::hideEvent(QHideEvent* event) {
// TODO: stop vipc thread ?
params.putBool("IsDriverViewEnabled", false);
}

View File

@@ -35,6 +35,7 @@ public:
void setFrameId(int frame_id) { draw_frame_id = frame_id; }
void setStreamType(VisionStreamType type) { requested_stream_type = type; }
VisionStreamType getStreamType() { return active_stream_type; }
void stopVipcThread();
signals:
void clicked();
@@ -51,7 +52,6 @@ protected:
void updateCalibration(const mat3 &calib);
void vipcThread();
void clearFrames();
void stopVipcThread();
bool zoomed_view;
GLuint frame_vao, frame_vbo, frame_ibo;