mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added reading the enable flag for the border detector
Former-commit-id: d2cf4df9a7684107b30f9bc01d5aa90b321ce1b5
This commit is contained in:
@@ -99,7 +99,7 @@ Hyperion::Hyperion(const Json::Value &jsonConfig) :
|
||||
_device(constructDevice(jsonConfig["device"])),
|
||||
_timer()
|
||||
{
|
||||
ImageProcessorFactory::getInstance().init(_ledString);
|
||||
ImageProcessorFactory::getInstance().init(_ledString, jsonConfig["blackborderdetector"].get("enable", true).asBool());
|
||||
|
||||
_timer.setSingleShot(true);
|
||||
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));
|
||||
|
@@ -10,9 +10,9 @@
|
||||
|
||||
using namespace hyperion;
|
||||
|
||||
ImageProcessor::ImageProcessor(const LedString& ledString) :
|
||||
ImageProcessor::ImageProcessor(const LedString& ledString, bool enableBlackBorderDetector) :
|
||||
mLedString(ledString),
|
||||
_enableBlackBorderRemoval(true),
|
||||
_enableBlackBorderRemoval(enableBlackBorderDetector),
|
||||
_borderProcessor(new BlackBorderProcessor(600, 50, 1)),
|
||||
mImageToLeds(nullptr)
|
||||
{
|
||||
|
@@ -10,12 +10,13 @@ ImageProcessorFactory& ImageProcessorFactory::getInstance()
|
||||
return instance;
|
||||
}
|
||||
|
||||
void ImageProcessorFactory::init(const LedString& ledString)
|
||||
void ImageProcessorFactory::init(const LedString& ledString, bool enableBlackBorderDetector)
|
||||
{
|
||||
_ledString = ledString;
|
||||
_enableBlackBorderDetector = enableBlackBorderDetector;
|
||||
}
|
||||
|
||||
ImageProcessor* ImageProcessorFactory::newImageProcessor() const
|
||||
{
|
||||
return new ImageProcessor(_ledString);
|
||||
return new ImageProcessor(_ledString, _enableBlackBorderDetector);
|
||||
}
|
||||
|
@@ -169,6 +169,18 @@
|
||||
"additionalProperties" : false
|
||||
}
|
||||
},
|
||||
"blackborderdetector" :
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : false,
|
||||
"properties" : {
|
||||
"enable" : {
|
||||
"type" : "boolean",
|
||||
"required" : true
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"xbmcVideoChecker" :
|
||||
{
|
||||
"type" : "object",
|
||||
|
Reference in New Issue
Block a user