Re: [Spice-devel] [spice-server PATCH 1/3] red_get_surface_cmd: avoid overflow

2017-07-19 Thread Uri Lublin
On 07/17/2017 11:22 AM, Frediano Ziglio wrote: Although unlikely, theoretically, multiplying two 32-bit numbers may overflow. Found by coverity. Signed-off-by: Uri Lublin --- server/red-parse-qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Spice-devel] Consult:how to install Spice in Openstack?

2017-07-19 Thread Christophe Fergeau
Hey, On Thu, Jul 13, 2017 at 02:11:46PM +0800, 李比 wrote: > Hello guys!Sorry to interrupt you.I want to remote access to VM through > spice protocol instead of RDP protocol .I have read the offical website > about how to install SPICE throuth virt-manager or libvirt or QEMU.But the > content

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 16:43 +0200, Victor Toso wrote: > Hi, > > On Wed, Jul 19, 2017 at 04:25:19PM +0200, Pavel Grunt wrote: > > On Wed, 2017-07-19 at 16:15 +0200, Victor Toso wrote: > > > Hi, > > > > > > On Wed, Jul 19, 2017 at 04:01:21PM +0200, Pavel Grunt wrote: > > > > On Wed, 2017-07-19 at

Re: [Spice-devel] [PATCH linux vdagent] Add systemd socket activation

2017-07-19 Thread Jonathon Jongsma
So, Victor told me on IRC that he was having trouble getting the patch to work and asked me to follow up on the mailing list about how to test the patch. I tested it on a Fedora25 vm as follows: - Set up a Fedora 25 vm - uninstall system spice-vdagent - build spice-vdagent from git and install

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
Hi, On Wed, Jul 19, 2017 at 05:27:43PM +0200, Pavel Grunt wrote: > > Stream decoding will fail, server will know about it and sever should > > fallback to image compression or a different video codec format for > > streaming. > > millions of criticals in the debug log and some resources wasted >

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
On Wed, Jul 19, 2017 at 06:01:43PM +0200, Pavel Grunt wrote: > On Wed, 2017-07-19 at 17:46 +0200, Victor Toso wrote: > > Hi, > > > > On Wed, Jul 19, 2017 at 05:27:43PM +0200, Pavel Grunt wrote: > > > > Stream decoding will fail, server will know about it and sever should > > > > fallback to image

Re: [Spice-devel] [spice-server PATCH 3/3] init ssl connection: return quickly if link is null

2017-07-19 Thread Uri Lublin
On 07/17/2017 11:17 AM, Frediano Ziglio wrote: On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote: Under error: 'link' fields are being accessed, so it's wrong to goto error with link == NULL. Instead, return immediately. Found by coverity. Signed-off-by: Uri Lublin

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 17:46 +0200, Victor Toso wrote: > Hi, > > On Wed, Jul 19, 2017 at 05:27:43PM +0200, Pavel Grunt wrote: > > > Stream decoding will fail, server will know about it and sever should > > > fallback to image compression or a different video codec format for > > > streaming. > >

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 08:03:49AM -0400, Frediano Ziglio wrote: > > > > > > On Wed, Jul 19, 2017 at 12:09:23PM +0200, Christophe de Dinechin wrote: > > > > > > > > > On 19 Jul 2017, at 11:21, Christophe Fergeau > > > > > wrote: > > > > > > > > > > On Wed, Jul 19,

Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-19 Thread Frediano Ziglio
> > > On 18 Jul 2017, at 17:54, Christophe Fergeau wrote: > > > > On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > >> Signed-off-by: Frediano Ziglio > >> --- > >> Makefile.am | 6 +- > >> configure.ac | 3 + > >>

Re: [Spice-devel] [vdagent-win PATCH] Split long if statement

2017-07-19 Thread Uri Lublin
On 07/19/2017 11:54 AM, Frediano Ziglio wrote: Instead of having a long if statement with checks and assignment split in two. The conditions where used to compute 2 different path, this does not help much with code readability. Signed-off-by: Frediano Ziglio Acked-by: Uri

Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-19 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:54, Christophe Fergeau wrote: > > On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: >> Signed-off-by: Frediano Ziglio >> --- >> Makefile.am | 6 +- >> configure.ac | 3 + >> vdagent/image.cpp

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:28, Christophe Fergeau wrote: > > On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote: >> Remove CxImage linking. >> Support Windows BMP format. > > Too bad there is no small/maintained library which would do that for us > :-/ From a

[Spice-devel] [vdagent-win PATCH] Split long if statement

2017-07-19 Thread Frediano Ziglio
Instead of having a long if statement with checks and assignment split in two. The conditions where used to compute 2 different path, this does not help much with code readability. Signed-off-by: Frediano Ziglio --- vdservice/vdservice.cpp | 11 ++- 1 file changed, 6

Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-19 Thread Christophe Fergeau
On Tue, Jul 18, 2017 at 01:29:24PM -0400, Frediano Ziglio wrote: > > On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > > > +} > > > +break; > > > +case PNG_COLOR_TYPE_PALETTE: > > > +// should return 1, 2, 4 and 8, BMP does not support 2 > > > > Is the

Re: [Spice-devel] [spice-gtk v1] display-gst: Improve h264 elements filtering

2017-07-19 Thread Victor Toso
Hi, On Thu, Jul 13, 2017 at 02:33:48PM +0200, Victor Toso wrote: > From: Victor Toso > > This patch fixes the avdec_h264 element not being present on > gstvideo_has_codec() which get all decoder elements from GstRegistry > and filter them on our GstCaps in order to get the

[Spice-devel] [vdagent-win PATCH v8 3/5] Write code to decode PNG format

2017-07-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- Makefile.am | 6 +- configure.ac | 3 + vdagent/image.cpp| 8 +- vdagent/imagepng.cpp | 237 +++ vdagent/imagepng.h | 25 ++ 5 files changed, 270

[Spice-devel] [vdagent-win PATCH v8 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 10 +-- vdagent/image.cpp | 172

[Spice-devel] [vdagent-win PATCH v8 1/5] Move image handling to a separate file

2017-07-19 Thread Frediano Ziglio
This will make easier to change code that handle images. Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- Makefile.am | 2 ++ vdagent/image.cpp | 88 + vdagent/image.h |

[Spice-devel] [vdagent-win PATCH v8 5/5] Add test for PNG files

2017-07-19 Thread Frediano Ziglio
Test various image and formats. The idea is to decode and encode again an image and check for differences. ImageMagick is used to create some test image and compare results. Wine is used to execute a test helper. Signed-off-by: Frediano Ziglio --- Makefile.am | 20

[Spice-devel] [vdagent-win PATCH v8 4/5] Support encoding PNG images

2017-07-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/imagepng.cpp | 110 +-- 1 file changed, 106 insertions(+), 4 deletions(-) diff --git a/vdagent/imagepng.cpp b/vdagent/imagepng.cpp index 9530d71..0d03ca0 100644 ---

[Spice-devel] [vdagent-win PATCH v8 0/5] Rewrite image support

2017-07-19 Thread Frediano Ziglio
CxImage is used for image conversion for clipboard support. CxImage have currently some issue: - library is old and unsupported; - required an old libpng library. Currently the MingW binary we distribute due to some issue have PNG disabled (so no clipboard image support). Note that currently we

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote: > > > On 18 Jul 2017, at 17:28, Christophe Fergeau wrote: > > > > On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote: > >> Remove CxImage linking. > >> Support Windows BMP format. > > > >

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 12:09:23PM +0200, Christophe de Dinechin wrote: > > > On 19 Jul 2017, at 11:21, Christophe Fergeau wrote: > > > > On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote: > >> > >>> On 18 Jul 2017, at 17:28, Christophe Fergeau

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-19 Thread Victor Toso
Hi, On Tue, Jul 18, 2017 at 06:55:12PM +0200, Christophe de Dinechin wrote: > Interestingly, I just discovered something I did not really expect: a > hot CPU is more than enough to make the spice client lack “oxygen”, > even if nothing else is running. > > If I start under light load and keep

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 12:09:23PM +0200, Christophe de Dinechin wrote: > > > > > On 19 Jul 2017, at 11:21, Christophe Fergeau wrote: > > > > > > On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote: > > >> > > >>> On 18 Jul 2017, at 17:28,

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 05:46:51PM +0200, Victor Toso wrote: > What I'm trying to stress is that we are trying to not check *specific* > plugins related to decode/parse a stream. We don't know what our users > will be using and we should not enforce them to use avdec_h264 for > instance. You are

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 18:00 +0200, Christophe Fergeau wrote: > On Wed, Jul 19, 2017 at 05:46:51PM +0200, Victor Toso wrote: > > What I'm trying to stress is that we are trying to not check *specific* > > plugins related to decode/parse a stream. We don't know what our users > > will be using and

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 18:13 +0200, Victor Toso wrote: > On Wed, Jul 19, 2017 at 06:01:43PM +0200, Pavel Grunt wrote: > > On Wed, 2017-07-19 at 17:46 +0200, Victor Toso wrote: > > > Hi, > > > > > > On Wed, Jul 19, 2017 at 05:27:43PM +0200, Pavel Grunt wrote: > > > > > Stream decoding will fail,

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote: > > > > > On 18 Jul 2017, at 17:28, Christophe Fergeau wrote: > > > > > > On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote: > > >> Remove CxImage linking. > > >> Support Windows BMP

Re: [Spice-devel] [PATCH spice-gtk] Revert "Ignore modifiers messages if no modifiers changed"

2017-07-19 Thread Victor Toso
Hi, On Mon, Jul 17, 2017 at 01:17:27PM +0200, Victor Toso wrote: > Hi Pavel, > > On Tue, Jul 11, 2017 at 01:34:12PM +0200, Pavel Grunt wrote: > > This reverts commit 73cd553fb0fbd213b64d72f8b4289ed8a17fc6c0. > > Which is: > > "This avoid keep sending modifiers changes if guest is not >

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Christophe de Dinechin
> On 19 Jul 2017, at 11:21, Christophe Fergeau wrote: > > On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote: >> >>> On 18 Jul 2017, at 17:28, Christophe Fergeau wrote: >>> >>> On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano

[Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
GStreamer's avdec_h264 needs h264parse to be able to process H264 video streams. However the check for elements through GstRegistry does not take into account the possible pipeline of elements (like "h264parse ! avdec_h264"). Fix that by checking for the elements by their name. ---

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
On Wed, Jul 19, 2017 at 03:30:49PM +0200, Pavel Grunt wrote: > On Wed, 2017-07-19 at 15:23 +0200, Victor Toso wrote: > > Hi, > > > > On Wed, Jul 19, 2017 at 02:59:00PM +0200, Pavel Grunt wrote: > > > GStreamer's avdec_h264 needs h264parse to be able to process H264 video > > > streams. However

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 15:40 +0200, Victor Toso wrote: > On Wed, Jul 19, 2017 at 03:30:49PM +0200, Pavel Grunt wrote: > > On Wed, 2017-07-19 at 15:23 +0200, Victor Toso wrote: > > > Hi, > > > > > > On Wed, Jul 19, 2017 at 02:59:00PM +0200, Pavel Grunt wrote: > > > > GStreamer's avdec_h264 needs

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
On Wed, Jul 19, 2017 at 03:46:36PM +0200, Pavel Grunt wrote: > On Wed, 2017-07-19 at 15:40 +0200, Victor Toso wrote: > > On Wed, Jul 19, 2017 at 03:30:49PM +0200, Pavel Grunt wrote: > > > On Wed, 2017-07-19 at 15:23 +0200, Victor Toso wrote: > > > > Hi, > > > > > > > > On Wed, Jul 19, 2017 at

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 15:23 +0200, Victor Toso wrote: > Hi, > > On Wed, Jul 19, 2017 at 02:59:00PM +0200, Pavel Grunt wrote: > > GStreamer's avdec_h264 needs h264parse to be able to process H264 video > > streams. However the check for elements through GstRegistry does not > > take into account

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
Hi, On Wed, Jul 19, 2017 at 02:59:00PM +0200, Pavel Grunt wrote: > GStreamer's avdec_h264 needs h264parse to be able to process H264 video > streams. However the check for elements through GstRegistry does not > take into account the possible pipeline of elements (like "h264parse ! >

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 15:52 +0200, Victor Toso wrote: > On Wed, Jul 19, 2017 at 03:46:36PM +0200, Pavel Grunt wrote: > > On Wed, 2017-07-19 at 15:40 +0200, Victor Toso wrote: > > > On Wed, Jul 19, 2017 at 03:30:49PM +0200, Pavel Grunt wrote: > > > > On Wed, 2017-07-19 at 15:23 +0200, Victor Toso

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
Hi, On Wed, Jul 19, 2017 at 04:01:21PM +0200, Pavel Grunt wrote: > On Wed, 2017-07-19 at 15:52 +0200, Victor Toso wrote: > > On Wed, Jul 19, 2017 at 03:46:36PM +0200, Pavel Grunt wrote: > > > On Wed, 2017-07-19 at 15:40 +0200, Victor Toso wrote: > > > > On Wed, Jul 19, 2017 at 03:30:49PM +0200,

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Pavel Grunt
On Wed, 2017-07-19 at 16:15 +0200, Victor Toso wrote: > Hi, > > On Wed, Jul 19, 2017 at 04:01:21PM +0200, Pavel Grunt wrote: > > On Wed, 2017-07-19 at 15:52 +0200, Victor Toso wrote: > > > On Wed, Jul 19, 2017 at 03:46:36PM +0200, Pavel Grunt wrote: > > > > On Wed, 2017-07-19 at 15:40 +0200,

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
Hi, On Wed, Jul 19, 2017 at 04:25:19PM +0200, Pavel Grunt wrote: > On Wed, 2017-07-19 at 16:15 +0200, Victor Toso wrote: > > Hi, > > > > On Wed, Jul 19, 2017 at 04:01:21PM +0200, Pavel Grunt wrote: > > > On Wed, 2017-07-19 at 15:52 +0200, Victor Toso wrote: > > > > On Wed, Jul 19, 2017 at

Re: [Spice-devel] [PATCH linux vdagent] Add systemd socket activation

2017-07-19 Thread Fabiano Fidêncio
On Thu, Jul 13, 2017 at 10:35 PM, Jonathon Jongsma wrote: > If we are configured to use the systemd init script, also add support > for systemd socket activation. systemd will listen on the socket that is > used to communicate between the session agent and the system daemon.

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-19 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 08:03:49AM -0400, Frediano Ziglio wrote: > > > > On Wed, Jul 19, 2017 at 12:09:23PM +0200, Christophe de Dinechin wrote: > > > > > > > On 19 Jul 2017, at 11:21, Christophe Fergeau > > > > wrote: > > > > > > > > On Wed, Jul 19, 2017 at 10:23:30AM

Re: [Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

2017-07-19 Thread Victor Toso
A new day, a new thread On Wed, Jul 19, 2017 at 02:59:00PM +0200, Pavel Grunt wrote: > GStreamer's avdec_h264 needs h264parse to be able to process H264 video > streams. However the check for elements through GstRegistry does not > take into account the possible pipeline of elements (like