summaryrefslogtreecommitdiffstats
path: root/spice1.proto
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-07-01 17:55:33 +0200
committerAlexander Larsson <alexl@redhat.com>2010-07-07 23:58:33 +0200
commit5ac88aa79fa6445f96e5419d8bf4fce81da63b90 (patch)
treeae702a8569fda96e8bfe27c6b2655d90bcef7ce4 /spice1.proto
parent26c1a0767f3fdcd0211b6b4c91a63ac9bc7abc6f (diff)
downloadspice-5ac88aa79fa6445f96e5419d8bf4fce81da63b90.tar.gz
spice-5ac88aa79fa6445f96e5419d8bf4fce81da63b90.tar.xz
spice-5ac88aa79fa6445f96e5419d8bf4fce81da63b90.zip
Properly parse QXLImage to the new-world SpiceImage
SpiceImage now replaces RedImage and has all image types in it. All image data are now chunked (and as such not copied when demarshalling).
Diffstat (limited to 'spice1.proto')
-rw-r--r--spice1.proto69
1 files changed, 36 insertions, 33 deletions
diff --git a/spice1.proto b/spice1.proto
index b49371ad..7bbccb7f 100644
--- a/spice1.proto
+++ b/spice1.proto
@@ -111,7 +111,7 @@ channel BaseChannel {
message {
uint32 id;
uint64 timestamp;
- uint8 data[] @end @ctype(uint8_t) @as_ptr(data_len);
+ uint8 data[] @ctype(uint8_t) @as_ptr(data_len);
} ping;
message {
@@ -419,16 +419,16 @@ struct BitmapData {
uint32 stride;
switch (flags) {
case PAL_FROM_CACHE:
- uint64 palette;
+ uint64 palette_id;
default:
- Palette *palette @outvar(bitmap);
+ Palette *palette @outvar(bitmap) @c_ptr;
} pal @anon;
- uint8 *data[image_size(8, stride, y)] @nocopy; /* pointer to array, not array of pointers as in C */
+ uint8 *data[image_size(8, stride, y)] @chunk; /* pointer to array, not array of pointers as in C */
} @ctype(SpiceBitmap);
struct BinaryData {
uint32 data_size;
- uint8 data[data_size] @end @nomarshal;
+ uint8 data[data_size] @nomarshal @chunk;
} @ctype(SpiceQUICData);
struct LZPLTData {
@@ -436,34 +436,37 @@ struct LZPLTData {
uint32 data_size;
switch (flags) {
case PAL_FROM_CACHE:
- uint64 palette;
+ uint64 palette_id;
default:
- Palette *palette @nonnull @outvar(lzplt);
+ Palette *palette @nonnull @outvar(lzplt) @c_ptr;
} pal @anon;
- uint8 data[data_size] @end @nomarshal;
+ uint8 data[data_size] @nomarshal @chunk;
};
struct Image {
- uint64 id;
- image_type type;
- image_flags flags;
- uint32 width;
- uint32 height;
-
- switch (type) {
+ struct ImageDescriptor {
+ uint64 id;
+ image_type type;
+ image_flags flags;
+ uint32 width;
+ uint32 height;
+ } descriptor;
+
+ switch (descriptor.type) {
case BITMAP:
- BitmapData bitmap_data @ctype(SpiceBitmap);
+ BitmapData bitmap;
case QUIC:
+ BinaryData quic;
case LZ_RGB:
case GLZ_RGB:
- BinaryData binary_data @ctype(SpiceQUICData);
+ BinaryData lz_rgb;
case LZ_PLT:
- LZPLTData lzplt_data @ctype(SpiceLZPLTData);
- } u @end;
-} @ctype(SpiceImageDescriptor);
+ LZPLTData lz_plt;
+ } u;
+};
struct Pattern {
- Image *pat @nonnull;
+ Image *pat @nonnull @c_ptr;
Point pos;
};
@@ -480,7 +483,7 @@ struct Brush {
struct QMask {
mask_flags flags;
Point pos;
- Image *bitmap;
+ Image *bitmap @c_ptr;
};
struct LineAttr {
@@ -608,7 +611,7 @@ channel DisplayChannel : BaseChannel {
message {
DisplayBase base;
struct Opaque {
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
Brush brush;
ropd rop_descriptor;
@@ -620,7 +623,7 @@ channel DisplayChannel : BaseChannel {
message {
DisplayBase base;
struct Copy {
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
ropd rop_descriptor;
image_scale_mode scale_mode;
@@ -631,7 +634,7 @@ channel DisplayChannel : BaseChannel {
message {
DisplayBase base;
struct Blend {
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
ropd rop_descriptor;
image_scale_mode scale_mode;
@@ -663,7 +666,7 @@ channel DisplayChannel : BaseChannel {
message {
DisplayBase base;
struct Rop3 {
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
Brush brush;
uint8 rop3;
@@ -698,7 +701,7 @@ channel DisplayChannel : BaseChannel {
message {
DisplayBase base;
struct Transparent {
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
uint32 src_color;
uint32 true_color;
@@ -710,7 +713,7 @@ channel DisplayChannel : BaseChannel {
struct AlphaBlnd {
int8 alpha_flags @virtual(0);
uint8 alpha;
- Image *src_bitmap;
+ Image *src_bitmap @c_ptr;
Rect src_area;
} data;
} draw_alpha_blend;
@@ -822,7 +825,7 @@ struct CursorHeader {
struct Cursor {
cursor_flags flags;
CursorHeader header;
- uint8 data[] @end @as_ptr(data_size);
+ uint8 data[] @as_ptr(data_size);
};
channel CursorChannel : BaseChannel {
@@ -876,13 +879,13 @@ channel PlaybackChannel : BaseChannel {
server:
message {
uint32 time;
- uint8 data[] @end @as_ptr(data_size);
+ uint8 data[] @as_ptr(data_size);
} @ctype(SpiceMsgPlaybackPacket) data = 101;
message {
uint32 time;
audio_data_mode mode;
- uint8 data[] @end @as_ptr(data_size);
+ uint8 data[] @as_ptr(data_size);
} mode;
message {
@@ -907,13 +910,13 @@ channel RecordChannel : BaseChannel {
client:
message {
uint32 time;
- uint8 data[] @end @nomarshal @as_ptr(data_size);
+ uint8 data[] @nomarshal @as_ptr(data_size);
} @ctype(SpiceMsgcRecordPacket) data = 101;
message {
uint32 time;
audio_data_mode mode;
- uint8 data[] @end @as_ptr(data_size);
+ uint8 data[] @as_ptr(data_size);
} mode;
message {