Re: [Spice-devel] spice-xpi deprecated soon

2016-04-19 Thread Yedidyah Bar David
On Tue, Apr 19, 2016 at 5:16 PM, RK RK wrote: > Thanks for your reply Christophe, I am using oVirt 3.6.3 in my production > environment with 250 Virtual Desktops accessed from within the office > premises. > > Our users will have thin client devices running trimmed down version of > CentOS 7 with

Re: [Spice-devel] [PATCH 16/16] audio: Remove global 'playback_state' variable

2016-04-19 Thread Jonathon Jongsma
Commit log should say "playback_compression" instead of "playback_state". Otherwise looks find. Acked-by: Jonathon Jongsma On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > This variable belongs to SpiceServerConfig rather than being a static > global v

Re: [Spice-devel] [PATCH 15/16] Remove dead code in reds_fill_channels()

2016-04-19 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > channels_info->num_of_channels is assigned, its value is not used, and > then it's assigned a different value. The first assignment can be > removed. > --- > server/reds.c | 1

Re: [Spice-devel] [PATCH 14/16] Improve Reds/RedMainChannel interface

2016-04-19 Thread Jonathon Jongsma
On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > Instead of exporting 2 methods to get number of channels, and to fill > channel information, and use that from the main channel code, it's > better to do everything in one go in reds.c, and call that single

Re: [Spice-devel] [PATCH 13/16] Add _config_ to SpiceServerConfig accessors

2016-04-19 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > --- > server/inputs-channel.c | 8 > server/reds.c | 8 > server/reds.h | 2 +- > 3 files changed, 9 insertions(+), 9 deletions(-) > > di

Re: [Spice-devel] [PATCH 12/16] Mark unused public API methods/code as deprecated

2016-04-19 Thread Jonathon Jongsma
On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > Also mark one probably unused code block with a g_critical() > --- > server/display-channel.c | 3 +++ > server/sound.c | 1 + > server/spice-migration.h | 6 +++--- > server/spice-server.h

Re: [Spice-devel] [PATCH 11/16] Add SpiceServerConfig

2016-04-19 Thread Jonathon Jongsma
On Tue, 2016-04-19 at 11:00 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > This wraps/groups the various parameters that can be set by spice-server > users through the spice_server_set_xxx public API. > --- > server/reds-private.h | 34 +- > server/reds.c | 327 ++

Re: [Spice-devel] [PATCH 05/16] Use weak gobject ref instead of reds_on_char_device_state_destroy

2016-04-19 Thread Jonathon Jongsma
On Tue, 2016-04-19 at 10:59 -0500, Jonathon Jongsma wrote: > From: Christophe Fergeau > > RedCharDevice implementation had to callback into reds.c in order to let > it know a char device was being destroyed. Now that RedCharDevice is a > gobject, a weak reference can be used instead allowing to r

Re: [Spice-devel] [PATCH] spice_server_char_device_add_interface: remove local 'reds' variable

2016-04-19 Thread Jonathon Jongsma
Sorry, ignore this patch. It was intended to be squashed into "[PATCH 05/16] Use weak gobject ref instead of reds_on_char_device_state_destroy" On Tue, 2016-04-19 at 15:08 -0500, Jonathon Jongsma wrote: > The local 'reds' variable shadows the 'reds' function argument and it is > the exact same in

[Spice-devel] [PATCH] spice_server_char_device_add_interface: remove local 'reds' variable

2016-04-19 Thread Jonathon Jongsma
The local 'reds' variable shadows the 'reds' function argument and it is the exact same instance. --- server/reds.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/reds.c b/server/reds.c index 60d8903..327711d 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3238,11 +3238,8 @@ stati

[Spice-devel] [PATCH 15/16] Remove dead code in reds_fill_channels()

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau channels_info->num_of_channels is assigned, its value is not used, and then it's assigned a different value. The first assignment can be removed. --- server/reds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/server/reds.c b/server/reds.c index 556d0cb..337d90b 100

[Spice-devel] [PATCH 11/16] Add SpiceServerConfig

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau This wraps/groups the various parameters that can be set by spice-server users through the spice_server_set_xxx public API. --- server/reds-private.h | 34 +- server/reds.c | 327 -- 2 files changed, 186 insert

[Spice-devel] [PATCH 12/16] Mark unused public API methods/code as deprecated

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau Also mark one probably unused code block with a g_critical() --- server/display-channel.c | 3 +++ server/sound.c | 1 + server/spice-migration.h | 6 +++--- server/spice-server.h| 12 +++- 4 files changed, 14 insertions(+), 8 deletions(-) diff

[Spice-devel] [PATCH 08/16] char device: use _reset_dev_instance() to set 'sin'

2016-04-19 Thread Jonathon Jongsma
Internally, use the method to set the 'sin' member variable so that we don't have to duplicate the g_object_notify() calls, and there are consistent debug statements whenever this value is modified. This also means that we need to handle NULL arguments to this function. --- server/char-device.c |

[Spice-devel] [PATCH 09/16] Rename PipeItem to RedPipeItem

2016-04-19 Thread Jonathon Jongsma
Following internal type naming conventions --- server/cache-item.h | 2 +- server/cache-item.tmpl.c | 2 +- server/char-device.c | 20 +- server/char-device.h | 6 +-- server/cursor-channel.c | 22 +-- server/dcc-send.c| 22 +-- server/dcc.c

[Spice-devel] [PATCH 06/16] char-device: notify when device instance is changed

2016-04-19 Thread Jonathon Jongsma
Since the device instance ("sin") is a gobject property, we should make sure to notify when it changes, particularly since we do some initialization in response to the "notify::sin" signal. --- server/char-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/char-device.c b/server

[Spice-devel] [PATCH 16/16] audio: Remove global 'playback_state' variable

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau This variable belongs to SpiceServerConfig rather than being a static global variable hidden in sound.c --- server/reds.c | 8 server/reds.h | 2 ++ server/sound.c | 13 +++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/server/red

[Spice-devel] [PATCH 07/16] char device: use 'device' rather than 'state' for var names

2016-04-19 Thread Jonathon Jongsma
Since the type name was changed, use variable names / debug statements that are consistent with the new name. --- server/char-device.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/char-device.c b/server/char-device.c index 90eb3d4..799a818 10064

[Spice-devel] [PATCH 14/16] Improve Reds/RedMainChannel interface

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau Instead of exporting 2 methods to get number of channels, and to fill channel information, and use that from the main channel code, it's better to do everything in one go in reds.c, and call that single method from the main channel code. --- server/main-channel.c | 4 +-

[Spice-devel] [PATCH 05/16] Use weak gobject ref instead of reds_on_char_device_state_destroy

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau RedCharDevice implementation had to callback into reds.c in order to let it know a char device was being destroyed. Now that RedCharDevice is a gobject, a weak reference can be used instead allowing to remove that coupling. --- server/char-device.c | 2 -- server/reds.c

[Spice-devel] [PATCH 13/16] Add _config_ to SpiceServerConfig accessors

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau --- server/inputs-channel.c | 8 server/reds.c | 8 server/reds.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/inputs-channel.c b/server/inputs-channel.c index d1af9cf..da26cf6 100644 --- a/server/inp

[Spice-devel] [PATCH 04/16] Use GQueue for RedCharDevice::send_queue

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau There was an extra RedCharDeviceMsgToClientItem type whose only purpose was to manage a linked list of items to send. GQueue has the same purpose as this type in addition to being generic. As the length of the send queue is tracked, a GQueue is more appropriate than a GLi

[Spice-devel] [PATCH 03/16] Remove use of opaque from vdi_port_read_one_msg_from_device

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau We can get 'reds' from the RedCharDevice accessible from the SpiceCharDeviceInstance passed as an argument. Acked-by: Pavel Grunt Acked-by: Frediano Ziglio --- server/reds.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/reds.c b/serv

[Spice-devel] [PATCH 00/16] Rebased patches from refactory branch (April 19)

2016-04-19 Thread Jonathon Jongsma
A new set of patches, included all un-acked patches from last set. Christophe Fergeau (10): Replace RedCharDevice::on_free_self_token with a signal Remove use of opaque from vdi_port_read_one_msg_from_device Use GQueue for RedCharDevice::send_queue Use weak gobject ref instead of reds_on_c

[Spice-devel] [PATCH 02/16] Replace RedCharDevice::on_free_self_token with a signal

2016-04-19 Thread Jonathon Jongsma
From: Christophe Fergeau It's more natural to do things this way with glib, and this allows to remove some coupling between Reds and RedCharDeviceVDIPort. Before this commit, the RedCharDeviceVDIPort has to provide a on_free_self_token() because Reds needs to know about it. With a signal, RedChar

[Spice-devel] [PATCH 01/16] UpgradeItem: use base PipeItem for refcounting

2016-04-19 Thread Jonathon Jongsma
No need to re-implement refcounting in this subclass. However, I needed to add a new 'dcc' member to UpgradeItem to be able to unref properly. --- Change since last patch: take ref on dcc server/dcc.c | 18 +- server/display-channel.c | 4 +--- server/display-channel.

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-19 Thread Fabiano Fidêncio
On Tue, Apr 19, 2016 at 4:11 PM, Fabiano Fidêncio wrote: > On Tue, Apr 19, 2016 at 4:00 PM, Frediano Ziglio wrote: >>> >>> On Tue, Apr 19, 2016 at 3:28 PM, Pavel Grunt wrote: >>> > Ack, I am going to push it. >>> >>> Do we really need this patch upstream? >>> It's a half-solution, at most, that

Re: [Spice-devel] spice-xpi deprecated soon

2016-04-19 Thread RK RK
I have attached the deprecation message screenshot for your reference. On Tue, Apr 19, 2016 at 7:46 PM, RK RK wrote: > Thanks for your reply Christophe, I am using oVirt 3.6.3 in my production > environment with 250 Virtual Desktops accessed from within the office > premises. > > Our users will

Re: [Spice-devel] spice-xpi deprecated soon

2016-04-19 Thread RK RK
Thanks for your reply Christophe, I am using oVirt 3.6.3 in my production environment with 250 Virtual Desktops accessed from within the office premises. Our users will have thin client devices running trimmed down version of CentOS 7 with spice-xpi installed via yum. Please let me know if you ne

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-19 Thread Fabiano Fidêncio
On Tue, Apr 19, 2016 at 4:00 PM, Frediano Ziglio wrote: >> >> On Tue, Apr 19, 2016 at 3:28 PM, Pavel Grunt wrote: >> > Ack, I am going to push it. >> >> Do we really need this patch upstream? >> It's a half-solution, at most, that doesn't work on newer Windows. >> > > Are you referring to Window

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-19 Thread Frediano Ziglio
> > On Tue, Apr 19, 2016 at 3:28 PM, Pavel Grunt wrote: > > Ack, I am going to push it. > > Do we really need this patch upstream? > It's a half-solution, at most, that doesn't work on newer Windows. > Are you referring to Window 11? It works on Windows 10. Frediano > Also, a better commit m

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-19 Thread Fabiano Fidêncio
On Tue, Apr 19, 2016 at 3:28 PM, Pavel Grunt wrote: > Ack, I am going to push it. Do we really need this patch upstream? It's a half-solution, at most, that doesn't work on newer Windows. Also, a better commit message would be more than appreciated in case we really decide to have it upstream.

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-19 Thread Pavel Grunt
Ack, I am going to push it. Thanks, Pavel On Mon, 2016-04-18 at 14:55 +0100, Frediano Ziglio wrote: > From: Christophe Fergeau > > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1297640 > > Acked-by: Frediano Ziglio > --- >  src/virt-viewer-util.c | 7 +++ >  1 file changed, 7 inse

Re: [Spice-devel] [PATCH spice] sw-canvas: Get rid of unsused SW_CANVAS_IMAGE_CACHE

2016-04-19 Thread Pavel Grunt
Pushed, thanks On Tue, 2016-04-19 at 06:56 -0400, Frediano Ziglio wrote: > > > > > > See spice-common commit edac1b36b572cbd8988c44341185a9f51ea3eeb5 > > --- > >  server/sw-canvas.c | 2 -- > >  server/sw-canvas.h | 2 -- > >  2 files changed, 4 deletions(-) > > > > diff --git a/server/sw-canvas.

Re: [Spice-devel] [PATCH spice-common] Define canvas_fix_alignment when is used

2016-04-19 Thread Pavel Grunt
Thanks, pushed On Tue, 2016-04-19 at 13:08 +0200, Christophe Fergeau wrote: > Acked-by: Christophe Fergeau > > On Tue, Apr 19, 2016 at 12:35:22PM +0200, Pavel Grunt wrote: > > It is used in canvas_get_lz4() which is guarded by USE_LZ4, and > > in canvas_get_lz() which is guarded by SW_CANVAS_CAC

Re: [Spice-devel] [PATCH spice-common] Define canvas_fix_alignment when is used

2016-04-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Apr 19, 2016 at 12:35:22PM +0200, Pavel Grunt wrote: > It is used in canvas_get_lz4() which is guarded by USE_LZ4, and > in canvas_get_lz() which is guarded by SW_CANVAS_CACHE. > --- > common/canvas_base.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff -

Re: [Spice-devel] [PATCH spice] sw-canvas: Get rid of unsused SW_CANVAS_IMAGE_CACHE

2016-04-19 Thread Frediano Ziglio
> > See spice-common commit edac1b36b572cbd8988c44341185a9f51ea3eeb5 > --- > server/sw-canvas.c | 2 -- > server/sw-canvas.h | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/server/sw-canvas.c b/server/sw-canvas.c > index 29d89db..a1bd791 100644 > --- a/server/sw-canvas.c > +++ b/serve

[Spice-devel] [vdagent-linux v1 7/8] console-kit: include handler for dbus match

2016-04-19 Thread Victor Toso
At the moment we request to read signals on ConsoleKit.Seat interface but later on we will request to read signals on different interface so moving this to its own function helps. --- src/console-kit.c | 65 +++ 1 file changed, 51 insertions(+),

[Spice-devel] [vdagent-linux v1 1/8] session-info: introduce session_is_locked method

2016-04-19 Thread Victor Toso
Each session back-end can return this information to vdagentd when requested. The agent should use this on situations that should not work when session is locked such as file-transfer-start which is fixed by this patch. systemd-login is the only back-end implementing this function at the moment a

[Spice-devel] [vdagent-linux v1 4/8] console-kit: use standard name for session-info var

2016-04-19 Thread Victor Toso
Console-kit was the first back-end implement to gather session info. When systemd integration was implemented with logind, we introduced session-info struct to deal with different back-ends. The 'ck' var was not changed at the time but it seems right to do so. --- src/console-kit.c | 94 +

[Spice-devel] [vdagent-linux v1 6/8] console-kit: include signal handler function

2016-04-19 Thread Victor Toso
At the moment we are only reading the ActiveSessionChanged signal from ConsoleKit.Seat but in a later patch we will be reading a few more signals so it make sense to move this handler to its own function. --- src/console-kit.c | 100 -- 1 file ch

[Spice-devel] [PATCH spice] sw-canvas: Get rid of unsused SW_CANVAS_IMAGE_CACHE

2016-04-19 Thread Pavel Grunt
See spice-common commit edac1b36b572cbd8988c44341185a9f51ea3eeb5 --- server/sw-canvas.c | 2 -- server/sw-canvas.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/server/sw-canvas.c b/server/sw-canvas.c index 29d89db..a1bd791 100644 --- a/server/sw-canvas.c +++ b/server/sw-canvas.c @@ -18,6

[Spice-devel] [vdagent-linux v1 8/8] console-kit: implement session_is_locked

2016-04-19 Thread Victor Toso
We register to read the Lock, Unlock and IdleHintChanged signals from ConsoleKit.Session. The Lock/Unlock signals should be the right signals for the job but not all Desktop Managers implement its locking in a way that trigger those signals. That's why we double-check with IdleHintChanged signal th

[Spice-devel] [vdagent-linux v1 0/8] do not allow file transfer on locked session

2016-04-19 Thread Victor Toso
This series is about drag-and-drop in locked session. The issue itself is a bit of a corner case which could allow a 'malicious' user to copy files to the ~/Download folder of the user that is logged but with a locked session. I found this as a good opportunity to work a bit on the integration wit

[Spice-devel] [vdagent-linux v1 5/8] console-kit: save verbosity level for debugging

2016-04-19 Thread Victor Toso
--- src/console-kit.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/console-kit.c b/src/console-kit.c index a72d9c2..04437af 100644 --- a/src/console-kit.c +++ b/src/console-kit.c @@ -32,6 +32,7 @@ struct session_info { int fd; char *seat; char *active_session; +

[Spice-devel] [vdagent-linux v1 3/8] console-kit: use define for dbus paths

2016-04-19 Thread Victor Toso
This improves readability of all paths related to dbus methods. This patch only applies for interfaces and object paths, later one it is included for signals as well. --- src/console-kit.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/cons

[Spice-devel] [vdagent-linux v1 2/8] build-sys: console-kit with dbus as default

2016-04-19 Thread Victor Toso
Previous patch makes the agent depend on dbus-1 so we don't need to do extra check on console-kit. --- configure.ac | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index aa2ef9f..fc5943b 100644 --- a/configure.ac +++ b/configure.ac

[Spice-devel] [PATCH spice-common] Define canvas_fix_alignment when is used

2016-04-19 Thread Pavel Grunt
It is used in canvas_get_lz4() which is guarded by USE_LZ4, and in canvas_get_lz() which is guarded by SW_CANVAS_CACHE. --- common/canvas_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/canvas_base.c b/common/canvas_base.c index 45dd75f..114c1b9 100644 --- a/common/canvas_base.

Re: [Spice-devel] spice-xpi deprecated soon

2016-04-19 Thread Christophe Fergeau
On Tue, Apr 19, 2016 at 11:36:21AM +0530, RK RK wrote: > Hi Team, > > I have seen in https://bugs.freedesktop.org/enter_bug.cgi?product=Spice > that xpi-activex (Browser plugins (to be deprecated)). I cannot find the "to be deprecated" that you mention by looking at this page, or at the bug list

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Christophe Fergeau
On Tue, Apr 19, 2016 at 11:20:00AM +0200, Pavel Grunt wrote: > Yeah, but spice-common compiles fine. imo the problem lies in our usage > of server/sw-canvas.[ch]. SW_CANVAS_IMAGE_CACHE is defined but not used > anywhere. To me it looks like some leftover code from the old client > (spicec). Ah, I

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Pavel Grunt
On Tue, 2016-04-19 at 10:59 +0200, Francois Gouget wrote: > On Tue, 19 Apr 2016, Pavel Grunt wrote: > > > Hi Francois, > > > > what error did you get? The function is used in canvas_get_lz() > > and canvas_get_lz4(). > >   CC   sw-canvas.lo > In file included from ../spice-common/common/sw_c

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Francois Gouget
On Tue, 19 Apr 2016, Pavel Grunt wrote: > Hi Francois, > > what error did you get? The function is used in canvas_get_lz() > and canvas_get_lz4(). CC sw-canvas.lo In file included from ../spice-common/common/sw_canvas.c:29:0, from sw-canvas.c:22: ../spice-common/common/c

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

2016-04-19 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] [client v13 28/29] spice-gtk: Probe GStreamer before advertising support for a codec

2016-04-19 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

Re: [Spice-devel] Protocol extensions

2016-04-19 Thread David Jaša
Hi Thomas, Spice supports proxying over HTTP CONNECT method to achieve connecting to spice servers in DMZs or with private addresses from general internet. The spice client has to know the internal name/IP of the host system so you can use .vv file to abstract users from these details. Connection

[Spice-devel] [client v13 26/29] spice-gtk: Add a GStreamer video decoder for MJPEG, VP8 and h264

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac | 26 ++- src/Makefile.am| 8 + src/channel-display-gst.c | 433 + src/channel-display-priv.h | 6 + src/channel-display.c | 10 ++ 5 files changed, 482 insertions(+),

[Spice-devel] [client v13 25/29] spice-gtk: Let the video decoder queue, schedule and drop the frames

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

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

2016-04-19 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 v13 24/29] spice-gtk: Rename num_drops_on_receive to arrive_late_count

2016-04-19 Thread Francois Gouget
The frame may not get dropped once that's left up to video decoders. 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

[Spice-devel] [client v13 23/29] spice-gtk: Optimize handling of the decoded frame buffer

2016-04-19 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 c7e1c6f..927827b 100644 --- a/src/chan

[Spice-devel] [spice v13 19/29] server: Add support for GStreamer 0.10

2016-04-19 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 v13 18/29] server: Dynamically adjust the GStreamer encoder bitrate if possible

2016-04-19 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] [client v13 22/29] spice-gtk: Enable adding alternative video decoders

2016-04-19 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] [qxl v13 20/29] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2016-04-19 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] [qxl v13 21/29] Xspice: Add --video-codecs to specify encoder and codec preferences

2016-04-19 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] [spice v13 17/29] server: Respect the GStreamer encoder's valid bit rate range

2016-04-19 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 v13 16/29] server: Give up after a while if GStreamer cannot handle the video

2016-04-19 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 | 53 -- 1 f

[Spice-devel] [spice v13 15/29] server: Adjust the frame rate based on the GStreamer encoding time

2016-04-19 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 51ec4b8..9a16c18 100644 --- a/server/gstreamer-encoder.c +++ b/

[Spice-devel] [spice v13 14/29] server: Adjust the GStreamer encoder bit rate to the network

2016-04-19 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 v13 07/29] server: Add VP8 support to the GStreamer video encoder

2016-04-19 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 9904bc8..9bd

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

2016-04-19 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 v13 11/29] server: Avoid copying the input frame in the GStreamer encoder

2016-04-19 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 v13 09/29] server: Let the video encoder manage the compressed buffer

2016-04-19 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 v13 12/29] server: Add h264 support to the GStreamer video encoder

2016-04-19 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 6093431..1e98523 100644 --- a/configure.

[Spice-devel] [spice v13 10/29] server: Handle and recover from GStreamer encoding errors

2016-04-19 Thread Francois Gouget
This avoids getting stuck if the codec is buggy or fails to encode a frame for whatever reason (e.g. odd frame size). Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 105 ++--- 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a

[Spice-devel] [spice v13 08/29] server: Use the optimal number of threads for VP8 encoding

2016-04-19 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 9bd8ccb..6093431 100644 --- a/configure.ac +++ b/configure.ac @@ -

[Spice-devel] [spice v13 05/29] server: Let the administrator pick the video encoder and codec

2016-04-19 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 v13 06/29] replay: Add an option to change video codec

2016-04-19 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 7e4659b..025b20c 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -290,7 +290,7 @@ int main(int argc, char **argv) {

[Spice-devel] [spice v13 04/29] server: Check the client video codec capabilities

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget --- server/dcc-send.c | 3 ++- server/stream.c | 25 - 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/server/dcc-send.c b/server/dcc-send.c index 89ff199..9331e02 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Pavel Grunt
Hi Francois, what error did you get? The function is used in canvas_get_lz() and canvas_get_lz4(). Pavel On Tue, 2016-04-19 at 08:41 +0200, Francois Gouget wrote: > On Tue, 19 Apr 2016, Francois Gouget wrote: > > > Signed-off-by: Francois Gouget > > --- > > > > I don't know if this is right b

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

2016-04-19 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 v13 02/29] server: Enable adding alternative MJPEG video encoders

2016-04-19 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 v13 01/29] server: Correctly handle and trace stream report errors

2016-04-19 Thread Francois Gouget
We may get stream reports after the stream has been closed, and even, in extreme cases, after a new stream has started reusing the same stream id. Neither case should cause the server to crash. So restore dcc_handle_stream_report() to how it was before being moved to dcc.c. Signed-off-by: Francois

[Spice-devel] [spice v13 00/29] Add GStreamer support for video streaming

2016-04-19 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. As before the patches can also be grabbed from the gst branch of the repositories below: spice: https://github.com/fgouget/spice spice-gtk: https://gi