Re: [Spice-devel] [vdagent-win PATCH 09/13] file_xfer: Use shared_ptr to simplify memory management

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:33:11AM -0400, Frediano Ziglio wrote: > > > > On Mon, May 28, 2018 at 09:58:02AM +0100, Frediano Ziglio wrote: > > > Clear automatically tasks items. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > vdagent/file_xfer.cpp | 25

Re: [Spice-devel] [vdagent-win PATCH 12/13] Factor out an utility function to read strings from registry

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:58:11AM -0400, Frediano Ziglio wrote: > > > > On Mon, May 28, 2018 at 09:58:05AM +0100, Frediano Ziglio wrote: > > > Signed-off-by: Frediano Ziglio > > > --- > > > vdagent/display_setting.cpp | 97 + > > > 1 file

Re: [Spice-devel] [vdagent-win PATCH 05/13] msi: Do not generate deps.txt

2018-05-28 Thread Frediano Ziglio
> > On Mon, May 28, 2018 at 09:26:47AM -0400, Frediano Ziglio wrote: > > > > > > On Mon, May 28, 2018 at 09:57:58AM +0100, Frediano Ziglio wrote: > > > > There's no reason to tell the package installed on the build system > > > > used. > > > > > > This can be useful to know which version of

Re: [Spice-devel] [vdagent-win PATCH 12/13] Factor out an utility function to read strings from registry

2018-05-28 Thread Frediano Ziglio
> > On Mon, May 28, 2018 at 09:58:05AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > vdagent/display_setting.cpp | 97 + > > 1 file changed, 54 insertions(+), 43 deletions(-) > > > > diff --git

Re: [Spice-devel] [vdagent-win PATCH 05/13] msi: Do not generate deps.txt

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:26:47AM -0400, Frediano Ziglio wrote: > > > > On Mon, May 28, 2018 at 09:57:58AM +0100, Frediano Ziglio wrote: > > > There's no reason to tell the package installed on the build system > > > used. > > > > This can be useful to know which version of zlib or libpng are

Re: [Spice-devel] [vdagent-win PATCH 12/13] Factor out an utility function to read strings from registry

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:58:05AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > vdagent/display_setting.cpp | 97 + > 1 file changed, 54 insertions(+), 43 deletions(-) > > diff --git a/vdagent/display_setting.cpp

Re: [Spice-devel] [vdagent-win PATCH 13/13] build: Base cmake support

2018-05-28 Thread Frediano Ziglio
> > Lacking some rationale in the commit log I think ;) > vdagent-win already has 2 build systems (mingw+autotools and VS), there > are patches to port other spice components to meson, so why cmake here? > > Christophe > Was going to add a big RFC in front. The reason of not using VS projects

Re: [Spice-devel] [vdagent-win PATCH 09/13] file_xfer: Use shared_ptr to simplify memory management

2018-05-28 Thread Frediano Ziglio
> > On Mon, May 28, 2018 at 09:58:02AM +0100, Frediano Ziglio wrote: > > Clear automatically tasks items. > > > > Signed-off-by: Frediano Ziglio > > --- > > vdagent/file_xfer.cpp | 25 - > > vdagent/file_xfer.h | 3 ++- > > 2 files changed, 6

Re: [Spice-devel] [vdagent-win PATCH 05/13] msi: Do not generate deps.txt

2018-05-28 Thread Frediano Ziglio
> > On Mon, May 28, 2018 at 09:57:58AM +0100, Frediano Ziglio wrote: > > There's no reason to tell the package installed on the build system > > used. > > This can be useful to know which version of zlib or libpng are bundled > with the agent msi installer when debugging something which is

Re: [Spice-devel] [vdagent-win PATCH 09/13] file_xfer: Use shared_ptr to simplify memory management

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:58:02AM +0100, Frediano Ziglio wrote: > Clear automatically tasks items. > > Signed-off-by: Frediano Ziglio > --- > vdagent/file_xfer.cpp | 25 - > vdagent/file_xfer.h | 3 ++- > 2 files changed, 6 insertions(+), 22

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

2018-05-28 Thread Frediano Ziglio
> > On Fri, May 25, 2018 at 01:55:20PM +0100, Frediano Ziglio wrote: > > 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

Re: [Spice-devel] [vdagent-win PATCH 08/13] file_xfer: Use destructor for FileXferTask

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:58:01AM +0100, Frediano Ziglio wrote: > Limit too much manual work. > By default delete the file, unless success() is called. > > Signed-off-by: Frediano Ziglio > --- > vdagent/file_xfer.cpp | 23 ++- > vdagent/file_xfer.h |

Re: [Spice-devel] [vdagent-win PATCH 00/13] Miscellaneous minor patches for the Windows Agent

2018-05-28 Thread Christophe Fergeau
ACK to patches 01 through 07 with the minor comments addressed Christophe On Mon, May 28, 2018 at 09:57:53AM +0100, Frediano Ziglio wrote: > Includes: > - minor cleanups; > - project updates; > - warning removals; > - possible minor buffer overflows; > - code style updates. > > Frediano Ziglio

Re: [Spice-devel] [vdagent-win PATCH 13/13] build: Base cmake support

2018-05-28 Thread Christophe Fergeau
Lacking some rationale in the commit log I think ;) vdagent-win already has 2 build systems (mingw+autotools and VS), there are patches to port other spice components to meson, so why cmake here? Christophe On Mon, May 28, 2018 at 09:58:06AM +0100, Frediano Ziglio wrote: > Signed-off-by:

Re: [Spice-devel] [vdagent-win PATCH 07/13] file_xfer: Remove too C syntax for C++

2018-05-28 Thread Christophe Fergeau
I would be a bit more verbose in the commit log, just state that it's about removing a struct typedef as in C++ simply declaring the struct will create both the 'struct Foo' and 'Foo' types. Christophe On Mon, May 28, 2018 at 09:58:00AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano

Re: [Spice-devel] [vdagent-win PATCH 06/13] file_xfer: Remove FileXferTask structure alignment

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:57:59AM +0100, Frediano Ziglio wrote: > There's no reason beside loosing performances to align > that structure, is not passed as binary data. 'losing', not 'loosing' > > Signed-off-by: Frediano Ziglio > --- > vdagent/file_xfer.h | 4 ++-- > 1

Re: [Spice-devel] [vdagent-win PATCH 05/13] msi: Do not generate deps.txt

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:57:58AM +0100, Frediano Ziglio wrote: > There's no reason to tell the package installed on the build system > used. This can be useful to know which version of zlib or libpng are bundled with the agent msi installer when debugging something which is installed on a

Re: [Spice-devel] [vdagent-win PATCH 03/13] Fix minor compiler compatibility

2018-05-28 Thread Christophe Fergeau
On Mon, May 28, 2018 at 09:57:56AM +0100, Frediano Ziglio wrote: > Assure std::min is declared including directly algorithm header. "ensure" ? > Undefine possible min and max macros, some Windows headers define them. > Currently happens using Visual Studio 2015. Huhu, not nice :(( Christophe

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

2018-05-28 Thread Christophe Fergeau
On Fri, May 25, 2018 at 01:55:20PM +0100, Frediano Ziglio wrote: > 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

Re: [Spice-devel] [spice-gtk] widget: avoid gdk_seat_grab/ungrab() API temporarily

2018-05-28 Thread Christophe Fergeau
On Fri, May 25, 2018 at 04:00:43PM +0200, Victor Toso wrote: > Hi, > > Quick update, this will not be needed anymore, yay. > https://gitlab.gnome.org/GNOME/gtk/merge_requests/166 > > Upstream bug with lots of information: > https://gitlab.gnome.org/GNOME/gtk/issues/1073 Ah great to read!

Re: [Spice-devel] [vdagent-win PATCH] Reuse spice-protocol macros instead of defining new ones for alignment

2018-05-28 Thread Frediano Ziglio
> > Signed-off-by: Frediano Ziglio > --- > common/vdcommon.h | 8 > vdagent/vdagent.cpp | 6 -- > 2 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/common/vdcommon.h b/common/vdcommon.h > index c1920e9..ac58efe 100644 > ---

[Spice-devel] [vdagent-win PATCH] Reuse spice-protocol macros instead of defining new ones for alignment

2018-05-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/vdcommon.h | 8 vdagent/vdagent.cpp | 6 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/common/vdcommon.h b/common/vdcommon.h index c1920e9..ac58efe 100644 --- a/common/vdcommon.h +++

[Spice-devel] [vdagent-win PATCH 00/13] Miscellaneous minor patches for the Windows Agent

2018-05-28 Thread Frediano Ziglio
Includes: - minor cleanups; - project updates; - warning removals; - possible minor buffer overflows; - code style updates. Frediano Ziglio (13): vcproj: Remove reference to CxImage vcproj: Add some missing files Fix minor compiler compatibility Avoid unused variable warning msi: Do not

[Spice-devel] [vdagent-win PATCH 06/13] file_xfer: Remove FileXferTask structure alignment

2018-05-28 Thread Frediano Ziglio
There's no reason beside loosing performances to align that structure, is not passed as binary data. Signed-off-by: Frediano Ziglio --- vdagent/file_xfer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdagent/file_xfer.h b/vdagent/file_xfer.h index

[Spice-devel] [vdagent-win PATCH 10/13] Minor overflow checks improvements

2018-05-28 Thread Frediano Ziglio
Although source of these data should be safe improve data checks to avoid some overflows. Signed-off-by: Frediano Ziglio --- vdagent/vdagent.cpp | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index

[Spice-devel] [vdagent-win PATCH 05/13] msi: Do not generate deps.txt

2018-05-28 Thread Frediano Ziglio
There's no reason to tell the package installed on the build system used. Signed-off-by: Frediano Ziglio --- Makefile.am | 5 + spice-vdagent.wxs.in | 4 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index

[Spice-devel] [vdagent-win PATCH 01/13] vcproj: Remove reference to CxImage

2018-05-28 Thread Frediano Ziglio
Not used anymore. Signed-off-by: Frediano Ziglio --- vdagent/vdagent.vcproj | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vdagent/vdagent.vcproj b/vdagent/vdagent.vcproj index f9f4228..f830b0f 100644 --- a/vdagent/vdagent.vcproj +++

[Spice-devel] [vdagent-win PATCH 03/13] Fix minor compiler compatibility

2018-05-28 Thread Frediano Ziglio
Assure std::min is declared including directly algorithm header. Undefine possible min and max macros, some Windows headers define them. Currently happens using Visual Studio 2015. Signed-off-by: Frediano Ziglio --- vdagent/image.cpp | 4 1 file changed, 4 insertions(+)

[Spice-devel] [vdagent-win PATCH 12/13] Factor out an utility function to read strings from registry

2018-05-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/display_setting.cpp | 97 + 1 file changed, 54 insertions(+), 43 deletions(-) diff --git a/vdagent/display_setting.cpp b/vdagent/display_setting.cpp index 5585bb5..cdc42c7 100644 ---

[Spice-devel] [vdagent-win PATCH 08/13] file_xfer: Use destructor for FileXferTask

2018-05-28 Thread Frediano Ziglio
Limit too much manual work. By default delete the file, unless success() is called. Signed-off-by: Frediano Ziglio --- vdagent/file_xfer.cpp | 23 ++- vdagent/file_xfer.h | 4 +++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git

[Spice-devel] [vdagent-win PATCH 04/13] Avoid unused variable warning

2018-05-28 Thread Frediano Ziglio
Currently happens using Visual Studio 2015. Signed-off-by: Frediano Ziglio --- vdagent/display_configuration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdagent/display_configuration.cpp b/vdagent/display_configuration.cpp index 6e7624b..cdbbe23

[Spice-devel] [vdagent-win PATCH 09/13] file_xfer: Use shared_ptr to simplify memory management

2018-05-28 Thread Frediano Ziglio
Clear automatically tasks items. Signed-off-by: Frediano Ziglio --- vdagent/file_xfer.cpp | 25 - vdagent/file_xfer.h | 3 ++- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp index

[Spice-devel] [vdagent-win PATCH 11/13] Fix some minor buffer overflows reading registry informations

2018-05-28 Thread Frediano Ziglio
Strings in the registry can be not NUL-terminated. Current code to make sure they are NUL-terminated can add an extra NUL character at the end of the buffer. Also RegQueryValueEx returns the number of bytes read, not the number of characters so the value must be fixed to avoid overflows.

[Spice-devel] [vdagent-win PATCH 07/13] file_xfer: Remove too C syntax for C++

2018-05-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/file_xfer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdagent/file_xfer.h b/vdagent/file_xfer.h index 029d0e7..747c29c 100644 --- a/vdagent/file_xfer.h +++ b/vdagent/file_xfer.h @@ -21,7 +21,7 @@

[Spice-devel] [vdagent-win PATCH 13/13] build: Base cmake support

2018-05-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- CMakeLists.txt | 48 Makefile.am| 3 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode

[Spice-devel] [vdagent-win PATCH 02/13] vcproj: Add some missing files

2018-05-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/vdagent.vcproj | 12 1 file changed, 12 insertions(+) diff --git a/vdagent/vdagent.vcproj b/vdagent/vdagent.vcproj index f830b0f..376ddd4 100644 --- a/vdagent/vdagent.vcproj +++ b/vdagent/vdagent.vcproj @@ -349,6

Re: [Spice-devel] [spice-gtk PATCH v2 1/2] mjpeg_decoder_queue_frame: free frame when dropping the frame

2018-05-28 Thread Frediano Ziglio
> > The frame is dropped and is not inserted into a queue to be > freed later. > mjpeg_decoder_queue_frame owns the frame and must free it. > > Signed-off-by: Uri Lublin For the series: Acked-by: Frediano Ziglio > --- > > changes since v1: information