Re: [Spice-devel] [PATCH 01/11] Add red_client_seamless_migration_done_for_channel()

2016-05-13 Thread Pavel Grunt
On Thu, 2016-05-12 at 15:45 -0500, Jonathon Jongsma wrote: > This is a public RedClient API that handles updating itself rather than > having the RedChannelClient poke around at the internal structure in > rec_channel_client_seamless_migration_done(). Acked-by: Pavel Grunt > --- >  server/red-ch

Re: [Spice-devel] [PATCH 04/11] let compiler manage the copy in a more typesafe way

2016-05-13 Thread Pavel Grunt
On Thu, 2016-05-12 at 15:45 -0500, Jonathon Jongsma wrote: > From: Frediano Ziglio > > Do not use memcpy but just copy the data > > Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt > --- >  server/red-channel.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/serve

Re: [Spice-devel] [PATCH 02/11] Move MainChannelClient to separate file

2016-05-13 Thread Frediano Ziglio
> > Preparation for converting to GObject > --- > server/Makefile.am | 2 + > server/inputs-channel.c | 2 +- > server/main-channel-client.c | 549 ++ > server/main-channel-client.h | 153 +++ > server/main-channel.c| 616 > +

Re: [Spice-devel] [PATCH 02/11] Move MainChannelClient to separate file

2016-05-13 Thread Pavel Grunt
On Thu, 2016-05-12 at 15:45 -0500, Jonathon Jongsma wrote: > Preparation for converting to GObject > --- >  server/Makefile.am   |   2 + >  server/inputs-channel.c  |   2 +- >  server/main-channel-client.c | 549 ++ >  server/main-channel-client.h | 15

[Spice-devel] Using private structure for making structure more public...

2016-05-13 Thread Frediano Ziglio
Hi, this is the last though looking at refactory branch current trend. We use Gobject and private separation so structure are less exposed to external... bla bla bla. The implementation however looks to not agree with it! Usually the channel and the client (like InputsChannel and InputsChanne

[Spice-devel] [PATCH 2/4] make cursor_channel_client_new static

2016-05-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 10 ++ server/cursor-channel.h | 5 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index c67c88f..66f0181 100644 --- a/server/cursor-channel.c +++ b/server

[Spice-devel] [PATCH 4/4] add some comments to cursor-channel.h header

2016-05-13 Thread Frediano Ziglio
Explain usage of the class. Signed-off-by: Frediano Ziglio --- server/cursor-channel.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/server/cursor-channel.h b/server/cursor-channel.h index 6c89bc3..7e801a4 100644 --- a/server/cursor-channel.h

[Spice-devel] [PATCH 0/4] Limit CursorChannel public interface

2016-05-13 Thread Frediano Ziglio
Hi, this is mostly an attempt to limit the public interface to what I think should be the minimum information needed to know by an user of a channel. In particular the client is mainly hidden and the set of method are really small. Frediano Ziglio (4): move cursor_connect to CursorChannel mak

[Spice-devel] [PATCH 1/4] move cursor_connect to CursorChannel

2016-05-13 Thread Frediano Ziglio
This function was handling mainly CursorChannel state Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 23 +++ server/cursor-channel.h | 5 + server/red-worker.c | 32 3 files changed, 32 insertions(+), 28 deletions(-) di

[Spice-devel] [PATCH 3/4] hide CursorChannelClient implementation details

2016-05-13 Thread Frediano Ziglio
The existence of this class can be hidden to user of CursorChannel class Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 15 +++ server/cursor-channel.h | 7 ++- server/red-worker.c | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/serv

Re: [Spice-devel] [spice-common PATCH v3] Add LZ4 data compression and used it in spicevmc channel

2016-05-13 Thread Frediano Ziglio
> > > > Compressed message type is CompressedData which contains compression > > type (1 byte) followed by the uncompressed data size (4 bytes) followed > > by the compressed data size (4 bytes) followed by the compressed data > > --- > > common/client_marshallers.h | 1 + > > common/messages.h

[Spice-devel] [PATCH] fix wrong assert causing streaming to crash

2016-05-13 Thread Frediano Ziglio
This regression was introduced by commit 18d3876b78c7f19c577da000d322dbd44e63e456 ("UpgradeItem: use base PipeItem for refcounting") This fix https://bugs.freedesktop.org/show_bug.cgi?id=95365. Signed-off-by: Frediano Ziglio --- server/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [Spice-devel] [PATCH] fix wrong assert causing streaming to crash

2016-05-13 Thread Christophe Fergeau
On Fri, May 13, 2016 at 12:25:09PM +0100, Frediano Ziglio wrote: > This regression was introduced by commit > 18d3876b78c7f19c577da000d322dbd44e63e456 > ("UpgradeItem: use base PipeItem for refcounting") > > This fix https://bugs.freedesktop.org/show_bug.cgi?id=95365. > > Signed-off-by: Frediano

[Spice-devel] [PATCH] Explicitly specify size of SpiceMsgSmartcardData

2016-05-13 Thread Frediano Ziglio
Without this, the demarshalling code does not know we expect exactly SpiceMsgSmartcardData::length bytes, and has to guess it from the amount of data which was sent Signed-off-by: Frediano Ziglio --- spice.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice.proto b/sp

[Spice-devel] [PATCH] simplify #ifdef code

2016-05-13 Thread Frediano Ziglio
Reduce conditional code Signed-off-by: Frediano Ziglio --- common/lz_compress_tmpl.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) Better to see this patch without space changes (and the looking result). diff --git a/common/lz_compress_tmpl.c b/common/lz_

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-05-13 Thread Victor Toso
Hi, On Wed, Mar 23, 2016 at 01:04:03PM +0100, Fabiano Fidêncio wrote: > gtask-helper provide methods that can easily be used for returning in > idle, as a few issues have been found in the GTask code used in > spice-gtk due to a immediately return when a return in idle was > expected. As examples

Re: [Spice-devel] [PATCH] Explicitly specify size of SpiceMsgSmartcardData

2016-05-13 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Fri, May 13, 2016 at 01:14:56PM +0100, Frediano Ziglio wrote: > Without this, the demarshalling code does not know we expect exactly > SpiceMsgSmartcardData::length bytes, and has to guess it from the > amount of data which was sent > > Signed-off-by: Frediano Zi

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-05-13 Thread Christophe Fergeau
Hey, On Fri, May 13, 2016 at 02:30:25PM +0200, Victor Toso wrote: > With that said, I'd like to suggest a change in the gtask-helper. > Quoting the fine manual from GTask: > "The "return" methods (eg, g_task_return_pointer()) automatically cause > the task to be "completed" as well, and there is

Re: [Spice-devel] Using private structure for making structure more public...

2016-05-13 Thread Christophe Fergeau
On Fri, May 13, 2016 at 04:42:08AM -0400, Frediano Ziglio wrote: > Hi, > this is the last though looking at refactory branch current trend. > > We use Gobject and private separation so structure are less exposed > to external... bla bla bla. > > The implementation however looks to not agree wit

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-05-13 Thread Victor Toso
On Fri, May 13, 2016 at 03:11:31PM +0200, Christophe Fergeau wrote: > Hey, > > On Fri, May 13, 2016 at 02:30:25PM +0200, Victor Toso wrote: > > With that said, I'd like to suggest a change in the gtask-helper. > > Quoting the fine manual from GTask: > > "The "return" methods (eg, g_task_return_po

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-05-13 Thread Christophe Fergeau
On Fri, May 13, 2016 at 03:28:11PM +0200, Victor Toso wrote: > > You would also need more magic to guarantee a coroutine switch before > > the callback is called in an idle (or are all idles called in the main > > context? I forgot this). In this case, my understanding is that the code > > was work

[Spice-devel] [PATCH 1/3] stats: allow easier change of statistic formats

2016-05-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/display-channel.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 1f4d66f..40c76b3 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@

[Spice-devel] [PATCH 3/3] stats: simplification

2016-05-13 Thread Frediano Ziglio
--- server/display-channel.c | 80 +++- 1 file changed, 25 insertions(+), 55 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 4e5e8bb..f3ceb28 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -53

[Spice-devel] [PATCH 2/3] stats: change values format from %f to %g

2016-05-13 Thread Frediano Ziglio
Allow printf to choose format based on order of numbers. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/display-channel.c b/server/display-channel.c index 40c76b3..4e5e8bb 100644 --- a/server/display-channel.

Re: [Spice-devel] [PATCH 08/11] Replace RedChannel::clients with GList

2016-05-13 Thread Frediano Ziglio
> > Instead of using a Ring, use a GList to store the list of channel > clients. This allows us to iterate the clients without poking inside of > the client struct to get the channel_link. This is required in order to > make the RedChannelClient struct private. > --- > server/display-channel.c |

Re: [Spice-devel] [PATCH 09/11] Remove 'peer' from name of channel client methods

2016-05-13 Thread Frediano Ziglio
> > There is some inconsistent naming of RedChannelClient methods. Some > include the word 'peer' (which normally seems to refer to RedsStream). > Remove the 'peer' terminology from those functions that are basically > RedChannelClient methods. > --- > server/red-channel.c | 18 +-

Re: [Spice-devel] Using private structure for making structure more public...

2016-05-13 Thread Frediano Ziglio
> > On Fri, May 13, 2016 at 04:42:08AM -0400, Frediano Ziglio wrote: > > Hi, > > this is the last though looking at refactory branch current trend. > > > > We use Gobject and private separation so structure are less exposed > > to external... bla bla bla. > > > > The implementation however loo

Re: [Spice-devel] [PATCH 07/11] Move InputsChannelClient to a separate file

2016-05-13 Thread Frediano Ziglio
> > Preparation for converting to GObject > --- > server/Makefile.am | 2 + > server/inputs-channel-client.c | 92 > ++ > server/inputs-channel-client.h | 44 > server/inputs-channel.c| 76 ++---

Re: [Spice-devel] [PATCH 3/3] stats: simplification

2016-05-13 Thread Christophe Fergeau
Why not merge this with patch 1, and have a helper taking a stat_info_t rather than having these macros? Christophe On Fri, May 13, 2016 at 02:55:58PM +0100, Frediano Ziglio wrote: > --- > server/display-channel.c | 80 > +++- > 1 file changed, 25 ins

Re: [Spice-devel] spice-html5 audio problem

2016-05-13 Thread Christophe Fergeau
On Tue, May 03, 2016 at 11:33:30AM +0200, Lorenzo Garcia wrote: > Hello, > > I've been using the spice-html5 client for few months in a project, but we > found that audio seems to have stopped working properly. > When we open the client it works well, but then it stops randomly; sometimes > in a f

Re: [Spice-devel] paste client clipboard selection to guest

2016-05-13 Thread Christophe Fergeau
Hey, On Mon, Apr 18, 2016 at 06:26:29AM +0300, Alex Roithman wrote: > I can't implement paste data to the guest. > > spice_main_clipboard_selection_notify() > don't send data to guest even if implement > as: > > spice_main_clipboard_selection_notify( > (SpiceMainChannel *) go

[Spice-devel] [PATCH] stats: simplify printing statistics

2016-05-13 Thread Frediano Ziglio
Use some utility function to show and compute statistics. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 131 ++- 1 file changed, 49 insertions(+), 82 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 1

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-13 Thread Christophe Fergeau
On Tue, May 03, 2016 at 06:55:36PM +0200, Francois Gouget wrote: > On Tue, 3 May 2016, Christophe Fergeau wrote: > [...] > > > > > + /* Copy the line */ > > > > > + uint8_t *src = chunks->chunk[chunk_index].data + > > > > > chunk_offset; > > > > > + memcpy(dst, src, stream_