KWin
Loading...
Searching...
No Matches
pipewirecore.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2018-2020 Red Hat Inc
3 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
4 SPDX-FileContributor: Jan Grulich <jgrulich@redhat.com>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#pragma once
10
11#include <QDebug>
12#include <QObject>
13
14#include <pipewire/pipewire.h>
15#include <spa/utils/hook.h>
16
17namespace KWin
18{
19
20class PipeWireCore : public QObject
21{
22 Q_OBJECT
23public:
25
26 static void onCoreError(void *data, uint32_t id, int seq, int res, const char *message);
27
29
30 bool init();
31
32 static std::shared_ptr<PipeWireCore> self();
33
34 struct pw_core *pwCore = nullptr;
35 struct pw_context *pwContext = nullptr;
36 struct pw_loop *pwMainLoop = nullptr;
37 spa_hook coreListener;
38 QString m_error;
39
40 pw_core_events pwCoreEvents = {};
41
42Q_SIGNALS:
43 void pipewireFailed(const QString &message);
44};
45
46} // namespace KWin
struct pw_loop * pwMainLoop
struct pw_core * pwCore
pw_core_events pwCoreEvents
void pipewireFailed(const QString &message)
static std::shared_ptr< PipeWireCore > self()
static void onCoreError(void *data, uint32_t id, int seq, int res, const char *message)
struct pw_context * pwContext