Re: [Spice-devel] [PATCH spice-server] spicevmc: Avoid computing some variable value if not necessary

2017-01-31 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2017-01-26 at 15:31 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/spicevmc.c | 17 - >  1 file changed, 8 insertions(+), 9 deletions(-) > > diff --git a/server/spicevmc.c b/server/spicevmc.c > index 89249b2..9bc

[Spice-devel] [PATCH] Don't close all but one display during reboot.

2017-01-31 Thread Jonathon Jongsma
When a guest is rebooted, the QXL driver gets unloaded at some point in the reboot process. When the driver is unloaded, the spice server sets a single flag to FALSE: RedWorker::driver_cap_monitors_config. This flag indicates whether the driver is capable of sending its own monitors config messages

Re: [Spice-devel] wss forced on spice.html

2017-01-31 Thread Jeremy White
Hi Cory, On 01/29/2017 04:38 PM, Cory Schwartz wrote: > Hi, > > I noticed on the example page > https://www.spice-space.org/spice-html5/spice.html > that you are unable to connect to a websocket where SSL is not > implemented. The reason for this is that the original site redirects > to https a

Re: [Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 12:25:00PM -0500, Frediano Ziglio wrote: > > > > On Tue, Jan 31, 2017 at 05:04:46PM +, Frediano Ziglio wrote: > > > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 > > > > Maybe it does reproduce it, maybe not... > > > > If you want a similar backt

Re: [Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-01-31 Thread Frediano Ziglio
> > On Tue, Jan 31, 2017 at 05:04:46PM +, Frediano Ziglio wrote: > > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 > > Maybe it does reproduce it, maybe not... > > If you want a similar backtrace, this is enough: > > int main(void) > { > SpiceCoreInterface *core =

Re: [Spice-devel] [spice-server 1/3] test_vdagent: Pass proper types to spice_server_add_interface

2017-01-31 Thread Frediano Ziglio
> > On Tue, Jan 31, 2017 at 07:45:44AM -0500, Frediano Ziglio wrote: > > Title should be test-vdagent (with dash). > > Thanks, fixed. > > > > > > > > > This is a revert of 93b4f4050^ and 93b4f4050. > > > For a SpiceCharDeviceInstance, the base interface must be a > > > SpiceCharDeviceInterface

Re: [Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 05:04:46PM +, Frediano Ziglio wrote: > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 Maybe it does reproduce it, maybe not... If you want a similar backtrace, this is enough: int main(void) { SpiceCoreInterface *core = basic_event_loop_init()

Re: [Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-01-31 Thread Frediano Ziglio
> > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 > > Signed-off-by: Frediano Ziglio If somebody can suggest a better name and comment would be great! > --- > server/tests/Makefile.am | 1 + > server/tests/test-interface-vdagent.c | 75 > ++

Re: [Spice-devel] [spice-server v2 2/2] gl: fix client mouse mode

2017-01-31 Thread Christophe Fergeau
Disregard this patch, I sent it by mistake. Christophe On Tue, Jan 31, 2017 at 05:48:39PM +0100, Christophe Fergeau wrote: > From: Marc-André Lureau > > Since 2.8, QEMU now longer creates QXL primary surfaces when using > GL. This change broke client-side mouse mode, because Spice server > reli

Re: [Spice-devel] [spice-server v2 1/2] Add some NULL checks to spice_server_remove_interface()

2017-01-31 Thread Frediano Ziglio
> > Currently, calling spice_server_remove_interface() twice in a row with > the same SPICE_INTERFACE_CHAR_DEVICE is going to cause a crash when > calling red_char_device_get_server(char_device->st); because > char_device->st will have been set to NULL by the first call. > > This commit adds a fe

[Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-01-31 Thread Frediano Ziglio
This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 Signed-off-by: Frediano Ziglio --- server/tests/Makefile.am | 1 + server/tests/test-interface-vdagent.c | 75 +++ 2 files changed, 76 insertions(+) create mode 100644 server/tests/

[Spice-devel] [spice-server v2 2/2] gl: fix client mouse mode

2017-01-31 Thread Christophe Fergeau
From: Marc-André Lureau Since 2.8, QEMU now longer creates QXL primary surfaces when using GL. This change broke client-side mouse mode, because Spice server relies on primary surface conditions. When GL is enabled, use GL scanout informations, similar to what red_qxl_get_allow_client_mouse() is

[Spice-devel] [spice-server v2 1/2] Add some NULL checks to spice_server_remove_interface()

2017-01-31 Thread Christophe Fergeau
Currently, calling spice_server_remove_interface() twice in a row with the same SPICE_INTERFACE_CHAR_DEVICE is going to cause a crash when calling red_char_device_get_server(char_device->st); because char_device->st will have been set to NULL by the first call. This commit adds a few sanity checks

Re: [Spice-devel] [spice-server] Add some NULL checks to spice_server_remove_interface()

2017-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 11:20:45AM -0500, Frediano Ziglio wrote: > > > > On Mon, Jan 30, 2017 at 01:26:01PM -0500, Frediano Ziglio wrote: > > > > if (strcmp(interface->type, SPICE_INTERFACE_TABLET) == 0) { > > > > SpiceTabletInstance *tablet = SPICE_CONTAINEROF(sin, > > > >

Re: [Spice-devel] [spice-server] Add some NULL checks to spice_server_remove_interface()

2017-01-31 Thread Frediano Ziglio
> > On Mon, Jan 30, 2017 at 01:26:01PM -0500, Frediano Ziglio wrote: > > > > > > Currently, calling spice_server_remove_interface() twice in a row with > > > the same SPICE_INTERFACE_CHAR_DEVICE is going to cause a crash when > > > calling red_char_device_get_server(char_device->st); because > >

Re: [Spice-devel] [spice-server] Add some NULL checks to spice_server_remove_interface()

2017-01-31 Thread Christophe Fergeau
On Mon, Jan 30, 2017 at 01:26:01PM -0500, Frediano Ziglio wrote: > > > > Currently, calling spice_server_remove_interface() twice in a row with > > the same SPICE_INTERFACE_CHAR_DEVICE is going to cause a crash when > > calling red_char_device_get_server(char_device->st); because > > char_device->

Re: [Spice-devel] [spice-server 1/3] test_vdagent: Pass proper types to spice_server_add_interface

2017-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 07:45:44AM -0500, Frediano Ziglio wrote: > Title should be test-vdagent (with dash). Thanks, fixed. > > > > > This is a revert of 93b4f4050^ and 93b4f4050. > > For a SpiceCharDeviceInstance, the base interface must be a > > SpiceCharDeviceInterface instance, not a SpiceB

Re: [Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 07:16:04AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > As there is a need to iterate over every encoder:codec pair and we do > > a check for every encoder and every codec, g_strsplit() is less > > complex and easier to follow. > > > > This change make

Re: [Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-01-31 Thread Victor Toso
Hi, On Tue, Jan 31, 2017 at 07:16:04AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > As there is a need to iterate over every encoder:codec pair and we do > > a check for every encoder and every codec, g_strsplit() is less > > complex and easier to follow. > > > > This change ma

Re: [Spice-devel] [PATCH 3/4] qxl-wddm-dod: Allow easy modification of fallback setting

2017-01-31 Thread Frediano Ziglio
> > Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio > --- > qxldod/QxlDod.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp > index 459fcb1..c107bd3 100755 > --- a/qxldod/QxlDod.cpp > +++ b/qxldod/QxlDod.cpp > @@

Re: [Spice-devel] [PATCH 2/4] qxl-wddm-dod: Discard meaningless copy of value

2017-01-31 Thread Frediano Ziglio
> > Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio > --- > qxldod/QxlDod.cpp | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp > index 46176f0..459fcb1 100755 > --- a/qxldod/QxlDod.cpp > +++ b/qxldod/QxlDod.cpp > @@ -4815,7 +4815,6

Re: [Spice-devel] [PATCH 1/4] qxl-wddm-dod: Startup case when OS does not supply frame buffer address

2017-01-31 Thread Frediano Ziglio
> > https://bugzilla.redhat.com/show_bug.cgi?id=1417448 > When the OS does not provide physical address of the frame buffer, > the driver retrieves it from allocated PCI resource for BAR0. > https://msdn.microsoft.com/en-us/library/hh451339(v=vs.85).aspx > In DxgkCbAcquirePostDisplayOwnership OS n

Re: [Spice-devel] [spice-server 1/3] test_vdagent: Pass proper types to spice_server_add_interface

2017-01-31 Thread Frediano Ziglio
Title should be test-vdagent (with dash). > > This is a revert of 93b4f4050^ and 93b4f4050. > For a SpiceCharDeviceInstance, the base interface must be a > SpiceCharDeviceInterface instance, not a SpiceBaseInterface instance, or > spice-server code will end up reading out of bounds. > > vmc_stat

Re: [Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-01-31 Thread Frediano Ziglio
> > From: Victor Toso > > As there is a need to iterate over every encoder:codec pair and we do > a check for every encoder and every codec, g_strsplit() is less > complex and easier to follow. > > This change makes much easier to extend the input which is currently a > list of tuples encoder:v

[Spice-devel] [spice-server v6 9/9] (RFC) reds: add support to priority for video codecs

2017-01-31 Thread Victor Toso
From: Victor Toso This patch implements a new value to the preference introduced in 497fcbb0a315b034ba keeping it backwards compatible. The new value is the priority, which is an unsigned integer and should be set as last argument. e.g: encoder:codec:rank Video codecs will now be ordered by its

[Spice-devel] [spice-gtk v6 6/9] spicy: improve status label with stream information

2017-01-31 Thread Victor Toso
From: Victor Toso By using stream-video-codec-type property, we can display which video-codec is being used. Signed-off-by: Victor Toso --- tools/spicy.c | 43 +-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/tools/spicy.c b/tools/spicy

[Spice-devel] [spice-gtk v6 5/9] spicy: keep status of mouse/agent on server mode

2017-01-31 Thread Victor Toso
From: Victor Toso --- tools/spicy.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/spicy.c b/tools/spicy.c index bffbef8..4712db6 100644 --- a/tools/spicy.c +++ b/tools/spicy.c @@ -180,25 +180,30 @@ static int ask_user(GtkWidget *parent, char *titl

[Spice-devel] [spice-gtk v6 3/9] spicy: implement preferred video codec type

2017-01-31 Thread Victor Toso
From: Victor Toso Similar to preferred video compression, a radio button showing mjpeg, vp8 and h264 in case server has the proper [0] capability [0] SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE Signed-off-by: Victor Toso --- tools/spicy.c | 56 +

[Spice-devel] [spice-gtk v6 1/9] Update spice-common

2017-01-31 Thread Victor Toso
From: Victor Toso Victor Toso (1): protocol: add preferred video codec message Signed-off-by: Victor Toso Acked-by: Frediano Ziglio --- spice-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice-common b/spice-common index 86dcd22..6439bec 16 --- a/spice-

[Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-01-31 Thread Victor Toso
From: Victor Toso As there is a need to iterate over every encoder:codec pair and we do a check for every encoder and every codec, g_strsplit() is less complex and easier to follow. This change makes much easier to extend the input which is currently a list of tuples encoder:video-codec. Signed

[Spice-devel] [spice-gtk v6 4/9] channel-display: new stream-video-codec-type property

2017-01-31 Thread Victor Toso
From: Victor Toso This is a per channel-display property that stores and notifies the video-codec type being used if a stream is being used or 0 if there is no ongoing stream. Signed-off-by: Victor Toso --- src/channel-display.c | 29 + 1 file changed, 29 insertions

[Spice-devel] [spice-gtk v6 2/9] channel-display: implement preferred video codec msgc

2017-01-31 Thread Victor Toso
From: Victor Toso * SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE This message was introduced in protocol 0.12.13 to establish client side preference on video codec to be used in streams. At this moment, we only introduce a new API [0] to select *the* preferred video codec for client; In a late

[Spice-devel] [spice-server v6 8/9] dcc: handle preferred video codec message

2017-01-31 Thread Victor Toso
From: Victor Toso [0] SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE This message provides a list of video codecs based on client's order of preference. We duplicate the video codecs array from reds.c and sort it using the order of codecs as reference. This message will not change an ongoing st

[Spice-devel] [spice-gtk v6 0/9] Add preferred video codec type message (Jan 31)

2017-01-31 Thread Victor Toso
From: Victor Toso Hi! Patchset rebased with some requested changes. The 09/09 is the RFC regarding priority per video-codec in the server, considering host/client preferences. Changes are in my gitlab, stream-preference branch -> https://gitlab.com/victortoso/spice-gtk -> https://gitlab.com/vic

Re: [Spice-devel] [PATCH spice-server] reds: Get state using red_char_device_get_server

2017-01-31 Thread Uri Lublin
On 01/31/2017 12:20 PM, Frediano Ziglio wrote: Avoid to use g_object_get if not necessary. red_char_device_get_server is more type safe and we are not bound to dynamic fields. Ack. Signed-off-by: Frediano Ziglio --- server/reds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[Spice-devel] [PATCH spice-server] reds: Get state using red_char_device_get_server

2017-01-31 Thread Frediano Ziglio
Avoid to use g_object_get if not necessary. red_char_device_get_server is more type safe and we are not bound to dynamic fields. Signed-off-by: Frediano Ziglio --- server/reds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/reds.c b/server/reds.c index 54f412f..e

Re: [Spice-devel] [PATCH spice-gtk 4/4] usb: remove disconnect_device() deprecation warning

2017-01-31 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 03:17:46PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use a static function instead of the deprecated public function. > > The usage of the function seems to be fine for sync case, since the > device was already removed, but I added a TODO

Re: [Spice-devel] [PATCH spice-gtk 3/4] Give a hint about spice_usb_device_manager_disconnect_device() deprecation

2017-01-31 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 06:19:58AM -0500, Marc-André Lureau wrote: > > > - Original Message - > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > src/usb-device-manager.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/

Re: [Spice-devel] [PATCH spice-gtk 2/4] audio: fix deprecation warning

2017-01-31 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > On Fri, Jan 27, 2017 at 03:17:44PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Use a private function to avoid the spice_audio_new() deprecation > > warning. > > > > Signed-off-by: Marc-André Lureau > > --- > > spice

Re: [Spice-devel] [PATCH spice-gtk 2/4] audio: fix deprecation warning

2017-01-31 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 03:17:44PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use a private function to avoid the spice_audio_new() deprecation > warning. > > Signed-off-by: Marc-André Lureau > --- > spice-common | 2 +- No need to change spice-comm

Re: [Spice-devel] [PATCH spice-gtk 2/4] audio: fix deprecation warning

2017-01-31 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 03:17:44PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use a private function to avoid the spice_audio_new() deprecation > warning. Sure, Acked-by: Victor Toso > > Signed-off-by: Marc-André Lureau > --- > spice-common | 2 +

Re: [Spice-devel] [PATCH spice-gtk 1/4] Revert "audio: Remove spice_audio_new() from the public header"

2017-01-31 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 03:17:43PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This reverts commit c6d9fa1c4af03d9875bf503ce6eabc9e7b52acc3. > > There is no rush to remove a deprecated API from public headers. It's > better to do that when the whole library breaks

Re: [Spice-devel] [PATCH v7 1/3] vdagentd: Quiet uninitialized variable warning.

2017-01-31 Thread Victor Toso
Hi, On Mon, Jan 30, 2017 at 01:05:39PM +0100, Christophe Fergeau wrote: > > Acked-by: Christophe Fergeau and pushed! > > On Fri, Jan 27, 2017 at 06:53:38PM +0100, Michal Suchanek wrote: > > With gcc 6.2.1 I cannot build vdagentd because gcc detects msg_type as > > potentially uninitialized an