Re: [Spice-devel] [spice-server v2 14/14] rcc: Consistently name RedChannelClient 'rcc'

2017-02-14 Thread Christophe Fergeau
On Tue, Feb 14, 2017 at 12:14:56PM -0600, Jonathon Jongsma wrote: > To be honest, I could go either way on this one. I like the > consistency, but I don't like the fact that it makes things like "git > blame" less useful. I'll leave the decision to others ;) I've pushed the series without this pat

Re: [Spice-devel] [PATCH spice-server 3/3] Add message counters to statistics

2017-02-14 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2017-02-14 at 15:51 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/red-channel.c | 4 >  1 file changed, 4 insertions(+) > > Ping. > > diff --git a/server/red-channel.c b/server/red-channel.c > index e70c46b..3599c3b 10064

Re: [Spice-devel] [PATCH spice-server 2/3] spicevmc: Add some statistics

2017-02-14 Thread Jonathon Jongsma
On Tue, 2017-02-14 at 15:51 +, Frediano Ziglio wrote: > Allows to see compressed/uncompressed ratio > > Signed-off-by: Frediano Ziglio > --- >  server/spicevmc.c | 17 + >  1 file changed, 17 insertions(+) > > Ping. > > diff --git a/server/spicevmc.c b/server/spicevmc.c > ind

Re: [Spice-devel] [PATCH spice-server 1/3] Improve statistic code interface

2017-02-14 Thread Jonathon Jongsma
On Tue, 2017-02-14 at 15:51 +, Frediano Ziglio wrote: > Use new structures and functions to implement statistic code. > Instead of using macro use inline functions. > Inline functions are more type safe. > If statistics are disabled structure and functions became empty; > this allow the code to

Re: [Spice-devel] [PATCH spice-server 4/4] Provide and reuse default implementation for config_socket

2017-02-14 Thread Jonathon Jongsma
On Tue, 2017-02-14 at 15:55 +0100, Christophe Fergeau wrote: > On Mon, Feb 13, 2017 at 11:03:19AM +, Frediano Ziglio wrote: > > Most channel don't need to do specific settings for the > > client socket so provide a default implementation to > > make easier to setup the client channnel. > > > >

Re: [Spice-devel] [PATCH spice-server 4/4] Provide and reuse default implementation for config_socket

2017-02-14 Thread Jonathon Jongsma
On Tue, 2017-02-14 at 15:55 +0100, Christophe Fergeau wrote: > On Mon, Feb 13, 2017 at 11:03:19AM +, Frediano Ziglio wrote: > > Most channel don't need to do specific settings for the > > client socket so provide a default implementation to > > make easier to setup the client channnel. > > > >

Re: [Spice-devel] Remote 3d support - streaming and lag

2017-02-14 Thread Frediano Ziglio
Francois did an hard job finding good parameters. For instance for H264 he disabled B frames to avoid to wait for a future frame and add slices to make bandwidth usage and CPU usage more regular. Finding the right combination of flags to get good quality without spending too much CPU or adding lot

Re: [Spice-devel] [spice-server v2 14/14] rcc: Consistently name RedChannelClient 'rcc'

2017-02-14 Thread Jonathon Jongsma
To be honest, I could go either way on this one. I like the consistency, but I don't like the fact that it makes things like "git blame" less useful. I'll leave the decision to others ;) Jonathon On Tue, 2017-02-14 at 15:17 +0100, Christophe Fergeau wrote: > It was sometimes named self, sometime

Re: [Spice-devel] [spice-server v2 13/14] rcc: Rename {Outgoing, Incoming}Handler

2017-02-14 Thread Jonathon Jongsma
On Tue, 2017-02-14 at 15:17 +0100, Christophe Fergeau wrote: > They no longer contain any vfuncs, so calling them "handler" does not > make a lot of sense. This commit renames them to > OutgoingMessageHandler/IncomingMessageHandler. Typo here: OutgoingMessageBuffer instead of OutgoingMessageHandle

[Spice-devel] [PATCH spice-gtk v4 1/6] gtk: Use gdk_cursor_new_from_name

2017-02-14 Thread Pavel Grunt
gdk_cursor_new has been deprecated since Gtk 3.16 Create the cursor when the widget is realized Also allow to hide the cursor under Wayland Acked-by: Victor Toso --- src/spice-widget.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/spice-widge

[Spice-devel] [PATCH spice-gtk v4 0/6] Avoid usage of deprecated functions

2017-02-14 Thread Pavel Grunt
Hi, this is a follow up to Francois's patches which avoided some deprecated warnings in the SpiceDisplay widget. (Also it seems that the client behavior under Wayland is better (reported by Christophe), there are still some issues with server mouse mode - https://bugzilla.redhat.com/show_bug.cgi?

[Spice-devel] [PATCH spice-gtk v4 3/6] gtk: Use gdk_device_warp

2017-02-14 Thread Pavel Grunt
gdk_display_warp_pointer has been deprecated since Gtk 3.0 Acked-by: Victor Toso --- src/spice-widget.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/spice-widget.c b/src/spice-widget.c index c39373c..f3fa911 100644 --- a/src/spice-widget.c +++ b/

[Spice-devel] [PATCH spice-gtk v4 2/6] gtk: Use gdk_window_get_device_position

2017-02-14 Thread Pavel Grunt
gdk_window_get_pointer has been deprecated since Gtk 3.0 Introduce helper functions for getting the display's pointing device and modifiers to keep the update_mouse_mode simple --- src/spice-widget.c | 42 -- 1 file changed, 32 insertions(+), 10 deletions(-

[Spice-devel] [PATCH spice-gtk v4 5/6] gtk: Avoid deprecated gdk_pointer_grab

2017-02-14 Thread Pavel Grunt
gdk_pointer_grab() was deprecated in 3.0 for gdk_device_grab() but that was also deprecated for gdk_seat_grab() in 3.20 Acked-by: Victor Toso --- src/spice-widget.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/spice-widget.c b/src/spice-wi

[Spice-devel] [PATCH spice-gtk v4 4/6] gtk: Avoid deprecated gdk_keyboard_grab

2017-02-14 Thread Pavel Grunt
gdk_keyboard_grab() was deprecated in 3.0 for gdk_device_grab() but that was also deprecated for gdk_seat_grab() in 3.20 --- src/spice-widget.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/spice-widget.c b/src/spice-widget.c index f3fa911..9d99c80 100644 ---

[Spice-devel] [PATCH spice-gtk v4 6/6] usb-device-widget: Migrate to GtkContainer from GtkBox

2017-02-14 Thread Pavel Grunt
GtkVBox is deprecated since Gtk 3.2, GtkBox is going to be deprecated. Just use the GtkContainer api. --- Per the commit bc3d12efb20423d5b1ebd490658f687c4bd323fd the class is considered final, so this shouldn't be an ABI break If we consider it as the ABI break we can just use the GtkContainer ap

Re: [Spice-devel] [spice-server 04/10] Remove IncomingHandlerInterface::{alloc, release}_msg_buf

2017-02-14 Thread Jonathon Jongsma
On Mon, 2017-02-13 at 05:10 -0500, Frediano Ziglio wrote: > > > > On Wed, Feb 08, 2017 at 12:54:44PM -0600, Jonathon Jongsma wrote: > > > On Tue, 2017-02-07 at 11:59 +0100, Christophe Fergeau wrote: > > > > Similarly to the previous commits, this removes an indirection > > > > level, > > > > Incom

Re: [Spice-devel] [PATCH spice-server] smartcard: Remove a "rename" function

2017-02-14 Thread Jonathon Jongsma
I think I would change the summary to something like: Remove an unnecessary wrapper function Acked-by: Jonathon Jongsma On Fri, 2017-02-10 at 14:30 +, Frediano Ziglio wrote: > smartcard_channel_client_pipe_add_push was just calling > red_channel_client_pipe_add_push without any cast or ot

Re: [Spice-devel] [PATCH spice-server 1/2] red-channel-client: Remove vec field from OutgoingHandler

2017-02-14 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma  On Fri, 2017-02-10 at 14:02 +, Frediano Ziglio wrote: > This was always set to vec_buf. > > Signed-off-by: Frediano Ziglio > --- >  server/red-channel-client-private.h | 3 +-- >  server/red-channel-client.c | 2 -- >  2 files changed, 1 insertion(+), 4 de

Re: [Spice-devel] [PATCH spice-server 2/2] red-channel-client: Pass array size to red_channel_client_prepare_out_msg

2017-02-14 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Fri, 2017-02-10 at 14:02 +, Frediano Ziglio wrote: > Do not make it assume vec contains IOV_MAX elements. > > Signed-off-by: Frediano Ziglio > --- >  server/red-channel-client.c | 12 +++- >  server/red-channel-client.h |  4 ++-- >  server/red-channel.

Re: [Spice-devel] [PATCH 1/2] authentication: Handle failed SASL authentication separately

2017-02-14 Thread Christophe Fergeau
On Mon, Feb 13, 2017 at 03:49:44PM +0200, Snir Sheriber wrote: > Remove handling with failures in the SASL authentication > process to separate function and display the error message > as reported by the SASL client (could also display SASL > server error message if error number was sent to the cli

Re: [Spice-devel] [PATCH 0/2] Handle failed authentication

2017-02-14 Thread Christophe Fergeau
Hey, can you make sure the email subject indicates that it's a spice-gtk patch? Christophe On Mon, Feb 13, 2017 at 03:49:43PM +0200, Snir Sheriber wrote: > These patches splits the handling of failed authentication into 2 > separate patches: one for sasl authentication failure and the > other one

Re: [Spice-devel] [spice-server v2 02/14] channel: Remove RedChannel::handle_parsed

2017-02-14 Thread Frediano Ziglio
> > red_channel_client_parse() currently does roughly: > > if (klass->parser) { > parsed = klass->parser(msg, msg_size, &parsed_size); > klass->handle_parsed(rcc, parsed_size, msg_type, parsed); > } else { > klass->handle_message(rcc, msg_type, msg, msg_size); > } > > The handle_pars

Re: [Spice-devel] [spice-server v2 05/14] channel: Remove IncomingHandlerInterface::{alloc, release}_msg_buf

2017-02-14 Thread Christophe Fergeau
On Tue, Feb 14, 2017 at 10:02:01AM -0500, Frediano Ziglio wrote: > > > > Similarly to the previous commits, this removes an indirection level, > > IncomingHandlerInterface stores pointers to > > alloc_recv_buf/release_recv_buf vfuncs, but these are always set to > > RedChannel::alloc_recv_buf/RedC

Re: [Spice-devel] [spice-server v2 03/14] channel: Rework red_channel_on_output a bit

2017-02-14 Thread Christophe Fergeau
On Tue, Feb 14, 2017 at 09:54:40AM -0500, Frediano Ziglio wrote: > > > > Have the RedChannelClient callback call into a RedChannel callback > > rather than doing the opposite. This will be useful in some subsequent > > refactoring of this code. > > > > Signed-off-by: Christophe Fergeau > > Patc

[Spice-devel] [PATCH spice-server 3/3] Add message counters to statistics

2017-02-14 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel.c | 4 1 file changed, 4 insertions(+) Ping. diff --git a/server/red-channel.c b/server/red-channel.c index e70c46b..3599c3b 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -103,6 +103,7 @@ struct RedChannelPrivate

[Spice-devel] [PATCH spice-server 1/3] Improve statistic code interface

2017-02-14 Thread Frediano Ziglio
Use new structures and functions to implement statistic code. Instead of using macro use inline functions. Inline functions are more type safe. If statistics are disabled structure and functions became empty; this allow the code to work and compile with either statistic disabled or enabled not requ

[Spice-devel] [PATCH spice-server 2/3] spicevmc: Add some statistics

2017-02-14 Thread Frediano Ziglio
Allows to see compressed/uncompressed ratio Signed-off-by: Frediano Ziglio --- server/spicevmc.c | 17 + 1 file changed, 17 insertions(+) Ping. diff --git a/server/spicevmc.c b/server/spicevmc.c index 9bcbada..174a04a 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -1

Re: [Spice-devel] [spice-server v2 01/14] channel: Remove unused 3rd red_channel_register_client_cbs() arg

2017-02-14 Thread Christophe Fergeau
On Tue, Feb 14, 2017 at 09:47:05AM -0500, Frediano Ziglio wrote: > > > > It was probably meant to be used as a "user_data" argument for the > > various callbacks, but turns out not to be used. > > > > Signed-off-by: Christophe Fergeau > > For me > > Acked-by: Frediano Ziglio > > I think usin

Re: [Spice-devel] [PATCH spice-server 2/4] Do not set not blocking flag twice

2017-02-14 Thread Christophe Fergeau
On Tue, Feb 14, 2017 at 10:16:43AM -0500, Frediano Ziglio wrote: > > > > On Mon, Feb 13, 2017 at 11:03:17AM +, Frediano Ziglio wrote: > > > Non blocking flag is set for all connection inside reds.c so > > > there's no need to set again for the single client channel. > > > > > > Signed-off-by:

Re: [Spice-devel] [PATCH spice-server 2/4] Do not set not blocking flag twice

2017-02-14 Thread Frediano Ziglio
> > On Mon, Feb 13, 2017 at 11:03:17AM +, Frediano Ziglio wrote: > > Non blocking flag is set for all connection inside reds.c so > > there's no need to set again for the single client channel. > > > > Signed-off-by: Frediano Ziglio > > I'd move that code in a RedsStream helper while at it,

Re: [Spice-devel] [PATCH spice-server 3/4] Do not set TCP_NODELAY flag twice

2017-02-14 Thread Frediano Ziglio
> > On Mon, Feb 13, 2017 at 11:03:18AM +, Frediano Ziglio wrote: > > TCP_NODELAY flag is set by default for all connection inside > > reds.c so there's no need to set again for the single > > client channel. > > > > Note that there are still some call to setsockopt to set this > > option but

Re: [Spice-devel] [PATCH spice-server 2/4] Do not set not blocking flag twice

2017-02-14 Thread Christophe Fergeau
On Mon, Feb 13, 2017 at 11:03:17AM +, Frediano Ziglio wrote: > Non blocking flag is set for all connection inside reds.c so > there's no need to set again for the single client channel. > > Signed-off-by: Frediano Ziglio I'd move that code in a RedsStream helper while at it, I can send a pat

Re: [Spice-devel] [spice-server v2 14/14] rcc: Consistently name RedChannelClient 'rcc'

2017-02-14 Thread Frediano Ziglio
> > It was sometimes named self, sometimes rcc, use rcc everywhere. > > Signed-off-by: Christophe Fergeau > --- > server/red-channel-client.c | 138 > ++-- > 1 file changed, 69 insertions(+), 69 deletions(-) > > diff --git a/server/red-channel-client.c

Re: [Spice-devel] [spice-server v2 13/14] rcc: Rename {Outgoing, Incoming}Handler

2017-02-14 Thread Frediano Ziglio
> > They no longer contain any vfuncs, so calling them "handler" does not > make a lot of sense. This commit renames them to > OutgoingMessageHandler/IncomingMessageHandler. > > Signed-off-by: Christophe Fergeau > --- > server/red-channel-client.c | 84 > ++-

Re: [Spice-devel] [spice-server v2 12/14] rcc: Remove red-channel-client-private.h

2017-02-14 Thread Frediano Ziglio
> > Nothing outside of RedChannelClient needs access to data contained in > RedChannelClientPrivate, so we can move all the type definitions to the > .c file to make it fully opaque rather than relying on a private header. > > Signed-off-by: Christophe Fergeau > --- > server/Makefile.am

Re: [Spice-devel] [spice-server v2 11/14] rcc: Move SpiceDataHeaderOpaque to red-channel-client-private.h

2017-02-14 Thread Frediano Ziglio
> > It's only used by red-channel-client.c > > Signed-off-by: Christophe Fergeau > --- > server/red-channel-client-private.h | 22 ++ > server/red-channel.h| 22 -- > 2 files changed, 22 insertions(+), 22 deletions(-) > > diff --git a/ser

Re: [Spice-devel] [PATCH spice-server 3/4] Do not set TCP_NODELAY flag twice

2017-02-14 Thread Christophe Fergeau
On Mon, Feb 13, 2017 at 11:03:18AM +, Frediano Ziglio wrote: > TCP_NODELAY flag is set by default for all connection inside > reds.c so there's no need to set again for the single > client channel. > > Note that there are still some call to setsockopt to set this > option but in this case the

Re: [Spice-devel] [spice-server v2 07/14] channel: Remove IncomingHandlerInterface

2017-02-14 Thread Frediano Ziglio
> > This commit removes what remains of IncomingHandlerInterface. The > remaining function pointers were pointing to RedChannel vfuncs. > Moreover the IncomingHandlerInterface abstraction is unused, ie the > codebase only has a single implementation for it, so we can directly > call the relevant m

Re: [Spice-devel] [spice-server v2 06/14] channel: More removal of IncomingHandlerInterface vfuncs

2017-02-14 Thread Frediano Ziglio
> > This commit removes IncomingHandlerInterface::on_error and > IncomingHandlerInterface::on_input. As with previous commits, these > vfuncs are always calling the method, and RedChannel::init sets them to > point to RedChannelClient methods, which RedChannelClient is then going > to call indirec

Re: [Spice-devel] [spice-server v2 05/14] channel: Remove IncomingHandlerInterface::{alloc, release}_msg_buf

2017-02-14 Thread Frediano Ziglio
> > Similarly to the previous commits, this removes an indirection level, > IncomingHandlerInterface stores pointers to > alloc_recv_buf/release_recv_buf vfuncs, but these are always set to > RedChannel::alloc_recv_buf/RedChannel::release_recv_buf, which are also > vfuncs which can be overridden i

Re: [Spice-devel] [PATCH spice-server 4/4] Provide and reuse default implementation for config_socket

2017-02-14 Thread Christophe Fergeau
On Mon, Feb 13, 2017 at 11:03:19AM +, Frediano Ziglio wrote: > Most channel don't need to do specific settings for the > client socket so provide a default implementation to > make easier to setup the client channnel. > > Signed-off-by: Frediano Ziglio > --- > server/inputs-channel.c | 6

Re: [Spice-devel] [PATCH spice-server 1/4] Clear "msg" pointers after releasing

2017-02-14 Thread Christophe Fergeau
On Mon, Feb 13, 2017 at 11:03:16AM +, Frediano Ziglio wrote: > Avoid possible dandling pointers. 'dangling', though let's delay that after my patch series doing changes in that area (I can rebase/queue your patch there). Christophe signature.asc Description: PGP signature __

Re: [Spice-devel] [spice-server v2 04/14] channel: Remove OutgoingHandlerInterface

2017-02-14 Thread Frediano Ziglio
> > RedChannel uses OutgoingHandlerInterface to provide constant pointers to > RedChannelClient methods. This OutgoingHandlerInterface structure is > then used in RedChannelClient to indirectly call these methods. > > The OutgoingHandlerInterface abstraction is unused, ie the codebase > only has

Re: [Spice-devel] [spice-server v2 03/14] channel: Rework red_channel_on_output a bit

2017-02-14 Thread Frediano Ziglio
> > Have the RedChannelClient callback call into a RedChannel callback > rather than doing the opposite. This will be useful in some subsequent > refactoring of this code. > > Signed-off-by: Christophe Fergeau Patch is fine however I think the signal comment on 04/14 should be moved to this pat

Re: [Spice-devel] [spice-server v2 01/14] channel: Remove unused 3rd red_channel_register_client_cbs() arg

2017-02-14 Thread Frediano Ziglio
> > It was probably meant to be used as a "user_data" argument for the > various callbacks, but turns out not to be used. > > Signed-off-by: Christophe Fergeau For me Acked-by: Frediano Ziglio I think using an alternate way to provide dispatcher would be better as a follow up. Note that Jon

[Spice-devel] [spice-server v2 11/14] rcc: Move SpiceDataHeaderOpaque to red-channel-client-private.h

2017-02-14 Thread Christophe Fergeau
It's only used by red-channel-client.c Signed-off-by: Christophe Fergeau --- server/red-channel-client-private.h | 22 ++ server/red-channel.h| 22 -- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/server/red-channel-clien

[Spice-devel] [spice-server v2 03/14] channel: Rework red_channel_on_output a bit

2017-02-14 Thread Christophe Fergeau
Have the RedChannelClient callback call into a RedChannel callback rather than doing the opposite. This will be useful in some subsequent refactoring of this code. Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 2 ++ server/red-channel.c| 9 ++--- server/red-chan

[Spice-devel] [spice-server v2 13/14] rcc: Rename {Outgoing, Incoming}Handler

2017-02-14 Thread Christophe Fergeau
They no longer contain any vfuncs, so calling them "handler" does not make a lot of sense. This commit renames them to OutgoingMessageHandler/IncomingMessageHandler. Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 84 ++--- 1 file chang

[Spice-devel] [spice-server v2 14/14] rcc: Consistently name RedChannelClient 'rcc'

2017-02-14 Thread Christophe Fergeau
It was sometimes named self, sometimes rcc, use rcc everywhere. Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 138 ++-- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-c

[Spice-devel] [spice-server v2 08/14] rcc: Pass RedChannelClient to red_peer_handle_incoming()

2017-02-14 Thread Christophe Fergeau
There is only one implementation of IncomingHandler which relies IncomingHandler::opaque to be a RedChannlClient. This commit makes this explicit. This allows to get rid of the IncomingHandler::opaque data member. This renames red_peer_handle_incoming() to red_channel_client_handle_incoming() as t

[Spice-devel] [spice-server v2 05/14] channel: Remove IncomingHandlerInterface::{alloc, release}_msg_buf

2017-02-14 Thread Christophe Fergeau
Similarly to the previous commits, this removes an indirection level, IncomingHandlerInterface stores pointers to alloc_recv_buf/release_recv_buf vfuncs, but these are always set to RedChannel::alloc_recv_buf/RedChannel::release_recv_buf, which are also vfuncs which can be overridden if needed. Thi

[Spice-devel] [spice-server v2 09/14] rcc: Pass RedChannelClient to red_peer_handle_outgoing()

2017-02-14 Thread Christophe Fergeau
There is only one implementation of OutgoingHandler which relies OutgoingHandler::opaque being a RedChannelClient. This commit makes this explicit in order to get rid of the OutgoingHandler::opaque data member. This renames red_peer_handle_outgoing() to red_channel_client_handle_outgoing() as the

[Spice-devel] [spice-server v2 10/14] rcc: Replace 'opaque' arg with typed RedChannelClient

2017-02-14 Thread Christophe Fergeau
The methods previously used by OutgoingHandlerInterface and IncomingHandlerInterface are no longer used as generic callbacks, but are directly called from RedChannelClient code. We can be explicit about the type of their first argument (RedChannelClient *) rather than using a generic void * pointer

[Spice-devel] [spice-server v2 04/14] channel: Remove OutgoingHandlerInterface

2017-02-14 Thread Christophe Fergeau
RedChannel uses OutgoingHandlerInterface to provide constant pointers to RedChannelClient methods. This OutgoingHandlerInterface structure is then used in RedChannelClient to indirectly call these methods. The OutgoingHandlerInterface abstraction is unused, ie the codebase only has a single implem

[Spice-devel] [spice-server v2 12/14] rcc: Remove red-channel-client-private.h

2017-02-14 Thread Christophe Fergeau
Nothing outside of RedChannelClient needs access to data contained in RedChannelClientPrivate, so we can move all the type definitions to the .c file to make it fully opaque rather than relying on a private header. Signed-off-by: Christophe Fergeau --- server/Makefile.am | 1 -

[Spice-devel] [spice-server v2 02/14] channel: Remove RedChannel::handle_parsed

2017-02-14 Thread Christophe Fergeau
red_channel_client_parse() currently does roughly: if (klass->parser) { parsed = klass->parser(msg, msg_size, &parsed_size); klass->handle_parsed(rcc, parsed_size, msg_type, parsed); } else { klass->handle_message(rcc, msg_type, msg, msg_size); } The handle_parsed implementation expec

[Spice-devel] [spice-server v2 01/14] channel: Remove unused 3rd red_channel_register_client_cbs() arg

2017-02-14 Thread Christophe Fergeau
It was probably meant to be used as a "user_data" argument for the various callbacks, but turns out not to be used. Signed-off-by: Christophe Fergeau --- server/inputs-channel.c | 2 +- server/main-channel.c | 2 +- server/red-channel.c| 6 +- server/red-channel.h| 2 +- server/red

[Spice-devel] [spice-server 00/14] Remove IncomingHandlerInterface/OutgoingHandlerInterface

2017-02-14 Thread Christophe Fergeau
Hey, Series grew a few more patches since the first iteration after the review comments, the most notable change would be the addition of "channel: Remove RedChannel::handle_parsed" which addresses the issue with red_channel_client_parse() return value which Jonathon pointed out. This changes the

[Spice-devel] [spice-server v2 07/14] channel: Remove IncomingHandlerInterface

2017-02-14 Thread Christophe Fergeau
This commit removes what remains of IncomingHandlerInterface. The remaining function pointers were pointing to RedChannel vfuncs. Moreover the IncomingHandlerInterface abstraction is unused, ie the codebase only has a single implementation for it, so we can directly call the relevant methods and ma

[Spice-devel] [spice-server v2 06/14] channel: More removal of IncomingHandlerInterface vfuncs

2017-02-14 Thread Christophe Fergeau
This commit removes IncomingHandlerInterface::on_error and IncomingHandlerInterface::on_input. As with previous commits, these vfuncs are always calling the method, and RedChannel::init sets them to point to RedChannelClient methods, which RedChannelClient is then going to call indirectly through t

Re: [Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Daniel P. Berrange
On Tue, Feb 14, 2017 at 08:33:09AM -0500, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > > > Allow easier processing by scripts and csv editors > > > --- > > > Also it renders nicely on github > > > https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv > > > From

Re: [Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Pavel Grunt
On Tue, 2017-02-14 at 08:33 -0500, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > > > Allow easier processing by scripts and csv editors > > > --- > > > Also it renders nicely on github > > >  https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv > > > From that ^

Re: [Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Marc-André Lureau
Hi - Original Message - > > > > Allow easier processing by scripts and csv editors > > --- > > Also it renders nicely on github > > https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv > > From that ^ table is obvious which values are missing > > With > > git diff HEAD^ --w

Re: [Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Pavel Grunt
On Tue, 2017-02-14 at 07:07 -0500, Frediano Ziglio wrote: > > > > Allow easier processing by scripts and csv editors > > --- > > Also it renders nicely on github > >  https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv > > From that ^ table is obvious which values are missing > > With

Re: [Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Frediano Ziglio
> > Allow easier processing by scripts and csv editors > --- > Also it renders nicely on github > https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv > From that ^ table is obvious which values are missing With git diff HEAD^ --word-diff --word-diff-regex='[^[:space:]]' you can ea

[Spice-devel] [PATCH spice-gtk] keymaps.csv: Add missing columns

2017-02-14 Thread Pavel Grunt
Allow easier processing by scripts and csv editors --- Also it renders nicely on github https://github.com/xerus/spice-gtk/blob/keymap/src/keymaps.csv From that ^ table is obvious which values are missing --- src/keymaps.csv | 702 1 file

Re: [Spice-devel] Remote 3d support - streaming and lag

2017-02-14 Thread Christophe de Dinechin
One thing I started to discuss last Wed is how video encoding may also require / introduce a lag on its own. The reason is that some video encodings use predictive (P) or bidirectional (B) frames that are relative to surrounding frames. Only a small fraction of the frames, the intracoded frames

Re: [Spice-devel] [spice-server 07/10] Remove IncomingHandlerInterface

2017-02-14 Thread Christophe Fergeau
On Thu, Feb 09, 2017 at 11:33:41AM -0600, Jonathon Jongsma wrote: > > Same comment as for the OutgoingHandler struct: removing these callback > funcs means that the IncomingHandler name is no longer a very good fit. > It's not so much a 'handler' as it is a collection of memory buffers > and state