2014-11-21 21:24:33 +01:00
|
|
|
// Qt includes
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
// hyperion includes
|
|
|
|
#include <utils/Image.h>
|
|
|
|
#include <utils/ColorRgb.h>
|
2016-06-07 23:12:18 +02:00
|
|
|
#include <utils/VideoMode.h>
|
2014-11-21 21:24:33 +01:00
|
|
|
|
|
|
|
// hyperion proto includes
|
|
|
|
#include "protoserver/ProtoConnection.h"
|
|
|
|
|
2016-06-07 23:12:18 +02:00
|
|
|
/// This class handles callbacks from the V4L2 and X11 grabber
|
2014-11-21 21:24:33 +01:00
|
|
|
class ProtoConnectionWrapper : public QObject
|
|
|
|
{
|
2016-05-26 23:44:27 +02:00
|
|
|
Q_OBJECT
|
2014-11-21 21:24:33 +01:00
|
|
|
|
|
|
|
public:
|
2016-08-28 15:10:43 +02:00
|
|
|
ProtoConnectionWrapper(const QString &address, int priority, int duration_ms, bool skipProtoReply);
|
2016-05-26 23:44:27 +02:00
|
|
|
virtual ~ProtoConnectionWrapper();
|
2017-11-22 00:52:55 +01:00
|
|
|
|
|
|
|
signals:
|
2016-06-07 23:12:18 +02:00
|
|
|
///
|
2017-11-22 00:52:55 +01:00
|
|
|
/// Forwarding new videoMode
|
2016-06-07 23:12:18 +02:00
|
|
|
///
|
|
|
|
void setVideoMode(const VideoMode videoMode);
|
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
|
|
|
};
|