mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge remote-tracking branch 'origin/master' into temperture
This commit is contained in:
@@ -113,6 +113,13 @@ public:
|
||||
|
||||
QString getGrabberName() const { return _grabberName; }
|
||||
|
||||
///
|
||||
/// @brief Determine if the grabber is available.
|
||||
///
|
||||
/// @return true, on success (i.e. library is present), else false
|
||||
///
|
||||
virtual bool isAvailable() { return _isAvailable; }
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void handleEvent(Event event) {}
|
||||
@@ -168,10 +175,15 @@ protected:
|
||||
|
||||
// Device states
|
||||
|
||||
/// Is the device available?
|
||||
bool _isAvailable;
|
||||
|
||||
/// Is the device enabled?
|
||||
bool _isEnabled;
|
||||
|
||||
/// Is the device in error state and stopped?
|
||||
bool _isDeviceInError;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
@@ -32,6 +32,14 @@ class GrabberWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
static constexpr const char* GRABBERTYPE = "Base";
|
||||
|
||||
template<typename GrabberType>
|
||||
static QSharedPointer<GrabberType> create(const QJsonDocument& config) {
|
||||
return QSharedPointer<GrabberType>::create(config);
|
||||
}
|
||||
|
||||
GrabberWrapper(const QString& grabberName, Grabber * ggrabber,int updateRate_Hz = DEFAULT_RATE_HZ);
|
||||
|
||||
~GrabberWrapper() override;
|
||||
@@ -71,6 +79,11 @@ public:
|
||||
///
|
||||
virtual bool isActive() const;
|
||||
|
||||
virtual bool isAvailable() { return _isAvailable; }
|
||||
|
||||
|
||||
QString getName() { return _grabberName; }
|
||||
|
||||
///
|
||||
/// @brief Get active grabber name
|
||||
/// @param hyperionInd The instance index
|
||||
@@ -195,4 +208,6 @@ protected:
|
||||
|
||||
/// The image used for grabbing frames
|
||||
Image<ColorRgb> _image;
|
||||
|
||||
bool _isAvailable;
|
||||
};
|
||||
|
Reference in New Issue
Block a user