[Spice-devel] [PATCH linux vdagent v5 1/7] Add lookup_xrand_output_for_device_info()

2019-01-23 Thread Jonathon Jongsma
Add a function to look up an xrandr output for a given device display id. This uses sysfs and the drm subsystem to lookup information about a graphics device output. It then compares the drm output name to xrandr output names to try to match that device output to an xrandr output. This is necesary

[Spice-devel] [PATCH linux vdagent v5 7/7] Send display_id down to the vdagentd daemon

2019-01-23 Thread Jonathon Jongsma
Add a display_id field to the structure that we use to send down the list of guest display resolutions to the vdagentd daemon. This allows us to map the spice display id to the proper X display for determining mouse locations, etc. In the case where we have an mjpeg plugin running in the

[Spice-devel] [PATCH linux vdagent v5 5/7] Factor a function out of get_current_mon_config()

2019-01-23 Thread Jonathon Jongsma
When sending the guest xorg resolution to the vdagentd daemon, we get the current resolution with this function, which returns a VDAgentMonitorsConfig structure that must then be converted to the structure that we send to the daemon. Rather than re-using this function that returns the wrong type,

[Spice-devel] [PATCH linux vdagent v5 2/7] Look up and store xrandr output in display map

2019-01-23 Thread Jonathon Jongsma
Instead of storing each device address and device display ID in the hash table, simply use the lookup_xrandr_output_for_device_info() function to look up the ID of the xrandr output and store that in the hash table. --- src/vdagent/x11-priv.h | 2 +- src/vdagent/x11-randr.c | 58

[Spice-devel] [PATCH linux vdagent v5 4/7] Use guest output map to determine xrandr output

2019-01-23 Thread Jonathon Jongsma
instead of using the spice display id directly as the xrandr output, look it up using our new guest output map --- src/vdagent/x11-randr.c | 81 - 1 file changed, 72 insertions(+), 9 deletions(-) diff --git a/src/vdagent/x11-randr.c

[Spice-devel] [PATCH linux vdagent v5 3/7] Make clearer distinctions between output ids

2019-01-23 Thread Jonathon Jongsma
There are basically three ways to refer to an output within vdagent: - The index of the array of MonitorConfig message. This is essentially a "spice display id" - the index of the array of xrandr outputs. This is the "output index" - the xrandr output id. This is the "output ID"

[Spice-devel] [PATCH linux vdagent v5 6/7] Use new function in vdagent_x11_send_daemon_guest_xorg_res()

2019-01-23 Thread Jonathon Jongsma
Rather than getting the current guest resolution in a VDAgentMonitorsConfig struct and then translating it to a new struct type for sending down to the daemon, simply use the new function that was factored out in a previous commit and populate the message struct directly. ---

[Spice-devel] [PATCH linux vdagent v5 0/7] Use the PCI addr and display ID

2019-01-23 Thread Jonathon Jongsma
This is a patch set that handles the PCI address and device dispay ID sent down to the agent by the server, and uses that to maintain a map for looking up a particular xrandr output for a given spice display id. This patch series builds on the patch from Lukas titled "Receive the

Re: [Spice-devel] [spice-gtk v1 1/2] display-gst: small refactor get_decoded_frame()

2019-01-23 Thread Frediano Ziglio
> > From: Victor Toso > > Small refactor to make each code block a bit more obvious. > > This code should (1) find the @buffer in the queue; (2) remove all old > elements from queue. That perfectly fit in two loops in sequence, but > they don't need to be nested and they don't need to use the

[Spice-devel] [spice-gtk v1 1/2] display-gst: small refactor get_decoded_frame()

2019-01-23 Thread Victor Toso
From: Victor Toso Small refactor to make each code block a bit more obvious. This code should (1) find the @buffer in the queue; (2) remove all old elements from queue. That perfectly fit in two loops in sequence, but they don't need to be nested and they don't need to use the same pointer

[Spice-devel] [spice-gtk v1 2/2] Require GStreamer 1.10 and above

2019-01-23 Thread Victor Toso
From: Victor Toso Odd minor versions are for development version, which means that checks on 1.9.x should be considered for development while normal environments should be running the stable. Some timeline of stable releases: 1.14.4: Tue Oct 2 22:53:01 2018 +0100 1.14.0: Mon Mar 19 20:09:51

Re: [Spice-devel] [PATCH vd_agent_linux] test-file-xfers: Make test succeed if run as root

2019-01-23 Thread Frediano Ziglio
ping > > If test is run with root (for instance on Gitlab CI) creating > a file on a directory with no permission will succeed and > test will fail. > Instead create a link trying to create a file in /proc/1 > directory (which fails also using root account). > > Signed-off-by: Frediano Ziglio

Re: [Spice-devel] [PATCH spice-server] red-worker: Remove obsolete type definition

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 05:16:32PM +, Frediano Ziglio wrote: > AsyncCommand was removed in eb6c8ba025. > > Signed-off-by: Frediano Ziglio Acked-by: Victor Toso > --- > server/red-worker.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/server/red-worker.h

Re: [Spice-devel] [PATCH spice-gtk v3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 08:32:22PM +, Frediano Ziglio wrote: > This patch is based on some work from Victor Toso (statistics) and > Snir Sheriber (GStreamer probing). > All GstBuffers are queued into decoding_queue and a probe is > attached to the sink in order to understand when the

[Spice-devel] [PATCH spice-gtk v3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Frediano Ziglio
This patch is based on some work from Victor Toso (statistics) and Snir Sheriber (GStreamer probing). All GstBuffers are queued into decoding_queue and a probe is attached to the sink in order to understand when the buffers are decoded. Previously we didn't add frames to decoding_queue in case of

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 11:28:57AM +, Frediano Ziglio wrote: > This patch is based on some work from Victor Toso (statistics) and > Snir Sheriber (GStreamer probing). > All GstBuffers are queued into decoding_queue and a probe is > attached to the sink in order to understand when the

[Spice-devel] [PATCH spice-server] image-encoders: Initialize Zlib lazily

2019-01-23 Thread Frediano Ziglio
Zlib structure take up more than 1MB and it is rarely used nowadays as it is not much effective. Initialise it only when necessary saving some memory in the normal case. Signed-off-by: Frediano Ziglio --- server/image-encoders.c | 18 ++ 1 file changed, 10 insertions(+), 8

Re: [Spice-devel] [PATCH spice-server] ci: Remove dependencies from copr build

2019-01-23 Thread Eduardo Lima (Etrunko)
On 1/23/19 3:02 PM, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > .gitlab-ci.yml | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index a757e7a3..9ce95c00 100644 > --- a/.gitlab-ci.yml > +++ b/.gitlab-ci.yml >

[Spice-devel] [PATCH spice-server] red-worker: Remove obsolete type definition

2019-01-23 Thread Frediano Ziglio
AsyncCommand was removed in eb6c8ba025. Signed-off-by: Frediano Ziglio --- server/red-worker.h | 1 - 1 file changed, 1 deletion(-) diff --git a/server/red-worker.h b/server/red-worker.h index 68c5058d..767329da 100644 --- a/server/red-worker.h +++ b/server/red-worker.h @@ -26,7 +26,6 @@

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

2019-01-23 Thread Sam Ravnborg
Hi Daniel. On Thu, Jan 17, 2019 at 10:03:34PM +0100, 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

[Spice-devel] [PATCH spice-server] ci: Remove dependencies from copr build

2019-01-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- .gitlab-ci.yml | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a757e7a3..9ce95c00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,15 @@ image: fedora:latest before_script: - >

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Frediano Ziglio
> On Wed, Jan 23, 2019 at 08:57:36AM -0500, Frediano Ziglio wrote: > > > On Wed, Jan 23, 2019 at 11:28:57AM +, Frediano Ziglio wrote: > > > > This patch is based on some work from Victor Toso (statistics) and > > > > Snir Sheriber (GStreamer probing). > > > > All GstBuffers are queued into

Re: [Spice-devel] [PATCH spice-server v4 0/4] Integrate recorder library and use on server

2019-01-23 Thread Victor Toso
Hi, On Mon, Jan 14, 2019 at 02:20:15PM +, Frediano Ziglio wrote: > Changes since v3: > - split spice-common update; > - update recorder commit to remove Meson error. This was basically acked in v3, the spice-common one was small suggestion; you decided to wait for the meson error to get

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Victor Toso
On Wed, Jan 23, 2019 at 08:57:36AM -0500, Frediano Ziglio wrote: > > On Wed, Jan 23, 2019 at 11:28:57AM +, Frediano Ziglio wrote: > > > This patch is based on some work from Victor Toso (statistics) and > > > Snir Sheriber (GStreamer probing). > > > All GstBuffers are queued into

Re: [Spice-devel] [PATCH spice-server v4 0/4] Integrate recorder library and use on server

2019-01-23 Thread Frediano Ziglio
ping > > Changes since v3: > - split spice-common update; > - update recorder commit to remove Meson error. > > Changes since v2: > - rebased > > Frediano Ziglio (4): > Integrate recorder library > Update spice-common submodule > Allows to enable recorder integration > Trace streaming

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Frediano Ziglio
> Hi, > > On Wed, Jan 23, 2019 at 11:28:57AM +, Frediano Ziglio wrote: > > This patch is based on some work from Victor Toso (statistics) and > > Snir Sheriber (GStreamer probing). > > All GstBuffers are queued into decoding_queue and a probe is > > attached to the sink in order to understand

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 11:28:57AM +, Frediano Ziglio wrote: > This patch is based on some work from Victor Toso (statistics) and > Snir Sheriber (GStreamer probing). > All GstBuffers are queued into decoding_queue and a probe is > attached to the sink in order to understand when the

Re: [Spice-devel] [PATCH spice-gtk 2/3] channel-display-gst: factor out get_decoded_frame

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 08:11:17AM -0500, Frediano Ziglio wrote: > > > > Hi, > > > > On Wed, Jan 23, 2019 at 12:08:53AM +, Frediano Ziglio wrote: > > > Separate the code from fetch_pending_sample that extracts the > > > SpiceGstFrame relative to a give GstBuffer. > > > This new function

[Spice-devel] 2012 paper comparing SPICE, VNC and NX

2019-01-23 Thread Christophe de Dinechin
Hey team, It’s still time to wish you a happy new year, I guess… :-) While looking for illustrations for an upcoming DevConf.cz talk, I cam across the following article that compares three remote desktop protocols: http://www.diva-portal.org/smash/get/diva2:530960/FULLTEXT01.pdf. It was

Re: [Spice-devel] [PATCH spice-gtk 2/3] channel-display-gst: factor out get_decoded_frame

2019-01-23 Thread Frediano Ziglio
> > Hi, > > On Wed, Jan 23, 2019 at 12:08:53AM +, Frediano Ziglio wrote: > > Separate the code from fetch_pending_sample that extracts the > > SpiceGstFrame relative to a give GstBuffer. > > This new function will be reused later. > > > > Signed-off-by: Frediano Ziglio > > --- > >

Re: [Spice-devel] [PATCH spice-gtk 1/3] channel-display-gst: Make some SpiceGstFrame names more clear

2019-01-23 Thread Victor Toso
Hi, On Wed, Jan 23, 2019 at 12:08:52AM +, Frediano Ziglio wrote: > Add encoded_ and decoded_ prefix to understand which side > they refer. > > Signed-off-by: Frediano Ziglio Acked-by: Victor Toso > --- > src/channel-display-gst.c | 36 ++-- > 1 file

[Spice-devel] [PATCH spice-gtk v2 3/3] channel-display: Instrument code to get frame and queue statistics

2019-01-23 Thread Frediano Ziglio
This patch is based on some work from Victor Toso (statistics) and Snir Sheriber (GStreamer probing). All GstBuffers are queued into decoding_queue and a probe is attached to the sink in order to understand when the buffers are decoded. When a buffer is decoded the time spent and queue length are

[Spice-devel] [PATCH] usbredirserver: Make compile under MacOS

2019-01-23 Thread Frediano Ziglio
This fixes Gitlab issue #9 (cfr https://gitlab.freedesktop.org/spice/usbredir/issues/9). Signed-off-by: Frediano Ziglio --- usbredirserver/usbredirserver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/usbredirserver/usbredirserver.c b/usbredirserver/usbredirserver.c index

[Spice-devel] [PATCH spice-gtk] spice-marshal: Remove unused marshalling closure

2019-01-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/spice-marshal.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/spice-marshal.txt b/src/spice-marshal.txt index 92087c58..cf35790e 100644 --- a/src/spice-marshal.txt +++ b/src/spice-marshal.txt @@ -11,6 +11,5 @@ VOID:UINT,POINTER,UINT

[Spice-devel] [PATCH spice-gtk] build-sys: Make git-version-gen work again with Meson

2019-01-23 Thread Frediano Ziglio
d0cbd9618f0b removed the ability to use git-version-gen to generate proper version string. Generate .tarball-version file in the distribution file to allow building from tarball. Do not use MESON_SOURCE_ROOT calling git-version-gen command as this won't be expanded. Change directory in