new frame grabber handling (#137)

* - implement framegrabber type option
- framegrabber autoselect
- integrate x11 grabber in hyperiond

* add doxy

* v4l: select device by name
hyperiond: fix x11 grabber connection to kodichecker
config: tune default prios of boblight and v4l

* make v4l name finding case insensitive
This commit is contained in:
redPanther
2016-07-24 15:18:34 +02:00
committed by GitHub
parent 01ec4a3655
commit 30b9c20611
16 changed files with 548 additions and 163 deletions

View File

@@ -80,11 +80,24 @@ bool V4L2Grabber::init()
if (! _initialized)
{
getV4Ldevices();
if ( _deviceName == "auto" )
std::string v4lDevices_str;
// show list only once
if ( ! QString(_deviceName.c_str()).startsWith("/dev/") )
{
for (auto& dev: _v4lDevices)
{
Debug(_log, "check v4l2 device: %s (%s)",dev.first.c_str(), dev.second.c_str());
v4lDevices_str += "\t"+ dev.first + "\t" + dev.second + "\n";
}
Info(_log, "available V4L2 devices:\n%s", v4lDevices_str.c_str());
}
if ( _deviceName == "auto" )
{
_deviceName = "unknown";
for (auto& dev: _v4lDevices)
{
//Debug(_log, "check v4l2 device: %s (%s)",dev.first.c_str(), dev.second.c_str());
_deviceName = dev.first;
if ( init() )
{
@@ -93,6 +106,18 @@ bool V4L2Grabber::init()
}
}
}
else if ( ! QString(_deviceName.c_str()).startsWith("/dev/") )
{
for (auto& dev: _v4lDevices)
{
if ( QString(_deviceName.c_str()).toLower() == QString(dev.second.c_str()).toLower() )
{
_deviceName = dev.first;
Info(_log, "found v4l2 device with configured name: %s (%s)", dev.second.c_str(), dev.first.c_str() );
break;
}
}
}
else
{
Info(_log, "configured v4l device: %s", _deviceName.c_str());