Re: [Spice-devel] [RFC spice-streaming-agent 2/4] spice-streaming-agent: fully reset the capture loop on start/stop requests

2019-08-12 Thread Kevin Pouget
On Sun, Aug 11, 2019 at 4:42 PM Snir Sheriber wrote: > > Hi, > > > On 8/6/19 6:34 PM, Kevin Pouget wrote: > > With this patch, spice-streaming-agent exits the frame-sending loop > > when START/STOP requests are received. This allows the recomputation > > of the most suitable capture/encoding plugi

Re: [Spice-devel] [spice-gtk v3 1/9] usb-redir: define interfaces to support emulated devices

2019-08-12 Thread Yuri Benditovich
On Mon, Aug 12, 2019 at 3:00 PM Frediano Ziglio wrote: > > > > > SpiceUsbBackendDevice structure is extended to support > > additional kind of device that is emulated by Spice-GTK > > and not present locally (and does not have libusb_device), > > such device has instead pointer to SpiceUsbEmulated

Re: [Spice-devel] [spice-gtk v3 2/9] usb-redir: cosmetic style fixes

2019-08-12 Thread Frediano Ziglio
> > From: Frediano Ziglio > > --- > src/usb-backend.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) Why not squashing into 1/9? It's just space changes/fixes. Not wanting to take credit for these changes to have it separate or add my signed off or other. > > diff

Re: [Spice-devel] [spice-gtk v3 1/9] usb-redir: define interfaces to support emulated devices

2019-08-12 Thread Frediano Ziglio
> > SpiceUsbBackendDevice structure is extended to support > additional kind of device that is emulated by Spice-GTK > and not present locally (and does not have libusb_device), > such device has instead pointer to SpiceUsbEmulatedDevice > abstract structure. Specific implementation of such device

[Spice-devel] [spice-gtk v3 8/9] usb-redir: enable redirection of emulated CD drive

2019-08-12 Thread Yuri Benditovich
Add implementation of emulated device to build. Now it is possible to create emulated CD devices. Signed-off-by: Yuri Benditovich --- src/meson.build | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/meson.build b/src/meson.build index fe19c16..3837a9d 100644 --- a/src/meson.build +

[Spice-devel] [spice-gtk v3 7/9] usb-redir: add implementation of emulated CD device

2019-08-12 Thread Yuri Benditovich
This module contains implementation of emulated device interface for shared CD. Signed-off-by: Yuri Benditovich --- src/usb-device-cd.c | 783 src/usb-device-cd.h | 34 ++ 2 files changed, 817 insertions(+) create mode 100644 src/usb-device-cd.c cr

[Spice-devel] [spice-gtk v3 3/9] usb-redir: move implementation of device description to USB backend

2019-08-12 Thread Yuri Benditovich
For local USB device the USB backend returns the same device description as spice-usb-manager did, for emulated devices it uses the description provided by device's implementation. Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio --- src/usb-backend.c| 41 ++

[Spice-devel] [spice-gtk v3 2/9] usb-redir: cosmetic style fixes

2019-08-12 Thread Yuri Benditovich
From: Frediano Ziglio --- src/usb-backend.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/usb-backend.c b/src/usb-backend.c index de2b55e..7f9fcc1 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -200,7 +200,7 @@ static int compare_dev_list_f

[Spice-devel] [spice-gtk v3 1/9] usb-redir: define interfaces to support emulated devices

2019-08-12 Thread Yuri Benditovich
SpiceUsbBackendDevice structure is extended to support additional kind of device that is emulated by Spice-GTK and not present locally (and does not have libusb_device), such device has instead pointer to SpiceUsbEmulatedDevice abstract structure. Specific implementation of such device depends on i

[Spice-devel] [spice-gtk v3 5/9] usb-redir: extend USB backend to support emulated devices

2019-08-12 Thread Yuri Benditovich
Redirection of emulated devices requires special approach, as usbredirhost can't be used for that (it works only with libusb devices). For emulated devices we create instance of usbredirparser that implements USB redirection protocol. In order to work with the same set of protocol capabilities that

[Spice-devel] [spice-gtk v3 4/9] usb-redir: do not use spice_usb_acl_helper for emulated devices

2019-08-12 Thread Yuri Benditovich
Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio --- src/channel-usbredir.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c index 8d4cd66..8fd6b41 100644 --- a/src/channel-usbredir.c ++

[Spice-devel] [spice-gtk v3 9/9] usb-redir: command-line option to create emulated CD drive

2019-08-12 Thread Yuri Benditovich
Added command-line option for sharing emulated CD devices. It uses property interface of usb-device-manager to create CD, this is a temporary solution until public API of usb-device-manager defined for shared CD management from both GUI and command line. Signed-off-by: Yuri Benditovich --- src/s

[Spice-devel] [spice-gtk v3 0/9] added feature of sharing CD image

2019-08-12 Thread Yuri Benditovich
This series of patches adds feature of sharing CD image via redirection of emulated CD device. Currently the trigger to create the device is command-line option: '--spice-share-cd Changes from v2: fixes resulted by reviews (based on fixups of Frediano Ziglio) Changes from v1: fixes resulted by r

Re: [Spice-devel] [PATCH spice-server v3] glz-encode: Remove obsolete reference segment

2019-08-12 Thread Uri Lublin
On 8/12/19 12:39 PM, Frediano Ziglio wrote: The GLZ code is basically LZ code (in spice-common) sharing image segments between multiple images. The code for RLE check in LZ (common/lz_compress_tmpl.c) is dealing with both RLE and dictionary matches being: if (!distance) { /* zero d

Re: [Spice-devel] [PATCH spice-server] glz-encode: Remove obsolete reference segment

2019-08-12 Thread Uri Lublin
On 8/12/19 10:14 AM, Frediano Ziglio wrote: The GLZ code is basically LZ code sharing image segments between multiple images. The code for RLE check in LZ is dealing with both RLE and dictionary matches being: > if (!distance) { /* zero distance means a run */ PIXEL x = *re

[Spice-devel] [PATCH spice-server v3] glz-encode: Remove obsolete reference segment

2019-08-12 Thread Frediano Ziglio
The GLZ code is basically LZ code (in spice-common) sharing image segments between multiple images. The code for RLE check in LZ (common/lz_compress_tmpl.c) is dealing with both RLE and dictionary matches being: if (!distance) { /* zero distance means a run */ PIXEL x = *ref;

Re: [Spice-devel] [RFC spice-streaming-agent 4/4] concrete-agent: prioritize requested codec for plugin selection

2019-08-12 Thread Kevin Pouget
On Mon, Aug 12, 2019 at 9:43 AM Frediano Ziglio wrote: > > > > > This patch gives more priority to the requested video codecs when > > selecting the FrameCapture plugin, instead of its hard-coded rank. > > > > The client_codecs storage structure is changed from 'set' to 'vector', > > as the codec

Re: [Spice-devel] [spice-server PATCH 2/3] test-loop: increment a variable outside of spice_assert

2019-08-12 Thread Frediano Ziglio
> > > > On 8/11/19 2:56 PM, Frediano Ziglio wrote: > > >> > > >> spice_assert is a macro and it may be that variable will > > >> be incremented twice (in theory, possibly not in practice). > > >> > > > > > > No, the issue is that Coverity assume that code can be stripped out > > > as usually asse

Re: [Spice-devel] [RFC spice-streaming-agent 4/4] concrete-agent: prioritize requested codec for plugin selection

2019-08-12 Thread Frediano Ziglio
> > This patch gives more priority to the requested video codecs when > selecting the FrameCapture plugin, instead of its hard-coded rank. > > The client_codecs storage structure is changed from 'set' to 'vector', > as the codec order is not preserved by the set structure.. > > Signed-off-by: Ke

[Spice-devel] [PATCH spice-server v2] glz-encode: Remove obsolete reference segment

2019-08-12 Thread Frediano Ziglio
The GLZ code is basically LZ code sharing image segments between multiple images. The code for RLE check in LZ is dealing with both RLE and dictionary matches being: if (!distance) { /* zero distance means a run */ PIXEL x = *ref; while ((ip < ip_bound) && (ref < ref_li

[Spice-devel] [PATCH spice-server] glz-encode: Remove obsolete reference segment

2019-08-12 Thread Frediano Ziglio
The GLZ code is basically LZ code sharing image segments between multiple images. The code for RLE check in LZ is dealing with both RLE and dictionary matches being: if (!distance) { /* zero distance means a run */ PIXEL x = *ref; while ((ip < ip_bound) && (ref < ref_li

Re: [Spice-devel] [PATCH spice-server v3] Use (u)intptr_t for virtual addresses

2019-08-12 Thread Snir Sheriber
Acked-by: Snir Sheriber On 8/12/19 9:55 AM, Frediano Ziglio wrote: On LLP64 platforms (like Windows) a virtual address cannot be represented by a "unsigned long" type, so use uintptr_t which is defined as an integral type large like a pointer. "address_delta" and "addr_delta" are a difference o

Re: [Spice-devel] [PATCH spice-server] style: Specify the possibility of "pragma once" usage

2019-08-12 Thread Snir Sheriber
Acked-by: Snir Sheriber On 8/12/19 9:56 AM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- docs/spice_style.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index e4d7fc6d1..89a550fb8 100644 --- a/docs/spice_style.txt ++

[Spice-devel] [PATCH v3 spice-streaming-agent] gst-plugin: Shorten template declarations

2019-08-12 Thread Snir Sheriber
The typeUPtr templates are very similar except for the unref-function. This patch is replacing the templates with a macro which also accepts an unref-function and is using this macro to define all typeUPtr types. Signed-off-by: Snir Sheriber --- -Update commit message -Conform with spice style

Re: [Spice-devel] [spice-server PATCH 1/3] compress_seg: comment out unused assignment

2019-08-12 Thread Frediano Ziglio
> > > > > CLANG warning: "Value stored to 'ref_limit' is never read" > > > > Commenting out since there is a ToDo that refers to ref_limit > > > > Found by Covscan. > > > > Signed-off-by: Uri Lublin > > --- > > > > Should the comment be deleted too ? > > > > I think would be time to revise