screencast: Address minor issues

This commit is contained in:
Vlad Zahorodnii 2020-07-27 14:07:57 +03:00 committed by Vlad Zahorodnii
parent 5a73f4a350
commit 29064f088d
2 changed files with 19 additions and 22 deletions

View file

@ -19,20 +19,22 @@
*/ */
#include "screencastmanager.h" #include "screencastmanager.h"
#include "scene.h" #include "abstract_client.h"
#include "workspace.h"
#include "composite.h"
#include "platform.h"
#include "abstract_wayland_output.h" #include "abstract_wayland_output.h"
#include "plugins/scenes/opengl/scene_opengl.h" #include "composite.h"
#include "deleted.h"
#include "effects.h"
#include "kwingltexture.h"
#include "pipewirestream.h" #include "pipewirestream.h"
#include "platform.h"
#include "scene.h"
#include "wayland_server.h"
#include "workspace.h"
#include <KLocalizedString>
#include <KWaylandServer/display.h> #include <KWaylandServer/display.h>
#include <KWaylandServer/output_interface.h> #include <KWaylandServer/output_interface.h>
#include <KLocalizedString>
#include <abstract_client.h>
#include <effects.h>
#include <deleted.h>
using namespace KWin; using namespace KWin;
@ -45,6 +47,7 @@ ScreencastManager::ScreencastManager(QObject *parent)
connect(m_screencast, &KWaylandServer::ScreencastInterface::outputScreencastRequested, connect(m_screencast, &KWaylandServer::ScreencastInterface::outputScreencastRequested,
this, &ScreencastManager::streamOutput); this, &ScreencastManager::streamOutput);
} }
class EGLFence : public QObject class EGLFence : public QObject
{ {
public: public:
@ -136,8 +139,8 @@ void ScreencastManager::streamWindow(KWaylandServer::ScreencastStreamInterface *
} }
void ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamInterface *waylandStream, void ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamInterface *waylandStream,
::wl_resource *outputResource, ::wl_resource *outputResource,
KWaylandServer::ScreencastInterface::CursorMode mode) KWaylandServer::ScreencastInterface::CursorMode mode)
{ {
auto outputIface = KWaylandServer::OutputInterface::get(outputResource); auto outputIface = KWaylandServer::OutputInterface::get(outputResource);
if (!outputIface) { if (!outputIface) {

View file

@ -21,27 +21,21 @@
#pragma once #pragma once
#include "wayland_server.h"
#include <KWaylandServer/screencast_interface.h> #include <KWaylandServer/screencast_interface.h>
class PipeWireStream; class PipeWireStream;
namespace KWin class ScreencastManager : public QObject
{
class AbstractEglBackend;
}
class ScreencastManager
: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
ScreencastManager(QObject *parent); explicit ScreencastManager(QObject *parent = nullptr);
void streamWindow(KWaylandServer::ScreencastStreamInterface *stream, const QString &winid); void streamWindow(KWaylandServer::ScreencastStreamInterface *stream, const QString &winid);
void streamOutput(KWaylandServer::ScreencastStreamInterface *stream, void streamOutput(KWaylandServer::ScreencastStreamInterface *stream,
::wl_resource *outputResource, ::wl_resource *outputResource,
KWaylandServer::ScreencastInterface::CursorMode mode); KWaylandServer::ScreencastInterface::CursorMode mode);
private: private:
void integrateStreams(KWaylandServer::ScreencastStreamInterface *waylandStream, PipeWireStream *pipewireStream); void integrateStreams(KWaylandServer::ScreencastStreamInterface *waylandStream, PipeWireStream *pipewireStream);