Feature/CEC detection (#877)

* Add CEC functionality

* Initial commit

* removed libCEC from the system skip list

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
Murat Seker
2020-07-20 20:06:41 +02:00
committed by GitHub
parent a3ce4fa706
commit c124e2136a
35 changed files with 651 additions and 89 deletions

View File

@@ -16,6 +16,7 @@
#include <hyperion/Grabber.h>
#include <grabber/VideoStandard.h>
#include <utils/Components.h>
#include <cec/CECEvent.h>
// general JPEG decoder includes
#ifdef HAVE_JPEG_DECODER
@@ -67,6 +68,7 @@ public:
}
bool getSignalDetectionEnabled() { return _signalDetectionEnabled; }
bool getCecDetectionEnabled() { return _cecDetectionEnabled; }
int grabFrame(Image<ColorRgb> &);
@@ -98,6 +100,11 @@ public:
///
void setSignalDetectionEnable(bool enable) override;
///
/// @brief overwrite Grabber.h implementation
///
void setCecDetectionEnable(bool enable) override;
///
/// @brief overwrite Grabber.h implementation
///
@@ -149,6 +156,8 @@ public slots:
void stop();
void handleCecEvent(CECEvent event);
signals:
void newFrame(const Image<ColorRgb> & image);
void readError(const char* err);
@@ -257,6 +266,8 @@ private:
int _noSignalCounterThreshold;
ColorRgb _noSignalThresholdColor;
bool _signalDetectionEnabled;
bool _cecDetectionEnabled;
bool _cecStandbyActivated;
bool _noSignalDetected;
int _noSignalCounter;
double _x_frac_min;