mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -90,8 +90,6 @@ public slots:
|
||||
|
||||
void stop();
|
||||
|
||||
void compStateChangeRequest(const hyperion::Components component, bool enable);
|
||||
|
||||
signals:
|
||||
void newFrame(const Image<ColorRgb> & image);
|
||||
void readError(const char* err);
|
||||
|
@@ -27,7 +27,6 @@ public slots:
|
||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
||||
|
||||
signals:
|
||||
void compStateChangeRequest(const hyperion::Components component, bool enable);
|
||||
|
||||
private slots:
|
||||
void newFrame(const Image<ColorRgb> & image);
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -92,4 +92,12 @@ signals:
|
||||
///
|
||||
void globalRegRequired(int priority);
|
||||
|
||||
///
|
||||
/// @brief Tell v4l2/screen capture the listener state
|
||||
/// @param component The component to handle
|
||||
/// @param hyperionInd The Hyperion instance index as identifier
|
||||
/// @param listen True when listening, else false
|
||||
///
|
||||
void requestSource(const hyperion::Components& component, const int hyperionInd, const bool listen);
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user