Re: [Spice-devel] [PATCH spice-protocol 2/8 v2] Add the StreamMsgGraphicsDeviceInfo message

2019-01-15 Thread Frediano Ziglio
> > The message contains information about the graphics device and monitor > belonging to a particular video stream (which maps to a channel) from > the streaming agent. > > Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio > --- > spice/stream-device.h | 31

Re: [Spice-devel] [PATCH spice-gtk v7] Fix overlay for vaapisink

2019-01-15 Thread Snir Sheriber
Hi, On 1/15/19 3:03 PM, Frediano Ziglio wrote: The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to

[Spice-devel] [PATCH v2] gstreamer: set timestamp in buffer's GstReferenceTimestampMeta

2019-01-15 Thread Snir Sheriber
Currently we set timestamps as buffer's PTS, this value may be changed by the pipeline in some cases and cause an unexpected buffer warnings (when GstVideoOverlay is not used). Use GstReferenceTimestampMeta when synchronization is made by spice. Before applying this patch you can reproduce the

Re: [Spice-devel] [PATCH spice-gtk v4 1/2] Fix overlay for vaapisink

2019-01-15 Thread Snir Sheriber
On 1/15/19 12:22 PM, Frediano Ziglio wrote: The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to

Re: [Spice-devel] [PATCH spice-common 3/3] docs: add spice URI scheme

2019-01-15 Thread Marc-André Lureau
On Mon, Jan 14, 2019 at 8:36 PM Frediano Ziglio wrote: > > > > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > docs/Makefile.am | 1 + > > docs/meson.build | 2 +- > > docs/spice_uri_scheme.txt | 131 ++ >

Re: [Spice-devel] [PATCH spice-common 3/3] docs: add spice URI scheme

2019-01-15 Thread Christophe Fergeau
Hey, On Fri, Jan 11, 2019 at 11:07:14PM +0400, marcandre.lur...@redhat.com wrote: > @@ -0,0 +1,131 @@ > +The "spice" URI scheme > +== > + > +This document is inspired by 'The "vnc" URI Scheme' (rfc7869) and > +attempts to document a standard Spice URI scheme. > + > +The

[Spice-devel] [PATCH spice-gtk v7] Fix overlay for vaapisink

2019-01-15 Thread Frediano Ziglio
The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to vaapisink. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] What algorithm does SPICE server use in video stream detection?

2019-01-15 Thread Christophe Fergeau
Hey, On Thu, Jan 10, 2019 at 03:03:05PM +0800, 陈炤 wrote: > Hi, > > > > I read the spice server code, and find that the video stream detection > code is in server/spice-bitmap-utils.c. func > bitmap_get_graduality_level will calculate a score, and the GRADUALITY > is set based on the score. >

Re: [Spice-devel] [PATCH spice-protocol 1/8 v2] Add the VDAgentGraphicsDeviceInfo message

2019-01-15 Thread Frediano Ziglio
> The message serves for passing the device address and device display ID > information for all display channels from SPICE server to the vd_agent. > > Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio > --- > spice/vd_agent.h | 23 +++ > 1 file changed, 23

Re: [Spice-devel] [spice-gtk v2 1/1] usb-redirection: implementation of usb backend layer

2019-01-15 Thread Christophe Fergeau
Hey, On Mon, Jan 07, 2019 at 03:50:12PM +0200, Yuri Benditovich wrote: > > > > > if (!priv->host) > > > -g_error("Out of memory allocating usbredirhost"); > > > +g_error("Out of memory initializing redirection support"); > > > > > > -#if USBREDIR_VERSION >= 0x000701 > > > -

Re: [Spice-devel] [PATCH spice-gtk v4 2/2] spice-widget: Avoid deadlock for VAAPI

2019-01-15 Thread Snir Sheriber
This patch fixes the issues I've experienced before Ack On 1/15/19 12:22 PM, Frediano Ziglio wrote: Calling gst_video_overlay_handle_events after gst_video_overlay_set_window_handle causes often a deadlock in gstreamer-vaapi. Reverting the calls fix this issue. Signed-off-by: Frediano Ziglio

[Spice-devel] [PATCH spice-gtk v6] Fix overlay for vaapisink

2019-01-15 Thread Frediano Ziglio
The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to vaapisink. Signed-off-by: Frediano Ziglio ---

[Spice-devel] [PATCH spice-gtk v5] Fix overlay for vaapisink

2019-01-15 Thread Frediano Ziglio
The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to vaapisink. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] [PATCH spice-gtk v2 04/15] build-sys: drop gstvideo option, make it required

2019-01-15 Thread Snir Sheriber
Acked-by: Snir Sheriber On 1/9/19 12:09 PM, Frediano Ziglio wrote: From: Marc-André Lureau GStreamer is being increasingly used by spice-gtk. Let's make it a core requirement. Signed-off-by: Marc-André Lureau --- .gitlab-ci.yml | 2 -- configure.ac | 41

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-15 Thread Neil Armstrong
On 15/01/2019 11:41, Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here I went through all > drivers.

Re: [Spice-devel] [PATCH spice-common 3/3] docs: add spice URI scheme

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 4:53 PM Christophe Fergeau wrote: > > Hey, > > On Fri, Jan 11, 2019 at 11:07:14PM +0400, marcandre.lur...@redhat.com wrote: > > @@ -0,0 +1,131 @@ > > +The "spice" URI scheme > > +== > > + > > +This document is inspired by 'The "vnc" URI Scheme'

Re: [Spice-devel] [PATCH spice-common 2/3] build-sys: improve asciidoc rules to allow multiple targets

2019-01-15 Thread Frediano Ziglio
> > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio > --- > docs/Makefile.am | 22 +++--- > docs/meson.build | 12 +++- > 2 files changed, 22 insertions(+), 12 deletions(-) > > diff --git a/docs/Makefile.am b/docs/Makefile.am

Re: [Spice-devel] [PATCH spice-common 3/3] docs: add spice URI scheme

2019-01-15 Thread Frediano Ziglio
> > On Mon, Jan 14, 2019 at 8:36 PM Frediano Ziglio wrote: > > > > > > > > From: Marc-André Lureau > > > > > > Signed-off-by: Marc-André Lureau > > > --- > > > docs/Makefile.am | 1 + > > > docs/meson.build | 2 +- > > > docs/spice_uri_scheme.txt | 131

Re: [Spice-devel] [PATCH spice-gtk v4 1/2] Fix overlay for vaapisink

2019-01-15 Thread Frediano Ziglio
> > On 1/15/19 12:22 PM, Frediano Ziglio wrote: > > The vaapisink plugin to support overlay requires the application > > to provide the proper context. If you don't do so the plugin will > > cause a crash of the application. > > To avoid possible thread errors from X11 create a new Display > >

Re: [Spice-devel] [PATCH spice 4/8 v2] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-15 Thread Frediano Ziglio
> > Receives the GraphicsDeviceInfo message from the streaming agent and > stores the data in a list on the streaming device. > > Signed-off-by: Lukáš Hrázký > --- > server/display-limits.h| 3 ++ > server/red-qxl.c | 2 +- > server/red-stream-device.c | 67

Re: [Spice-devel] [PATCH v2] gstreamer: set timestamp in buffer's GstReferenceTimestampMeta

2019-01-15 Thread Frediano Ziglio
> > Currently we set timestamps as buffer's PTS, this value may be changed by > the pipeline in some cases and cause an unexpected buffer warnings (when > GstVideoOverlay is not used). Use GstReferenceTimestampMeta when > synchronization is made by spice. > > Before applying this patch you can

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-15 Thread Jani Nikula
On Tue, 15 Jan 2019, Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here I went through all > drivers.

Re: [Spice-devel] [PATCH v2] gstreamer: set timestamp in buffer's GstReferenceTimestampMeta

2019-01-15 Thread Frediano Ziglio
> > Hi, > > On 1/15/19 3:42 PM, Frediano Ziglio wrote: > >> Currently we set timestamps as buffer's PTS, this value may be changed by > >> the pipeline in some cases and cause an unexpected buffer warnings (when > >> GstVideoOverlay is not used). Use GstReferenceTimestampMeta when > >>

[Spice-devel] [spice-gtk [rfc] 0/2] Clipboard managers and Spice

2019-01-15 Thread Victor Toso
From: Victor Toso Hi, Several iteractions trying to avoid some bug in X11 but in the end I found the iteraction with Clibpoard managers (or any other application that request/set clipboard data) a bit more urgent. Simple try here, to not allow another application to request clipboard data from

[Spice-devel] [spice-gtk [rfc] 1/2] gtk-session: introduce clipboard-managers property

2019-01-15 Thread Victor Toso
From: Victor Toso SpiceGtkSession::allow-clipboard-managers property is introduced to enable other applications in the Client OS to set or fetch clipboard data from a spice-gtk-session that is under keyboard-grab, which is expected to be in use by the user. This option is disabled by default as

[Spice-devel] [spice-gtk [rfc] 2/2] gtk-session: add request targets delayed

2019-01-15 Thread Victor Toso
From: Victor Toso If SpiceGtkSession::allow-clipboard-managers is disabled, while the spice client does not hold the keyboard-grab, every owner-change event to clipboard change will be delayed and requested later when keyboard-grab is received. Signed-off-by: Victor Toso ---

Re: [Spice-devel] [spice-gtk [rfc] 0/2] Clipboard managers and Spice

2019-01-15 Thread Victor Toso
Hi, On Tue, Jan 15, 2019 at 05:11:36PM +0100, Victor Toso wrote: > From: Victor Toso > > Hi, > > Several iteractions trying to avoid some bug in X11 but in the end I > found the iteraction with Clibpoard managers (or any other application > that request/set clipboard data) a bit more urgent. >

Re: [Spice-devel] [PATCH spice-common 3/3] docs: add spice URI scheme

2019-01-15 Thread Christophe Fergeau
On Tue, Jan 15, 2019 at 06:00:09PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jan 15, 2019 at 4:53 PM Christophe Fergeau > wrote: > > > > Hey, > > > > On Fri, Jan 11, 2019 at 11:07:14PM +0400, marcandre.lur...@redhat.com wrote: > > > @@ -0,0 +1,131 @@ > > > +The "spice" URI scheme > > >

[Spice-devel] [PATCH vd_agent_linux 3/7] file-xfers: Allocate file_path after disk space check

2019-01-15 Thread Frediano Ziglio
Variable is not used. Keep code to create file together. Signed-off-by: Frediano Ziglio --- src/vdagent/file-xfers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c index 67bad9e..77029e7 100644 ---

[Spice-devel] [PATCH vd_agent_linux 2/7] file-xfers: Reuse cleanup code

2019-01-15 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/vdagent/file-xfers.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c index 78d5db3..67bad9e 100644 --- a/src/vdagent/file-xfers.c +++ b/src/vdagent/file-xfers.c @@ -220,10 +220,7

[Spice-devel] [PATCH vd_agent_linux 4/7] Factor out function to create file

2019-01-15 Thread Frediano Ziglio
Make easier to test file creation Signed-off-by: Frediano Ziglio --- src/vdagent/file-xfers.c | 88 src/vdagent/file-xfers.h | 1 + 2 files changed, 53 insertions(+), 36 deletions(-) diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c

[Spice-devel] [PATCH vd_agent_linux 7/7] file-xfer: Do not strip filename if file part has no extension

2019-01-15 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/tests/test-file-xfers.c | 6 ++ src/vdagent/file-xfers.c| 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tests/test-file-xfers.c b/src/tests/test-file-xfers.c index 494adc9..e87efac 100644 --- a/src/tests/test-file-xfers.c

[Spice-devel] [PATCH vd_agent_linux 5/7] Add a test to test file creation

2019-01-15 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- Makefile.am | 22 +++ src/tests/test-file-xfers.c | 73 + 2 files changed, 95 insertions(+) create mode 100644 src/tests/test-file-xfers.c diff --git a/Makefile.am b/Makefile.am index

[Spice-devel] [PATCH vd_agent_linux 6/7] Fix race condition creating file

2019-01-15 Thread Frediano Ziglio
Avoid race condition creating file between checking file existence with stat() and opening with open(). Directly create the file passing the O_EXCL flag. Signed-off-by: Frediano Ziglio --- src/vdagent/file-xfers.c | 28 ++-- 1 file changed, 14 insertions(+), 14

[Spice-devel] [PATCH vd_agent_linux 1/7] file-xfers: Initialise correctly AgentFileXferTask::file_fd field

2019-01-15 Thread Frediano Ziglio
Correct invalid value for a file descriptor is -1, not 0. Signed-off-by: Frediano Ziglio --- src/vdagent/file-xfers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c index b5aedd0..78d5db3 100644 --- a/src/vdagent/file-xfers.c +++

Re: [Spice-devel] [spice-gtk [rfc] 0/2] Clipboard managers and Spice

2019-01-15 Thread Marc-André Lureau
On Tue, Jan 15, 2019 at 8:11 PM Victor Toso wrote: > > From: Victor Toso > > Hi, > > Several iteractions trying to avoid some bug in X11 but in the end I > found the iteraction with Clibpoard managers (or any other application > that request/set clipboard data) a bit more urgent. > > Simple try

Re: [Spice-devel] [spice-gtk v5] gtk-session: improve doc on owner-changed

2019-01-15 Thread Jakub Janku
Hi, On Tue, Jan 15, 2019 at 11:22 AM Victor Toso wrote: > > From: Victor Toso > > * Set -> Sets (Jakub) > * Clarify when onwer-changed event is called with > owner == self (Jakub) > > Signed-off-by: Victor Toso > --- > src/spice-gtk-session.c | 5 ++--- > 1 file changed, 2 insertions(+), 3

Re: [Spice-devel] What algorithm does SPICE server use in video stream detection?

2019-01-15 Thread 陈炤
Hi Christophe, Thank you for your answer! BR, Don At 2019-01-15 21:54:36, "Christophe Fergeau" wrote: >Hey, > >On Thu, Jan 10, 2019 at 03:03:05PM +0800, 陈炤 wrote: >> Hi, >> >> >> >> I read the spice server code, and find that the video stream detection >> code is in

Re: [Spice-devel] [spice-gtk [rfc] 0/2] Clipboard managers and Spice

2019-01-15 Thread Victor Toso
Hi, On Wed, Jan 16, 2019 at 12:08:31AM +0400, Marc-André Lureau wrote: > On Tue, Jan 15, 2019 at 8:11 PM Victor Toso wrote: > > > > From: Victor Toso > > > > Hi, > > > > Several iteractions trying to avoid some bug in X11 but in the end I > > found the iteraction with Clibpoard managers (or any

[Spice-devel] [spice-gtk v1 2/2] gtk-session: clipboard request: notify agent on failure

2019-01-15 Thread Victor Toso
From: Victor Toso Similar to 172c521271a3d - if we don't, the agent might be waiting for data till some timeout happens in the system, blocking copy-paste feature and possibly freezing applications. A way to reproduce is copy-paste big clipboard data between two spice clients. Also add some

[Spice-devel] [spice-gtk v1 1/2] gtk-session: clipboard: avoid possible index out of bounds

2019-01-15 Thread Victor Toso
From: Victor Toso Should first check selection value before accessing those arrays. The get_clipboard_from_selection() function does that for us. Signed-off-by: Victor Toso --- src/spice-gtk-session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [Spice-devel] [spice-gtk v4 2/2] gtk-session: clipboard: x11: owner-change improvement

2019-01-15 Thread Victor Toso
Hi, On Tue, Jan 15, 2019 at 01:40:48AM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jan 15, 2019 at 12:40 AM Jakub Janku wrote: > > > > Hi, > > > > On Mon, Jan 14, 2019 at 1:41 PM Marc-André Lureau > > wrote: > > > > > > Hi > > > > > > On Mon, Jan 14, 2019 at 4:34 PM Victor Toso wrote: >

Re: [Spice-devel] [PATCH v2] gstreamer: set timestamp in buffer's GstReferenceTimestampMeta

2019-01-15 Thread Snir Sheriber
Hi, On 1/15/19 3:42 PM, Frediano Ziglio wrote: Currently we set timestamps as buffer's PTS, this value may be changed by the pipeline in some cases and cause an unexpected buffer warnings (when GstVideoOverlay is not used). Use GstReferenceTimestampMeta when synchronization is made by spice.

Re: [Spice-devel] [vdagent-linux] systemd: Update path in unit file

2019-01-15 Thread Frediano Ziglio
> > From: Christian Hesse > > When loading the unit file, systemd 240 logs: > > systemd[1]: /usr/lib/systemd/system/spice-vdagentd.service:9: PIDFile= > references path below legacy directory /var/run/, updating > /var/run/spice-vdagentd/spice-vdagentd.pid → >

Re: [Spice-devel] [spice-gtk v4 1/2] gtk-session: improve doc on owner-changed

2019-01-15 Thread Victor Toso
Hi, On Mon, Jan 14, 2019 at 08:49:52PM +0100, Jakub Janku wrote: > Hi, > > On Mon, Jan 14, 2019 at 1:34 PM Victor Toso wrote: > > > > From: Victor Toso > > > > * Sets -> Set (Jakub) > > * Clarify when onwer-changed event is called with > > owner == self (Jakub) > > > > Signed-off-by: Victor

Re: [Spice-devel] [spice-gtk v3 1/3] gtk-session: clipboard: document owner-changed event

2019-01-15 Thread Victor Toso
Hi, On Mon, Jan 14, 2019 at 10:15:04PM +0100, Jakub Janku wrote: > > The comment refers to the gtk_clipboard_clear() not > > owner-changed event so you are right, of course. This comment > > was probably a left over from different interactions that I > > did in this code :( > > > > I'll send a

[Spice-devel] [PATCH spice-gtk v4 1/2] Fix overlay for vaapisink

2019-01-15 Thread Frediano Ziglio
The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to vaapisink. Signed-off-by: Frediano Ziglio ---

[Spice-devel] [spice-gtk v5] gtk-session: improve doc on owner-changed

2019-01-15 Thread Victor Toso
From: Victor Toso * Set -> Sets (Jakub) * Clarify when onwer-changed event is called with owner == self (Jakub) Signed-off-by: Victor Toso --- src/spice-gtk-session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c

[Spice-devel] [PATCH spice-gtk v4 2/2] spice-widget: Avoid deadlock for VAAPI

2019-01-15 Thread Frediano Ziglio
Calling gst_video_overlay_handle_events after gst_video_overlay_set_window_handle causes often a deadlock in gstreamer-vaapi. Reverting the calls fix this issue. Signed-off-by: Frediano Ziglio --- src/spice-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git