Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-19 Thread Uri Lublin
On 02/19/2018 06:47 PM, Lukáš Hrázký wrote: On Mon, 2018-02-19 at 18:29 +0200, Uri Lublin wrote: On 02/14/2018 06:37 PM, Christophe Fergeau wrote: On Wed, Feb 14, 2018 at 10:40:58AM -0500, Frediano Ziglio wrote: On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: Introduce a unit test framework

Re: [Spice-devel] [PATCH 09/17] Reorder headers according to style guide

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp b/src/spi

Re: [Spice-devel] [PATCH 08/17] Use C++ style for cursor message initialization instead of C style

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 47 > +-- > 1 file changed, 27 insertions(+), 20 deletions(-) > > diff --gi

Re: [Spice-devel] [PATCH spice-streaming-agent 4/6] Separate handling start/stop message from server

2018-02-19 Thread Uri Lublin
On 02/19/2018 06:44 PM, Frediano Ziglio wrote: On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: Prepare to add support for other messages. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 26 ++ 1 file changed, 18 insertions(+), 8 deletion

Re: [Spice-devel] [PATCH 07/17] Get rid of C-style memset initializations, use C++ style aggregates

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 47 > ++- > 1 file changed, 28 insertions(+), 19 deletions(-) > > diff --gi

Re: [Spice-devel] [PATCH 05/17] Use RAII to cleanup stream in case of exception or return

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:59 +0100, Christophe de Dinechin wrote: > > On 16 Feb 2018, at 17:40, Frediano Ziglio wrote: > > > > > > > > From: Christophe de Dinechin > > > > > > Get rid of C-style 'goto done' in do_capture. > > > Get rid of global streamfd, pass it around (cleaned up in later pat

Re: [Spice-devel] [PATCH spice-streaming-agent 1/6] Be more restrictive about error handling

2018-02-19 Thread Uri Lublin
On 02/19/2018 05:52 PM, Frediano Ziglio wrote: There's no much point in ignoring the error if these errors cause the communication to be out of sync. Ignoring them just change the state to indetermidate. Hi Frediano, There is a typo in the last word. I would be more specific, mentioning those

Re: [Spice-devel] [PATCH 03/17] Eliminate signed/unsigned warning

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/mjpeg-fallback.cpp| 2 +- > src/spice-streaming-agent.cpp | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sr

Re: [Spice-devel] [PATCH 01/17] Add missing header

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/concrete-agent.cpp | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/concrete-agent.cpp b/src/concrete-agent.cpp > index 891c09b..ac3

Re: [Spice-devel] [PATCH 00/17] WIP: Refactor the streaming agent towards a more standard C++ style

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 17:15 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The streaming agent started as C code. This series converts > the style to something that is more usual for C++, notably: > > - Adds encapsulation and RAII for resources such as the stream > - Spl

Re: [Spice-devel] [PATCH spice-streaming-agent 2/6] Separate ERROR macro in a different utility header

2018-02-19 Thread Frediano Ziglio
> > On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > > Allows to reuse it. > > > > Signed-off-by: Frediano Ziglio > > --- > > src/Makefile.am| 1 + > > src/mjpeg-fallback.cpp | 7 +-- > > src/utils.hpp | 18 ++ > > 3 files changed, 20 insertions

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-19 Thread Lukáš Hrázký
On Mon, 2018-02-19 at 18:29 +0200, Uri Lublin wrote: > On 02/14/2018 06:37 PM, Christophe Fergeau wrote: > > On Wed, Feb 14, 2018 at 10:40:58AM -0500, Frediano Ziglio wrote: > > > > > > > > > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: > > > > > > > > > > Introduce a unit test framework (Catch

Re: [Spice-devel] [PATCH spice-streaming-agent 1/6] Be more restrictive about error handling

2018-02-19 Thread Frediano Ziglio
> > On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > > There's no much point in ignoring the error if these errors cause the > > communication to be out of sync. > > Ignoring them just change the state to indetermidate. > > > > Signed-off-by: Frediano Ziglio > > --- > > src/spice-str

Re: [Spice-devel] [PATCH spice-streaming-agent 4/6] Separate handling start/stop message from server

2018-02-19 Thread Frediano Ziglio
> > On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > > Prepare to add support for other messages. > > > > Signed-off-by: Frediano Ziglio > > --- > > src/spice-streaming-agent.cpp | 26 ++ > > 1 file changed, 18 insertions(+), 8 deletions(-) > > > > diff --git

Re: [Spice-devel] [PATCH spice-streaming-agent v3 3/3] mjpeg-fallback: unittest for the options parsing

2018-02-19 Thread Uri Lublin
On 02/14/2018 06:37 PM, Christophe Fergeau wrote: On Wed, Feb 14, 2018 at 10:40:58AM -0500, Frediano Ziglio wrote: On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote: Introduce a unit test framework (Catch) to the codebase and a simple unit test for parsing the options of the mjpeg plugin. Signed

Re: [Spice-devel] [PATCH spice-streaming-agent 4/6] Separate handling start/stop message from server

2018-02-19 Thread Lukáš Hrázký
On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > Prepare to add support for other messages. > > Signed-off-by: Frediano Ziglio > --- > src/spice-streaming-agent.cpp | 26 ++ > 1 file changed, 18 insertions(+), 8 deletions(-) > > diff --git a/src/spice-streamin

Re: [Spice-devel] [spice-gtk] Add --spice-disable-clipboard option

2018-02-19 Thread Christophe Fergeau
On Thu, Jan 18, 2018 at 12:13:45PM +0100, Christophe Fergeau wrote: > On Thu, Jan 18, 2018 at 12:06:34PM +0100, Marc-André Lureau wrote: > > Hi > > > > On Thu, Jan 18, 2018 at 10:31 AM, Christophe Fergeau > > wrote: > > > At least on X.org, malicious code could run the equivalent of "watch > > >

Re: [Spice-devel] [PATCH spice-streaming-agent 2/6] Separate ERROR macro in a different utility header

2018-02-19 Thread Lukáš Hrázký
On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > Allows to reuse it. > > Signed-off-by: Frediano Ziglio > --- > src/Makefile.am| 1 + > src/mjpeg-fallback.cpp | 7 +-- > src/utils.hpp | 18 ++ > 3 files changed, 20 insertions(+), 6 deletions(-) >

Re: [Spice-devel] [PATCH spice-streaming-agent 1/6] Be more restrictive about error handling

2018-02-19 Thread Lukáš Hrázký
On Mon, 2018-02-19 at 15:52 +, Frediano Ziglio wrote: > There's no much point in ignoring the error if these errors cause the > communication to be out of sync. > Ignoring them just change the state to indetermidate. > > Signed-off-by: Frediano Ziglio > --- > src/spice-streaming-agent.cpp |

Re: [Spice-devel] [PATCH spice-streaming-agent] spec.in: Add BuildRequires for catch-devel

2018-02-19 Thread Frediano Ziglio
> > --- > > Currently you have to have catch so no conditional is needed. > > --- > spice-streaming-agent.spec.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/spice-streaming-agent.spec.in b/spice-streaming-agent.spec.in > index d137840..ac8203a 100644 > --- a/spice-streaming-agent

[Spice-devel] [PATCH spice-streaming-agent 5/6] Handle capabilities

2018-02-19 Thread Frediano Ziglio
Do not bail if the server is attempting to communicate some extensions but just ignore as at the moment we support none. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/spice-streaming-agent.

[Spice-devel] [PATCH spice-streaming-agent 6/6] Stub to handle errors from server

2018-02-19 Thread Frediano Ziglio
Base error message handling. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index 5813fba..2612ccb 100644 --- a/src/spice-streaming-agent.cpp +++ b/src/

[Spice-devel] [PATCH spice-streaming-agent 2/6] Separate ERROR macro in a different utility header

2018-02-19 Thread Frediano Ziglio
Allows to reuse it. Signed-off-by: Frediano Ziglio --- src/Makefile.am| 1 + src/mjpeg-fallback.cpp | 7 +-- src/utils.hpp | 18 ++ 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 src/utils.hpp diff --git a/src/Makefile.am b/src/Makef

[Spice-devel] [PATCH spice-streaming-agent 1/6] Be more restrictive about error handling

2018-02-19 Thread Frediano Ziglio
There's no much point in ignoring the error if these errors cause the communication to be out of sync. Ignoring them just change the state to indetermidate. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/

[Spice-devel] [PATCH spice-streaming-agent 4/6] Separate handling start/stop message from server

2018-02-19 Thread Frediano Ziglio
Prepare to add support for other messages. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index 08f4b48..41b4d3d 100644

[Spice-devel] [PATCH spice-streaming-agent 3/6] Use exception handling data from streaming device

2018-02-19 Thread Frediano Ziglio
In all paths errors from this function are treated like fatal error, there's no need to handle all manually potentially forgetting to handle errors. Also avoid to deal directly with logging moving the responsibility to other layers. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cp

Re: [Spice-devel] [PATCH spice-streaming-agent v2 2/2] explicit instead of static registration for built-in plugins

2018-02-19 Thread Frediano Ziglio
> > On Fri, 2018-02-16 at 07:23 -0500, Frediano Ziglio wrote: > > > > > > > On 6 Feb 2018, at 10:51, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > On 5 Feb 2018, at 15:29, Lukáš Hrázký wrote: > > > > > > > > > > > > The static registration (that is, having a static list of pointers

[Spice-devel] [PATCH spice-streaming-agent] spec.in: Add BuildRequires for catch-devel

2018-02-19 Thread Snir Sheriber
--- Currently you have to have catch so no conditional is needed. --- spice-streaming-agent.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/spice-streaming-agent.spec.in b/spice-streaming-agent.spec.in index d137840..ac8203a 100644 --- a/spice-streaming-agent.spec.in +++ b/spice-stre

[Spice-devel] Gitlab - 2018!

2018-02-19 Thread Victor Toso
Hi, There was a thread in 2016 about moving to gitlab [0] which it was not complete done. New projects have been started in gitlab instead of freedesktop and without notice, some users are even filling bugs there already [1]. [0] https://lists.freedesktop.org/archives/spice-devel/2016-September/

Re: [Spice-devel] [PATCH spice-streaming-agent v2 2/2] explicit instead of static registration for built-in plugins

2018-02-19 Thread Lukáš Hrázký
On Fri, 2018-02-16 at 07:23 -0500, Frediano Ziglio wrote: > > > > > On 6 Feb 2018, at 10:51, Frediano Ziglio wrote: > > > > > > > > > > > > > On 5 Feb 2018, at 15:29, Lukáš Hrázký wrote: > > > > > > > > > > The static registration (that is, having a static list of pointers to > > > > > static

Re: [Spice-devel] [spice-gtk v1 2/2] channel-display: use libva to set preferred video codecs

2018-02-19 Thread Victor Toso
Hi, On Mon, Feb 19, 2018 at 02:58:22PM +0100, Christophe Fergeau wrote: > On Thu, Feb 15, 2018 at 10:05:05AM +0100, Victor Toso wrote: > > From: Victor Toso > > > > By using the detection of which video codecs (and profiles!) the > > hardware supports with VA-API capable driver in previous commi

Re: [Spice-devel] [PATCH 2/2] Eliminate signed/unsigned warning

2018-02-19 Thread Christophe Fergeau
On Mon, Feb 19, 2018 at 03:06:40PM +0100, Christophe de Dinechin wrote: > > > > On 19 Feb 2018, at 13:24, Christophe Fergeau wrote: > > > > On Fri, Feb 16, 2018 at 04:23:06PM +0100, Christophe de Dinechin wrote: > >> From: Christophe de Dinechin > >> > >> Without this, GCC complains about sig

Re: [Spice-devel] [spice-gtk v1 1/2] Use libva to check video hardware accel capabilities

2018-02-19 Thread Victor Toso
Hi, On Mon, Feb 19, 2018 at 02:44:04PM +0100, Christophe Fergeau wrote: > Hey, > > On Thu, Feb 15, 2018 at 10:05:04AM +0100, Victor Toso wrote: > > From: Victor Toso > > > > Libva is an implementation for VA-API. > > > > This can be used to automatically send to the server the > > preferred vi

Re: [Spice-devel] [PATCH spice-server v3 0/2] Implement cursor for streaming device

2018-02-19 Thread Christophe Fergeau
On Tue, Feb 13, 2018 at 01:58:07PM +, Frediano Ziglio wrote: > Changes since v2: > - shrink buffer after the message is handled. > > Frediano Ziglio (2): > stream-device: handle cursor from device > stream-device: Implement mouse movement > > server/stream-device.c | 201 >

[Spice-devel] [PATCH v2] Add support for resolution 800x600

2018-02-19 Thread Yuri Benditovich
https://bugzilla.redhat.com/show_bug.cgi?id=1477492 https://docs.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview requires 800x600 to be supported. Signed-off-by: Yuri Benditovich --- qxldod/QxlDod.cpp | 16 qxldod/QxlDod.h | 6 --

Re: [Spice-devel] [PATCH 2/2] Eliminate signed/unsigned warning

2018-02-19 Thread Christophe de Dinechin
> On 19 Feb 2018, at 13:24, Christophe Fergeau wrote: > > On Fri, Feb 16, 2018 at 04:23:06PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Without this, GCC complains about signed / unsigned comparisons: >> >> mjpeg-fallback.cpp:121:24: warning: comparison betwee

Re: [Spice-devel] [spice-gtk v1 2/2] channel-display: use libva to set preferred video codecs

2018-02-19 Thread Christophe Fergeau
On Thu, Feb 15, 2018 at 10:05:05AM +0100, Victor Toso wrote: > From: Victor Toso > > By using the detection of which video codecs (and profiles!) the > hardware supports with VA-API capable driver in previous commit. > > Signed-off-by: Victor Toso > --- > src/channel-display.c | 33 +++

Re: [Spice-devel] [RFC PATCH 1/1] separate and encapsulate the agent business code

2018-02-19 Thread Christophe de Dinechin
> On 19 Feb 2018, at 14:05, Christophe Fergeau wrote: > > On Wed, Feb 14, 2018 at 10:13:41PM +0100, Christophe de Dinechin wrote: I’d write “config.h”. No reason to ever look config.h in system headers. >>> >>> The reason for the <> is described in [1], 4th paragraph. I've >>> mentioned i

Re: [Spice-devel] [PATCH] Add support for resolution 800x600

2018-02-19 Thread Christophe de Dinechin
> On 19 Feb 2018, at 14:35, Frediano Ziglio wrote: > >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1477492 >> https://docs.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview >> requires 800x600 to be supported. >> >> Signed-off-by: Yuri Benditovich

Re: [Spice-devel] [spice-gtk v1 1/2] Use libva to check video hardware accel capabilities

2018-02-19 Thread Christophe Fergeau
Hey, On Thu, Feb 15, 2018 at 10:05:04AM +0100, Victor Toso wrote: > From: Victor Toso > > Libva is an implementation for VA-API. > > This can be used to automatically send to the server the > preferred video codecs as the client would prefer streams > with video codecs that can be decoded with

Re: [Spice-devel] [PATCH spice-streaming-agent] Make evaluation order more readable

2018-02-19 Thread Victor Toso
On Mon, Feb 19, 2018 at 01:26:01PM +, Frediano Ziglio wrote: > As a first sight the XXX = YYY != 0 syntax can be confusing, > add parenthesis to make clear the order. > > Signed-off-by: Frediano Ziglio Acked-by: Victor Toso > --- > src/spice-streaming-agent.cpp | 2 +- > 1 file changed, 1

Re: [Spice-devel] [PATCH] Add support for resolution 800x600

2018-02-19 Thread Frediano Ziglio
> > https://bugzilla.redhat.com/show_bug.cgi?id=1477492 > https://docs.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview > requires 800x600 to be supported. > > Signed-off-by: Yuri Benditovich > --- > qxldod/QxlDod.cpp | 28 ++-- >

[Spice-devel] [PATCH spice-streaming-agent] Make evaluation order more readable

2018-02-19 Thread Frediano Ziglio
As a first sight the XXX = YYY != 0 syntax can be confusing, add parenthesis to make clear the order. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp

[Spice-devel] [PATCH] Add support for resolution 800x600

2018-02-19 Thread Yuri Benditovich
https://bugzilla.redhat.com/show_bug.cgi?id=1477492 https://docs.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview requires 800x600 to be supported. Signed-off-by: Yuri Benditovich --- qxldod/QxlDod.cpp | 28 ++-- qxldod/QxlDod.h

Re: [Spice-devel] #include "canvas_base.c" ?

2018-02-19 Thread Christophe Fergeau
On Thu, Feb 15, 2018 at 03:28:42PM +0100, Christophe de Dinechin wrote: > While looking at some warnings, I came across this in sw_canvas.c: > > #include “canvas_base.c" > > So we include a .c in another one. Apparently, this was inherited from some > Cairo canvas. Is that something we care to k

Re: [Spice-devel] [RFC PATCH 1/1] separate and encapsulate the agent business code

2018-02-19 Thread Christophe Fergeau
On Wed, Feb 14, 2018 at 10:13:41PM +0100, Christophe de Dinechin wrote: > >> I’d write “config.h”. No reason to ever look config.h in system headers. > > > > The reason for the <> is described in [1], 4th paragraph. I've > > mentioned it during the previous discussion and didn't get any comment >

Re: [Spice-devel] [PATCH 03/14] streaming_requested is really a bool

2018-02-19 Thread Christophe de Dinechin
> On 19 Feb 2018, at 13:03, Christophe Fergeau wrote: > > On Wed, Feb 14, 2018 at 06:52:11PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Signed-off-by: Christophe de Dinechin >> --- >> src/spice-streaming-agent.cpp | 8 >> 1 file changed, 4 insertions(+

Re: [Spice-devel] [PATCH spice-streaming-agent v2 2/4] Remove clang warning on missing 'override'

2018-02-19 Thread Christophe Fergeau
On Thu, Feb 15, 2018 at 03:58:15PM +0100, Christophe de Dinechin wrote: > Again, I really don’t want to have to post-process my patches manually > to split-out whitespace corrections. I see that as “punishment for > doing the right thing”. This is also a matter of differing workflows, I mostly exc

Re: [Spice-devel] [PATCH spice-gtk v2 2/4] uri: learn to parse spice+tls:// form

2018-02-19 Thread Christophe Fergeau
On Fri, Feb 16, 2018 at 10:30:18AM +, Daniel P. Berrangé wrote: > On Fri, Feb 16, 2018 at 11:13:06AM +0100, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > spice:// has a weird scheme encoding, where it can accept both plain > > and tls ports with URI query parameters.

Re: [Spice-devel] [PATCH 2/2] Eliminate signed/unsigned warning

2018-02-19 Thread Christophe Fergeau
On Fri, Feb 16, 2018 at 04:23:06PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Without this, GCC complains about signed / unsigned comparisons: > > mjpeg-fallback.cpp:121:24: warning: comparison between signed and unsigned > integer expressions [-Wsign-compare] >

Re: [Spice-devel] [PATCH 03/14] streaming_requested is really a bool

2018-02-19 Thread Christophe Fergeau
On Wed, Feb 14, 2018 at 06:52:11PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > src/spice-streaming-agent.cpp | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/spice-streaming-agent.cpp