Re: [Spice-devel] [PATCH 02/30] Move dcc glz field initialization into dcc_new

2016-06-07 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-06-07 at 11:17 +0100, Frediano Ziglio wrote: > There is no reason to initialize these fields in two different places. > Note that an usage between dcc_new and the function where these > field were initialised would have resulted in a crash. > > Signed-off

Re: [Spice-devel] [PATCH 01/30] Do not release too much drawables

2016-06-07 Thread Jonathon Jongsma
I have to admit that I'm not very familiar with this bit of the code. But it's clearly a behavior change and it seems like one that could have non-obvious or hard-to-test consequences. Can you give a bit more justification for the change? Does it fix an observed issue? It seems that these glz drawa

Re: [Spice-devel] [PATCH 2/2] record: Make red_record_cursor_cmd static

2016-06-07 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Mon, 2016-06-06 at 09:56 +0100, Frediano Ziglio wrote: > This function is never used outside this compile unit. > > Signed-off-by: Frediano Ziglio > --- >  server/red-record-qxl.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/server

Re: [Spice-devel] [PATCH 1/2 v2] replay: Handle cursor commands

2016-06-07 Thread Jonathon Jongsma
On Mon, 2016-06-06 at 09:56 +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/tests/replay.c | 50 +++--- >  1 file changed, 35 insertions(+), 15 deletions(-) > > Changes from v1: > - renamed cmd_queue to display_queue to mak

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

2016-06-07 Thread Alex Roithman
i checked some clipboard actions in one same virtual machine. The different in usage clipboards in the virt-viewer (Remote Viewer) app and the my app is that: [In virtual machine console]: $ kill -9 $ /usr/bin/spice-vdagent -d -x .. spice-vdagent[.]: 0x24f1010 received clipboard data, arg1

Re: [Spice-devel] [spice-gtk v3 05/16] file-xfer: inform agent of errors only when task finished

2016-06-07 Thread Jonathon Jongsma
On Tue, 2016-06-07 at 11:14 -0500, Jonathon Jongsma wrote: > On Sun, 2016-06-05 at 10:38 +0200, Victor Toso wrote: > > > > Hi, > > > > On Fri, Jun 03, 2016 at 10:17:05AM -0500, Jonathon Jongsma wrote: > > > > > > > > > Related to my comments to the last patch, this change makes the > > > SpiceF

Re: [Spice-devel] [spice-gtk v3 07/16] file-xfer: call user callback once per operation

2016-06-07 Thread Jonathon Jongsma
On Sun, 2016-06-05 at 11:39 +0200, Victor Toso wrote: > Hi, > > On Fri, Jun 03, 2016 at 12:12:14PM -0500, Jonathon Jongsma wrote: > > > > On Mon, 2016-05-30 at 11:55 +0200, Victor Toso wrote: > > > > > > SpiceFileTransferTask has a callback to be called when operation > > > ended. Til this patch

Re: [Spice-devel] [spice-gtk v3 06/16] file-xfer: a FileTransferOperation per transfer call

2016-06-07 Thread Jonathon Jongsma
On Sun, 2016-06-05 at 11:31 +0200, Victor Toso wrote: > On Fri, Jun 03, 2016 at 11:42:13AM -0500, Jonathon Jongsma wrote: > > > > On Mon, 2016-05-30 at 11:55 +0200, Victor Toso wrote: > > > > > > Each call to spice_main_file_copy_async will now create a > > > FileTransferOperation which groups al

Re: [Spice-devel] [spice-gtk v3 05/16] file-xfer: inform agent of errors only when task finished

2016-06-07 Thread Jonathon Jongsma
On Sun, 2016-06-05 at 10:38 +0200, Victor Toso wrote: > Hi, > > On Fri, Jun 03, 2016 at 10:17:05AM -0500, Jonathon Jongsma wrote: > > > > Related to my comments to the last patch, this change makes the > > SpiceFileTransferTask class less "self-contained". In other words, if > > the user does not

Re: [Spice-devel] [spice-gtk v3 04/16] file-xfer: introduce file-info signal

2016-06-07 Thread Jonathon Jongsma
On Sun, 2016-06-05 at 10:20 +0200, Victor Toso wrote: > Hi, > > On Thu, Jun 02, 2016 at 05:14:57PM -0500, Jonathon Jongsma wrote: > > > > On Mon, 2016-05-30 at 11:55 +0200, Victor Toso wrote: > > > > > > In order to avoid sending the agent message on > > > file_xfer_info_async_cb, we can provide

Re: [Spice-devel] [PATCH 2/4] worker: Record cursor commands

2016-06-07 Thread Jonathon Jongsma
On Mon, 2016-06-06 at 04:21 -0400, Frediano Ziglio wrote: > > > > > > On Fri, 2016-06-03 at 10:59 +0100, Frediano Ziglio wrote: > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > >  server/red-worker.c | 5 + > > >  1 file changed, 5 insertions(+) > > > > > > diff --git a/server/red-w

Re: [Spice-devel] [spice v16 01/23] streaming: Better check for sized frames

2016-06-07 Thread Frediano Ziglio
> Usually the RedDrawable bbox dimensions match the src_area dimensions > so that checking that the bbox matches the stream's original dest_area > should be enough to determine if sized stream support is needed to > send the frame. > But making the bbox different could be used to have the scaling

Re: [Spice-devel] [spice-gtk] Do not mix function linkage

2016-06-07 Thread Frediano Ziglio
> > Hi, > > would you mind adding a comment to the code to avoid the change in the > future? > > Thanks, > Pavel > Make sense, was/is not that obvious. Done, added also a check for the call. Frediano > On Tue, 2016-06-07 at 12:43 +0100, Frediano Ziglio wrote: > > This prevents a possible cr

[Spice-devel] [spice-gtk 3/3] widget: Always hook keyboard on Windows

2016-06-07 Thread Frediano Ziglio
This prevents some keyboard handling like IME processing to take place. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1342984 (beside removing the call from virt-viewer). Signed-off-by: Frediano Ziglio --- src/spice-widget.c | 30 -- 1 file changed, 16 inser

[Spice-devel] [spice-gtk 2/3] widget: Do not mix function linkage

2016-06-07 Thread Frediano Ziglio
This prevents a possible crash on windows 32 bit. The linkage of UnhookWindowsHookEx is WINAPI which is __stdcall while callback for g_clear_pointer is C. This could cause stack pointer corruption depending on compiler flags. Signed-off-by: Frediano Ziglio --- src/spice-widget.c | 6 +- 1 fi

[Spice-devel] [spice-gtk 1/3] widget: Do not ignore unsupported keys from keyboard

2016-06-07 Thread Frediano Ziglio
If Windows layout does not support a given key the resulting virtual code is set to 0xFF. To avoid losing this raw key (causing the key not been sent to remote machine) detect this condition and handle the key. The check for raw scancode is there to understand if we can handle correctly the key in

[Spice-devel] [qxl v16 23/23] Xspice: Add --video-codecs to specify encoder and codec preferences

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- scripts/Xspice | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Xspice b/scripts/Xspice index 15a5a5e..bf8112f 100755 --- a/scripts/Xspice +++ b/scripts/Xspice @@ -87,6 +87,7 @@ parser.add_argument('--zlib-glz-wan-compression', # TO

[Spice-devel] [qxl v16 22/23] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- examples/spiceqxl.xorg.conf.example | 7 +++ src/qxl.h | 1 + src/qxl_driver.c| 2 ++ src/spiceqxl_spice_server.c | 15 +++ 4 files changed, 25 insertions(+) diff --git a/examples/spiceqxl

[Spice-devel] [spice v16 21/23] streaming: Add support for GStreamer 0.10

2016-06-07 Thread Francois Gouget
configure will use GStreamer 1.0 if present and fall back to GStreamer 0.10 otherwise. ffenc_mjpeg takes its bitrate as a long so extend set_gstenc_bitrate(). Signed-off-by: Francois Gouget --- configure.ac | 36 ++--- server/Makefile.am | 8 +++ server/gstreamer

[Spice-devel] [spice v16 20/23] streaming: Dynamically adjust the GStreamer encoder bitrate if possible

2016-06-07 Thread Francois Gouget
This is faster and lets the encoder leverage past bitrate shaping history to attain the target faster. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer

[Spice-devel] [spice v16 19/23] streaming: Respect the GStreamer encoder's valid bit rate range

2016-06-07 Thread Francois Gouget
GObject returns an error instead of clamping if given an out of range property value. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 67 ++ 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/server/gstreamer-encoder.c b/se

[Spice-devel] [spice v16 18/23] streaming: Give up after a while if GStreamer cannot handle the video

2016-06-07 Thread Francois Gouget
This typically happens when sending very small frames (less than 16 pixels in one dimension) to the x264enc encoder. This avoids repeatedly wasting time rebuilding the pipeline. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 61 ++ 1 f

[Spice-devel] [spice v16 17/23] streaming: Adjust the frame rate based on the GStreamer encoding time

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 40 +--- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c index f5a8c17..335aa81 100644 --- a/server/gstreamer-encoder.c +++ b/

[Spice-devel] [spice v16 16/23] streaming: Adjust the GStreamer encoder bit rate to the network

2016-06-07 Thread Francois Gouget
The video encoder uses the client reports and/or notifications of server frame drops as its feedback mechanisms. In particular it keeps track of the maximum video margin and reduces the bit rate whenever the margin goes below certain thresholds or decreases too sharply. It uses these to figure out

[Spice-devel] [spice v16 15/23] streaming: Shape the bit rate of the GStreamer codecs output

2016-06-07 Thread Francois Gouget
The GStreamer codecs don't follow the specified bit rate very closely: they can decide to exceed it for ten seconds or more if they consider the scene deserves it. Such long bursts are enough to cause network congestion, resulting in many lost frames which cause significant display corruption. So t

[Spice-devel] [spice v16 14/23] streaming: Add h264 support to the GStreamer video encoder

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac | 1 + server/gstreamer-encoder.c | 17 - server/reds.c | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 650ea4a..1cc9f4f 100644 --- a/configure.

[Spice-devel] [spice v16 11/23] streaming: Let the video encoder manage the compressed buffer

2016-06-07 Thread Francois Gouget
This way the video encoder is not forced to use malloc()/free(). This also allows more flexibility in how the video encoder manages the buffer which allows for a zero-copy implementation in both video encoders. Signed-off-by: Francois Gouget --- server/dcc-send.c | 24 +++-- ser

[Spice-devel] [spice v16 12/23] streaming: Handle and recover from GStreamer encoding errors

2016-06-07 Thread Francois Gouget
If an error occurs for whatever reason (e.g. codec not supporting odd frame sizes), the GStreamer pipeline will drop the current buffer, causing the encoder to be stuck waiting for the sample. So this patch tracks error notifications and ensures we don't wait for a sample if none will come. Signed

[Spice-devel] [spice v16 13/23] streaming: Avoid copying the input frame in the GStreamer encoder

2016-06-07 Thread Francois Gouget
Note that we can only avoid copies for the first 1 Mpixels or so. That's because Spice splits larger frames into more chunks than we can fit GstMemory fragments in a GStreamer buffer. So if there are more pixels we will avoid copies for the first 3840 KB and copy the rest. Furthermore, while in pra

[Spice-devel] [spice v16 10/23] streaming: Use the optimal number of threads for VP8 encoding

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac | 4 server/gstreamer-encoder.c | 27 ++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ac08410..650ea4a 100644 --- a/configure.ac +++ b/configure.ac @@ -

[Spice-devel] [spice v16 09/23] streaming: Add VP8 support to the GStreamer video encoder

2016-06-07 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac | 1 + server/gstreamer-encoder.c | 67 -- server/reds.c | 4 ++- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 79fe0b8..ac0

[Spice-devel] [spice v16 08/23] replay: Add an option to change video codec

2016-06-07 Thread Pavel Grunt
--- server/tests/replay.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index d552327..ebb8bb5 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -290,7 +290,7 @@ int main(int argc, char **argv) {

[Spice-devel] [spice v16 07/23] streaming: Let the administrator pick the video encoder and codec

2016-06-07 Thread Francois Gouget
The Spice server administrator can specify the encoder and codec preferences to optimize for CPU or bandwidth usage. Preferences are described in a semi-colon separated list of encoder:codec pairs. The server has a default preference list which can explicitly be selected by specifying 'auto'. Sign

Re: [Spice-devel] [spice-gtk] Do not mix function linkage

2016-06-07 Thread Pavel Grunt
Hi, would you mind adding a comment to the code to avoid the change in the future? Thanks, Pavel On Tue, 2016-06-07 at 12:43 +0100, Frediano Ziglio wrote: > This prevents a possible crash on windows 32 bit. > The linkage of UnhookWindowsHookEx is WINAPI which is __stdcall while > callback for g_

[Spice-devel] [spice v16 03/23] mjpeg: Use src_area as the authoritative source for the frame dimensions

2016-06-07 Thread Francois Gouget
Video frames correspond to QXL_DRAW_COPY operations where the frame area is defined by the SpiceCopy.src_area field. Signed-off-by: Francois Gouget --- server/mjpeg-encoder.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/server/mjpeg-encoder.c b/server/mjpeg-

[Spice-devel] [spice v16 02/23] streaming: Remove the Drawable.sized_stream field

2016-06-07 Thread Francois Gouget
Only red_marshall_stream_data() needs to know whether to send the frame using a SpiceMsgDisplayStreamDataSized or a regular StreamData message. So check whether we have a sized frame there and simplify the rest of the code. Signed-off-by: Francois Gouget --- server/dcc-send.c| 39 +++

[Spice-devel] [spice v16 06/23] streaming: Check the client video codec capabilities

2016-06-07 Thread Francois Gouget
The server picks a codec supported by the client based on the following new client capabilities: * SPICE_DISPLAY_CAP_MULTI_CODEC which denotes a recent client that supports multiple codecs. This capability is needed to not have to hardcode that MJPEG is supported. This makes it possible to w

[Spice-devel] [spice v16 05/23] streaming: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-06-07 Thread Francois Gouget
This introduces a pared down GStreamer-based video encoder to serve as the basis for later enhancements. In this form the new encoder supports both regular and sized streams but lacks any rate control. It should still work fine if bandwidth is sufficient such as on LANs. Signed-off-by: Francois Go

[Spice-devel] [spice v16 04/23] streaming: Remove the width/height encode_frame() parameters

2016-06-07 Thread Francois Gouget
encode_frame() needs the QXL_DRAW_COPY operation's SpiceCopy.src_area field anyway, so the width and height parameters were redundant. Signed-off-by: Francois Gouget --- server/dcc-send.c | 14 ++ server/mjpeg-encoder.c | 1 - server/video-encoder.h | 2 +- 3 files changed, 7

[Spice-devel] [spice v16 01/23] streaming: Better check for sized frames

2016-06-07 Thread Francois Gouget
Usually the RedDrawable bbox dimensions match the src_area dimensions so that checking that the bbox matches the stream's original dest_area should be enough to determine if sized stream support is needed to send the frame. But making the bbox different could be used to have the scaling be performe

[Spice-devel] [streaming v16 00/23] Add GStreamer support for video streaming

2016-06-07 Thread Francois Gouget
This patch series adds support for using GStreamer to encode the video streams, adding support for VP8 and h264 codecs. As before the patches can also be grabbed from the gst branch of the repositories below. Note that this time around the required support is already present in the client. sp

[Spice-devel] [spice-gtk] Do not mix function linkage

2016-06-07 Thread Frediano Ziglio
This prevents a possible crash on windows 32 bit. The linkage of UnhookWindowsHookEx is WINAPI which is __stdcall while callback for g_clear_pointer is C. This could cause stack pointer corruption depending on compiler flags. Signed-off-by: Frediano Ziglio --- src/spice-widget.c | 3 ++- 1 file

Re: [Spice-devel] [spice-server v1] char-device: fix mismatch of client tokens

2016-06-07 Thread Frediano Ziglio
> > As the tokens counter were not being reset you could enter in a > situation where client thinks it has more tokens then server which > would eventually lead to client's disconnection from 0c5eca97f16ec6 > onwards (before it was crashing). > > It is easy to check the above situation if you tra

[Spice-devel] [PATCH 26/30] Use Ring instead of accessing Drawable internals

2016-06-07 Thread Frediano Ziglio
Remove some coupling, we mainly need to store a list of RedGlzDrawables. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 8 server/dcc-encoders.h| 4 ++-- server/display-channel.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/dcc-encod

[Spice-devel] [PATCH 24/30] Better encoders encapsulation

2016-06-07 Thread Frediano Ziglio
Avoid to access some fields from dcc.c Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 4 server/dcc.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index fcb6e11..c49561f 100644 --- a/server/dcc-enc

[Spice-devel] [PATCH 29/30] Remove dependency from dcc-encoders to Drawable

2016-06-07 Thread Frediano Ziglio
Encoding image requires a RedDrawable (where the data is stored) and a Ring where to store information to free Glz structures. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 17 ++--- server/dcc-encoders.h | 3 ++- server/dcc.c | 4 +++- 3 files changed, 15 ins

[Spice-devel] [PATCH 25/30] Change RedGlzDrawable::drawable from pointer to boolean

2016-06-07 Thread Frediano Ziglio
The field was used just as a flag. This has the advantage to make clear to not use the pointer as we don't have ownership. Also many the structure a bit smaller. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --gi

[Spice-devel] [PATCH 27/30] Do not access EncodersData internal to lock/unlock glz encoding

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 14 ++ server/dcc-encoders.h| 2 ++ server/display-channel.c | 18 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index 01138a2..b91ddc

[Spice-devel] [PATCH 21/30] Make some function static

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 4 ++-- server/dcc-encoders.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index b403024..6b6b95b 100644 --- a/server/dcc-encoders.c +++ b/server/dcc-encoders.c @@ -5

[Spice-devel] [PATCH 28/30] Make GlzSharedDictionary structure private in dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 10 ++ server/dcc-encoders.h | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index b91ddc8..06132ed 100644 --- a/server/dcc-encoders.c +++ b/server/d

[Spice-devel] [PATCH 30/30] Reduce header dependency

2016-06-07 Thread Frediano Ziglio
Avoid dependencies from RedChannel stuff. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h index 1decd33..fa709d9 100644 --- a/server/dcc-encoders.h +++ b/server/dcc-en

[Spice-devel] [PATCH 22/30] Encapsulate dcc_release_glz

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 4 +++- server/dcc-encoders.h | 1 - server/dcc.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index 6b6b95b..899e549 100644 --- a/server/dcc-encoders.c +++ b

[Spice-devel] [PATCH 23/30] Better encapsulation for dcc_compress_image_glz call

2016-06-07 Thread Frediano Ziglio
Do not access too much encoders data. Slightly different as now if glz is frozen lz compression is used. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 15 +++ server/dcc.c | 21 ++--- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git

[Spice-devel] [PATCH 20/30] Encapsulate code to save glz state

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 10 ++ server/dcc-encoders.h | 2 ++ server/dcc-send.c | 8 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index f583857..b403024 100644 --- a/server/dc

[Spice-devel] [PATCH 02/30] Move dcc glz field initialization into dcc_new

2016-06-07 Thread Frediano Ziglio
There is no reason to initialize these fields in two different places. Note that an usage between dcc_new and the function where these field were initialised would have resulted in a crash. Signed-off-by: Frediano Ziglio --- server/dcc.c | 10 -- 1 file changed, 4 insertions(+), 6 deleti

[Spice-devel] [PATCH 16/30] Move others glz fields to dcc-encoders

2016-06-07 Thread Frediano Ziglio
Note that in this patch glz_drawable_count is removed. This was used only to print some statistics. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 69 server/dcc-encoders.h| 18 +++-- server/dcc.c | 17 +-

[Spice-devel] [PATCH 17/30] Make dcc_compress_image_glz independent to DisplayChannelClient

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index 1b6a089..273789a 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -697,15 +697,17 @@ static const LzImageType bi

[Spice-devel] [PATCH 06/30] Move dcc_compress_image_quic to dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 76 +++ server/dcc-encoders.h | 10 +++ server/dcc.c | 73 - server/dcc.h | 7 - 4 files changed, 86 insertions(+),

[Spice-devel] [PATCH 14/30] More encapsulation for dcc_encoders_free

2016-06-07 Thread Frediano Ziglio
Encoders function should not use DisplayChannelClient Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 3 +-- server/dcc-encoders.h | 2 +- server/dcc.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index a

[Spice-devel] [PATCH 18/30] Move dcc_compress_image_glz to dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 134 + server/dcc-encoders.h | 6 ++ server/dcc.c | 148 -- 3 files changed, 140 insertions(+), 148 deletions(-) diff --git a/server/d

[Spice-devel] [PATCH 12/30] Move dcc_compress_image_lz4 to dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 50 + server/dcc-encoders.h | 3 +++ server/dcc.c | 52 --- 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/server/

[Spice-devel] [PATCH 19/30] Encapsulate some data in dcc-encoders

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 60 ++-- server/dcc-encoders.h| 33 ++ server/display-channel.c | 13 +++ server/display-channel.h | 5 4 files changed, 63 insertions(+), 48 deletio

[Spice-devel] [PATCH 09/30] Encapsulate jpeg information in EncodersData structure

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 16 server/dcc-encoders.h | 5 + server/dcc.c | 28 server/dcc.h | 3 --- 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/server/dcc-encoders.c b/serve

[Spice-devel] [PATCH 04/30] Move marshalling code from dcc-encoders to dcc-send

2016-06-07 Thread Frediano Ziglio
No reasons why dcc-encoders should know about marshalling. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 20 server/dcc-encoders.h | 5 - server/dcc-send.c | 20 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/serve

[Spice-devel] [PATCH 13/30] Encapsulate zlib information in EncodersData structure

2016-06-07 Thread Frediano Ziglio
This change is less clean the other similar patches as zlib and glz require more steps. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 18 +- server/dcc-encoders.h | 5 + server/dcc.c | 4 ++-- server/dcc.h | 5 - 4 files changed, 16 inser

[Spice-devel] [PATCH 07/30] Encapsulate lz information in EncodersData structure

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 30 -- server/dcc-encoders.h | 3 +++ server/dcc.c | 23 +-- server/dcc.h | 2 -- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/server/dcc-encoders.c b

[Spice-devel] [PATCH 10/30] Move dcc_compress_image_jpeg to dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 127 ++ server/dcc-encoders.h | 4 ++ server/dcc.c | 127 -- 3 files changed, 131 insertions(+), 127 deletions(-) diff --git a/ser

[Spice-devel] [PATCH 11/30] Encapsulate lz4 information in EncodersData structure

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 16 server/dcc-encoders.h | 5 + server/dcc.c | 16 +--- server/dcc.h | 4 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encod

[Spice-devel] [PATCH 15/30] Move some glz fields to EncodersData

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 99 +++- server/dcc-encoders.h| 22 +++ server/dcc-send.c| 10 ++--- server/dcc.c | 45 +++--- server/dcc.h | 4 -- server/display

[Spice-devel] [PATCH 00/30] Better encapsulation of image encoding stuff

2016-06-07 Thread Frediano Ziglio
Hi, after the discussion and tests to reduce typedef mess I realized the code lack some proper encapsulation. In DisplayChannel there are multiple files to handle different stuff but all code needs to know all structures and basically include all stuff. Looking at code one stuff that could/should

[Spice-devel] [PATCH 01/30] Do not release too much drawables

2016-06-07 Thread Frediano Ziglio
Accumulate counter, do not reset for each client. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c| 5 ++--- server/dcc-encoders.h| 3 ++- server/display-channel.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c

[Spice-devel] [PATCH 03/30] Add compress_buf_free function

2016-06-07 Thread Frediano Ziglio
dcc-encoders should be in change of allocate and free the structure don't put internal assumptions (which functions are used for memory management) in different files. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.h | 5 + 1 file changed, 5 insertions(+) diff --git a/server/dcc-enc

[Spice-devel] [PATCH 05/30] Encapsulate quic information in a new EncodersData structure

2016-06-07 Thread Frediano Ziglio
Start putting all encoding code into dcc-encoders.c. Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 27 ++- server/dcc-encoders.h | 6 ++ server/dcc.c | 14 +++--- server/dcc.h | 5 +++-- 4 files changed, 30 insertions(+), 22 de

[Spice-devel] [PATCH 08/30] Move dcc_compress_image_lz to dcc-encoders.c

2016-06-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-encoders.c | 80 +++ server/dcc-encoders.h | 5 server/dcc.c | 66 -- 3 files changed, 85 insertions(+), 66 deletions(-) diff --git a/server/dcc-en

Re: [Spice-devel] [spice-gtk v2] sasl: fix SASL GSSAPI by allowing NULL username

2016-06-07 Thread Pavel Grunt
Hi, On Mon, 2016-06-06 at 18:04 +0200, Fabiano Fidêncio wrote: > From: Alexander Bokovoy > > SASL GSSAPI module will try to negotiate authentication based on the > credentials in the default credentials cache. It does not matter if > SPICE knows username or not as SASL negotiation will pass thro