[Spice-devel] [PATCH spice-protocol 1/2] video streaming: add support for frames of different sizes

Yonit Halperin yhalperi at redhat.com
Sun Apr 8 08:42:10 PDT 2012


Add SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, for stream_data message
that also contains the size and destination box of the data.
The server can send such messages only to clients with
SPICE_DISPLAY_CAP_SIZED_STREAM.

When playing a youtube video on Windows guest, the driver sometimes sends
images which contain the vidoe frames, but also other parts of the
screen (e.g., the youtube process bar). In order to prevent glitches, we send these
images as part of the stream, using SPICE_MSG_DISPLAY_STREAM_DATA_SIZED.

Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
---
 spice/enums.h    |    1 +
 spice/protocol.h |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/spice/enums.h b/spice/enums.h
index d2dbfd0..802e1ee 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -415,6 +415,7 @@ enum {
     SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND,
     SPICE_MSG_DISPLAY_SURFACE_CREATE,
     SPICE_MSG_DISPLAY_SURFACE_DESTROY,
+    SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
 
     SPICE_MSG_END_DISPLAY
 };
diff --git a/spice/protocol.h b/spice/protocol.h
index e3342cb..ceba2a1 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -122,6 +122,10 @@ enum {
     SPICE_MAIN_CAP_NAME_AND_UUID,
 };
 
+enum {
+    SPICE_DISPLAY_CAP_SIZED_STREAM,
+};
+
 #include <spice/end-packed.h>
 
 #endif /* _H_SPICE_PROTOCOL */
-- 
1.7.7.6



More information about the Spice-devel mailing list