Fix camera plugin selection.
When requesting a camera plugin for a given device id, it should fall back to any available plugin if that device id is not found. Change-Id: I685294c7fdcaa72bce70178b0aae2ec92e79e107 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
@@ -359,19 +359,14 @@ public:
|
||||
}
|
||||
break;
|
||||
case QMediaServiceProviderHint::Device: {
|
||||
plugin = plugins[0];
|
||||
foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
|
||||
QMediaServiceSupportedDevicesInterface *iface =
|
||||
qobject_cast<QMediaServiceSupportedDevicesInterface*>(currentPlugin);
|
||||
|
||||
if (!iface) {
|
||||
// the plugin may support the device,
|
||||
// but this choice still can be overridden
|
||||
if (iface && iface->devices(type).contains(hint.device())) {
|
||||
plugin = currentPlugin;
|
||||
} else {
|
||||
if (iface->devices(type).contains(hint.device())) {
|
||||
plugin = currentPlugin;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user