mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-11 16:36:17 +00:00
Proto: Add preferred compression message and constants.
When accessing a virtual desktop from different devices, some may have different image compression requirements, e.g. slow devices may prefer the faster LZ4 over GLZ. This message instructs the server to switch the image compression algorithm. This patch also promotes the SPICE_IMAGE_COMPRESS_* constants so that they are available from both the server and the client.
This commit is contained in:
parent
1b5edbe49e
commit
127a76a3b8
@ -72,6 +72,7 @@ typedef struct {
|
||||
void (*msgc_smartcard_reader_add)(SpiceMarshaller *m, VSCMsgReaderAdd *msg);
|
||||
#endif
|
||||
void (*msgc_port_event)(SpiceMarshaller *m, SpiceMsgcPortEvent *msg);
|
||||
void (*msgc_display_preferred_compression)(SpiceMarshaller *m, SpiceMsgcDisplayPreferredCompression *msg);
|
||||
} SpiceMessageMarshallers;
|
||||
|
||||
SpiceMessageMarshallers *spice_message_marshallers_get(void);
|
||||
|
||||
@ -630,6 +630,10 @@ typedef struct SpiceMsgcPortEvent {
|
||||
uint8_t event;
|
||||
} SpiceMsgcPortEvent;
|
||||
|
||||
typedef struct SpiceMsgcDisplayPreferredCompression {
|
||||
uint8_t image_compression;
|
||||
} SpiceMsgcDisplayPreferredCompression;
|
||||
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif /* _H_SPICE_PROTOCOL */
|
||||
|
||||
15
spice.proto
15
spice.proto
@ -361,6 +361,17 @@ enum8 image_type {
|
||||
LZ4,
|
||||
};
|
||||
|
||||
enum8 image_compress {
|
||||
INVALID = 0,
|
||||
OFF,
|
||||
AUTO_GLZ,
|
||||
AUTO_LZ,
|
||||
QUIC,
|
||||
GLZ,
|
||||
LZ,
|
||||
LZ4,
|
||||
};
|
||||
|
||||
flags8 image_flags {
|
||||
CACHE_ME,
|
||||
HIGH_BITS_SET,
|
||||
@ -922,6 +933,10 @@ channel DisplayChannel : BaseChannel {
|
||||
int32 last_frame_delay;
|
||||
uint32 audio_delay;
|
||||
} stream_report;
|
||||
|
||||
message {
|
||||
uint8 image_compression;
|
||||
} preferred_compression;
|
||||
};
|
||||
|
||||
flags16 keyboard_modifier_flags {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user