From a2a4067e07311e9f74ac8744027601ccba69c496 Mon Sep 17 00:00:00 2001 From: Pascal Nowack Date: Fri, 29 Sep 2023 12:33:17 +0200 Subject: [PATCH] screencast: Add ability to stop streams When a stream is destroyed by a consumer, mutter won't be able to recognize that. For mutter, the stream just paused, but did not disconnect, because the connection state of a PipeWire stream only represents, whether the respective PipeWire context is connected to PipeWire. In addition to that, it may be the case, that the stream consumer just recreates the stream. So even if mutter would be able to know, when the stream consumer destroyed a stream, but not the whole screencast or remote-desktop session, then mutter would not know, whether the stream will be resumed eventually or not. So, add an explicit API call to the screencast interface to stop a stream. For virtual streams, this also means, that the respective virtual monitor is destroyed. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2889 Part-of: --- .../org.gnome.Mutter.ScreenCast.xml | 8 ++++++ src/backends/meta-screen-cast-stream.c | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml index 345650732..4d8936c38 100644 --- a/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml +++ b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml @@ -199,6 +199,14 @@ --> + + +