Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jesustorresdev/1e3e15f963893452c24cadb748987127 to your computer and use it in GitHub Desktop.
Save jesustorresdev/1e3e15f963893452c24cadb748987127 to your computer and use it in GitHub Desktop.
class FrameProcessingThread : public QThread
{
Q_OBJECT
public:
FrameProcessingThread(FiniteBuffer* buffer,
QObject *parent = 0)
: QThread(parent), buffer_(buffer)
{}
void run()
{
while(true) {
QImage image = buffer_->extractFrame();
//
// Aquí va el código para procesar cada frame...
//
// ...
//
}
}
private:
FiniteBuffer* buffer_;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment