[Spice-devel] [protocol v3] macros: Mark unused SPICE_GNUC_XXX macros as deprecated

2016-12-14 Thread Francois Gouget
We don't want to maintain more macros than necessary and in the end the equivalent G_GNUC_XXX macros should be preferred. Should any project actually depend on these macros they can keep using them by defining the usual SPICE_DEPRECATED macro until they migrate away from them or the macros are rein

Re: [Spice-devel] [vdagent-win v2] VDService to notify VDAgent about session status

2016-12-14 Thread Victor Toso
Hi, On Wed, Dec 14, 2016 at 05:07:17PM -0500, Frediano Ziglio wrote: > > > > Commit 5907b6cbb5c724f9729da59a644271b4258d122e started to handle > > Lock/Unlock events from Session at VDAgent. That seemed to work fine > > but as pointed by Andrei at [0], it does not cover the following > > situatio

Re: [Spice-devel] [PATCH v1 09/10] DCC: change how fill_bits() marshalls data by reference

2016-12-14 Thread Jonathon Jongsma
On Wed, 2016-12-14 at 16:03 -0500, Frediano Ziglio wrote: > > > > > > The fill_bits() function marshalls some data by reference. This > > data is > > owned by the RedDrawable that is owned by the Drawable that is > > owned by > > the RedDrawablePipeItem.  Instead of keeping the RedPipeItem alive

Re: [Spice-devel] [vdagent-win v2] VDService to notify VDAgent about session status

2016-12-14 Thread Frediano Ziglio
> > Commit 5907b6cbb5c724f9729da59a644271b4258d122e started to handle > Lock/Unlock events from Session at VDAgent. That seemed to work fine > but as pointed by Andrei at [0], it does not cover the following > situation: > > > It fails for next test-case: > > > > * Connect with RV to VM > > * Loc

Re: [Spice-devel] [spice-common v3 02/11] protocol: add preferred video codec message

2016-12-14 Thread Frediano Ziglio
> > Hi, > > On Wed, Dec 14, 2016 at 02:48:45PM -0500, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > Client might want to choose a preferred video codec for streaming for > > > different reasons which having hardware decoder support being the most > > > interest one. > > > >

[Spice-devel] [PATCH spice-server v2] gitignore: Reduce html files exclusion

2016-12-14 Thread Frediano Ziglio
Limit the html files ignored. Can happen that you are working on some html files on your main spice-server directory and it's not desirable to ignore them. Signed-off-by: Frediano Ziglio --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Changes since v1: - remove redundant

[Spice-devel] [PATCH spice-server v4 2/2] Add some debugging for GlzDictItem structure

2016-12-14 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/image-encoders.c | 22 ++ 1 file changed, 22 insertions(+) Changes since v3: - do not use inline for empty function. diff --git a/server/image-encoders.c b/server/image-encoders.c index b23cdf0..698a737 100644 --- a/server/image-enco

Re: [Spice-devel] [spice-common v3 02/11] protocol: add preferred video codec message

2016-12-14 Thread Victor Toso
Hi, On Wed, Dec 14, 2016 at 02:48:45PM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Client might want to choose a preferred video codec for streaming for > > different reasons which having hardware decoder support being the most > > interest one. > > > > This message allows

Re: [Spice-devel] [PATCH v1 09/10] DCC: change how fill_bits() marshalls data by reference

2016-12-14 Thread Frediano Ziglio
> > The fill_bits() function marshalls some data by reference. This data is > owned by the RedDrawable that is owned by the Drawable that is owned by > the RedDrawablePipeItem. Instead of keeping the RedPipeItem alive by > passing it to red_channel_client_init_send_data(), simply reference the >

Re: [Spice-devel] [PATCH v1 07/10] Spicevmc: don't pass pipe item to init_send_data()

2016-12-14 Thread Jonathon Jongsma
On Wed, 2016-12-14 at 15:27 -0500, Frediano Ziglio wrote: > > > > > > --- > >  server/spicevmc.c | 14 +++--- > >  1 file changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/server/spicevmc.c b/server/spicevmc.c > > index d6a6ac8..521a540 100644 > > --- a/server/spicevmc.c > >

Re: [Spice-devel] [PATCH v1 07/10] Spicevmc: don't pass pipe item to init_send_data()

2016-12-14 Thread Frediano Ziglio
> > --- > server/spicevmc.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/server/spicevmc.c b/server/spicevmc.c > index d6a6ac8..521a540 100644 > --- a/server/spicevmc.c > +++ b/server/spicevmc.c > @@ -627,6 +627,12 @@ static void > spicevmc_red_channel

Re: [Spice-devel] [PATCH v1 10/10] Remove third argument from red_channel_client_init_send_data()

2016-12-14 Thread Frediano Ziglio
> > This third argument (and the 'item' member of > RedChannelClient::priv::send_data) was a somewhat roundabout way to keep > the RedPipeItem alive until a message is sent, just in case some data > owned by that pipeitem was added to the marshaller by reference. This > was a rather confusing mech

Re: [Spice-devel] [PATCH v1 02/10] Rename cursor_set_item() to cursor_channel_set_item()

2016-12-14 Thread Frediano Ziglio
> > Follow C method naming convention. Acked-by: Frediano Ziglio > --- > server/cursor-channel.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/server/cursor-channel.c b/server/cursor-channel.c > index f245eed..dedee37 100644 > --- a/server/cursor-channel.c > +

[Spice-devel] ovirt, spice and igel

2016-12-14 Thread Craig Warner
’m new to overt and this has been a rapid learning curve, and come to point where I need assistance. The objective of this project is to provide via a igel thin client a seamless multimedia experience for the end user. The environment is based upon both host and virtual instance using Centos 7.

Re: [Spice-devel] [spice-common v3 02/11] protocol: add preferred video codec message

2016-12-14 Thread Frediano Ziglio
> > From: Victor Toso > > Client might want to choose a preferred video codec for streaming for > different reasons which having hardware decoder support being the most > interest one. > > This message allows the client to send an array of video codecs in > order of preference. > > Signed-off-

[Spice-devel] Spice-Html5 Client Query

2016-12-14 Thread Shirley Arava
Hi, I was looking for some sort of guidance as to where I was going wrong with the spice protocol requirements. We are currently trying to use SPICE-html5 client to provide remote access to Virtual Machines hosted on a Xen hypervisor. It would be really helpful if you could provide us some inputs

[Spice-devel] [spice-protocol v2] macros: Mark unused SPICE_GNUC_XXX macros as deprecated

2016-12-14 Thread Christophe Fergeau
We don't want to maintain more macros than necessary and in the end the equivalent G_GNUC_XXX macros should be preferred. Should any project actually depend on these macros they can keep using them by defining the usual SPICE_DEPRECATED macro until they migrate away from them or the macros are rein

Re: [Spice-devel] [protocol] macros: Mark unused SPICE_GNUC_XXX macros as deprecated

2016-12-14 Thread Christophe Fergeau
On Tue, Dec 13, 2016 at 06:50:02AM +0100, Francois Gouget wrote: > We don't want to maintain more macros than necessary and in the end > the equivalent G_GNUC_XXX macros should be preferred. > Should any project actually depend on these macros they can keep using > them by defining the usual SPICE

[Spice-devel] [PATCH v1 03/10] CursorChannel: minor improvement to cursor_fill()

2016-12-14 Thread Jonathon Jongsma
Move all 'out' parameters to the end of the function. --- server/cursor-channel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index dedee37..04483af 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c

[Spice-devel] [PATCH v1 06/10] Smartcard: Don't pass pipe item to _init_send_data()

2016-12-14 Thread Jonathon Jongsma
--- server/smartcard-channel-client.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c index 347e177..aece01b 100644 --- a/server/smartcard-channel-client.c +++ b/server/smartcard-channel-clie

[Spice-devel] [PATCH v1 10/10] Remove third argument from red_channel_client_init_send_data()

2016-12-14 Thread Jonathon Jongsma
This third argument (and the 'item' member of RedChannelClient::priv::send_data) was a somewhat roundabout way to keep the RedPipeItem alive until a message is sent, just in case some data owned by that pipeitem was added to the marshaller by reference. This was a rather confusing mechanism, howeve

[Spice-devel] [PATCH v1 05/10] MainChannel: remove another init_send_data arg

2016-12-14 Thread Jonathon Jongsma
Use spice_marshaller_add_by_ref_full() instead of _add_by_ref() to handle the referenced data properly rather than passing the pipe item to red_channel_client_init_send_data() to keep the pipe item alive indirectly. --- server/main-channel-client.c | 14 +++--- 1 file changed, 11 insertion

[Spice-devel] [PATCH v1 04/10] Refactor cursor marshalling for SET, INIT

2016-12-14 Thread Jonathon Jongsma
Use spice_marshaller_add_by_ref_full() instead of spice_marshaller_add_by_ref() to allow the marshaller to manage the lifetime of the referenced data buffer rather than having to manage it by passing a PipeItem to red_channel_client_init_send_data(). Since the data is owned by CursorItem (which is

[Spice-devel] [PATCH v1 01/10] Avoid passing pipe item to red_channel_client_init_send_data()

2016-12-14 Thread Jonathon Jongsma
The only time that the pipe item needs to be passed as the third argument to red_channel_client_init_send_data() is when the pipe item holds a data buffer that has been added to the marshaller by reference (spice_marshaller_add_by_ref()) and needs to be kept alive until the data has been sent. In a

[Spice-devel] [PATCH v1 00/10] Refactor red_channel_client_init_send_data()

2016-12-14 Thread Jonathon Jongsma
A series of patches refactoring the somewhat-confusing red_channel_client_init_send_data() function. The third argument to this function is a RedPipeItem and it was never very obvious when or why we should pass an item in this parameter. Sometimes callers passed NULL, and sometimes they passed an i

[Spice-devel] [PATCH v1 07/10] Spicevmc: don't pass pipe item to init_send_data()

2016-12-14 Thread Jonathon Jongsma
--- server/spicevmc.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index d6a6ac8..521a540 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -627,6 +627,12 @@ static void spicevmc_red_channel_release_msg_rcv_buf(R

[Spice-devel] [PATCH v1 08/10] DCC: remove more init_send_data() arguments

2016-12-14 Thread Jonathon Jongsma
--- server/dcc-send.c | 17 - server/spicevmc.c | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/server/dcc-send.c b/server/dcc-send.c index edeea62..db42ab8 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@ -1118,7 +1118,7 @@ static void red_marsh

[Spice-devel] [PATCH v1 09/10] DCC: change how fill_bits() marshalls data by reference

2016-12-14 Thread Jonathon Jongsma
The fill_bits() function marshalls some data by reference. This data is owned by the RedDrawable that is owned by the Drawable that is owned by the RedDrawablePipeItem. Instead of keeping the RedPipeItem alive by passing it to red_channel_client_init_send_data(), simply reference the Drawable and

[Spice-devel] [PATCH v1 02/10] Rename cursor_set_item() to cursor_channel_set_item()

2016-12-14 Thread Jonathon Jongsma
Follow C method naming convention. --- server/cursor-channel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index f245eed..dedee37 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -104,7 +104,7 @@ s

Re: [Spice-devel] [PATCH] Do endian swapping.

2016-12-14 Thread Christophe Fergeau
On Wed, Dec 14, 2016 at 04:43:11PM +0100, Michal Suchánek wrote: > On Wed, 14 Dec 2016 15:32:11 +0100 > Christophe Fergeau wrote: > > > Hey, > > > > On Mon, Nov 28, 2016 at 03:08:34PM +0100, Michal Suchanek wrote: > > > This allows running big endian and little endian guest side by side > > > us

Re: [Spice-devel] [PATCH v2 0/2] RHEL7 improvements

2016-12-14 Thread Victor Toso
Hi, On Thu, Dec 08, 2016 at 03:43:22PM +, Frediano Ziglio wrote: > These 2 patches attempt to join images split by RHEL7 graphic > stack (Mesa) decreasing commands handled by spice-server. > > You can see the difference between the 2 video: > - https://www.youtube.com/watch?v=OarV6zUmUdg (befo

Re: [Spice-devel] [spice-server v2 8/9] reds: add support to ranks for video codecs

2016-12-14 Thread Christophe Fergeau
On Wed, Dec 14, 2016 at 04:34:07PM +0100, Victor Toso wrote: > On Wed, Dec 14, 2016 at 02:32:09PM +0100, Christophe Fergeau wrote: > > On Wed, Dec 14, 2016 at 08:53:49AM +0100, Victor Toso wrote: > > > Hi, > > > > > > You rock. I'll use this as reference for future proposals, many thanks! > > > > W

Re: [Spice-devel] [PATCH] Do endian swapping.

2016-12-14 Thread Michal Suchánek
On Wed, 14 Dec 2016 15:32:11 +0100 Christophe Fergeau wrote: > Hey, > > On Mon, Nov 28, 2016 at 03:08:34PM +0100, Michal Suchanek wrote: > > This allows running big endian and little endian guest side by side > > using cut&paste between them. > > > > There is some general design idea that swapp

Re: [Spice-devel] [spice-server v2 8/9] reds: add support to ranks for video codecs

2016-12-14 Thread Victor Toso
On Wed, Dec 14, 2016 at 02:32:09PM +0100, Christophe Fergeau wrote: > On Wed, Dec 14, 2016 at 08:53:49AM +0100, Victor Toso wrote: > > Hi, > > > > You rock. I'll use this as reference for future proposals, many thanks! > > While this is polished, I'd say this patch is not directly related to > the

Re: [Spice-devel] [PATCH] Do endian swapping.

2016-12-14 Thread Christophe Fergeau
Hey, On Mon, Nov 28, 2016 at 03:08:34PM +0100, Michal Suchanek wrote: > This allows running big endian and little endian guest side by side using > cut&paste between them. > > There is some general design idea that swapping should come as cloce to > virtio_read/virtio_write as possible. In partic

Re: [Spice-devel] [PATCH spice-server 2/2] Add some debugging for GlzDictItem structure

2016-12-14 Thread Christophe Fergeau
On Tue, Dec 13, 2016 at 02:31:51PM +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/image-encoders.c | 26 ++ > 1 file changed, 26 insertions(+) > > diff --git a/server/image-encoders.c b/server/image-encoders.c > index b23cdf0..a529968 100644

Re: [Spice-devel] [spice-server v2 8/9] reds: add support to ranks for video codecs

2016-12-14 Thread Christophe Fergeau
On Wed, Dec 14, 2016 at 08:53:49AM +0100, Victor Toso wrote: > Hi, > > You rock. I'll use this as reference for future proposals, many thanks! While this is polished, I'd say this patch is not directly related to the 'preferred-video-codec' series? Ie we could at first not have a way for the serv

Re: [Spice-devel] [PATCH spice-server 4/4] gitignore: Reduce html files exclusion

2016-12-14 Thread Christophe Fergeau
On Mon, Dec 12, 2016 at 02:09:24PM +, Frediano Ziglio wrote: > Limit the html files ignored. > Can happen that you are working on some html files on your main > spice-server directory and it's not desirable to ignore them. > > Signed-off-by: Frediano Ziglio > --- > .gitignore | 2 +- > 1 fil

Re: [Spice-devel] [PATCH spice-server 3/4] gitignore: Reuse global gitignore

2016-12-14 Thread Christophe Fergeau
s/global/top-level/ Acked-by: Christophe Fergeau On Mon, Dec 12, 2016 at 02:09:23PM +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > .gitignore| 1 + > server/.gitignore | 5 - > 2 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/.gitignore b/.g

Re: [Spice-devel] [PATCH spice-server 2/4] gitignore: Limit scope of some files

2016-12-14 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 12, 2016 at 02:09:22PM +, Frediano Ziglio wrote: > This make more obvious which directory they refer > and potentially avoid ignoring unwanted files. > > Signed-off-by: Frediano Ziglio > --- > .gitignore| 2 -- > server/.gitignore | 4 +++-

Re: [Spice-devel] [PATCH spice-server 1/4] gitignore: Remove obsolete files

2016-12-14 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 12, 2016 at 02:09:21PM +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/.gitignore | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/server/.gitignore b/server/.gitignore > index 2ff8a4e..3b98549 100644 > --- a/ser

[Spice-devel] [spice-server v3 08/11] reds: drop sscanf() in favour of g_strsplit()

2016-12-14 Thread Victor Toso
From: Victor Toso In case of errors in sscanf(), we were returning (codecs + n) being n an uninitialized variable. That should be avoided in any circumstance. 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 co

[Spice-devel] [spice-server v3 07/11] reds: set the video_codecs in a separated function

2016-12-14 Thread Victor Toso
From: Victor Toso Small refactor. As reds_get_video_codecs() returns the video codecs as GArray, we should match reds_set_video_codecs() to have a GArray as parameter instead of string. reds_set_video_codecs_from_string() seems more appropriate for the previous function. Signed-off-by: Victor T

[Spice-devel] [spice-gtk v3 04/11] channel-display: implement preferred video codec msgc

2016-12-14 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-gtk v3 05/11] spicy: implement preferred video codec type

2016-12-14 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 --- src/spicy.c | 41 + 1 file chang

[Spice-devel] [spice-protocol v3 01/11] protocol: add preferred video codec message

2016-12-14 Thread Victor Toso
From: Victor Toso Client might want to choose a preferred video codec for streaming for different reasons which having hardware decoder support being the most interest one. This message allows the client to send a list of video codecs in a order of preference. Signed-off-by: Victor Toso --- s

[Spice-devel] [spice-server v3 06/11] reds: don't replace video_codecs on failure

2016-12-14 Thread Victor Toso
From: Victor Toso We should replace the video_codecs GArray only after the parsing of input is done, otherwise we might lose previous configuration. Tests were updated to match this situation. Input that fails to replace video_codecs are considered bad. Signed-off-by: Victor Toso --- server/r

[Spice-devel] [spice-server v3 10/11] reds: add support to priority for video codecs

2016-12-14 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-server v3 09/11] Update spice-common

2016-12-14 Thread Victor Toso
From: Victor Toso Frediano Ziglio (6): Start adding protocol file documentation Start writing some documentation on protocol Extended protocol documentation More work on attribute protocol documentation Fix BNF notation in documentation Add protocol documentati

[Spice-devel] [spice-gtk v3 03/11] Update spice-common

2016-12-14 Thread Victor Toso
From: Victor Toso Francois Gouget (1): codegen: Fix compatibility with Python 2.6 Frediano Ziglio (6): Start adding protocol file documentation Start writing some documentation on protocol Extended protocol documentation More work on attribute protocol documentation

[Spice-devel] [spice-server v3 11/11] dcc: handle preferred video codec message

2016-12-14 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-server v3 00/11] Add preferred video codec type message

2016-12-14 Thread Victor Toso
From: Victor Toso Hi, I tried to send a few patches beforehand to get this series easier to review and test, that's why it took some time to resend it. Gladly, v2 had a really good overview/review about this series usefulness and I do recomend the read at [0] and the response [1]. [0] https://

[Spice-devel] [spice-common v3 02/11] protocol: add preferred video codec message

2016-12-14 Thread Victor Toso
From: Victor Toso Client might want to choose a preferred video codec for streaming for different reasons which having hardware decoder support being the most interest one. This message allows the client to send an array of video codecs in order of preference. Signed-off-by: Victor Toso --- c

Re: [Spice-devel] [qxl] xspice: Adjust to X.org 1.19 changes

2016-12-14 Thread Hans de Goede
Hi, On 14-12-16 11:51, Christophe Fergeau wrote: In newer X.org versions, it's no longer supported to modify the set of FDs passed to a BlockHandler method to get notified when the FD has data to be read. This was limited anyway as we could only get read events this way, and had to do our own po

[Spice-devel] [qxl] xspice: Adjust to X.org 1.19 changes

2016-12-14 Thread Christophe Fergeau
In newer X.org versions, it's no longer supported to modify the set of FDs passed to a BlockHandler method to get notified when the FD has data to be read. This was limited anyway as we could only get read events this way, and had to do our own polling to get notified about socket writeability. St