[Spice-devel] [PATCH 3/3] Display: Send a preferred compression message on init.
Christophe Fergeau
cfergeau at redhat.com
Fri Apr 24 05:55:37 PDT 2015
On Fri, Apr 17, 2015 at 12:40:25PM +0200, Javier Celaya wrote:
> If the user prefers a specific compression algorithm, report it when
> setting up the display channel.
> ---
> gtk/channel-display.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gtk/channel-display.c b/gtk/channel-display.c
> index efe2259..6f5fb5f 100644
> --- a/gtk/channel-display.c
> +++ b/gtk/channel-display.c
> @@ -789,12 +789,14 @@ static void spice_display_channel_up(SpiceChannel *channel)
> SpiceMsgOut *out;
> SpiceSession *s = spice_channel_get_session(channel);
> SpiceMsgcDisplayInit init;
> + SpiceMsgcDisplayPreferredCompression pref_comp_msg;
> int cache_size;
> int glz_window_size;
>
> g_object_get(s,
> "cache-size", &cache_size,
> "glz-window-size", &glz_window_size,
> + "preferred-compression", &pref_comp_msg.image_compression,
SpiceMsgcDisplayPreferredCompression::image_compression is an (u)int8_t,
the "preferred-compression" property is defined as an int property, so
you really need to go through an intermediate int-sized variable as
g_object_get() will assume &pref_comp_msg.image_compression is a pointer
to an int-sized variable.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150424/da872ef3/attachment.sig>
More information about the Spice-devel
mailing list