|
|
|
|
@ -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()) |
|
|
|
|
|