implement use of multiple v4l devices.

Not all v4l devices are compat with that or must be attaches to different usb controllers
This commit is contained in:
redpanther
2016-08-30 22:28:13 +02:00
parent 02ee557300
commit a85a5c0f2c
7 changed files with 172 additions and 148 deletions

View File

@@ -50,7 +50,7 @@ V4L2Grabber::V4L2Grabber(const std::string & device,
, _noSignalCounter(0)
, _streamNotifier(nullptr)
, _imageResampler()
, _log(Logger::getInstance("V4L2"))
, _log(Logger::getInstance("V4L2:"+device))
, _initialized(false)
, _deviceAutoDiscoverEnabled(false)
{

View File

@@ -16,7 +16,7 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device,
double greenSignalThreshold,
double blueSignalThreshold,
const int priority)
: GrabberWrapper("V4L2", priority)
: GrabberWrapper("V4L2:"+device, priority)
, _timeout_ms(1000)
, _grabber(device,
input,

View File

@@ -399,83 +399,87 @@
},
"grabber-v4l2" :
{
"type" : "object",
"properties" :
"type":"array",
"items":
{
"enable" :
"type" : "object",
"properties" :
{
"type" : "boolean"
"enable" :
{
"type" : "boolean"
},
"device" :
{
"type" : "string"
},
"input" :
{
"type" : "integer"
},
"standard" :
{
"type" : "string"
},
"width" :
{
"type" : "integer"
},
"height" :
{
"type" : "integer"
},
"frameDecimation" :
{
"type" : "integer"
},
"sizeDecimation" :
{
"type" : "integer"
},
"priority" :
{
"type" : "integer"
},
"mode" :
{
"type" : "string"
},
"useKodiChecker" :
{
"type" : "boolean"
},
"cropLeft" :
{
"type" : "integer"
},
"cropRight" :
{
"type" : "integer"
},
"cropTop" :
{
"type" : "integer"
},
"cropBottom" :
{
"type" : "integer"
},
"redSignalThreshold" :
{
"type" : "number"
},
"greenSignalThreshold" :
{
"type" : "number"
},
"blueSignalThreshold" :
{
"type" : "number"
}
},
"device" :
{
"type" : "string"
},
"input" :
{
"type" : "integer"
},
"standard" :
{
"type" : "string"
},
"width" :
{
"type" : "integer"
},
"height" :
{
"type" : "integer"
},
"frameDecimation" :
{
"type" : "integer"
},
"sizeDecimation" :
{
"type" : "integer"
},
"priority" :
{
"type" : "integer"
},
"mode" :
{
"type" : "string"
},
"useKodiChecker" :
{
"type" : "boolean"
},
"cropLeft" :
{
"type" : "integer"
},
"cropRight" :
{
"type" : "integer"
},
"cropTop" :
{
"type" : "integer"
},
"cropBottom" :
{
"type" : "integer"
},
"redSignalThreshold" :
{
"type" : "number"
},
"greenSignalThreshold" :
{
"type" : "number"
},
"blueSignalThreshold" :
{
"type" : "number"
}
},
"additionalProperties" : false
}
},
"framegrabber" :
{