[Spice-devel] [RFC/POC PATCH spice-protocol 01/16] Add the StreamInfo message

Lukáš Hrázký lhrazky at redhat.com
Tue Jun 5 15:30:27 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 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/spice/stream-device.h b/spice/stream-device.h
index 6add42b..d004d0a 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,19 @@ 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.  Sequence starts from 1. Value of 0 makes no sense here, but
+     * the ID is passed from server to client and back to the server and
+     * vd_agent in the MonitorsConfig messages. In those messages value of 0
+     * means the output_id is unset, meaning the monitors are regular,
+     * non-streamed from the streaming agent.
+     */
+    uint32_t 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.17.1



More information about the Spice-devel mailing list