mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
screen-cast-session: Add API to get stream from object path
Will be needed by the remote desktop session to translate stream local input coordinates.
This commit is contained in:
parent
d27e6921d6
commit
f3203f0330
@ -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)
|
||||
{
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user