From e849667be6be0c9d1727f3a93e4fa4425b84cc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 20 Apr 2020 22:28:05 +0200 Subject: [PATCH] screen-cast-stream-src: Add getter for stride https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1207 --- src/backends/meta-screen-cast-stream-src.c | 9 +++++++++ src/backends/meta-screen-cast-stream-src.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c index 4f3d821ef..e63f5ddbb 100644 --- a/src/backends/meta-screen-cast-stream-src.c +++ b/src/backends/meta-screen-cast-stream-src.c @@ -956,6 +956,15 @@ meta_screen_cast_stream_src_init_initable_iface (GInitableIface *iface) iface->init = meta_screen_cast_stream_src_initable_init; } +int +meta_screen_cast_stream_src_get_stride (MetaScreenCastStreamSrc *src) +{ + MetaScreenCastStreamSrcPrivate *priv = + meta_screen_cast_stream_src_get_instance_private (src); + + return priv->video_stride; +} + MetaScreenCastStream * meta_screen_cast_stream_src_get_stream (MetaScreenCastStreamSrc *src) { diff --git a/src/backends/meta-screen-cast-stream-src.h b/src/backends/meta-screen-cast-stream-src.h index 3f6a1af2b..7e81ac48a 100644 --- a/src/backends/meta-screen-cast-stream-src.h +++ b/src/backends/meta-screen-cast-stream-src.h @@ -65,6 +65,8 @@ struct _MetaScreenCastStreamSrcClass void meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src); +int meta_screen_cast_stream_src_get_stride (MetaScreenCastStreamSrc *src); + MetaScreenCastStream * meta_screen_cast_stream_src_get_stream (MetaScreenCastStreamSrc *src); gboolean meta_screen_cast_stream_src_draw_cursor_into (MetaScreenCastStreamSrc *src,