[Spice-devel] [RFC PATCH spice-protocol v2 03/20] Add the StreamInfo message

Lukáš Hrázký lhrazky at redhat.com
Thu Aug 16 16:26:32 UTC 2018


The message is meant to contain information related to the stream, e.g.
now the guest (xrandr) output ID of the streamed monitor.

Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
---
 spice/stream-device.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/spice/stream-device.h b/spice/stream-device.h
index 6add42b..be22e06 100644
--- a/spice/stream-device.h
+++ b/spice/stream-device.h
@@ -90,6 +90,8 @@ typedef enum StreamMsgType {
     STREAM_TYPE_CURSOR_SET,
     /* guest cursor position */
     STREAM_TYPE_CURSOR_MOVE,
+    /* the stream information message */
+    STREAM_TYPE_INFO,
 } StreamMsgType;
 
 typedef enum StreamCapabilities {
@@ -140,6 +142,15 @@ typedef struct StreamMsgData {
     uint8_t data[0];
 } StreamMsgData;
 
+/* Message containing information about the stream, sent when a new stream is created.
+ */
+typedef struct StreamMsgInfo {
+    /* The xrandr output ID (index of the output in the list) that is being
+     * streamed, 0-based.
+     */
+    uint32_t guest_output_id;
+} StreamMsgInfo;
+
 /* Tell to stop current stream and possibly start a new one.
  * This message is sent by the host to the guest.
  * Allows to communicate the codecs supported by the clients.
-- 
2.18.0



More information about the Spice-devel mailing list