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/GrabbingMode.h>
|
|
|
|
#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-05-26 23:44:27 +02:00
|
|
|
ProtoConnectionWrapper(const std::string & address, int priority, int duration_ms, bool skipProtoReply);
|
|
|
|
virtual ~ProtoConnectionWrapper();
|
2016-06-07 23:12:18 +02:00
|
|
|
|
|
|
|
signals:
|
|
|
|
///
|
2016-07-10 22:04:31 +02:00
|
|
|
/// Forwarding KODI Video Checker Message
|
2016-06-07 23:12:18 +02:00
|
|
|
///
|
|
|
|
void setGrabbingMode(const GrabbingMode mode);
|
|
|
|
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
|
|
|
};
|