kwin/screencast/screencastmanager.h

46 lines
1.5 KiB
C
Raw Normal View History

/*
* Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Jan Grulich <jgrulich@redhat.com>
* Aleix Pol Gonzalez <aleixpol@kde.org>
*/
#pragma once
#include <KWaylandServer/screencast_interface.h>
class PipeWireStream;
2020-07-27 11:07:57 +00:00
class ScreencastManager : public QObject
{
Q_OBJECT
2020-07-27 11:07:57 +00:00
public:
2020-07-27 11:07:57 +00:00
explicit ScreencastManager(QObject *parent = nullptr);
void streamWindow(KWaylandServer::ScreencastStreamInterface *stream, const QString &winid);
void streamOutput(KWaylandServer::ScreencastStreamInterface *stream,
2020-07-27 11:07:57 +00:00
::wl_resource *outputResource,
KWaylandServer::ScreencastInterface::CursorMode mode);
private:
void integrateStreams(KWaylandServer::ScreencastStreamInterface *waylandStream, PipeWireStream *pipewireStream);
KWaylandServer::ScreencastInterface *m_screencast;
};