[Spice-devel] Strange patch about image compression

Christophe Fergeau cfergeau at redhat.com
Thu Sep 3 06:53:13 PDT 2015


Hey,

On Fri, Aug 21, 2015 at 11:26:10AM +0100, Frediano Ziglio wrote:
> Hi,
>   I came to look close at this patch
> 
> http://cgit.freedesktop.org/spice/spice/commit/?id=c914e96fb4de3ba8b2df174d7c7af8ff76af1081
> 
> I think the intention of the patch is to change the image compression from
> the client size. The strange thing is that is change the worker
> image_compression and not the channel one.
> The worker one is mainly used to set the channel image compression when a
> new channel is created however to select the compression to use the channel
> setting is used. So it seems that this patch end up setting the image
> compression for the future channel but not for the present ones. Is this
> intended?

red_compress_image() is using
display_channel->common.worker->image_compression which is what
display_channel_handle_preferred_compression() (added in the commit you
linked to) sets.
However, I had to add
@@ -10520,6 +10524,7 @@ static RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_t
                                         handle_parsed,
                                         &channel_cbs,
                                         migration_flags);
+    red_channel_set_cap(channel, SPICE_DISPLAY_CAP_PREF_COMPRESSION);
     common = (CommonChannel *)channel;
     if (!channel) {
         goto error;


to spice-server in order to be able to use this feature.

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/20150903/d015887a/attachment.sig>


More information about the Spice-devel mailing list