Re: [Spice-devel] [PATCH spice-gtk 6/7] widget: update d->ready based on scanout image available

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 7:14 PM, Marc-André Lureau wrote: > d->ready is updated based on monitor area & canvas. In case of GL > rendering, update it based on monitor area & scanout and add check > before drawing update. > > Signed-off-by: Marc-André Lureau

Re: [Spice-devel] [qxl 5/5] spiceqxl_audio: Stop the playback channel if there is nothing to play

2016-03-21 Thread Francois Gouget
This lets the client free the audio resources when an audio application is not actually playing anything, typically because playback is paused. This matches QEMU's behavior. As a side benefit it stops the client's mm-time from being stuck (due to the audio backend's delay updates being applied to

[Spice-devel] [PATCH spice-gtk 7/7] widget: modify update-area to not require primary surface

2016-03-21 Thread Marc-André Lureau
If egl display is enabled, use GL scanout geometry to check intersection with the monitor area. This solves displaying GL display without software canvas. Signed-off-by: Marc-André Lureau --- src/spice-widget.c | 35 ++- 1 file

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-21 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > Making the refcounting thread safe is one thing, but then the code > freeing the drawable needs to be thread-safe too. red_put_drawable might > be fine (only looked briefly), but release_resource which is a vfunc > provided by QEMU seems much

[Spice-devel] [PATCH spice-gtk 1/7] widget: remove superflous WIN32 check

2016-03-21 Thread Marc-André Lureau
The egl call is already inside a X11 conditional block. Signed-off-by: Marc-André Lureau --- src/spice-widget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/spice-widget.c b/src/spice-widget.c index e329809..c8bb72c 100644 --- a/src/spice-widget.c +++

[Spice-devel] [PATCH spice] worker: remove check for canvas during cursor connect

2016-03-21 Thread Marc-André Lureau
We want the cursor to be initialized even if there is no canvas, especially when using a GL scanout. This solves some client warnings when using qemu with GL scanout-only (patches under review on qemu ML). Signed-off-by: Marc-André Lureau ---

[Spice-devel] [PATCH spice-gtk 5/7] egl: check and update scanout after egl init

2016-03-21 Thread Marc-André Lureau
Once the egl/GL context are initialized, check if there is a scanout to associate to display widget. This solves races when scanout update is happening before the egl/GL context is ready. Signed-off-by: Marc-André Lureau --- src/spice-widget-egl.c | 5 + 1 file

[Spice-devel] [PATCH spice-gtk 3/7] display: return NULL in spice_display_get_gl_scanout()

2016-03-21 Thread Marc-André Lureau
If there is no valid scanout, return NULL. Signed-off-by: Marc-André Lureau --- src/channel-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/channel-display.c b/src/channel-display.c index 2c54df7..90d155e 100644 ---

[Spice-devel] [PATCH spice-gtk 4/7] widget: make gl-scanout and update-monitor-area privately exported

2016-03-21 Thread Marc-André Lureau
The following changes will call these functions from spice-widget-egl.c Signed-off-by: Marc-André Lureau --- src/spice-widget-priv.h | 3 +++ src/spice-widget.c | 17 +++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git

[Spice-devel] [PATCH spice-gtk 6/7] widget: update d->ready based on scanout image available

2016-03-21 Thread Marc-André Lureau
d->ready is updated based on monitor area & canvas. In case of GL rendering, update it based on monitor area & scanout and add check before drawing update. Signed-off-by: Marc-André Lureau --- src/spice-widget-egl.c | 4 +++- src/spice-widget.c | 3 ++- 2 files

Re: [Spice-devel] [PATCH v3 2/2] Lower gtk+ requirement to 3.10

2016-03-21 Thread Jeremy White
Hi, > diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c > index 1b3cd07..a9bea52 100644 > --- a/src/spice-widget-egl.c > +++ b/src/spice-widget-egl.c > @@ -29,7 +29,9 @@ > #include > > #include > +#if GTK_CHECK_VERSION(3,16,0) > #include > +#endif This breaks builds on Debian,

Re: [Spice-devel] [PATCH 05/12] char-device: Make SpiceCharDeviceState a gobject

2016-03-21 Thread Frediano Ziglio
Just for coherence I would change the case from gobject to GObject > > From: Christophe Fergeau > > --- > server/char-device.c | 586 > +-- > server/char-device.h | 38 +++- > 2 files changed, 422 insertions(+), 202

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

2016-03-21 Thread Francois Gouget
On Mon, 7 Mar 2016, Christophe Fergeau wrote: > Hey, > > One more issue I have with this series is that I reliably manage to > get a hung spice-server with gstreamer:mjpeg and gstreamer:h264 > I test it with you tube, and then hovering over the video seek bar so > that lots of thumbnails are

[Spice-devel] [PATCH spice-gtk 2/7] egl: check context is ready

2016-03-21 Thread Marc-André Lureau
Add a new GL status field to check if the GL context is ready. This helps debugging races where GL is called before the context is ready. Signed-off-by: Marc-André Lureau --- src/spice-widget-egl.c | 7 ++- src/spice-widget-priv.h | 1 + src/spice-widget.c

Re: [Spice-devel] [spice-gtk] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Marc-André Lureau
- Original Message - > On Mon, Mar 21, 2016 at 3:04 PM, Marc-André Lureau > wrote: > > Hi > > > > - Original Message - > >> epoxy/egl.h header is not provided by mingw-epoxy package. > >> Let's avoid egl usage when building using mingw then. > >> > >>

Re: [Spice-devel] [PATCH v2 10/12] spice/gl: create dummy primary surface (RfC)

2016-03-21 Thread Marc-André Lureau
Hi On Mon, Mar 21, 2016 at 11:24 AM, Gerd Hoffmann wrote: > On Fr, 2016-03-18 at 14:45 +0100, Marc-André Lureau wrote: >> Hi >> >> On Fri, Mar 18, 2016 at 2:17 PM, Gerd Hoffmann wrote: >> > Ping Marc? Any comment on this? >> >> >> Could you send a rebased

Re: [Spice-devel] [spice-gtk] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 4:03 PM, Marc-André Lureau wrote: > > > - Original Message - >> On Mon, Mar 21, 2016 at 3:04 PM, Marc-André Lureau >> wrote: >> > Hi >> > >> > - Original Message - >> >> epoxy/egl.h header is not provided by

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

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 10:58 AM, Fabiano Fidêncio wrote: > On Mon, Mar 21, 2016 at 8:21 AM, Dmitry Fleytman wrote: >> Hi, >> >> I still cannot build: >> >> >> make[4]: Entering directory '/root/src/spice-gtk/src' >> CCLD

[Spice-devel] [spice-gtk v2] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Fabiano Fidêncio
epoxy/egl.h header is not provided by mingw-epoxy package. Let's avoid egl usage when building using mingw then. Signed-off-by: Fabiano Fidêncio --- configure.ac| 1 - src/Makefile.am | 5 + src/spice-widget-priv.h | 4 src/spice-widget.c

[Spice-devel] [spice-gtk] vmcstream, gtask: Fix crash when trying to use webdav

2016-03-21 Thread Fabiano Fidêncio
Don't try to get the cancellable from a task that is, for sure (ensured by us), NULL. See the backtrace: #0 0x729cf250 in g_task_get_cancellable () at /lib64/libgio-2.0.so.0 #1 0x778a9012 in spice_vmc_input_stream_read_all_async (stream=, buffer=0x7070f8, count=8,

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-21 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 02:57:18PM +0100, Pavel Grunt wrote: > Thanks! > > Acked-by: Pavel Grunt > > On Fri, 2016-03-18 at 17:12 +0100, Christophe Fergeau wrote: > > +GL acceleration (virgl) > > +=== > > + > > +OpenGL acceleration is currently local only

Re: [Spice-devel] [spice-gtk] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 3:04 PM, Marc-André Lureau wrote: > Hi > > - Original Message - >> epoxy/egl.h header is not provided by mingw-epoxy package. >> Let's avoid egl usage when building using mingw then. >> >> Signed-off-by: Fabiano Fidêncio >>

Re: [Spice-devel] [spice-gtk] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Marc-André Lureau
Hi - Original Message - > epoxy/egl.h header is not provided by mingw-epoxy package. > Let's avoid egl usage when building using mingw then. > > Signed-off-by: Fabiano Fidêncio > --- > configure.ac| 1 - > src/Makefile.am | 2 ++ >

[Spice-devel] [spice-gtk] mingw: Fix build failure due to epoxy/egl.h header

2016-03-21 Thread Fabiano Fidêncio
epoxy/egl.h header is not provided by mingw-epoxy package. Let's avoid egl usage when building using mingw then. Signed-off-by: Fabiano Fidêncio --- configure.ac| 1 - src/Makefile.am | 2 ++ src/spice-widget-priv.h | 4 src/spice-widget.c |

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-21 Thread Pavel Grunt
Thanks! Acked-by: Pavel Grunt On Fri, 2016-03-18 at 17:12 +0100, Christophe Fergeau wrote: > Document how to use virgl with QEMU/libvirt > > virt-manager documentation still needs to be added. > --- >  docs/manual/manual.txt | 55 >

[Spice-devel] [PATCH] char-device: Add helpers for SpiceCharDeviceCallbacks vfuncs

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau Add helper functions wrapping calls to the virtual functions defined in SpiceCharDeviceCallbacks. --- server/char-device.c | 78 +--- 1 file changed, 62 insertions(+), 16 deletions(-) Changes: -

Re: [Spice-devel] [PATCH 03/12] Free dispatchers at exit

2016-03-21 Thread Frediano Ziglio
> > From: Jonathon Jongsma > > --- > server/red-qxl.c | 7 +++ > server/red-qxl.h | 1 + > server/reds.c| 2 ++ > 3 files changed, 10 insertions(+) > > diff --git a/server/red-qxl.c b/server/red-qxl.c > index 8012b26..5233afd 100644 > --- a/server/red-qxl.c > +++

[Spice-devel] [PATCH] Remove last usage of global 'reds' variable

2016-03-21 Thread Frediano Ziglio
From: Jonathon Jongsma This should be the final piece of removing the global reds variable. We still need a global variable to clean up during the atexit() function, but we use a GList of servers (even though we technically don't support multiple servers in the same process

Re: [Spice-devel] [PATCH 02/12] Convert Dispatcher and MainDispatcher to GObjects

2016-03-21 Thread Frediano Ziglio
> > From: Jonathon Jongsma > > Allows more explicit inheritance relationship, and numerous other > advantages. After discussions and changes I would ack but as I did the last changes I cannot ack these. Frediano > --- > server/dispatcher.c | 234 >

[Spice-devel] [PATCH spice-gtk] usb-device-manager: Remove invalid return annotation

2016-03-21 Thread Pavel Grunt
--- src/usb-device-manager.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 417c5b2..85231a1 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -1568,8 +1568,6 @@ gboolean

[Spice-devel] [PATCH spice-gtk] Remove extra checks before g_cancellable_disconnect()

2016-03-21 Thread Pavel Grunt
If cancellable is NULL or handler_id is 0 the function does nothing. --- src/spice-pulse.c | 4 +--- src/vmcstream.c | 15 +++ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/spice-pulse.c b/src/spice-pulse.c index 8d45dbe..6bc3014 100644 --- a/src/spice-pulse.c

[Spice-devel] [PATCH v2] Attempt to manage redirection in a way similar to Unix

2016-03-21 Thread Frediano Ziglio
This patch allows remote-viewer to redirect output/error streams to files. Also if launched from a console program (for instance from the command prompt) you are able to see output from the console where you launch the program. This allow to launch the program with a syntax like >

Re: [Spice-devel] [spice-gtk] channel-usbredir: Fix crash due to a Task returning earlier than expected

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 8:05 AM, Pavel Grunt wrote: > On Mon, 2016-03-21 at 04:02 +0100, Fabiano Fidêncio wrote: >> g_task_return_error() has been completing the task immediately, not >> cleaning up/setting up the device state to STATE_DISCONNECTED. It's >> been >> causing a

[Spice-devel] [PATCH 05/12] char-device: Make SpiceCharDeviceState a gobject

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau --- server/char-device.c | 586 +-- server/char-device.h | 38 +++- 2 files changed, 422 insertions(+), 202 deletions(-) diff --git a/server/char-device.c b/server/char-device.c index

[Spice-devel] [PATCH 08/12] smartcard: Turn SmartcardState into a GObject

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Once all char device states are converted, we can turn the associated vfuncs into RedCharDeviceClass vfuncs. --- server/smartcard.c | 221 + server/smartcard.h |

[Spice-devel] [PATCH 09/12] reds: Make VDIPortState private to reds.c

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau VDIPortState and VDIReadBuf don't really need to be defined in a header file as they are only used in reds.c --- server/reds-private.h | 56 + server/reds.c | 167 +- 2 files

[Spice-devel] [PATCH 06/12] spicevmc: Introduce RedCharDeviceSpiceVmc GObject

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau --- server/spicevmc.c | 102 ++ 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index f745fdb..0cf2cce 100644 --- a/server/spicevmc.c +++

[Spice-devel] [PATCH 11/12] reds: Remove spice_char_device_state_create()

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau Nothing is using it anymore now that CharDevice classes are gobjectified. --- server/char-device.c | 42 -- server/char-device.h | 11 +-- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git

[Spice-devel] [PATCH 10/12] reds: Make VDIPortState a gobject

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. --- server/char-device.c | 3 +- server/reds-private.h | 2 +- server/reds.c | 527 -- 3 files changed, 304 insertions(+), 228 deletions(-) diff --git

[Spice-devel] [PATCH 04/12] char-device: Add helpers for SpiceCharDeviceCallbacks vfuncs

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau Add helper functions wrapping calls to the virtual functions defined in SpiceCharDeviceCallbacks. --- server/char-device.c | 97 +++- 1 file changed, 81 insertions(+), 16 deletions(-) diff --git

[Spice-devel] [PATCH 12/12] Move SpiceCharDeviceCallbacks into RedCharDeviceClass

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau This structure holding virtual function pointers was kept until now as a RedCharDevice member in order to make the GObject conversion easier. Now that all RedCharDevice children are converted to GObject, it can be moved into RedCharDeviceClass. ---

[Spice-devel] [PATCH 07/12] spicevmc: Move SpiceVmcState::pipe_item to RedCharDeviceSpiceVmc

2016-03-21 Thread Frediano Ziglio
From: Christophe Fergeau This pipe item belongs to the char device, not to the spicevmc channel. --- server/spicevmc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index 0cf2cce..9a009b9 100644 ---

[Spice-devel] [PATCH 01/12] Remove last usage of global 'reds' variable

2016-03-21 Thread Frediano Ziglio
From: Jonathon Jongsma This should be the final piece of removing the global reds variable. We still need a global variable to clean up during the atexit() function, but we use a GList of servers (even though we technically don't support multiple servers in the same process

[Spice-devel] [PATCH 03/12] Free dispatchers at exit

2016-03-21 Thread Frediano Ziglio
From: Jonathon Jongsma --- server/red-qxl.c | 7 +++ server/red-qxl.h | 1 + server/reds.c| 2 ++ 3 files changed, 10 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 8012b26..5233afd 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@

Re: [Spice-devel] [PATCH] usbredir_handle_msg: rename data to err_data

2016-03-21 Thread Victor Toso
On Sun, Mar 20, 2016 at 03:03:41PM +0200, Snir Sheriber wrote: > To better reflect what this variable is used for and change the declare > location such that it will be declared only if it should Acked-by: Victor Toso > --- > src/channel-usbredir.c | 14 +++--- >

Re: [Spice-devel] [spice-server 1/3] Revert "fix regression due to callback called earlier"

2016-03-21 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 06:47:19AM -0400, Frediano Ziglio wrote: > > > > Passing Reds into agent-msg-filter.[ch] isn't the right thing to do from > > a layering point of view. > > > > This reverts commit a1e62fa5ae983b7b69cb437b2635ce84b2471383. > > diff --git a/spice-common b/spice-common > >

Re: [Spice-devel] [spice-server 1/3] Revert "fix regression due to callback called earlier"

2016-03-21 Thread Frediano Ziglio
> > Passing Reds into agent-msg-filter.[ch] isn't the right thing to do from > a layering point of view. > > This reverts commit a1e62fa5ae983b7b69cb437b2635ce84b2471383. > --- > server/agent-msg-filter.c | 5 +++-- > server/agent-msg-filter.h | 3 ++- > server/reds.c | 18

Re: [Spice-devel] [spice-server 3/3] Remove dependency of vdi_port_read_buf_process on RedsState

2016-03-21 Thread Frediano Ziglio
> > This makes it easier to move the VDIPort API to a different file, and > make it as self-contained as possible. Acked the entire serie Frediano > --- > server/reds.c | 24 +--- > 1 file changed, 17 insertions(+), 7 deletions(-) > > diff --git a/server/reds.c

Re: [Spice-devel] [PATCH v2 10/12] spice/gl: create dummy primary surface (RfC)

2016-03-21 Thread Gerd Hoffmann
On Fr, 2016-03-18 at 14:45 +0100, Marc-André Lureau wrote: > Hi > > On Fri, Mar 18, 2016 at 2:17 PM, Gerd Hoffmann wrote: > > Ping Marc? Any comment on this? > > > Could you send a rebased series, for the patches that lead to the > issue? Update pushed to

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

2016-03-21 Thread Fabiano Fidêncio
On Mon, Mar 21, 2016 at 8:21 AM, Dmitry Fleytman wrote: > Hi, > > I still cannot build: > > > make[4]: Entering directory '/root/src/spice-gtk/src' > CCLD libspice-client-glib-2.0.la > CC spice-widget.lo > In file included from spice-widget.c:40:0: >

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

2016-03-21 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 09:21:01AM +0200, Dmitry Fleytman wrote: > Hi, > > I still cannot build: > > > make[4]: Entering directory '/root/src/spice-gtk/src' > CCLD libspice-client-glib-2.0.la > CC spice-widget.lo > In file included from spice-widget.c:40:0: >

[Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-21 Thread Christophe Fergeau
Document how to use virgl with QEMU/libvirt virt-manager documentation still needs to be added. --- docs/manual/manual.txt | 55 ++ 1 file changed, 55 insertions(+) diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt index

[Spice-devel] [spice-server 1/3] Revert "fix regression due to callback called earlier"

2016-03-21 Thread Christophe Fergeau
Passing Reds into agent-msg-filter.[ch] isn't the right thing to do from a layering point of view. This reverts commit a1e62fa5ae983b7b69cb437b2635ce84b2471383. --- server/agent-msg-filter.c | 5 +++-- server/agent-msg-filter.h | 3 ++- server/reds.c | 18 --

[Spice-devel] [spice-server 2/3] agent: Sync AgentMsgFilter state upon agent connection

2016-03-21 Thread Christophe Fergeau
AgentMsgFilter needs to know whether monitors config messages need to be filtered or not. This used to be done from within agent_msg_filter_config() using the global RedsState, but this got more tricky as it was removed. A first attempt a1e62fa5ae9 caused crashes on qemu startup with

[Spice-devel] [spice-server 3/3] Remove dependency of vdi_port_read_buf_process on RedsState

2016-03-21 Thread Christophe Fergeau
This makes it easier to move the VDIPort API to a different file, and make it as self-contained as possible. --- server/reds.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/server/reds.c b/server/reds.c index 82e6da4..4afff1a 100644 ---

[Spice-devel] [spice-server] Remove dependency of vdi_port_read_buf_process on RedsState

2016-03-21 Thread Christophe Fergeau
I'd go with these patches in order to replace patch 05/15. An alternative for 2/3 is to pass the RedsState to agent_msg_filter_init(). Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

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

2016-03-21 Thread Dmitry Fleytman
Hi, I still cannot build: make[4]: Entering directory '/root/src/spice-gtk/src' CCLD libspice-client-glib-2.0.la CC spice-widget.lo In file included from spice-widget.c:40:0: spice-widget-priv.h:27:23: fatal error: epoxy/egl.h: No such file or directory #include

Re: [Spice-devel] [spice-gtk] channel-usbredir: Fix crash due to a Task returning earlier than expected

2016-03-21 Thread Pavel Grunt
On Mon, 2016-03-21 at 04:02 +0100, Fabiano Fidêncio wrote: > g_task_return_error() has been completing the task immediately, not > cleaning up/setting up the device state to STATE_DISCONNECTED. It's > been > causing a double free when trying to redirect a device without having > the ACL