2020-07-22 17:29:23 +00:00
|
|
|
/*
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2018-2020 Red Hat Inc
|
|
|
|
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
|
|
SPDX-FileContributor: Jan Grulich <jgrulich@redhat.com>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
*/
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-11-07 19:34:55 +00:00
|
|
|
#include "plugin.h"
|
|
|
|
|
2020-09-04 14:55:59 +00:00
|
|
|
#include <KWaylandServer/screencast_v1_interface.h>
|
2020-07-22 17:29:23 +00:00
|
|
|
|
2020-07-28 13:37:04 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2020-07-22 17:29:23 +00:00
|
|
|
class PipeWireStream;
|
|
|
|
|
2020-11-07 19:34:55 +00:00
|
|
|
class ScreencastManager : public Plugin
|
2020-07-22 17:29:23 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-07-27 11:07:57 +00:00
|
|
|
|
2020-07-22 17:29:23 +00:00
|
|
|
public:
|
2020-07-27 11:07:57 +00:00
|
|
|
explicit ScreencastManager(QObject *parent = nullptr);
|
2020-07-22 17:29:23 +00:00
|
|
|
|
2020-09-04 14:55:59 +00:00
|
|
|
void streamWindow(KWaylandServer::ScreencastStreamV1Interface *stream, const QString &winid);
|
|
|
|
void streamOutput(KWaylandServer::ScreencastStreamV1Interface *stream,
|
2020-09-02 14:38:56 +00:00
|
|
|
KWaylandServer::OutputInterface *output,
|
2020-09-04 14:55:59 +00:00
|
|
|
KWaylandServer::ScreencastV1Interface::CursorMode mode);
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
private:
|
2020-09-04 14:55:59 +00:00
|
|
|
void integrateStreams(KWaylandServer::ScreencastStreamV1Interface *waylandStream, PipeWireStream *pipewireStream);
|
2020-07-27 11:05:52 +00:00
|
|
|
|
2020-09-04 14:55:59 +00:00
|
|
|
KWaylandServer::ScreencastV1Interface *m_screencast;
|
2020-07-22 17:29:23 +00:00
|
|
|
};
|
|
|
|
|
2020-07-28 13:37:04 +00:00
|
|
|
} // namespace KWin
|