diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-03-07 12:12:15 +0000 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2021-01-19 13:24:55 +0000 |
commit | 88d91ff65863cc069ab02a2e42c4a13fb161bd16 (patch) | |
tree | 9ea2fedc9538105c859f2e1efd6abfb59e5c8a93 | |
parent | 4348ddb628fa1f65857d6284e534570cc1a8a466 (diff) |
stream-device: Allow the guest to send some information about the stream
This will allow the guest to tell its idea of numeric ID.
Using only virtual devices (like QXL or VGA) there's usually a
one to one mapping between guest and server numbering.
That is first graphic device for the guest is first display
channel for the server. This is not more true if you have device
assignment devices (pass through) as SPICE don't knows much about
these devices.
Also is possible that the guest decides to use only device assigned
devices. This causes some problems, mostly with client mouses which
requires the server to send events with guest IDs.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | spice/stream-device.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spice/stream-device.h b/spice/stream-device.h index e559f16..0becdb7 100644 --- a/spice/stream-device.h +++ b/spice/stream-device.h @@ -96,11 +96,15 @@ typedef enum StreamMsgType { STREAM_TYPE_DEVICE_DISPLAY_INFO, /* video encoding quality indicator message */ STREAM_TYPE_QUALITY_INDICATOR, + /* guest information */ + STREAM_TYPE_GUEST_INFO, } StreamMsgType; typedef enum StreamCapabilities { /* handling of STREAM_TYPE_QUALITY_INDICATOR messages */ STREAM_CAP_QUALITY_INDICATOR, + // server accepts StreamMsgGuestInfo + STREAM_CAP_GUEST_INFO, STREAM_CAP_END // this must be the last } StreamCapabilities; @@ -269,6 +273,28 @@ typedef struct StreamMsgCursorMove { int32_t y; } StreamMsgCursorMove; +/* Guest information + * This message is sent by the guest to the host. + * The guest send information about the stream in the guest. + * + * States allowed: not Streaming + */ +typedef struct StreamMsgGuestInfo { + /* Position of the stream in the guest surface. + * The stream can came from part of a surface managed by the + * display server. This can happens for instance using Xorg. + */ + int32_t stream_x; + int32_t stream_y; + /* Guest ID. + * The ID is used to send back mouse events. + * This is used to map the SPICE DisplayChannel IDs to the proper + * guest ID. + */ + uint8_t id; + uint8_t padding1[3]; +} StreamMsgGuestInfo; + #include <spice/end-packed4.h> #endif /* SPICE_STREAM_DEVICE_H_ */ |