// +-------------------------------- DISCLAIMER ---------------------------------+
// |                                                                             |
// | This program is provided to you free of charge "as such".                   |
// | You should not assume that this program is error-free or suitable for any   |
// | purpose whatsoever.                                                         |
// |                                                                             |
// | EURESYS does not give any representation, warranty or undertaking that this |
// | program is free of any defect or error or suitable for any purpose. EURESYS |
// | shall not be liable, in contract, in torts or otherwise, for any damages,   |
// | loss, costs, expenses or other claims for compensation, including those     |
// | asserted by third parties, arising out of or in connection with the use of  |
// | this program.                                                               |
// +-----------------------------------------------------------------------------+

#ifndef PROCESSINGHANDLER_H
#define PROCESSINGHANDLER_H
#include <atomic>
#include <thread>

#include "CameraHandler.h"

class ProcessingHandler
{
public:
  ProcessingHandler(CameraHandler* cameraHandler);
  ~ProcessingHandler();

  void start();
  void stop();

  bool isAborted();

private:
  void run();
  std::atomic<bool> abort_;
  CameraHandler* cameraHandler_;
  std::thread processingThread_;
};

#endif // PROCESSINGHANDLER_H


