hyperion won't fail, if v4l2 has invalid device + auto device (#118)

* hyperion won't fail, if v4l2 has invalid device

* add v4l auto select. use "auto" as device name
This commit is contained in:
redPanther
2016-07-14 23:40:10 +02:00
committed by brindosch
parent 9f1bc6d9e8
commit b49ada956b
6 changed files with 152 additions and 78 deletions

View File

@@ -3,6 +3,7 @@
// stl includes
#include <string>
#include <vector>
#include <map>
// Qt includes
#include <QObject>
@@ -50,7 +51,7 @@ public slots:
double blueSignalThreshold,
int noSignalCounterThreshold);
void start();
bool start();
void stop();
@@ -61,6 +62,11 @@ private slots:
int read_frame();
private:
void getV4Ldevices();
bool init();
void uninit();
void open_device();
void close_device();
@@ -102,8 +108,11 @@ private:
};
private:
const std::string _deviceName;
const io_method _ioMethod;
std::string _deviceName;
std::map<std::string,std::string> _v4lDevices;
int _input;
VideoStandard _videoStandard;
io_method _ioMethod;
int _fileDescriptor;
std::vector<buffer> _buffers;
@@ -125,4 +134,5 @@ private:
ImageResampler _imageResampler;
Logger * _log;
bool _initialized;
};

View File

@@ -30,7 +30,7 @@ public:
virtual ~V4L2Wrapper();
public slots:
void start();
bool start();
void stop();