mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Logging migration continues ... (#97)
* migrate logging for blackborder and bonjour. fix logging bug in hyperion * fix kodichecker when kodi is not there
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#include <iostream>
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// BlackBorders includes
|
||||
#include <blackborder/BlackBorderDetector.h>
|
||||
#include <cmath>
|
||||
|
||||
using namespace hyperion;
|
||||
|
||||
BlackBorderDetector::BlackBorderDetector(double threshold) :
|
||||
_blackborderThreshold(calculateThreshold(threshold))
|
||||
BlackBorderDetector::BlackBorderDetector(double threshold)
|
||||
: _blackborderThreshold(calculateThreshold(threshold))
|
||||
{
|
||||
// empty
|
||||
}
|
||||
@@ -21,7 +23,7 @@ uint8_t BlackBorderDetector::calculateThreshold(double threshold)
|
||||
|
||||
uint8_t blackborderThreshold = uint8_t(rgbThreshold);
|
||||
|
||||
std::cout << "BLACKBORDER INFO: threshold set to " << threshold << " (" << int(blackborderThreshold) << ")" << std::endl;
|
||||
Info(Logger::getInstance("BLACKBORDER"), "threshold set to %f (%d)", threshold , int(blackborderThreshold));
|
||||
|
||||
return blackborderThreshold;
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#include <iostream>
|
||||
/*
|
||||
#include <iomanip>
|
||||
using std::setw;
|
||||
//*/
|
||||
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// Blackborder includes
|
||||
#include <blackborder/BlackBorderProcessor.h>
|
||||
@@ -10,20 +8,19 @@ using std::setw;
|
||||
|
||||
using namespace hyperion;
|
||||
|
||||
BlackBorderProcessor::BlackBorderProcessor(const Json::Value &blackborderConfig) :
|
||||
_unknownSwitchCnt(blackborderConfig.get("unknownFrameCnt", 600).asUInt()),
|
||||
_borderSwitchCnt(blackborderConfig.get("borderFrameCnt", 50).asUInt()),
|
||||
_maxInconsistentCnt(blackborderConfig.get("maxInconsistentCnt", 10).asUInt()),
|
||||
_blurRemoveCnt(blackborderConfig.get("blurRemoveCnt", 1).asUInt()),
|
||||
_detectionMode(blackborderConfig.get("mode", "default").asString()),
|
||||
_detector(blackborderConfig.get("threshold", 0.01).asDouble()),
|
||||
_currentBorder({true, -1, -1}),
|
||||
_previousDetectedBorder({true, -1, -1}),
|
||||
_consistentCnt(0),
|
||||
_inconsistentCnt(10)
|
||||
BlackBorderProcessor::BlackBorderProcessor(const Json::Value &blackborderConfig)
|
||||
: _unknownSwitchCnt(blackborderConfig.get("unknownFrameCnt", 600).asUInt())
|
||||
, _borderSwitchCnt(blackborderConfig.get("borderFrameCnt", 50).asUInt())
|
||||
, _maxInconsistentCnt(blackborderConfig.get("maxInconsistentCnt", 10).asUInt())
|
||||
, _blurRemoveCnt(blackborderConfig.get("blurRemoveCnt", 1).asUInt())
|
||||
, _detectionMode(blackborderConfig.get("mode", "default").asString())
|
||||
, _detector(blackborderConfig.get("threshold", 0.01).asDouble())
|
||||
, _currentBorder({true, -1, -1})
|
||||
, _previousDetectedBorder({true, -1, -1})
|
||||
, _consistentCnt(0)
|
||||
, _inconsistentCnt(10)
|
||||
{
|
||||
std::cout << "BLACKBORDER INFO: mode:" << _detectionMode << std::endl;
|
||||
// empty
|
||||
Info(Logger::getInstance("BLACKBORDER"), "mode: %s", _detectionMode.c_str());
|
||||
}
|
||||
|
||||
BlackBorder BlackBorderProcessor::getCurrentBorder() const
|
||||
|
Reference in New Issue
Block a user