mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	v4l grabber wont crash hyperiond anymore (#168)
* v4l errors won't lead to crash hyperiond (exceptions are catched) v4l auto device mode with better log messages createV4l in hyperiond.cpp refactored, now v4l is always available as long as it is compiled in * change back, code accidently altered * fix compile of dispmanx grabber
This commit is contained in:
		| @@ -37,10 +37,9 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device, | ||||
| 	qRegisterMetaType<std::vector<ColorRgb>>("std::vector<ColorRgb>"); | ||||
|  | ||||
| 	// Handle the image in the captured thread using a direct connection | ||||
| 	QObject::connect( | ||||
| 				&_grabber, SIGNAL(newFrame(Image<ColorRgb>)), | ||||
| 				this, SLOT(newFrame(Image<ColorRgb>)), | ||||
| 				Qt::DirectConnection); | ||||
| 	QObject::connect(&_grabber, SIGNAL(newFrame(Image<ColorRgb>)), this, SLOT(newFrame(Image<ColorRgb>)), Qt::DirectConnection); | ||||
|  | ||||
| 	QObject::connect(&_grabber, SIGNAL(readError(const char*)), this, SLOT(readError(const char*)), Qt::DirectConnection); | ||||
|  | ||||
| 	// send color data to Hyperion using a queued connection to handle the data over to the main event loop | ||||
| // 	QObject::connect( | ||||
| @@ -92,6 +91,12 @@ void V4L2Wrapper::newFrame(const Image<ColorRgb> &image) | ||||
| 	_hyperion->setColors(_priority, _ledColors, _timeout_ms); | ||||
| } | ||||
|  | ||||
| void V4L2Wrapper::readError(const char* err) | ||||
| { | ||||
| 	Error(_log, "stop grabber, because reading device failed. (%s)", err); | ||||
| 	stop(); | ||||
| } | ||||
| 	 | ||||
| void V4L2Wrapper::checkSources() | ||||
| { | ||||
| 	QList<int> activePriorities = _hyperion->getActivePriorities(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user