mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
screen-cast-stream: Embed the wayland output name to streams
If a screencast session is screencasting from multiple monitors, it is not possible to distinguish which stream (or PipeWire stream node id) belongs to which connected monitor (such information may be useful to the caller e.g. caller might want to embed the stream in a window and name it after the monitor connector, for example). This change adds optional metadata for monitor streams to also return the wayland output name with the stream. Ideally, this metadata should equip the caller to get more information about display from the following Wayland interfaces: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_output https://wayland.app/protocols/xdg-output-unstable-v1 Related: - https://github.com/flatpak/xdg-desktop-portal/pull/832 - https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/48 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2540>
This commit is contained in:
parent
dcd3bccae5
commit
e2d4da8562
@ -221,6 +221,9 @@
|
|||||||
compositor coordinate space.
|
compositor coordinate space.
|
||||||
* "size" (ii): Size of the source of the stream in the compositor
|
* "size" (ii): Size of the source of the stream in the compositor
|
||||||
coordinate space.
|
coordinate space.
|
||||||
|
* "output-name" s: Xrandr name of the output in case of X11 and
|
||||||
|
wl_output.name in case of Wayland. Available only
|
||||||
|
for monitor streams.
|
||||||
-->
|
-->
|
||||||
<property name="Parameters" type="a{sv}" access="read" />
|
<property name="Parameters" type="a{sv}" access="read" />
|
||||||
|
|
||||||
|
@ -168,6 +168,7 @@ meta_screen_cast_monitor_stream_set_parameters (MetaScreenCastStream *stream,
|
|||||||
MetaScreenCastMonitorStream *monitor_stream =
|
MetaScreenCastMonitorStream *monitor_stream =
|
||||||
META_SCREEN_CAST_MONITOR_STREAM (stream);
|
META_SCREEN_CAST_MONITOR_STREAM (stream);
|
||||||
MetaRectangle logical_monitor_layout;
|
MetaRectangle logical_monitor_layout;
|
||||||
|
const char *output_name;
|
||||||
|
|
||||||
logical_monitor_layout =
|
logical_monitor_layout =
|
||||||
meta_logical_monitor_get_layout (monitor_stream->logical_monitor);
|
meta_logical_monitor_get_layout (monitor_stream->logical_monitor);
|
||||||
@ -182,6 +183,10 @@ meta_screen_cast_monitor_stream_set_parameters (MetaScreenCastStream *stream,
|
|||||||
g_variant_new ("(ii)",
|
g_variant_new ("(ii)",
|
||||||
logical_monitor_layout.width,
|
logical_monitor_layout.width,
|
||||||
logical_monitor_layout.height));
|
logical_monitor_layout.height));
|
||||||
|
|
||||||
|
output_name = meta_monitor_get_connector (monitor_stream->monitor);
|
||||||
|
g_variant_builder_add (parameters_builder, "{sv}", "output-name",
|
||||||
|
g_variant_new ("s", output_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user