2014-11-21 21:24:33 +01:00
|
|
|
// Qt includes
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
// hyperion includes
|
|
|
|
#include <utils/Image.h>
|
|
|
|
#include <utils/ColorRgb.h>
|
|
|
|
|
|
|
|
// hyperion proto includes
|
|
|
|
#include "protoserver/ProtoConnection.h"
|
|
|
|
|
|
|
|
/// This class handles callbacks from the V4L2 grabber
|
|
|
|
class ProtoConnectionWrapper : public QObject
|
|
|
|
{
|
2016-05-26 23:44:27 +02:00
|
|
|
Q_OBJECT
|
2014-11-21 21:24:33 +01:00
|
|
|
|
|
|
|
public:
|
2016-05-26 23:44:27 +02:00
|
|
|
ProtoConnectionWrapper(const std::string & address, int priority, int duration_ms, bool skipProtoReply);
|
|
|
|
virtual ~ProtoConnectionWrapper();
|
2014-11-21 21:24:33 +01:00
|
|
|
|
|
|
|
public slots:
|
2016-05-26 23:44:27 +02:00
|
|
|
/// Handle a single image
|
|
|
|
/// @param image The image to process
|
|
|
|
void receiveImage(const Image<ColorRgb> & image);
|
2014-11-21 21:24:33 +01:00
|
|
|
|
|
|
|
private:
|
2016-05-26 23:44:27 +02:00
|
|
|
/// Priority for calls to Hyperion
|
|
|
|
const int _priority;
|
2014-11-21 21:24:33 +01:00
|
|
|
|
2016-05-26 23:44:27 +02:00
|
|
|
/// Duration for color calls to Hyperion
|
|
|
|
const int _duration_ms;
|
2014-11-21 21:24:33 +01:00
|
|
|
|
2016-05-26 23:44:27 +02:00
|
|
|
/// Hyperion proto connection object
|
|
|
|
ProtoConnection _connection;
|
2014-11-21 21:24:33 +01:00
|
|
|
};
|