Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > Due to a bug in current packaged Valgrind check-valgrind is failing > with: > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 33) > ==17986==at 0x4C344F0: __memcpy_chk (vg_replace_strmem.c:1581) >

Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-16 Thread Frediano Ziglio
> > On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > > Due to a bug in current packaged Valgrind check-valgrind is failing > > with: > > > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, > > 33) > > ==17986==at 0x4C344F0: __memcpy_chk

[Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-16 Thread Frediano Ziglio
Due to a bug in current packaged Valgrind check-valgrind is failing with: ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 33) ==17986==at 0x4C344F0: __memcpy_chk (vg_replace_strmem.c:1581) ==17986==by 0x40E7E9: check_vmc_error_message (test-stream-device.c:166)

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Uri Lublin
On 04/16/2018 01:13 PM, Christophe Fergeau wrote: At the moment, we'll unconditionally release the guest QXL resources in red_put_drawable() even if red_get_drawable() failed and did not initialize drawable->release_info_ext properly. This commit checks the QXLReleaseInfo in release_info_ext is

Re: [Spice-devel] [spice-gtk v1 00/11] misc improvements in channel-display

2018-04-16 Thread Victor Toso
Hi, On Thu, Mar 29, 2018 at 01:53:44PM +0200, Victor Toso wrote: > Hi, > > On Tue, Mar 13, 2018 at 12:25:31PM +0100, Victor Toso wrote: > > From: Victor Toso > > > > Hi, > > > > The first four patches are related to using hash table to track stream's > > structure,

[Spice-devel] [spice-server] Slight simplification of red_channel_client_push() logic

2018-04-16 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c index f154c5c63..d46c299c2 100644 --- a/server/red-channel-client.c +++

Re: [Spice-devel] [spice-server] Slight simplification of red_channel_client_push() logic

2018-04-16 Thread Frediano Ziglio
> > Signed-off-by: Christophe Fergeau > --- > server/red-channel-client.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/server/red-channel-client.c b/server/red-channel-client.c > index f154c5c63..d46c299c2 100644 > ---

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Frediano Ziglio
> > This is in preparation for next commit > --- > server/red-parse-qxl.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c > index 80746ecbb..c08d18160 100644 > --- a/server/red-parse-qxl.c > +++

Re: [Spice-devel] not clear how to use streaming agent

2018-04-16 Thread Uri Lublin
On 04/12/2018 05:37 AM, 孙得霖 wrote: hi,     I use spice for remote view, I want to captures the guest video output, encodes it and send through, so I choose streaming agent, how to build and run it is not clear, can you help me? 1.host environment and Software version: centOS(Mini install)

Re: [Spice-devel] not clear how to use streaming agent

2018-04-16 Thread 孙得霖
Thank you for the compliment. "[1] https://www.linux-kvm.org/page/SPICE; is what I want. At first, I running Windows 7 as the guest, not clear how to use streaming agent. Next I will try CentOS as the guest. now spice-server deal with stream like In the future, I want to send video stream to

Re: [Spice-devel] [PATCH spice-gtk 2/3] channel-display-gst: Reduce contention on queues_mutex

2018-04-16 Thread Snir Sheriber
ack (Uri has the same patch :p) On 04/16/2018 01:43 PM, Frediano Ziglio wrote: We don't need to lock the entire queues to create a frame. Signed-off-by: Frediano Ziglio --- src/channel-display-gst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 06:58:18AM -0400, Frediano Ziglio wrote: > Don't like this, lot of structures in this file use "qxl", for coherence > I would change all or nothing but changing all would mean a lot of changes > with not much value Imo 'red' and 'qxl' are not very good names, I'd prefer to

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Frediano Ziglio
> > On Mon, Apr 16, 2018 at 06:58:18AM -0400, Frediano Ziglio wrote: > > Don't like this, lot of structures in this file use "qxl", for coherence > > I would change all or nothing but changing all would mean a lot of changes > > with not much value > > Imo 'red' and 'qxl' are not very good

Re: [Spice-devel] [PATCH spice-gtk 3/3] spice-channel: Make some conditional code more readable

2018-04-16 Thread Snir Sheriber
ack On 04/16/2018 01:43 PM, Frediano Ziglio wrote: Avoid confusing indentation. Signed-off-by: Frediano Ziglio --- src/spice-channel.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/spice-channel.c b/src/spice-channel.c index

Re: [Spice-devel] [spice-gtk v2] usb-device-widget: Fix crash on no USB devices

2018-04-16 Thread Eduardo Lima (Etrunko)
On 13/04/18 18:20, Victor Toso wrote: > Hi, > > On Fri, Apr 13, 2018 at 03:14:56PM -0300, Eduardo Lima (Etrunko) wrote: >> On 13/04/18 05:50, Victor Toso wrote: >>> From: goldengdeng <907246...@qq.com> >>> >>> The spice_usb_device_manager_get_devices() is only checking for NULL >>> while the

[Spice-devel] [PATCH] build: Remove check for pnp.ids path

2018-04-16 Thread Eduardo Lima (Etrunko)
This looks like a leftover from the following commit, which removed the only reference for this file. commit 30986505ba6041c293c38cb4b7f4b618a59f4716 Author: Marc-André Lureau Date: Fri May 10 17:05:49 2013 +0200 Remove GnomeRR code Changing client

Re: [Spice-devel] not clear how to use streaming agent

2018-04-16 Thread 孙得霖
Hi, Thanks for your response.it is first time to communicate in English,to be frank, my English is not very good and there may be points expressed poorly in my reply. I hope you will pardon me for this. I want to capute guest video stream(encode it) and to client with spice protocol direct

Re: [Spice-devel] not clear how to use streaming agent

2018-04-16 Thread Lukáš Hrázký
On Mon, 2018-04-16 at 10:33 +0800, 孙得霖 wrote: > Hi, > Thanks for your response.it is first time to communicate in English,to be > frank, my English is not very good and there may be points expressed poorly > in my reply. I hope you will pardon me for this. Your english is very good, don't worry

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Frediano Ziglio
> > At the moment, we'll unconditionally release the guest QXL resources in > red_put_drawable() even if red_get_drawable() failed and did not > initialize drawable->release_info_ext properly. > This commit checks the QXLReleaseInfo in release_info_ext is non-0 > before attempting to release it.

Re: [Spice-devel] [PATCH spice-gtk 1/3] channel-display-gst: Protect timer_id with queue_mutex

2018-04-16 Thread Snir Sheriber
Hi On 04/16/2018 01:43 PM, Frediano Ziglio wrote: timer_id is supposed to be protected by this mutex, make sure this is true in spice_gst_decoder_reschedule. Signed-off-by: Frediano Ziglio --- src/channel-display-gst.c | 11 --- 1 file changed, 8 insertions(+),

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 07:25:19AM -0400, Frediano Ziglio wrote: > > > > At the moment, we'll unconditionally release the guest QXL resources in > > red_put_drawable() even if red_get_drawable() failed and did not > > initialize drawable->release_info_ext properly. > > This commit checks the

Re: [Spice-devel] [PATCH spice-gtk 1/3] fixup! Gstreamer: Use GstVideoOverlay if possible

2018-04-16 Thread Snir Sheriber
Hi, thanks for the patches! On 04/15/2018 10:12 PM, Frediano Ziglio wrote: As we don't need frame anymore instead of attaching to the buffer free it. --- src/channel-display-gst.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git

Re: [Spice-devel] [RFC spice-gtk v2 0/1] Direct rendering

2018-04-16 Thread Frediano Ziglio
> > Differences from v1 > -Recognize streaming mode by the streaming-mode surface flag The propagation of this property (as English word, not gobject) is weird. Seems that is a SpiceDisplay property but in reality is a surface propery (which is stored in display_surface structure in spice-gtk),

Re: [Spice-devel] not clear how to use streaming agent

2018-04-16 Thread 孙得霖
Hello, Thanks for your response, you are right,I am using Intel vGPU and running a Windows7 guest. So I am not clear how to using streaming-agent in Window 7 guest. Next I will try linux as the guest. Intel provides a dma-buf of the host at 30ms intervals(the dma-buf is full-screen size),

Re: [Spice-devel] [PATCH spice-gtk 1/4] gio-coroutine: Fix C inheritance

2018-04-16 Thread Christophe Fergeau
On Fri, Apr 13, 2018 at 03:49:16PM +0100, Frediano Ziglio wrote: > GConditionWaitSource should inherit from GSource so GSource > should be the first field. Good catch, however what is interesting is why this worked so far without issues, GSource is struct _GSource { /*< private >*/ gpointer

Re: [Spice-devel] [PATCH spice-gtk 0/4] Miscellaneous small patches

2018-04-16 Thread Christophe Fergeau
For the series Acked-by: Christophe Fergeau but see my comment on 1/4 On Fri, Apr 13, 2018 at 03:49:15PM +0100, Frediano Ziglio wrote: > Frediano Ziglio (4): > gio-coroutine: Fix C inheritance > gio-coroutine: Make waitFuncs static > gio-coroutine: Remove only

Re: [Spice-devel] [PATCH spice-gtk 3/4] gio-coroutine: Remove only assigned self field

2018-04-16 Thread Christophe Fergeau
Alternatively, this could come first in the series, with the nice side-effect of fixing that GSource inheritance issue that you mentioned ;) With the order that you chose, this allows to make the fix more obvious, and to better document why it was not a problem (by luck). On Fri, Apr 13, 2018 at

[Spice-devel] [spice-server 03/10] qxl: Make red_{get, put}_drawable static

2018-04-16 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. --- server/red-parse-qxl.c | 17 -

[Spice-devel] [spice-server 06/10] qxl: Add red_cursor_cmd_new and red_cursor_cmd_free helpers

2018-04-16 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] --- server/cursor-channel.c | 6 +-

[Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit --- server/red-parse-qxl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 80746ecbb..c08d18160 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c

[Spice-devel] [spice-server 01/10] qxl: Remove red_put_blend()

2018-04-16 Thread Christophe Fergeau
SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and red_put_copy() are identical, so we can add a #define red_put_blend red_put_copy similar to the one we already have for red_get_blend. --- server/red-parse-qxl.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[Spice-devel] [spice-server 07/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_message

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index eb80ba81b..5408cfa5a 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@

[Spice-devel] [spice-server 02/10] qxl: Move red_drawable_unref/red_drawable_new

2018-04-16 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h This commit moves them close to the other functions creating/unref'ing QXL commands parsed by red-parse-qxl.h --- server/red-parse-qxl.c | 21 + server/red-parse-qxl.h | 2 ++ server/red-worker.c| 20

[Spice-devel] [spice-server 09/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_update_cmd

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d7ae53804..d4a7decd3 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@

[Spice-devel] [spice-server 00/10] qxl: Move more guest resource release to red-parse-qxl

2018-04-16 Thread Christophe Fergeau
Hey, Currently, after parsing a QXL command through red-parse-qxl, the code which got the command has to tell red-parse-qxl when it no longer needs the command, but also to remember to release the command QXL resources itself. This series moves this 'release resource' logic to red-parse-qxl.

[Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
At the moment, we'll unconditionally release the guest QXL resources in red_put_drawable() even if red_get_drawable() failed and did not initialize drawable->release_info_ext properly. This commit checks the QXLReleaseInfo in release_info_ext is non-0 before attempting to release it. ---

[Spice-devel] [spice-server 08/10] qxl: Release QXL resource in red_put_message

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 6 -- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 5408cfa5a..d7ae53804 100644 --- a/server/red-parse-qxl.c +++

[Spice-devel] [spice-server 10/10] qxl: Release QXL resources in red_put_update_cmd

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 10 +++--- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d4a7decd3..313cd1bfb 100644 --- a/server/red-parse-qxl.c +++

[Spice-devel] [PATCH spice-gtk 3/3] spice-channel: Make some conditional code more readable

2018-04-16 Thread Frediano Ziglio
Avoid confusing indentation. Signed-off-by: Frediano Ziglio --- src/spice-channel.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/spice-channel.c b/src/spice-channel.c index 55bdef9..7e3e3b7 100644 --- a/src/spice-channel.c +++

[Spice-devel] [PATCH spice-gtk 2/3] channel-display-gst: Reduce contention on queues_mutex

2018-04-16 Thread Frediano Ziglio
We don't need to lock the entire queues to create a frame. Signed-off-by: Frediano Ziglio --- src/channel-display-gst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index 201842e..f5fa642 100644

[Spice-devel] [PATCH spice-gtk 1/3] channel-display-gst: Protect timer_id with queue_mutex

2018-04-16 Thread Frediano Ziglio
timer_id is supposed to be protected by this mutex, make sure this is true in spice_gst_decoder_reschedule. Signed-off-by: Frediano Ziglio --- src/channel-display-gst.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/channel-display-gst.c

Re: [Spice-devel] [spice-server 01/10] qxl: Remove red_put_blend()

2018-04-16 Thread Frediano Ziglio
> > SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and > red_put_copy() are identical, so we can add a #define red_put_blend > red_put_copy similar to the one we already have for red_get_blend. > --- > server/red-parse-qxl.c | 7 +-- > 1 file changed, 1 insertion(+), 6