mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
use a common camera:// prefix for video input
Refs #69017 Change-Id: Iab0a6d49221d1a14e5e563e1747ea5a1dd5aff22
This commit is contained in:

committed by
Guillaume Roguez

parent
8507024c70
commit
a948e1f955
@ -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
|
||||
|
Reference in New Issue
Block a user