Inspect capture plugin dependencies and recognize XWayland sessions
This commit is contained in:
1 parent
97c460e2f1
commit
27f3726124
3 files changed
+7
-4
No files matched your search
@@ -98,8 +98,9 @@ QList<StreamVideoSource> StreamPublishEngine::sources() {
|
||||
QList<StreamVideoSource> sources;
|
||||
#ifdef HAVE_STREAM_CAPTURE
|
||||
for (const auto& camera : QMediaDevices::videoInputs()) sources.push_back({StreamVideoSource::Camera, camera.description(), camera.id(), {}});
|
||||
if (QGuiApplication::platformName().contains("wayland")) {
|
||||
sources.push_back({StreamVideoSource::Screen, text("Screen or window (system selection)"), "portal", {}});
|
||||
if (QGuiApplication::platformName().contains("wayland") || qEnvironmentVariable("XDG_SESSION_TYPE") == "wayland"
|
||||
|| qEnvironmentVariableIsSet("WAYLAND_DISPLAY")) {
|
||||
sources.push_back({StreamVideoSource::Screen, text("Screen (system selection)"), "portal", {}});
|
||||
} else {
|
||||
for (auto* screen : QGuiApplication::screens()) sources.push_back({StreamVideoSource::Screen, screen->name(), screen->name().toUtf8(), {}});
|
||||
for (const auto& window : QWindowCapture::capturableWindows())
|
||||
|
||||
Reference in new issue
Block a user