Changeset View
Changeset View
Standalone View
Standalone View
src/screencast.cpp
Show All 16 Lines | |||||
17 | * Authors: | 17 | * Authors: | ||
18 | * Jan Grulich <jgrulich@redhat.com> | 18 | * Jan Grulich <jgrulich@redhat.com> | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "screencast.h" | 21 | #include "screencast.h" | ||
22 | #include "session.h" | 22 | #include "session.h" | ||
23 | #include "screencaststream.h" | 23 | #include "screencaststream.h" | ||
24 | #include "screenchooserdialog.h" | 24 | #include "screenchooserdialog.h" | ||
25 | #include "utils.h" | ||||
25 | 26 | | |||
26 | #include <QEventLoop> | 27 | #include <QEventLoop> | ||
27 | #include <QLoggingCategory> | 28 | #include <QLoggingCategory> | ||
28 | #include <QThread> | 29 | #include <QThread> | ||
29 | #include <QTimer> | 30 | #include <QTimer> | ||
30 | 31 | | |||
31 | #include <QDBusMetaType> | 32 | #include <QDBusMetaType> | ||
32 | #include <QDBusError> | 33 | #include <QDBusError> | ||
▲ Show 20 Lines • Show All 369 Lines • ▼ Show 20 Line(s) | 382 | { | |||
402 | } | 403 | } | ||
403 | 404 | | |||
404 | if (!m_eglInitialized) { | 405 | if (!m_eglInitialized) { | ||
405 | qCWarning(XdgDesktopPortalKdeScreenCast) << "EGL is not initialized, we are not able to process screen content"; | 406 | qCWarning(XdgDesktopPortalKdeScreenCast) << "EGL is not initialized, we are not able to process screen content"; | ||
406 | return 2; | 407 | return 2; | ||
407 | } | 408 | } | ||
408 | 409 | | |||
409 | QScopedPointer<ScreenChooserDialog, QScopedPointerDeleteLater> screenDialog(new ScreenChooserDialog(m_outputMap, session->multipleSources())); | 410 | QScopedPointer<ScreenChooserDialog, QScopedPointerDeleteLater> screenDialog(new ScreenChooserDialog(m_outputMap, session->multipleSources())); | ||
411 | Utils::setParentWindow(screenDialog.data(), parent_window); | ||||
410 | 412 | | |||
411 | if (screenDialog->exec()) { | 413 | if (screenDialog->exec()) { | ||
412 | ScreenCastPortalOutput selectedOutput = m_outputMap.value(screenDialog->selectedScreens().first()); | 414 | ScreenCastPortalOutput selectedOutput = m_outputMap.value(screenDialog->selectedScreens().first()); | ||
413 | 415 | | |||
414 | // Initialize PipeWire | 416 | // Initialize PipeWire | ||
415 | createPipeWireStream(selectedOutput.resolution); | 417 | createPipeWireStream(selectedOutput.resolution); | ||
416 | 418 | | |||
417 | // HACK wait for stream to be ready | 419 | // HACK wait for stream to be ready | ||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |