void Worker::run() { BOOST_LOG_NAMED_SCOPE("worker run"); this->jpeg_reader.start(); while (this->running) { //BOOST_LOG_TRIVIAL(debug) << "Waiting frame"; FrameAnalysis *frame = this->context.get(); //BOOST_LOG_TRIVIAL(debug) << "Got frame"; if (this->context.is_finished()) { BOOST_LOG_TRIVIAL(debug) << "Worker ready to exit"; break; } this->last_frame = QSharedPointer<FrameAnalysis>(frame); emit frame_produced(); } }
void Worker::run() { BOOST_LOG_NAMED_SCOPE("worker run"); this->jpeg_reader.start(); while (this->running) { BOOST_LOG_TRIVIAL(debug) << "Waiting frame"; FrameAnalysis *frame = this->context.get(); BOOST_LOG_TRIVIAL(debug) << "Got frame"; if (this->context.is_finished()) { BOOST_LOG_TRIVIAL(debug) << "Worker ready to exit"; break; } if (frame->does_have_fix()) { this->out_stream << frame->gen_csv_line() << "\n"; } this->last_frame = QSharedPointer<FrameAnalysis>(frame); BOOST_LOG_TRIVIAL(debug) << "Emitting frame produced"; emit frame_produced(); } }