Re: [Spice-devel] [PATCH] macros: do not use more type safe CONTAINEROF version if not requested

2016-03-01 Thread Christophe Fergeau
On Tue, Mar 01, 2016 at 02:41:32PM -0500, Frediano Ziglio wrote: > > > > On Tue, Mar 01, 2016 at 09:44:39AM +, Frediano Ziglio wrote: > > > This prevents incompatibility if users (like old spice-server/spice-gtk) > > > are not expected to have this additional restriction. > > > > > > Signed-o

Re: [Spice-devel] [PATCH v6 14/14] UsbDeviceManager: Make synchronous disconnect method static

2016-03-01 Thread Jonathon Jongsma
I apologize for not responding to your questions about deprecation earlier. Basically, if you look at spice-channel.h you can see an example of how to deprecate this function instead of removing it from the API. Basically: #ifndef SPICE_DISABLE_DEPRECATED SPICE_DEPRECATED void spice_channel_set_c

Re: [Spice-devel] [PATCH v6 13/14] UsbDeviceWidget: Use asynchronous disconnect API

2016-03-01 Thread Jonathon Jongsma
On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > Signed-off-by: Kirill Moizik > Signed-off-by: Dmitry Fleytman > --- > src/usb-device-widget.c | 33 - > 1 file changed, 24 insertions(+), 9 deletions(-) > > diff --git a/src/usb

Re: [Spice-devel] [PATCH] macros: do not use more type safe CONTAINEROF version if not requested

2016-03-01 Thread Frediano Ziglio
> > On Tue, Mar 01, 2016 at 09:44:39AM +, Frediano Ziglio wrote: > > This prevents incompatibility if users (like old spice-server/spice-gtk) > > are not expected to have this additional restriction. > > > > Signed-off-by: Frediano Ziglio > > --- > > spice/macros.h | 3 ++- > > 1 file chang

Re: [Spice-devel] [PATCH v6 12/14] UsbDeviceWidget: Consider asynchronous redirection flows

2016-03-01 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > Gray out redirection controls while there are > asynchronous redirection flows in progress. > > Signed-off-by: Kirill Moizik > Signed-off-by: Dmitry Fleytman > --- > src/usb-devic

Re: [Spice-devel] [PATCH v6 11/14] UsbDeviceWidget: Show info bar during redirection flows

2016-03-01 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > Signed-off-by: Kirill Moizik > Signed-off-by: Dmitry Fleytman > --- > src/map-file | 1 + > src/usb-device-manager.c | 23 +++ > src/usb-device-man

Re: [Spice-devel] [PATCH v6 10/14] usbredir: Disconnect USB device asynchronously

2016-03-01 Thread Jonathon Jongsma
On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > Signed-off-by: Kirill Moizik > Signed-off-by: Dmitry Fleytman > --- > src/channel-usbredir.c | 38 +++--- > 1 file changed, 31 insertions(+), 7 deletions(-) > > diff --git a/src

Re: [Spice-devel] [PATCH v6 09/14] UsbDeviceManager: Track device disconnection operations in progress

2016-03-01 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > During device disconnection, unwanted hotplug events may happen. > We need to ignore those therefore we track disconnection operations > in progress. > > See also comment to commit >

Re: [Spice-devel] [PATCH v6 08/14] UsbDeviceManager: Implement asynchronous disconnect device flow

2016-03-01 Thread Jonathon Jongsma
As I mentioned in the previous patch, I'd really like this rebased on Fabiano's GTask work. I understand that it's annoying to have to rebase this stuff, so I'm willing to do it for you if you'd prefer. Another comment below On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kiril

Re: [Spice-devel] [PATCH v6 07/14] UsbDeviceManager: Track device redirection operations in progress

2016-03-01 Thread Jonathon Jongsma
On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > During device connection, unwanted hotplug events may happen. > We need to ignore those therefore we track redirection operations > in progress. > > See also comment to commit > "Do not process USB hotplug events

Re: [Spice-devel] connection lost after 1 Hour

2016-03-01 Thread Frediano Ziglio
Or you can try this http://libkeepalive.sourceforge.net/ Frediano > > Hi Nikhil, > > your issue seems to be network inactivity. This will be resolved in the > next release of spice-server by use of tcp_keepalive but for the time > being, the only cure is to use the VM from time to time so that

Re: [Spice-devel] connection lost after 1 Hour

2016-03-01 Thread David Jaša
Hi Nikhil, your issue seems to be network inactivity. This will be resolved in the next release of spice-server by use of tcp_keepalive but for the time being, the only cure is to use the VM from time to time so that the TCP connections don't get closed (NAT records don't expire, ...) David On P

Re: [Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

2016-03-01 Thread Frediano Ziglio
> > Hey, > > On Mon, Feb 29, 2016 at 01:34:32PM -0600, Jonathon Jongsma wrote: > > Frediano and I talked about this last week and basically agreed on renaming > > RedDispatcher to RedQXL. A little more justification for the rename: > > > > There are already a couple other types with Dispatcher i

[Spice-devel] How to adapt keymaps for spice-html5

2016-03-01 Thread Eric Grammatico
Hello There, I am currently testing spice-html5. I find it very promessing and I'd like to give a hand if possible. I am currently experiencing an irritating issue with key mapping. I win to have French keymap implemented, but it seems most of extended keys are either not defined or miss defin

[Spice-devel] spicy client only renders first frame?

2016-03-01 Thread Rafael Send
Hello- I've built spice-gtk-3 from spice-space.org on tinycore linux (64-bit). For this, I also had to built the server, the protocol and qemu itself with spice support; all of which seem to work fine (and things work great in SDL mode). However, when I start the spicy client and connect to the VM

[Spice-devel] How do I use Spice?

2016-03-01 Thread Matthew
Hello, I know you have multiple PDFs on your website about how to use Spice. All of it is confusing to me, and I have a lot of questions. - Is this a virtual desktop? - Is it free? - How to I set up a desktop to connect to? - Does the Chromebook version work? - Can I add my own pro

Re: [Spice-devel] [PATCH] Add utility to help redirecting output from remote-viewer/virt-viewer

2016-03-01 Thread Frediano Ziglio
> > Hi > > - Original Message - > > These utility use some trick to use console even if they are GUI > > application (not supposed to have a console by default). > > This make output redirection harder as output by default will tend > > to go to console of parent process instead of using

Re: [Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

2016-03-01 Thread Christophe Fergeau
Hey, On Mon, Feb 29, 2016 at 01:34:32PM -0600, Jonathon Jongsma wrote: > Frediano and I talked about this last week and basically agreed on renaming > RedDispatcher to RedQXL. A little more justification for the rename: > > There are already a couple other types with Dispatcher in their names: >

Re: [Spice-devel] [PATCH] macros: do not use more type safe CONTAINEROF version if not requested

2016-03-01 Thread Christophe Fergeau
On Tue, Mar 01, 2016 at 09:44:39AM +, Frediano Ziglio wrote: > This prevents incompatibility if users (like old spice-server/spice-gtk) > are not expected to have this additional restriction. > > Signed-off-by: Frediano Ziglio > --- > spice/macros.h | 3 ++- > 1 file changed, 2 insertions(+)

Re: [Spice-devel] [PATCH v6 06/14] usbredir: Spawn a different thread for device redirection flow

2016-03-01 Thread Jonathon Jongsma
On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > On Windows when using usbdk, opening and closing USB device handle, > i.e. calling libusb_open()/libusb_unref_device() can block for a few > seconds (3-5 second more specifically on patch author's HW). > > libusb

[Spice-devel] [client v10 24/27] spice-gtk: Add a GStreamer video decoder for MJPEG, VP8 and h264

2016-03-01 Thread Francois Gouget
This decoder lets GStreamer handle the buffering and scheduling of thei frame decoding and display. Signed-off-by: Francois Gouget --- configure.ac | 26 ++- src/Makefile.am| 8 + src/channel-display-gst.c | 432 + src/cha

[Spice-devel] [qxl v10 18/27] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2016-03-01 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] [client v10 20/27] spice-gtk: Enable adding alternative video decoders

2016-03-01 Thread Francois Gouget
This replaces the original channel-display-mjpeg API with a VideoDecoder base class which can be reimplemented by other decoders. Furthermore this moves the MJPEG-specific state information from the display_stream struct to a derived class of VideoDecoder. Signed-off-by: Francois Gouget --- src/

[Spice-devel] [spice v10 17/27] server: Add support for GStreamer 0.10

2016-03-01 Thread Francois Gouget
configure will use GStreamer 1.0 if present and fall back to GStreamer 0.10 otherwise. Signed-off-by: Francois Gouget --- configure.ac | 36 ++ server/Makefile.am | 8 server/gstreamer-encoder.c | 114 - server

[Spice-devel] [client v10 27/27] spice-gtk: Use decodebin as a fallback for the GStreamer video decoder

2016-03-01 Thread Francois Gouget
This means future video codecs may be supported automatically. One can also force usage of decodebin by setting $SPICE_GSTVIDEO_AUTO. Signed-off-by: Francois Gouget --- src/channel-display-gst.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/channel-dis

[Spice-devel] [spice v10 16/27] server: Respect the GStreamer encoder's valid bit rate range

2016-03-01 Thread Francois Gouget
Otherwise it may get wrapped to a much lower value than intended. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 84 ++ 1 file changed, 63 insertions(+), 21 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encod

[Spice-devel] [client v10 25/27] spice-gtk: Allow disabling support for the builtin MJPEG video decoder

2016-03-01 Thread Francois Gouget
This makes it possible to test the GStreamer video decoder with MJPEG streams. Signed-off-by: Francois Gouget --- configure.ac | 11 +++ src/Makefile.am| 7 ++- src/channel-display-priv.h | 2 ++ src/channel-display.c | 5 + 4 files changed, 24 i

[Spice-devel] [client v10 21/27] spice-gtk: Optimize handling of the decoded frame buffer

2016-03-01 Thread Francois Gouget
The MJPEG decoder does not need a zero-filled buffer. Signed-off-by: Francois Gouget --- src/channel-display-mjpeg.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/channel-display-mjpeg.c b/src/channel-display-mjpeg.c index 78e3d5a..6271cfb 100644 --- a/src/chan

[Spice-devel] [client v10 26/27] spice-gtk: Probe GStreamer before advertising support for a codec

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- src/channel-display-gst.c | 17 +++-- src/channel-display-priv.h | 4 ++-- src/channel-display.c | 21 + 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c

[Spice-devel] [qxl v10 19/27] Xspice: Add --video-codecs to specify encoder and codec preferences

2016-03-01 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] [client v10 22/27] spice-gtk: Rename num_drops_on_receive to arrive_late_count.

2016-03-01 Thread Francois Gouget
Starting with the next patch the frmae may not get dropped. Signed-off-by: Francois Gouget --- src/channel-display-priv.h | 2 +- src/channel-display.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h index

[Spice-devel] [spice v10 15/27] server: Give up after a while if GStreamer cannot handle the video

2016-03-01 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 | 59 -- 1 f

[Spice-devel] [client v10 23/27] spice-gtk: Let the video decoder queue, schedule and drop the frames

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- src/channel-display-mjpeg.c | 141 --- src/channel-display-priv.h | 10 ++- src/channel-display.c | 201 +++- 3 files changed, 188 insertions(+), 164 deletions(-) diff --git a/src/chann

[Spice-devel] [spice v10 13/27] server: Shape the bit rate of the GStreamer codecs output

2016-03-01 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 v10 14/27] server: Adjust the GStreamer encoder bit rate to the network

2016-03-01 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 v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- In theory this could be needed by the next patch. server/red-parse-qxl.h | 4 ++-- server/red-worker.c| 7 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/red-parse-qxl.h b/server/red-parse-qxl.h index 9c30572..220a096 100644

[Spice-devel] [spice v10 08/27] server: Add VP8 support to the GStreamer video encoder

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- Changed the VP8 encoder parameters based on the realtime profile to improve performance. The patch does not use the realtime profile directly because profiles don't seem to be supported from 'gst-launch' pipeline strings yet. Furthermore it turns out that it

[Spice-devel] [spice v10 12/27] server: Add h264 support to the GStreamer video encoder

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 17 - server/reds.c | 4 +++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c index 0a63758..f3fef41 100644 --- a/server/gstreamer-

[Spice-devel] [spice v10 11/27] server: Avoid copying the input frame in the GStreamer encoder

2016-03-01 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 v10 09/27] server: Let the video encoder manage the compressed buffer

2016-03-01 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 | 25 +++--- se

[Spice-devel] [spice v10 07/27] replay: Add an option to change video codec

2016-03-01 Thread Pavel Grunt
Signed-off-by: Francois Gouget --- 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 f3b670f..5bbca5e 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -284,7 +284,7 @@ int main

[Spice-devel] [spice v10 06/27] server: Let the administrator pick the video encoder and codec

2016-03-01 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'. The

[Spice-devel] [spice v10 05/27] server: Check the client video codec capabilities

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget --- server/dcc.c| 5 - server/dcc.h| 2 +- server/stream.c | 41 + 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index d4a6c7c..df650c9 100644 --- a/server/dcc.c +++

[Spice-devel] [spice v10 04/27] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-03-01 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 v10 03/27] server: Enable adding alternative MJPEG video encoders

2016-03-01 Thread Francois Gouget
This replaces the original mjpeg_encoder API with a VideoEncoder base class which can be reimplemented by other encoders. This also renames the members and enums from mjpeg_* to video_*. Signed-off-by: Francois Gouget --- server/Makefile.am | 2 +- server/dcc-send.c | 25 se

[Spice-devel] [spice v10 02/27] server: Store the opaque pointer in VideoEncoderRateControlCbs

2016-03-01 Thread Francois Gouget
It has the same lifetime as the corresponding structure so this simplifies keeping track of it. Signed-off-by: Francois Gouget --- server/mjpeg-encoder.c | 13 + server/mjpeg-encoder.h | 4 +++- server/stream.c| 5 +++-- 3 files changed, 11 insertions(+), 11 deletions(-) d

[Spice-devel] [protocol v10 01/27] protocol: Add support for the VP8 and h264 video codecs

2016-03-01 Thread Francois Gouget
Clients that support multiple codecs must advertise the SPICE_DISPLAY_CAP_MULTI_CODEC capability and one SPICE_DISPLAY_CAP_CODEC_XXX per supported codec. Signed-off-by: Francois Gouget --- spice.proto | 2 ++ spice/enums.h| 2 ++ spice/protocol.h | 4 3 files changed, 8 insertions(

[Spice-devel] [PATCH v10 00/27] Add GStreamer support for video streaming

2016-03-01 Thread Francois Gouget
This patch series adds support for using GStreamer to encode and decode the video streams, adding support for VP8 and h264 codecs. There have been quite a few changes since the last revision of this patchset. * The VP8 encoding performance has been improved. * The zero-copy code for the input f

Re: [Spice-devel] [PATCH v6 03/14] win-usb-dev: Track device redirection operations in progress

2016-03-01 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Sun, 2016-02-28 at 11:54 +0200, Dmitry Fleytman wrote: > From: Kirill Moizik > > This commit introduces redirecting property of GUdevClient > > This property indicates when a redirection operation > is in progress on a device. It's set back to FALSE > once the de

Re: [Spice-devel] [PATCH] Add utility to help redirecting output from remote-viewer/virt-viewer

2016-03-01 Thread Marc-André Lureau
- Original Message - > These utility use some trick to use console even if they are GUI > application (not supposed to have a console by default). > This make output redirection harder as output by default will tend > to go to console of parent process instead of using redirected output.

Re: [Spice-devel] [PATCH] Add utility to help redirecting output from remote-viewer/virt-viewer

2016-03-01 Thread Victor Toso
Hi, On Tue, Mar 01, 2016 at 01:29:13PM +, Frediano Ziglio wrote: > These utility use some trick to use console even if they are GUI > application (not supposed to have a console by default). > This make output redirection harder as output by default will tend > to go to console of parent proce

Re: [Spice-devel] [PATCH] Add utility to help redirecting output from remote-viewer/virt-viewer

2016-03-01 Thread Marc-André Lureau
Hi - Original Message - > These utility use some trick to use console even if they are GUI > application (not supposed to have a console by default). > This make output redirection harder as output by default will tend > to go to console of parent process instead of using redirected output

[Spice-devel] [PATCH] Add utility to help redirecting output from remote-viewer/virt-viewer

2016-03-01 Thread Frediano Ziglio
These utility use some trick to use console even if they are GUI application (not supposed to have a console by default). This make output redirection harder as output by default will tend to go to console of parent process instead of using redirected output. This utility avoid remote-viewer/virt-v

Re: [Spice-devel] [vdagent-linux] buildsys: Support libsystemd in addition to libsystemd-login

2016-03-01 Thread Fabiano Fidêncio
On Tue, Mar 1, 2016 at 11:59 AM, Christophe Fergeau wrote: > Since systemd 209, the various systemd helper libraries are gathered in > a single libsystemd, and libsystemd-login is only built when systemd is > built with compat libraries support. Since commit > https://github.com/systemd/systemd/co

[Spice-devel] [vdagent-linux] buildsys: Support libsystemd in addition to libsystemd-login

2016-03-01 Thread Christophe Fergeau
Since systemd 209, the various systemd helper libraries are gathered in a single libsystemd, and libsystemd-login is only built when systemd is built with compat libraries support. Since commit https://github.com/systemd/systemd/commit/4de282c "build-sys: drop libsystemd-{id128,daemon,login,journal

[Spice-devel] [PATCH] macros: do not use more type safe CONTAINEROF version if not requested

2016-03-01 Thread Frediano Ziglio
This prevents incompatibility if users (like old spice-server/spice-gtk) are not expected to have this additional restriction. Signed-off-by: Frediano Ziglio --- spice/macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I defined a new SPICE_CONTAINEROF_MORESAFE macro to enable thi