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

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Use C++ "placement new" to directly initialize a C++ object at a > specified memory location. This makes it possible to get rid of > type-unsafe memset, low-level unsafe

[Spice-devel] [PATCH vdagent v3 2/2] vdagent: add GTK+ clipboard handling

2018-03-01 Thread Jakub Janků
From: Jakub Janků --- src/vdagent/clipboard.c | 416 +++- src/vdagent/clipboard.h | 6 +- src/vdagent/vdagent.c | 23 ++- src/vdagent/x11-priv.h | 44 ++--- src/vdagent/x11.c | 25 ++- src/vdagent/x11.h | 6 +

[Spice-devel] [PATCH spice-streaming-agent] mjpeg-fallback: Ignore not recognized options

2018-03-01 Thread Frediano Ziglio
Options are global and should be ignored if not recognised by a specific plugin as they can be used by other ones. Signed-off-by: Frediano Ziglio --- src/mjpeg-fallback.cpp| 2 -- src/unittests/test-mjpeg-fallback.cpp | 7 +++ 2 files changed, 3

Re: [Spice-devel] [PATCH 09/22] Move read, write, handle and locking into the 'Stream' class

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The 'Stream' class is designed to abstract file I/O. In a subsequent > patch, message formatting will be isolated out of the class, but in > order to minimize code changes,

[Spice-devel] [spice-gtk v1] Don't exceed one statement per line

2018-03-01 Thread Victor Toso
From: Victor Toso Cosmetic change. One break was dropped on _default:_ label of switch Signed-off-by: Victor Toso --- src/channel-usbredir.c | 8 +--- src/spice-channel.c| 7 +-- 2 files changed, 10 insertions(+), 5 deletions(-) diff

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

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 17:36 +0100, Christophe Fergeau wrote: > My understanding is that the previous iteration was quite controversial, > I would just drop it from the series unless you get acks from everyone > involved this time. I've only commented on compiler support, it seems it's fine, so no

[Spice-devel] [PATCH vdagent 1/2] build: make GTK+ optional

2018-03-01 Thread Jakub Janků
From: Jakub Janků Add --with-gtk configure option. If used, favor GTK+ over Xlib. --- configure.ac | 13 - src/vdagent/vdagent.c | 8 +++- src/vdagent/x11.c | 6 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/configure.ac

[Spice-devel] [PATCH vdagent 2/2] x11: retireve _NET_WM_NAME using Xlib if GTK+ is missing

2018-03-01 Thread Jakub Janků
From: Jakub Janků This code using Xlib was removed by commit "x11: retrieve _NET_WM_NAME using GDK" a4f5c7dcb6579f61434a443e537641f91da6cb8c. Bring it back to make GTK+ optional for now. --- src/vdagent/vdagent.c | 6 ++-- src/vdagent/x11.c | 85

Re: [Spice-devel] [PATCH vdagent 1/2] build: make GTK+ optional

2018-03-01 Thread Victor Toso
On Thu, Mar 01, 2018 at 11:10:55AM +0100, Jakub Janků wrote: > From: Jakub Janků > > Add --with-gtk configure option. > If used, favor GTK+ over Xlib. Looks good to me both patches. I'll push early next week if no one complains about it. Acked-by: Victor Toso

[Spice-devel] [PATCH usbredirserver] usbredirserver : enable TCP keepalive

2018-03-01 Thread zhenwei.pi
In some bad cases, for example, host OS crashes without sending any FIN to usbredirserver, and usbredirserver will keep idle connection for a long time. We can also set the kernel arguments, it means that other processes may be affected. Setting a sensible timeout(like 10 minutes) seems good.

[Spice-devel] [PATCH vdagent v3 1/2] vdagent: add new vdagent_clipboard_*() interface

2018-03-01 Thread Jakub Janků
From: Jakub Janků Introduce new functions to handle clipboard, add new files clipboard.[ch] This is only a preparatory patch for following GTK+ clipboard implementation. --- Makefile.am | 2 ++ src/vdagent/clipboard.c | 68

Re: [Spice-devel] [PATCH spice-streaming-agent] Only build unit tests when running make check

2018-03-01 Thread Christophe Fergeau
On Wed, Feb 28, 2018 at 01:33:35PM +0100, Lukáš Hrázký wrote: > On Wed, 2018-02-28 at 12:19 +0100, Christophe Fergeau wrote: > > On Wed, Feb 28, 2018 at 11:56:07AM +0100, Lukáš Hrázký wrote: > > > On Tue, 2018-02-27 at 18:02 +0100, Christophe Fergeau wrote: > > > > On Tue, Feb 27, 2018 at

Re: [Spice-devel] [PATCH 14/22] Create classes encapsulating the X11 display cursor capture

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > There are two classes: > - The X11CursorUpdater class sends the messages. It can be used when > no thread is required. > - The X11CursorThread spawns an X11CursorUpdater in

Re: [Spice-devel] [PATCH 15/22] Create FrameLog class to encapsulate logging of frames

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 15:11, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> The FrameLog encapsulates the frame binary log, making sure that the >> log is properly closed in

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Lukáš Hrázký
On Thu, 2018-03-01 at 12:40 +0100, Lukáš Hrázký wrote: > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > > From: Christophe de Dinechin > > > > Throwing 'runtime_error' directly should be reserved for the support > > library. Add an 'Error' class as a

Re: [Spice-devel] [PATCH 10/22] Remove client_codecs global variable, moved inside the 'Stream' class

2018-03-01 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > It makes sense to place the codecs inside the Stream which is charged > with setting it up, until we create a proper abstraction for input > messages similar to what Message does for output messages in follow-up > patches. > >

Re: [Spice-devel] [PATCH 09/22] Move read, write, handle and locking into the 'Stream' class

2018-03-01 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > The 'Stream' class is designed to abstract file I/O. In a subsequent > patch, message formatting will be isolated out of the class, but in > order to minimize code changes, this intermediate step simply moves > the corresponding

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Throwing 'runtime_error' directly should be reserved for the support > library. Add an 'Error' class as a base class for all errors thrown > by the streaming agent, as well as subclasses used to discriminate > between categories of

Re: [Spice-devel] [PATCH usbredirserver] usbredirserver : enable TCP keepalive

2018-03-01 Thread Frediano Ziglio
> > In some bad cases, for example, host OS crashes without > sending any FIN to usbredirserver, and usbredirserver > will keep idle connection for a long time. > > We can also set the kernel arguments, it means that other > processes may be affected. > > Setting a sensible timeout(like 10

Re: [Spice-devel] [PATCH 15/22] Create FrameLog class to encapsulate logging of frames

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The FrameLog encapsulates the frame binary log, making sure that the > log is properly closed in case of exceptions. > > Signed-off-by: Christophe de Dinechin

Re: [Spice-devel] [PATCH spice-streaming-agent 1/1] Adding gstreamer based plugin

2018-03-01 Thread Jonathon Jongsma
On Thu, 2018-03-01 at 02:32 -0500, Frediano Ziglio wrote: > > > > On Wed, 2018-02-28 at 15:42 -0600, Jonathon Jongsma wrote: > > > On Wed, 2018-02-28 at 15:34 -0600, Jonathon Jongsma wrote: > > > > On Thu, 2018-02-22 at 11:40 -0500, Frediano Ziglio wrote: > > > > > > > > > > > > Gstreamer based

Re: [Spice-devel] [PATCH 18/22] Convert existing std::runtime_error to the new Error classes

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Appropriate error classes been created for the existing messages: > - ProtocolError: handles the various kinds of protocol-related errors > - MessageDataError: a form of

Re: [Spice-devel] [PATCH 13/22] Convert message writing from C style to C++ style

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > - The Stream class now deals with locking and sending messages > - The Message<> template class deals with the general writing mechanisms > - Classes, FormatMessage,

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Throwing 'runtime_error' directly should be reserved for the support > library. Add an 'Error' class as a base class for all errors thrown > by the streaming agent, as well

Re: [Spice-devel] [PATCH 10/22] Remove client_codecs global variable, moved inside the 'Stream' class

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > It makes sense to place the codecs inside the Stream which is charged > with setting it up, until we create a proper abstraction for input > messages similar to what Message

[Spice-devel] [spice-streaming-agent 0/6] build: Misc configure.ac improvements

2018-03-01 Thread Christophe Fergeau
Hey, while looking at adding a --disable-tests argument as discussed recently on the mailing list, I piled up a couple of unrelated changes to configure.ac/Makefile.am. Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

[Spice-devel] [spice-streaming-agent 3/6] build: Remove -fvisibility detection from configure.ac

2018-03-01 Thread Christophe Fergeau
In my testing (x86_64/gcc), this had no impact on the resulting binary, building with/without it gives the same stripped binary save for its buildid. Signed-off-by: Christophe Fergeau --- configure.ac| 19 --- src/Makefile.am | 2 -- 2 files changed, 21

[Spice-devel] [spice-streaming-agent 5/6] build: Add --enable-tests

2018-03-01 Thread Christophe Fergeau
Tests are enabled by default, but are expensive to compile, so they can be disabled if that's what one wants. They will also be enabled/disabled by default depending on the availability of 'catch' Signed-off-by: Christophe Fergeau --- configure.ac| 21

Re: [Spice-devel] [PATCH] build: Add autogen.sh convenience script

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:42, Christophe Fergeau wrote: > > Hey, > > I sent > https://lists.freedesktop.org/archives/spice-devel/2018-March/042479.html > (which is based on spice-gtk's autogen.sh) which should address the > issues below. Will ack there. > > Christophe >

Re: [Spice-devel] [PATCH 20/22] Move the X11CursorUpdater and X11CursorThread classes in a separate file

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:12, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> This makes it possible to remove X11 dependencies from the main agent file. >> >> Note: it may

Re: [Spice-devel] [spice-streaming-agent 4/6] build: Improve BINDIR doc string

2018-03-01 Thread Jonathon Jongsma
On Thu, 2018-03-01 at 16:41 +0100, Christophe de Dinechin wrote: > > On 1 Mar 2018, at 16:27, Christophe Fergeau > > wrote: > > > > Signed-off-by: Christophe Fergeau > > --- > > configure.ac | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Spice-devel] [PATCH 20/22] Move the X11CursorUpdater and X11CursorThread classes in a separate file

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 17:02, Christophe de Dinechin > wrote: > > > >> On 1 Mar 2018, at 16:12, Lukáš Hrázký wrote: >> >> On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >>> From: Christophe de Dinechin

Re: [Spice-devel] [PATCH 15/22] Create FrameLog class to encapsulate logging of frames

2018-03-01 Thread Lukáš Hrázký
On Thu, 2018-03-01 at 15:42 +0100, Christophe de Dinechin wrote: > > On 1 Mar 2018, at 15:11, Lukáš Hrázký wrote: > > > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > > > From: Christophe de Dinechin > > > > > > The FrameLog

Re: [Spice-devel] [PATCH 19/22] Put Stream and Message classes in separate files

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Doing this change will make it possible to move the capture loop to the > concrete-agent.cpp file. > > Signed-off-by: Christophe de Dinechin > --- >

Re: [Spice-devel] [PATCH 20/22] Move the X11CursorUpdater and X11CursorThread classes in a separate file

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > This makes it possible to remove X11 dependencies from the main agent file. > > Note: it may be unsafe to call XCloseDisplay from the destructor. > Doing some experiments

Re: [Spice-devel] [PATCH 18/22] Convert existing std::runtime_error to the new Error classes

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 15:42, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Appropriate error classes been created for the existing messages: >> - ProtocolError: handles the

Re: [Spice-devel] [PATCH spice-server v5 0/8] Better handling reset for streaming device

2018-03-01 Thread Christophe de Dinechin
> On 13 Feb 2018, at 16:54, Frediano Ziglio wrote: > > Changes since v4: > - split reset patch; > - add a workaround for a Qemu bug, seems easier to do it > instead of detecting it; > - add another problem with fix and test case. For what it’s worth, I tested this for a

Re: [Spice-devel] [spice-streaming-agent 3/6] build: Remove -fvisibility detection from configure.ac

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:27, Christophe Fergeau wrote: > > In my testing (x86_64/gcc), this had no impact on the resulting binary, > building with/without it gives the same stripped binary save for its > buildid. I was also thinking that -fvisibility=hidden did not make

Re: [Spice-devel] [spice-streaming-agent 4/6] build: Improve BINDIR doc string

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:27, Christophe Fergeau wrote: > > Signed-off-by: Christophe Fergeau > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 2ab14da..ce83153 100644 > ---

Re: [Spice-devel] [spice-streaming-agent 2/6] build: Use pkgconfig to detect libjpeg

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:27, Christophe Fergeau wrote: > > Upstream provides a .pc file, we can use it rather than doing the > detection manually. Acked-by: Christophe de Dinechin Will test on macOS too, there are some specific aspects of libjpeg .pc

Re: [Spice-devel] [spice-streaming-agent 5/6] build: Add --enable-tests

2018-03-01 Thread Lukáš Hrázký
On Thu, 2018-03-01 at 16:27 +0100, Christophe Fergeau wrote: > Tests are enabled by default, but are expensive to compile, so they can be > disabled if that's what one wants. They will also be enabled/disabled by > default depending on the availability of 'catch' Thanks again for this :) I'd

Re: [Spice-devel] [PATCH 21/22] Moving FrameLog into a separate file

2018-03-01 Thread Lukáš Hrázký
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Isolating classes in separate files makes parallel builds faster, > facilitates code reuse and minimizes the chances of patch conflicts. > > Signed-off-by: Christophe de

Re: [Spice-devel] [PATCH spice-streaming-agent] mjpeg-fallback: Ignore not recognized options

2018-03-01 Thread Lukáš Hrázký
On Thu, 2018-03-01 at 10:17 +, Frediano Ziglio wrote: > Options are global and should be ignored if not recognised by a > specific plugin as they can be used by other ones. Haven't realized that.. Acked-by: Lukáš Hrázký > Signed-off-by: Frediano Ziglio

[Spice-devel] [spice-streaming-agent 2/6] build: Use pkgconfig to detect libjpeg

2018-03-01 Thread Christophe Fergeau
Upstream provides a .pc file, we can use it rather than doing the detection manually. Signed-off-by: Christophe Fergeau --- configure.ac | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 5aab662..e5decb3

[Spice-devel] [spice-streaming-agent 4/6] build: Improve BINDIR doc string

2018-03-01 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2ab14da..ce83153 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,7 @@ LIBVIRT_LINKER_NO_INDIRECT

[Spice-devel] [spice-streaming-agent 1/6] build: Fix VPATH build

2018-03-01 Thread Christophe Fergeau
The .desktop file is generated, so will be in $(builddir), not $(srcdir) Signed-off-by: Christophe Fergeau --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 74ec16a..94ad7aa 100644 --- a/Makefile.am +++

[Spice-devel] [spice-streaming-agent 6/6] build: Add autogen.sh script

2018-03-01 Thread Christophe Fergeau
Convenience script to avoid running autoreconf/configure manually. It can be run from a directory out of the source tree for VPATH builds. This script is based off the one in spice-gtk. Signed-off-by: Christophe Fergeau --- autogen.sh | 18 ++ 1 file

Re: [Spice-devel] [PATCH] build: Add autogen.sh convenience script

2018-03-01 Thread Christophe Fergeau
Hey, I sent https://lists.freedesktop.org/archives/spice-devel/2018-March/042479.html (which is based on spice-gtk's autogen.sh) which should address the issues below. Christophe On Fri, Feb 16, 2018 at 03:28:41PM +, Daniel P. Berrangé wrote: > On Fri, Feb 16, 2018 at 04:18:19PM +0100,

Re: [Spice-devel] [spice-streaming-agent 6/6] build: Add autogen.sh script

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:27, Christophe Fergeau wrote: > > Convenience script to avoid running autoreconf/configure manually. > It can be run from a directory out of the source tree for VPATH builds. > This script is based off the one in spice-gtk. > > Signed-off-by:

Re: [Spice-devel] [PATCH 18/22] Convert existing std::runtime_error to the new Error classes

2018-03-01 Thread Lukáš Hrázký
On Thu, 2018-03-01 at 16:23 +0100, Christophe de Dinechin wrote: > > On 1 Mar 2018, at 15:42, Lukáš Hrázký wrote: > > > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > > > From: Christophe de Dinechin > > > > > > Appropriate error

Re: [Spice-devel] [PATCH 21/22] Moving FrameLog into a separate file

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:14, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Isolating classes in separate files makes parallel builds faster, >> facilitates code reuse and

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 15:46, Lukáš Hrázký wrote: > > On Thu, 2018-03-01 at 12:40 +0100, Lukáš Hrázký wrote: >> On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >>> From: Christophe de Dinechin >>> >>> Throwing 'runtime_error' directly

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

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 10:51, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 17:36 +0100, Christophe Fergeau wrote: >> My understanding is that the previous iteration was quite controversial, >> I would just drop it from the series unless you get acks from everyone >> involved

Re: [Spice-devel] [PATCH 14/22] Create classes encapsulating the X11 display cursor capture

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 14:56, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> There are two classes: >> - The X11CursorUpdater class sends the messages. It can be used when >>

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

2018-03-01 Thread Christophe de Dinechin
> On 28 Feb 2018, at 17:36, Christophe Fergeau wrote: > > My understanding is that the previous iteration was quite controversial, > I would just drop it from the series unless you get acks from everyone > involved this time. It’s a bit difficult to drop that from the

Re: [Spice-devel] [PATCH 03/22] Reformat 'if' statments according to style guide

2018-03-01 Thread Christophe de Dinechin
> On 28 Feb 2018, at 17:35, Christophe Fergeau wrote: > > s/statments/statements in the short log. Fixed > > On Wed, Feb 28, 2018 at 04:43:06PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> This patch ensures that all

Re: [Spice-devel] [PATCH 11/22] Make streaming_requested a method in Stream

2018-03-01 Thread Jonathon Jongsma
On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Until we have a proper separation of input messages, it makes sense > to > have the Stream class deal with this flag. > > Signed-off-by: Christophe de Dinechin

Re: [Spice-devel] [spice-streaming-agent 4/6] build: Improve BINDIR doc string

2018-03-01 Thread Christophe Fergeau
On Thu, Mar 01, 2018 at 10:03:13AM -0600, Jonathon Jongsma wrote: > On Thu, 2018-03-01 at 16:41 +0100, Christophe de Dinechin wrote: > > > On 1 Mar 2018, at 16:27, Christophe Fergeau > > > wrote: > > > > > > Signed-off-by: Christophe Fergeau > > > --- >

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 12:40, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Throwing 'runtime_error' directly should be reserved for the support >> library. Add an 'Error'

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 13:13, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> Throwing 'runtime_error' directly should be reserved for the support >> library. Add an 'Error' class as a base class for all errors thrown >> by the

Re: [Spice-devel] [PATCH 10/22] Remove client_codecs global variable, moved inside the 'Stream' class

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 11:51, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> It makes sense to place the codecs inside the Stream which is charged >> with setting it up,

Re: [Spice-devel] [PATCH 09/22] Move read, write, handle and locking into the 'Stream' class

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 11:59, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> The 'Stream' class is designed to abstract file I/O. In a subsequent >> patch, message formatting will be isolated out of the class, but in >> order to

[Spice-devel] [spice-streaming-agent v2] build: Add --enable-tests

2018-03-01 Thread Christophe Fergeau
Tests require 'catch' to be installed, one might want to disable them if catch is not available. This patch adds a --disable-tests switch. By default, tests are enabled depending on 'catch' availability. Signed-off-by: Christophe Fergeau --- configure.ac| 21

Re: [Spice-devel] [PATCH 10/22] Remove client_codecs global variable, moved inside the 'Stream' class

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 11:56, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> It makes sense to place the codecs inside the Stream which is charged >> with setting it up, until we create a proper abstraction for input >> messages

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

2018-03-01 Thread Christophe de Dinechin
> On 28 Feb 2018, at 18:16, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> Fix a race condition, make sure we only use stream after opening >> Get rid of C-style 'goto done' in do_capture. >> Get rid of global streamfd, pass it

Re: [Spice-devel] [PATCH 11/22] Make streaming_requested a method in Stream

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 18:19, Jonathon Jongsma wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Until we have a proper separation of input messages, it makes sense >> to >> have the Stream

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

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 11:02, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Use C++ "placement new" to directly initialize a C++ object at a >> specified memory location.

Re: [Spice-devel] [spice-streaming-agent 3/6] build: Remove -fvisibility detection from configure.ac

2018-03-01 Thread Frediano Ziglio
> > In my testing (x86_64/gcc), this had no impact on the resulting binary, > building with/without it gives the same stripped binary save for its > buildid. > > Signed-off-by: Christophe Fergeau Have you compiled proposed Snir plugin? I think we are going to use soon

Re: [Spice-devel] [PATCH 18/22] Convert existing std::runtime_error to the new Error classes

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:47, Lukáš Hrázký wrote: > > On Thu, 2018-03-01 at 16:23 +0100, Christophe de Dinechin wrote: >>> On 1 Mar 2018, at 15:42, Lukáš Hrázký wrote: >>> >>> On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: From:

Re: [Spice-devel] [PATCH 19/22] Put Stream and Message classes in separate files

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 16:11, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Doing this change will make it possible to move the capture loop to the >> concrete-agent.cpp

Re: [Spice-devel] [PATCH 15/22] Create FrameLog class to encapsulate logging of frames

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 15:54, Lukáš Hrázký wrote: > > On Thu, 2018-03-01 at 15:42 +0100, Christophe de Dinechin wrote: >>> On 1 Mar 2018, at 15:11, Lukáš Hrázký wrote: >>> >>> On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: From:

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-01 Thread Christophe de Dinechin
> On 28 Feb 2018, at 17:46, Christophe Fergeau wrote: > > On Wed, Feb 28, 2018 at 04:43:15PM +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> Throwing 'runtime_error' directly should be reserved for the support >> library.

Re: [Spice-devel] [spice-streaming-agent 1/6] build: Fix VPATH build

2018-03-01 Thread Jonathon Jongsma
On Thu, 2018-03-01 at 16:27 +0100, Christophe Fergeau wrote: > The .desktop file is generated, so will be in $(builddir), not > $(srcdir) > > Signed-off-by: Christophe Fergeau > --- > Makefile.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [Spice-devel] [PATCH 13/22] Convert message writing from C style to C++ style

2018-03-01 Thread Christophe de Dinechin
> On 1 Mar 2018, at 14:45, Lukáš Hrázký wrote: > > On Wed, 2018-02-28 at 16:43 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> - The Stream class now deals with locking and sending messages >> - The Message<> template class