mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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;
|
||||
};
|
||||
|
@@ -30,7 +30,7 @@ public:
|
||||
virtual ~V4L2Wrapper();
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
bool start();
|
||||
|
||||
void stop();
|
||||
|
||||
|
Reference in New Issue
Block a user