services/pipewire: add reconnect support

This commit is contained in:
outfoxxed 2026-01-08 03:58:17 -08:00
parent 8d19beb69e
commit 5d8354a88b
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
10 changed files with 277 additions and 32 deletions

View file

@ -30,6 +30,9 @@ public:
~PwCore() override;
Q_DISABLE_COPY_MOVE(PwCore);
bool start(bool retry);
void shutdown();
[[nodiscard]] bool isValid() const;
[[nodiscard]] qint32 sync(quint32 id) const;
@ -40,6 +43,7 @@ public:
signals:
void polled();
void synced(quint32 id, qint32 seq);
void fatalError();
private slots:
void poll();
@ -48,6 +52,7 @@ private:
static const pw_core_events EVENTS;
static void onSync(void* data, quint32 id, qint32 seq);
static void onError(void* data, quint32 id, qint32 seq, qint32 res, const char* message);
QSocketNotifier notifier;
SpaHook listener;