Re: [Spice-devel] [PATCH spice-common] Protect G_LOG_DOMAIN definition with #ifndef guards

2018-04-19 Thread Eduardo Lima (Etrunko)
On 19/04/18 17:50, Frediano Ziglio wrote: >> >> Different from autotools, with meson, the subproject is not a separate >> build, so the definition of G_LOG_DOMAIN from the superproject will be >> the same for spice-common. >> >> This will happen only with spice-gtk, because the value is different

Re: [Spice-devel] [PATCH spice-common] Protect G_LOG_DOMAIN definition with #ifndef guards

2018-04-19 Thread Eduardo Lima (Etrunko)
On 19/04/18 17:50, Frediano Ziglio wrote: >> >> Different from autotools, with meson, the subproject is not a separate >> build, so the definition of G_LOG_DOMAIN from the superproject will be >> the same for spice-common. >> >> This will happen only with spice-gtk, because the value is different

Re: [Spice-devel] [PATCH spice-common] Protect G_LOG_DOMAIN definition with #ifndef guards

2018-04-19 Thread Frediano Ziglio
> > Different from autotools, with meson, the subproject is not a separate > build, so the definition of G_LOG_DOMAIN from the superproject will be > the same for spice-common. > > This will happen only with spice-gtk, because the value is different > than defined, while with spice-server the

[Spice-devel] [PATCH spice-common] Protect G_LOG_DOMAIN definition with #ifndef guards

2018-04-19 Thread Eduardo Lima (Etrunko)
Different from autotools, with meson, the subproject is not a separate build, so the definition of G_LOG_DOMAIN from the superproject will be the same for spice-common. This will happen only with spice-gtk, because the value is different than defined, while with spice-server the definition of

[Spice-devel] [PATCH spice-streaming-agent 0/3] Split plugin version check patch

2018-04-19 Thread Frediano Ziglio
This patchset just split previous series to be able to discuss separate changes. Changes since v1: - remove space change from 1/3; - rebased on master. Christophe de Dinechin (3): Ensure that plugins cannot bypass version check Change numbering schema Add a macro to deal with the

[Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-19 Thread Frediano Ziglio
From: Christophe de Dinechin This change addresses two issues related to plugin version checking: 1. It is possible for plugins to bypass version checking or do it wrong (as a matter of fact, the mjpeg fallback sets a bad example) 2. The current plugin version check

[Spice-devel] [PATCH spice-streaming-agent 3/3] Add a macro to deal with the boilerplate of writing a streaming agent plugin

2018-04-19 Thread Frediano Ziglio
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- include/spice-streaming-agent/plugin.hpp | 9 + 1 file changed, 9 insertions(+) diff --git a/include/spice-streaming-agent/plugin.hpp

Re: [Spice-devel] [PATCH spice-streaming-agent 2/3] Change numbering schema

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:42PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > A major.minor numbering scheme is not ideal for ABI checks. > In particular, it makes it difficult to react to an incompatibility > that was detected post release. > > [More

Re: [Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:41PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > This change addresses two issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact,

[Spice-devel] spice-gtk redirection of USB

2018-04-19 Thread dongzhen_...@nfs-china.com
hi! spice-gtk 0.33 build mingw64-configure --without-sasl --with-gtk=3.0 --with-audio=gstreamer --without-Python --enable-usbredir=yes --enable-smartcard=no i fond virt-viewer usb device selection become this picture all USB Device ? thank you ! dongzhen_...@nfs-china.com From: Victor

[Spice-devel] [PATCH spice-streaming-agent] Eliminate signed/unsigned warning

2018-04-19 Thread Frediano Ziglio
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin Signed-off-by: Frediano Ziglio --- src/mjpeg-fallback.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mjpeg-fallback.cpp

Re: [Spice-devel] [spice-server v1 3/4] display-limits: use SPICE_MAX_NUM_STREAMS from protocol

2018-04-19 Thread Frediano Ziglio
> > On Thu, Apr 19, 2018 at 03:26:05AM -0400, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol > > > 0.12.14 to fix the amount of streams we might be working currently. > > > > > > This

[Spice-devel] [PATCH spice-gtk 1/3] RFC channel-display-gst: Prevent accumulating output queue

2018-04-19 Thread Frediano Ziglio
display_queue is queued with decoded frames ready to be displayed. However current code can insert a timeout before displaying and removing the queued frames. As the frames are not compressed the usage of memory by this queue can became in some cases quite huge (in the order of different

[Spice-devel] [PATCH spice-gtk 2/3] RFC channel-display-gst: Limit input queue

2018-04-19 Thread Frediano Ziglio
Whenever there are bytes from the network we queue them to GStreamer. The pipeline is set to not have a limit so the queue can grow indefinitely. Limit the queue stopping reading if is already too large. Currently fixed to 64 MByte. Signed-off-by: Frediano Ziglio ---

[Spice-devel] [PATCH spice-gtk 0/3] RFC Reduce gstreamer queues

2018-04-19 Thread Frediano Ziglio
Currently there is no limit on the input and output queue of GStreamer pipeline. On output we queue decompressed frames before displaying without limits. On input as soon as we get data from network we attempt to queue to GStreamer pipeline but the source is configures with no limits

[Spice-devel] [PATCH spice-gtk 3/3] HACK reduce time to wait

2018-04-19 Thread Frediano Ziglio
Hacky patch to display frames ASAP --- src/channel-display-gst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index 281a936..644d94a 100644 --- a/src/channel-display-gst.c +++ b/src/channel-display-gst.c @@ -183,7

Re: [Spice-devel] [PATCH spice-gtk v2] spice-widget: Fix use after free

2018-04-19 Thread Victor Toso
Hi, On Thu, Apr 19, 2018 at 12:27:02PM +0100, Frediano Ziglio wrote: > Before d567bfe65f010556f12c7ca5e95d0e480b2e4a70 > ("spice-widget: fix leak of boxed type cursor-shape") the cursor was > just leaked. Now is freed however mouse_pixbuf points to cursor > data so when the cursor is freed

[Spice-devel] [PATCH spice-gtk v2] spice-widget: Fix use after free

2018-04-19 Thread Frediano Ziglio
Before d567bfe65f010556f12c7ca5e95d0e480b2e4a70 ("spice-widget: fix leak of boxed type cursor-shape") the cursor was just leaked. Now is freed however mouse_pixbuf points to cursor data so when the cursor is freed mouse_pixbuf points to a dangling pointer. Retain the cursor as long as mouse_pixbuf

Re: [Spice-devel] [PATCH spice-gtk] spice-widget: Fix use after free

2018-04-19 Thread Victor Toso
Hi, On Thu, Apr 19, 2018 at 11:25:12AM +0100, Frediano Ziglio wrote: > Before d567bfe65f010556f12c7ca5e95d0e480b2e4a70 > ("spice-widget: fix leak of boxed type cursor-shape") the cursor was > just leaked. Now is freed however mouse_pixbuf points to cursor > data so when the cursor is freed

[Spice-devel] [PATCH spice-gtk] spice-widget: Fix use after free

2018-04-19 Thread Frediano Ziglio
Before d567bfe65f010556f12c7ca5e95d0e480b2e4a70 ("spice-widget: fix leak of boxed type cursor-shape") the cursor was just leaked. Now is freed however mouse_pixbuf points to cursor data so when the cursor is freed mouse_pixbuf points to a dangling pointer. Retain the cursor as long as mouse_pixbuf

Re: [Spice-devel] [spice-server v1 3/4] display-limits: use SPICE_MAX_NUM_STREAMS from protocol

2018-04-19 Thread Victor Toso
On Thu, Apr 19, 2018 at 03:26:05AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol > > 0.12.14 to fix the amount of streams we might be working currently. > > > > This change removes the

Re: [Spice-devel] [spice-gtk v1 4/4] channel-display: Limit number of streams that can be created

2018-04-19 Thread Victor Toso
Hi, On Thu, Apr 19, 2018 at 03:29:00AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol > > 0.12.14 to fix the amount of streams we might be working currently. > > > > With this change,

Re: [Spice-devel] [spice-common v1 2/4] messages: document limitation of id in StreamCreate

2018-04-19 Thread Victor Toso
Hi, On Thu, Apr 19, 2018 at 03:31:08AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Note that the ID limitation always existed but now we have the > > limitation in the protocol itself with SPICE_MAX_NUM_STREAMS > > > > Signed-off-by: Victor Toso

Re: [Spice-devel] [spice-protocol v1 1/4] streaming: define max of number of concurrent streams

2018-04-19 Thread Victor Toso
Hi, On Thu, Apr 19, 2018 at 03:19:40AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > This definition is lacking in client while in server it is hardcoded > > to 50. Having a well defined limitation allow us to make the code > > more robust and optimized.

[Spice-devel] how to configure spice multi-proxy

2018-04-19 Thread 王杰东
Recently i use squid to configure SPICE_PROXY and it works , it can resolve many network environment which have 2 nets. But my question is that how to configure SPICE_PROXY if there are twice net-switch ,like CLIENT connects HOST1 with NET1, HOST1 connects HOST2 with NET2, HOST2 connects

Re: [Spice-devel] [spice-common v1 2/4] messages: document limitation of id in StreamCreate

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > Note that the ID limitation always existed but now we have the > limitation in the protocol itself with SPICE_MAX_NUM_STREAMS > > Signed-off-by: Victor Toso > --- > common/messages.h | 2 +- > 1 file changed, 1

Re: [Spice-devel] [spice-gtk v1 4/4] channel-display: Limit number of streams that can be created

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol > 0.12.14 to fix the amount of streams we might be working currently. > > With this change, let's create the streams array on _init() and free > it on _finalize() to avoid dealing

Re: [Spice-devel] [spice-server v1 3/4] display-limits: use SPICE_MAX_NUM_STREAMS from protocol

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol > 0.12.14 to fix the amount of streams we might be working currently. > > This change removes the NUM_STREAMS define in display-limits.h > > This is an ABI break patch as the size

Re: [Spice-devel] [spice-protocol v1 1/4] streaming: define max of number of concurrent streams

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > This definition is lacking in client while in server it is hardcoded > to 50. Having a well defined limitation allow us to make the code > more robust and optimized. > > Signed-off-by: Victor Toso > --- > spice/protocol.h

[Spice-devel] [spice-gtk v1 4/4] channel-display: Limit number of streams that can be created

2018-04-19 Thread Victor Toso
From: Victor Toso Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol 0.12.14 to fix the amount of streams we might be working currently. With this change, let's create the streams array on _init() and free it on _finalize() to avoid dealing with too many

[Spice-devel] [spice-server v1 3/4] display-limits: use SPICE_MAX_NUM_STREAMS from protocol

2018-04-19 Thread Victor Toso
From: Victor Toso Using the limit SPICE_MAX_NUM_STREAMS introduced in spice-protocol 0.12.14 to fix the amount of streams we might be working currently. This change removes the NUM_STREAMS define in display-limits.h This is an ABI break patch as the size of some arrays

[Spice-devel] [spice-protocol v1 1/4] streaming: define max of number of concurrent streams

2018-04-19 Thread Victor Toso
From: Victor Toso This definition is lacking in client while in server it is hardcoded to 50. Having a well defined limitation allow us to make the code more robust and optimized. Signed-off-by: Victor Toso --- spice/protocol.h | 2 ++ 1 file

[Spice-devel] [spice-common v1 2/4] messages: document limitation of id in StreamCreate

2018-04-19 Thread Victor Toso
From: Victor Toso Note that the ID limitation always existed but now we have the limitation in the protocol itself with SPICE_MAX_NUM_STREAMS Signed-off-by: Victor Toso --- common/messages.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Spice-devel] [spice-gtk v1 0/4] Add a max-num-streams in protocol

2018-04-19 Thread Victor Toso
From: Victor Toso Hi, As discussed [0], let's add a well defined value for max number of concurrent streams that we might have. This series bumps spice-gtk to unreleased spice-protocol and also breaks abi of spice-server. Let me know your thoughts on it. [0]

Re: [Spice-devel] [spice-gtk v1] channel-display: always name GHashFunc and GEqualFunc

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > g_hash_table_new() allows to pass NULL for GHashFunc and GEqualFunc > which defaults to g_direct_hash() and g_direct_equal(). > > This is the only place in our code that uses NULL while in > channel-main and channel-smartcard and

Re: [Spice-devel] [spice-server v1] tests: add test-listen executable to gitignore

2018-04-19 Thread Frediano Ziglio
> > From: Victor Toso > > Signed-off-by: Victor Toso > --- > server/tests/.gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/server/tests/.gitignore b/server/tests/.gitignore > index ccd5fe10..db26b3ee 100644 > ---

[Spice-devel] [spice-server v1] tests: add test-listen executable to gitignore

2018-04-19 Thread Victor Toso
From: Victor Toso Signed-off-by: Victor Toso --- server/tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/server/tests/.gitignore b/server/tests/.gitignore index ccd5fe10..db26b3ee 100644 --- a/server/tests/.gitignore +++