Re: [Spice-devel] [RFC spice-gtk 0/1] Direct rendering

2018-03-12 Thread Frediano Ziglio
> > This patch utilize the GstVideoOverlay interface when the > client is running under x window system and it receives a > full-screen stream that is decoded using gstreamer (gst => > 1.9.0) > > Some notes > - It currently checks for full screen but probably a msg > says it is streaming mode

[Spice-devel] [PATCH spice-server 1/2] Change ENABLE_EXTRA_CHECKS statements to #ifdef

2018-03-12 Thread Eduardo Lima (Etrunko)
This patch makes it clear that this is a configure switch and not a variable defined somewhere else in the code. Signed-off-by: Eduardo Lima (Etrunko) --- server/display-channel.c | 4 +++- server/reds.c| 6 +++--- server/stream-device.c | 22

[Spice-devel] [PATCH spice-server 2/2] Rename stream-device.[ch] to red-stream-device.[ch]

2018-03-12 Thread Eduardo Lima (Etrunko)
In order to avoid confusion with file named stream-device.h, from spice-protocol. Signed-off-by: Eduardo Lima (Etrunko) --- server/Makefile.am | 4 ++-- server/{stream-device.c => red-stream-device.c} | 4 +--- server/{stream-device.h =>

Re: [Spice-devel] [spice-server v2 0/7] Add test-listen test case

2018-03-12 Thread Frediano Ziglio
> > While working on some bug/new feature for SPICE, I added a test case for > our spice_server_set_port/_set_tls/... API. While the work I did this > for still needs some work, this test case should be good enough on its > own. > > Christophe > > Christophe Fergeau (7): > reds: Close sockets

Re: [Spice-devel] [PATCH v2] Use scancode instead of keycode names

2018-03-12 Thread Daniel P . Berrangé
On Fri, Mar 09, 2018 at 09:30:00AM +0100, Olivier Fourdan wrote: > When running on Xwayland, the keycode mapping property is not available, > which causes unknown keycode mapping errors and the keyboard doesn't > work. > > Check for a known scancode (“XK_Page_Up”) which differs to distinguish >

Re: [Spice-devel] [PATCH v2] Use scancode instead of keycode names

2018-03-12 Thread Christophe Fergeau
Hey, On Fri, Mar 09, 2018 at 09:30:00AM +0100, Olivier Fourdan wrote: > When running on Xwayland, the keycode mapping property is not available, > which causes unknown keycode mapping errors and the keyboard doesn't > work. > > Check for a known scancode (“XK_Page_Up”) which differs to

Re: [Spice-devel] [spice-gtk v2] channel-display: Use GHashTable to keep stream's structure

2018-03-12 Thread Lukáš Hrázký
On Mon, 2018-03-12 at 16:25 +0100, Victor Toso wrote: > Hi, > > Thanks for taking a look! > > On Mon, Mar 12, 2018 at 04:13:30PM +0100, Lukáš Hrázký wrote: > > On Wed, 2018-03-07 at 09:17 +0100, Victor Toso wrote: > > > From: Victor Toso > > > > > > The major issue with

[Spice-devel] [spice-server v2 1/7] reds: Close sockets when failing to watch them

2018-03-12 Thread Christophe Fergeau
Currently if we fail to set up the watch waiting for accept() to be called on the socket, we still keep the network socket(s) open even if we are not going to be able to use it. This commit makes sure it's closed a set to -1 when such a failure occurs rather than having a half initialized

[Spice-devel] [spice-server v2 2/7] build: Bump glib version

2018-03-12 Thread Christophe Fergeau
From spice-gtk b312ca08 commit: "At the moment: - Fedora 26 has 2.52 - Fedora 25 has 2.50 - Fedora 24 has 2.48 - CentOS 7 has 2.46 - Debian 9 has 2.50" RHEL6 only have 2.28, but glib 2.32 is only used in a test case at the moment. Signed-off-by: Christophe Fergeau

[Spice-devel] [spice-server v2 6/7] test-listen: Add TLS test

2018-03-12 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/tests/test-listen.c | 106 +++-- 1 file changed, 103 insertions(+), 3 deletions(-) diff --git a/server/tests/test-listen.c b/server/tests/test-listen.c index 7843c9b67..77a185abf 100644 ---

[Spice-devel] [spice-server v2 4/7] test-listen: Add test case for port/address configuration

2018-03-12 Thread Christophe Fergeau
This test case will be testing the external spice-server API to configure the address/port it's listening on. For now it sets up a listening server, spawns a thread which is going to connect to that port, and check it gets the REDQ magic upon connection. It will be extended to test for Unix

[Spice-devel] [spice-server v2 3/7] tests: basic-event-loop: Silence debug message

2018-03-12 Thread Christophe Fergeau
There is currently a debug printf which is always shown when a mainloop event is triggered. This is unlikely to be useful unless one is debugging the event loop code. Signed-off-by: Christophe Fergeau --- server/tests/basic-event-loop.c | 2 +- 1 file changed, 1

[Spice-devel] [spice-server v2 5/7] test-listen: Add event loop helpers

2018-03-12 Thread Christophe Fergeau
These factor a bit of common code, and more importantly, help with freeing all event loop related data at the end of each test. Signed-off-by: Christophe Fergeau --- server/tests/test-listen.c | 118 +++-- 1 file changed, 83

[Spice-devel] [spice-server v2 7/7] test-listen: Add Unix socket test

2018-03-12 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- configure.ac | 3 +++ server/tests/Makefile.am | 4 +++- server/tests/test-listen.c | 38 +++--- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/configure.ac

[Spice-devel] [spice-server v2 0/7] Add test-listen test case

2018-03-12 Thread Christophe Fergeau
While working on some bug/new feature for SPICE, I added a test case for our spice_server_set_port/_set_tls/... API. While the work I did this for still needs some work, this test case should be good enough on its own. Christophe Christophe Fergeau (7): reds: Close sockets when failing to

Re: [Spice-devel] [spice-gtk v1 1/3] channel-display: remove id parameter from helper function

2018-03-12 Thread Victor Toso
On Mon, Mar 12, 2018 at 04:13:06PM +0100, Lukáš Hrázký wrote: > On Fri, 2018-03-02 at 12:39 +0100, Victor Toso wrote: > > From: Victor Toso > > > > Instead of passing the id parameter for destroy_display_stream() which > > is only used for debug, let's store the id when

Re: [Spice-devel] [spice-gtk v2] channel-display: Use GHashTable to keep stream's structure

2018-03-12 Thread Victor Toso
Hi, Thanks for taking a look! On Mon, Mar 12, 2018 at 04:13:30PM +0100, Lukáš Hrázký wrote: > On Wed, 2018-03-07 at 09:17 +0100, Victor Toso wrote: > > From: Victor Toso > > > > The major issue with the current approach is that it relies on > > the ID from

Re: [Spice-devel] [spice-gtk v2] channel-display: Use GHashTable to keep stream's structure

2018-03-12 Thread Lukáš Hrázký
On Wed, 2018-03-07 at 09:17 +0100, Victor Toso wrote: > From: Victor Toso > > The major issue with the current approach is that it relies on > the ID from SpiceMsgDisplayStreamCreate to create the smallest 2^n > sized array that could fit the stream's id as index. > > This

Re: [Spice-devel] [spice-gtk v1 1/3] channel-display: remove id parameter from helper function

2018-03-12 Thread Lukáš Hrázký
On Fri, 2018-03-02 at 12:39 +0100, Victor Toso wrote: > From: Victor Toso > > Instead of passing the id parameter for destroy_display_stream() which > is only used for debug, let's store the id when creating the stream at > display_stream_create(). > > Another benefit is

Re: [Spice-devel] [PATCH spice-server] red-record-qxl: fix clang warning

2018-03-12 Thread Christophe Fergeau
Ok, Acked-by: Christophe Fergeau On Mon, Mar 12, 2018 at 12:33:47PM +, Frediano Ziglio wrote: > Fix clang warning: > > red-record-qxl.c:893:13: error: variable 'fd_in' is used uninitialized > whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] >

[Spice-devel] [PATCH spice-server] red-record-qxl: fix clang warning

2018-03-12 Thread Frediano Ziglio
Fix clang warning: red-record-qxl.c:893:13: error: variable 'fd_in' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (ret) This is technically impossible but is not on a hot path. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] [PATCH] usbredirserver : enable TCP keepalive

2018-03-12 Thread Victor Toso
Hi, On Fri, Mar 09, 2018 at 04:16:43PM +0800, zhenwei.pi wrote: > In some bad cases, for example, host OS crashes without > sending any FIN to usbredirserver, and usbredirserver > will keep idle connection for a long time. > > We can also set the kernel arguments, it means that other > processes

Re: [Spice-devel] [spice-server 4/8] test-listen: Add test case port/address configuration

2018-03-12 Thread Christophe Fergeau
On Fri, Mar 09, 2018 at 06:36:24AM -0500, Frediano Ziglio wrote: > > +static void test_connect_plain(void) > > +{ > > +GThread *thread; > > +int result; > > + > > +/* server */ > > +SpiceServer *server = spice_server_new(); > > +core = basic_event_loop_init(); > > +