[Spice-devel] [RFC v2 1/2] stream-channel: Use the preferred codec list instead of supported

2019-08-02 Thread Kevin Pouget
This patch computes and sends the list of the video codecs preferred by all the clients when requesting to start a new video stream. It used to be the list of the supported codecs. The MJPEG codec is used as a fallback is there if no codec preferred by all the clients. Signed-off-by: Kevin Pouge

[Spice-devel] [RFC spice-server 2/2] streaming: Restart guest video streams on video-codec changes

2019-08-02 Thread Kevin Pouget
This patch resets the host and guest video streams when the client changes the preferred video-codecs or when the host admin updates the list of video-codecs allowed. Signed-off-by: Kevin Pouget --- server/dcc.c | 4 +++- server/display-channel.c | 2 +- server/video-stream.c|

Re: [Spice-devel] [PATCH spice-server 03/13] char-device: Allocate all write buffer in a single block

2019-08-02 Thread Frediano Ziglio
> > Hi, > > On Thu, May 30, 2019 at 03:22:44PM +0100, Frediano Ziglio wrote: > > There are no much data other than the buffer, reduce the > > allocations. > > > > Signed-off-by: Frediano Ziglio > > --- > > server/char-device.c | 27 +++ > > server/char-device.h | 2 +-

Re: [Spice-devel] [PATCH spice-server 1/3] glz-encoder-dict: Remove useless __packed__ attribute

2019-08-02 Thread Frediano Ziglio
> > Hi, > > On Mon, Jul 22, 2019 at 12:08:39PM +0100, Frediano Ziglio wrote: > > The structure has no holes, adding this attribute could only > > decrease efficiency. > > Why does it decrease efficiency? > If the giant array that contains these structure get unaligned as the previous fields ar

Re: [Spice-devel] [PATCH spice-gtk 1/2] usb-device-manager: Fix number truncation by spice_usb_device_get_busnum

2019-08-02 Thread Victor Toso
For both patches, Acked-by: Victor Toso On Thu, Aug 01, 2019 at 10:52:21AM +0100, Frediano Ziglio wrote: > "bus" field is 16 bit so returning using a guint8 type potentially > truncate the value. > > Signed-off-by: Frediano Ziglio > --- > src/usb-device-manager-priv.h | 2 +- > src/usb-device-

Re: [Spice-devel] [PATCH spice-server 13/13] red-channel-client: Add some comment on the flush code

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:54PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-channel-client.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/server/red-channel-client.c b/server/red-channel-client.c > index 3fd51d78b..337733d5d 100644

Re: [Spice-devel] [PATCH spice-server 12/13] red-channel-client: Reduce indentation of some code

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:53PM +0100, Frediano Ziglio wrote: > Just a style change, return earlier to avoid some indentation. > > Signed-off-by: Frediano Ziglio Looks fine, Acked-by: Victor Toso > --- > server/red-channel-client.c | 37 +++-- > 1 file

Re: [Spice-devel] [PATCH spice-server 11/13] red-channel: Remove unused declaration

2019-08-02 Thread Victor Toso
Pushed already but fine! On Thu, May 30, 2019 at 03:22:52PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-channel.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/server/red-channel.h b/server/red-channel.h > index 4bfd81ee1..eb16bd4b8 100644 > --- a

Re: [Spice-devel] [PATCH spice-server 10/13] inputs-channel-client: Remove unused declarations

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:51PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/inputs-channel-client.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/server/inputs-channel-client.h b/server/inputs-channel-client.h > index c22288980..1afc22bd4 10

Re: [Spice-devel] [PATCH spice-server 09/13] dispatcher: Use a new API to handle events

2019-08-02 Thread Victor Toso
On Thu, May 30, 2019 at 03:22:50PM +0100, Frediano Ziglio wrote: > Instead of having to manually register the file descriptor and > than need to call dispatcher_handle_recv_read just provide a single > API to create the watch. > This has some advantage: > - replace 2 API with 1; > - code reuse for

Re: [Spice-devel] [PATCH spice-server 08/13] cache-item: Remove unused define

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:49PM +0100, Frediano Ziglio wrote: A good verbose detective would say "Since commit x1y2z3", but happy to have it as is too ;) > Signed-off-by: Frediano Ziglio > --- > server/cache-item.tmpl.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/server/

Re: [Spice-devel] [PATCH spice-server 07/13] cache-item: Remove only written fields

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:48PM +0100, Frediano Ziglio wrote: > cursor_cache_items and palette_cache_items where only written > but never used. Acked-by: Victor Toso > Signed-off-by: Frediano Ziglio > --- > server/cache-item.tmpl.c | 3 --- > server/cursor-channel-client.c | 1 -

Re: [Spice-devel] [PATCH spice-server 06/13] red-channel: Inline red_channel_pipes_create_batch

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:47PM +0100, Frediano Ziglio wrote: > The function is called only by red_channel_pipes_new_add. > > Signed-off-by: Frediano Ziglio Acked-by: Victor Toso > --- > server/red-channel.c | 20 > 1 file changed, 4 insertions(+), 16 deletions(-) >

Re: [Spice-devel] [PATCH spice-server 05/13] red-worker: Remove warning

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:46PM +0100, Frediano Ziglio wrote: > In some configuration _GNU_SOURCE is defined by the compiler > and defining again cause a warning. > Do not define again to avoid the warning. Not a problem with the patch but we is it the case we should fix some troubling con

Re: [Spice-devel] [PATCH spice-server 04/13] spicevmc: Remove reds parameter from spicevmc_device_disconnect

2019-08-02 Thread Victor Toso
On Thu, May 30, 2019 at 03:22:45PM +0100, Frediano Ziglio wrote: > Unused. > Also the devices should be able to release themselves. Right, Acked-by: Victor Toso > > Signed-off-by: Frediano Ziglio > --- > server/char-device.h | 3 +-- > server/reds.c| 2 +- > server/spicevmc.c| 2 +

Re: [Spice-devel] [PATCH spice-server 03/13] char-device: Allocate all write buffer in a single block

2019-08-02 Thread Victor Toso
Hi, On Thu, May 30, 2019 at 03:22:44PM +0100, Frediano Ziglio wrote: > There are no much data other than the buffer, reduce the > allocations. > > Signed-off-by: Frediano Ziglio > --- > server/char-device.c | 27 +++ > server/char-device.h | 2 +- > 2 files changed, 16

Re: [Spice-devel] [PATCH spice-server v2] char-device: Remove unused red_char_device_destroy function

2019-08-02 Thread Victor Toso
Hi, Okay, there was a v2. Acked-by: Victor Toso On Thu, May 30, 2019 at 06:17:46PM +0100, Frediano Ziglio wrote: > g_object_unref is directly used. > > Signed-off-by: Frediano Ziglio > --- > server/char-device.c | 6 -- > server/char-device.h | 5 ++--- > 2 files changed, 2 insertions(+),

Re: [Spice-devel] [PATCH spice-server 02/13] char-device: Pull more code into red_char_device_send_to_client_tokens_absorb

2019-08-02 Thread Victor Toso
On Thu, May 30, 2019 at 03:22:43PM +0100, Frediano Ziglio wrote: > The 2 callers red_char_device_send_to_client_tokens_set and > red_char_device_send_to_client_tokens_add are doing mostly > the same thing so put common code to > red_char_device_send_to_client_tokens_absorb. > > Signed-off-by: Fred

Re: [Spice-devel] [PATCH spice-server 01/13] char-device: Remove unused red_char_device_destroy function

2019-08-02 Thread Victor Toso
Hi, There still is some comments for this function call, I'd update it here as well if it makes sense to do so server/char-device.h:94: * device detached: call red_char_device_destroy/reset server/char-device.h:123: * case red_char_device_destroy has been called Still, Acked-by: Victor

Re: [Spice-devel] [PATCH spice-server 3/3] Use start/end-packet.h headers instead of direct GCC attribute

2019-08-02 Thread Victor Toso
Hi, On Mon, Jul 22, 2019 at 09:47:05AM -0400, Frediano Ziglio wrote: > > > > > > > > Hi, > > > > > > > > > Here we can also remove some of the packing > > > > > > > Do you mean the nested ones? I'm not sure and I would prefer a follow up, > > it's more "conservative" to keep the attribute if

Re: [Spice-devel] [PATCH spice-server 1/3] glz-encoder-dict: Remove useless __packed__ attribute

2019-08-02 Thread Victor Toso
Hi, On Mon, Jul 22, 2019 at 12:08:39PM +0100, Frediano Ziglio wrote: > The structure has no holes, adding this attribute could only > decrease efficiency. Why does it decrease efficiency? > Note that HashEntry structure is used for a large (8MB) array so > this won't affect much possible contain