mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added image handler to v4l2 grabber to send colors to Hyperion
Former-commit-id: be6fb4dd8080b3325ba6161f48c093f8a145786d
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifdef ENABLE_V4L2
|
||||
// v4l2 grabber
|
||||
#include <grabber/V4L2Grabber.h>
|
||||
#include <grabber/V4L2Wrapper.h>
|
||||
#endif
|
||||
|
||||
// XBMC Video checker includes
|
||||
@@ -172,19 +172,20 @@ int main(int argc, char** argv)
|
||||
|
||||
#ifdef ENABLE_V4L2
|
||||
// construct and start the v4l2 grabber if the configuration is present
|
||||
V4L2Grabber * v4l2Grabber = nullptr;
|
||||
V4L2Wrapper * v4l2Grabber = nullptr;
|
||||
if (config.isMember("grabber-v4l2"))
|
||||
{
|
||||
const Json::Value & grabberConfig = config["grabber-v4l2"];
|
||||
v4l2Grabber = new V4L2Grabber(
|
||||
v4l2Grabber = new V4L2Wrapper(
|
||||
grabberConfig.get("device", "/dev/video0").asString(),
|
||||
grabberConfig.get("input", 0).asInt(),
|
||||
parseVideoStandard(grabberConfig.get("standard", "NONE").asString()),
|
||||
parseVideoStandard(grabberConfig.get("standard", "no-change").asString()),
|
||||
grabberConfig.get("width", -1).asInt(),
|
||||
grabberConfig.get("height", -1).asInt(),
|
||||
grabberConfig.get("frameDecimation", 2).asInt(),
|
||||
grabberConfig.get("sizeDecimation", 8).asInt(),
|
||||
grabberConfig.get("sizeDecimation", 8).asInt());
|
||||
&hyperion,
|
||||
grabberConfig.get("priority", 800).asInt());
|
||||
v4l2Grabber->set3D(parse3DMode(grabberConfig.get("mode", "2D").asString()));
|
||||
v4l2Grabber->setCropping(
|
||||
grabberConfig.get("cropLeft", 0).asInt(),
|
||||
@@ -192,7 +193,6 @@ int main(int argc, char** argv)
|
||||
grabberConfig.get("cropTop", 0).asInt(),
|
||||
grabberConfig.get("cropBottom", 0).asInt());
|
||||
|
||||
// TODO: create handler
|
||||
v4l2Grabber->start();
|
||||
std::cout << "V4l2 grabber created and started" << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user