Commit a948e1f9 authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez

use a common camera:// prefix for video input

Refs #69017

Change-Id: Iab0a6d49221d1a14e5e563e1747ea5a1dd5aff22
parent 8507024c
......@@ -60,7 +60,7 @@
A media resource locator (MRL).
Currently, the following are supported:
<ul>
<li>v4l2://DEVICE</li>
<li>camera://DEVICE</li>
<li>display://DISPLAY_NAME[ WIDTHxHEIGHT]</li>
<li>file://IMAGE_PATH</li>
</ul>
......
......@@ -108,9 +108,7 @@ VideoDeviceMonitor::getMRLForDefaultDevice() const
const auto it = findDeviceByName(defaultDevice_);
if(it == std::end(devices_))
return {};
auto prefix = it->getDeviceParams().format;
return prefix + "://" + it->getSettings().name;
return "camera://" + it->getSettings().name;
}
void
......
......@@ -317,7 +317,7 @@ VideoInput::switchInput(const std::string& resource)
bool valid = false;
if (prefix == "video4linux2") {
if (prefix == "camera") {
/* Video4Linux2 */
valid = initCamera(suffix);
} else if (prefix == "display") {
......@@ -326,9 +326,6 @@ VideoInput::switchInput(const std::string& resource)
} else if (prefix == "file") {
/* Pathname */
valid = initFile(suffix);
} else if (prefix == "avfoundation") {
/* AVFoundation */
valid = initCamera(suffix);
}
// Unsupported MRL or failed initialization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment