Skip to content
Snippets Groups Projects
Commit 9cb6073c authored by Adrien Béraud's avatar Adrien Béraud Committed by Emmanuel Lepage Vallee
Browse files

use a common camera:// prefix for video input

Refs #69017
parent a123a9fc
Branches
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
constexpr static const char* NONE = "" ; constexpr static const char* NONE = "" ;
constexpr static const char* DISPLAY = "display://"; constexpr static const char* DISPLAY = "display://";
constexpr static const char* FILE = "file://" ; constexpr static const char* FILE = "file://" ;
constexpr static const char* V4L2 = "v4l2://" ; constexpr static const char* CAMERA = "camera://" ;
}; };
struct Display { struct Display {
...@@ -164,7 +164,7 @@ void Video::SourcesModel::switchTo(const int idx) ...@@ -164,7 +164,7 @@ void Video::SourcesModel::switchTo(const int idx)
); );
break; break;
default: default:
DBus::VideoManager::instance().switchInput(Video::SourcesModelPrivate::ProtocolPrefix::V4L2 + DBus::VideoManager::instance().switchInput(Video::SourcesModelPrivate::ProtocolPrefix::CAMERA +
Video::DeviceModel::instance()->index(idx-ExtendedDeviceList::COUNT__,0).data(Qt::DisplayRole).toString()); Video::DeviceModel::instance()->index(idx-ExtendedDeviceList::COUNT__,0).data(Qt::DisplayRole).toString());
break; break;
}; };
...@@ -173,7 +173,7 @@ void Video::SourcesModel::switchTo(const int idx) ...@@ -173,7 +173,7 @@ void Video::SourcesModel::switchTo(const int idx)
void Video::SourcesModel::switchTo(Video::Device* device) void Video::SourcesModel::switchTo(Video::Device* device)
{ {
DBus::VideoManager::instance().switchInput(Video::SourcesModelPrivate::ProtocolPrefix::V4L2 + device->id()); DBus::VideoManager::instance().switchInput(Video::SourcesModelPrivate::ProtocolPrefix::CAMERA + device->id());
} }
Video::Device* Video::SourcesModel::deviceAt(const QModelIndex& idx) const Video::Device* Video::SourcesModel::deviceAt(const QModelIndex& idx) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment