[Spice-devel] [client 1/2] streaming: Constify the video stream's dest and clip parameters

Francois Gouget fgouget at codeweavers.com
Tue May 24 09:44:23 UTC 2016


They are only supposed to be changed when receiving the relevant server
message.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 src/channel-display-priv.h | 2 +-
 src/channel-display.c      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h
index 94a90e6..3155015 100644
--- a/src/channel-display-priv.h
+++ b/src/channel-display-priv.h
@@ -103,7 +103,7 @@ struct display_stream {
 
     /* from messages */
     display_surface             *surface;
-    SpiceClip                   *clip;
+    const SpiceClip             *clip;
     QRegion                     region;
     int                         have_region;
 
diff --git a/src/channel-display.c b/src/channel-display.c
index a301e67..2b8ab4e 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -1131,7 +1131,7 @@ static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in)
     }
 }
 
-static SpiceRect *stream_get_dest(display_stream *st, SpiceMsgIn *frame_msg)
+static const SpiceRect *stream_get_dest(display_stream *st, SpiceMsgIn *frame_msg)
 {
     if (frame_msg == NULL ||
         spice_msg_in_type(frame_msg) != SPICE_MSG_DISPLAY_STREAM_DATA_SIZED) {
@@ -1213,7 +1213,7 @@ void stream_display_frame(display_stream *st, SpiceMsgIn *frame_msg,
                           uint8_t* data)
 {
     int width, height;
-    SpiceRect *dest;
+    const SpiceRect *dest;
     int stride;
 
     stream_get_dimensions(st, frame_msg, &width, &height);
-- 
2.8.1



More information about the Spice-devel mailing list