fix: Resolve enable state for v4l and screen capture (#728)

* fix: Resolve the enable state for v4l and screen capture

* Use instance index instead of pointer

* Second try

* fix(QtGrabber): QScreen ownership

* Remove v4l2 compState listener
This commit is contained in:
brindosch
2020-03-26 17:49:36 +01:00
committed by GitHub
parent 49b30c47f7
commit cb98d51a9c
12 changed files with 109 additions and 52 deletions

View File

@@ -97,12 +97,6 @@ public:
///
void setEnabled(bool enable);
signals:
///
/// @brief PIPE component state changes from HyperionDaemon to V4L2Grabber
///
void compStateChangeRequest(const hyperion::Components component, bool enable);
protected:
ImageResampler _imageResampler;

View File

@@ -17,6 +17,10 @@ class Grabber;
class GlobalSignals;
class QTimer;
/// List of Hyperion instances that requested screen capt
static QList<int> GRABBER_SYS_CLIENTS;
static QList<int> GRABBER_V4L_CLIENTS;
///
/// This class will be inherted by FramebufferWrapper and others which contains the real capture interface
///
@@ -33,6 +37,11 @@ public:
///
virtual bool start();
///
/// Starts maybe the grabber wich produces led values with the specified update rate
///
virtual void tryStart();
///
/// Stop grabber
///
@@ -94,8 +103,12 @@ signals:
///
void systemImage(const QString& name, const Image<ColorRgb>& image);
protected:
private slots:
/// @brief Handle a source request event from Hyperion.
/// Will start and stop grabber based on active listeners count
void handleSourceRequest(const hyperion::Components& component, const int hyperionInd, const bool listen);
protected:
QString _grabberName;
/// The timer for generating events with the specified update rate