You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
438 B
30 lines
438 B
#include "sink.hpp" |
|
|
|
namespace cv { |
|
namespace viz { |
|
|
|
Sink::Sink(std::function<bool(const cv::UMat&)> consumer) : consumer_(consumer) { |
|
} |
|
|
|
Sink::Sink() { |
|
|
|
} |
|
Sink::~Sink() { |
|
} |
|
|
|
bool Sink::isReady() { |
|
if(consumer_) |
|
return true; |
|
else |
|
return false; |
|
} |
|
|
|
bool Sink::isOpen() { |
|
return open_; |
|
} |
|
|
|
void Sink::operator()(const cv::UMat& frame) { |
|
open_ = consumer_(frame); |
|
} |
|
} /* namespace viz2d */ |
|
} /* namespace kb */
|
|
|