diff --git a/src/backends/meta-screen-cast-session.c b/src/backends/meta-screen-cast-session.c index 674e1214e..b95ce514d 100644 --- a/src/backends/meta-screen-cast-session.c +++ b/src/backends/meta-screen-cast-session.c @@ -97,6 +97,24 @@ meta_screen_cast_session_close (MetaScreenCastSession *session) g_object_unref (session); } +MetaScreenCastStream * +meta_screen_cast_session_get_stream (MetaScreenCastSession *session, + const char *path) +{ + GList *l; + + for (l = session->streams; l; l = l->next) + { + MetaScreenCastStream *stream = l->data; + + if (g_strcmp0 (meta_screen_cast_stream_get_object_path (stream), + path) == 0) + return stream; + } + + return NULL; +} + char * meta_screen_cast_session_get_object_path (MetaScreenCastSession *session) { diff --git a/src/backends/meta-screen-cast-session.h b/src/backends/meta-screen-cast-session.h index 20bbf84e7..c877912cf 100644 --- a/src/backends/meta-screen-cast-session.h +++ b/src/backends/meta-screen-cast-session.h @@ -25,6 +25,8 @@ #include "backends/meta-screen-cast.h" +#include "backends/meta-screen-cast-stream.h" + typedef enum _MetaScreenCastSessionType { META_SCREEN_CAST_SESSION_TYPE_NORMAL, @@ -48,4 +50,7 @@ gboolean meta_screen_cast_session_start (MetaScreenCastSession *session, void meta_screen_cast_session_close (MetaScreenCastSession *session); +MetaScreenCastStream * meta_screen_cast_session_get_stream (MetaScreenCastSession *session, + const char *path); + #endif /* META_SCREEN_CAST_SESSION_H */