mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
v4l: fix auto mode opens usable device twice (#139)
This commit is contained in:
parent
108e06ed46
commit
6840d93206
@ -4,16 +4,18 @@
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QFileInfo>
|
||||
|
||||
@ -97,12 +99,11 @@ bool V4L2Grabber::init()
|
||||
_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() )
|
||||
{
|
||||
Info(_log, "found usable v4l2 device: %s (%s)",dev.first.c_str(), dev.second.c_str());
|
||||
break;
|
||||
return _initialized;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user