Skip to content

Commit

Permalink
Merge pull request #89 from AIRLegend/dev
Browse files Browse the repository at this point in the history
Change old cv2 Window processing system with waitKey to QThread::sleep
  • Loading branch information
AIRLegend authored Feb 11, 2021
2 parents 6320c5c + 66bbf6d commit d6e464c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Client/src/presenter/presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include "../version.h"

#include <QThread>
#include <qapplication.h>

Presenter::Presenter(IView& view, std::unique_ptr<TrackerFactory>&& t_factory, std::unique_ptr<ConfigMgr>&& conf_mgr)
{
Expand Down Expand Up @@ -214,7 +216,8 @@ void Presenter::run_loop()
view->paint_video_frame(mat);
}

cv::waitKey(1000/state.video_fps);
QApplication::processEvents();
QThread::msleep(1000 / state.video_fps);
}

cam->stop_camera();
Expand Down

0 comments on commit d6e464c

Please sign in to comment.