Re: [Spice-devel] [spice-server v2 1/3] channel: Call red_channel_disconnect_if_pending_send() from red_channel_wait_all_sent()

2017-09-12 Thread Frediano Ziglio
> > red_channel_disconnect_if_pending_send() and red_channel_wait_all_sent() are > always called together, we can remove one of the 2 methods. > > Signed-off-by: Christophe Fergeau > --- > Only change since v1 is an added comment to red_channel_wait_all_sent() > to explicitly indicate it's going

[Spice-devel] [spice-server v2 3/3] channel: Remove no longer used red_channel_apply_clients{_data, }

2017-09-12 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- No changes since v1 server/red-channel.c | 10 -- server/red-channel.h | 6 -- 2 files changed, 16 deletions(-) diff --git a/server/red-channel.c b/server/red-channel.c index b8f4f54e8..b4a92340f 100644 --- a/server/red-channel.c +++ b/server/r

[Spice-devel] [spice-server v2 2/3] channel: Remove red_channel_client_disconnect_if_pending_send()

2017-09-12 Thread Christophe Fergeau
There is exactly one user in RedChannel, and this can be reimplemented using already public RedChannelClient API. No need for an extra function very specialized function with a not great name. This commit thus removes one method from RedChannelClient public API, and replaces it with an equivalent

[Spice-devel] [spice-server v2 1/3] channel: Call red_channel_disconnect_if_pending_send() from red_channel_wait_all_sent()

2017-09-12 Thread Christophe Fergeau
red_channel_disconnect_if_pending_send() and red_channel_wait_all_sent() are always called together, we can remove one of the 2 methods. Signed-off-by: Christophe Fergeau --- Only change since v1 is an added comment to red_channel_wait_all_sent() to explicitly indicate it's going to disconnect sl

Re: [Spice-devel] [PATCH spice-server v2] tests: Avoid to disable all deprecation warnings just for expect functions

2017-09-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Sep 12, 2017 at 12:52:37PM +0100, Frediano Ziglio wrote: > In case GLib don't provide these functions we use replacements so > there's no need to have a warning if these functions are called. > This potentially capture other compatibility issues in the tests

[Spice-devel] [PATCH spice-server v2] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-09-12 Thread Frediano Ziglio
Instead of having MarkerPipeItem pointing to an external variable with the possibility to forget to reset it and have a dangling pointer use reference counting to keep the item and mark the item when sent. This item is placed into the queue to understand when it was sent. The current implementation

Re: [Spice-devel] [PATCH spice-server 09/10] red-channel-client: Simplify red_channel_client_wait_pipe_item_sent

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 08:30:40AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 11:15:46AM +0100, Frediano Ziglio wrote: > > > Instead of inserting the marker after the item (the tail of the queue > > > is the first item to send) and then have to wait again if for > > > the specif

Re: [Spice-devel] [PATCH spice-server 16/16] red-worker: Start processing commands as soon as possible

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:37:43AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 04:03:18AM -0400, Frediano Ziglio wrote: > > > ping > > > > > > > > > > > When the worker is started it could take a while to start > > > > processing commands. > > > > The reason is that the dispatc

[Spice-devel] [PATCH spice-server v2] red-channel-client: Simplify red_channel_client_wait_pipe_item_sent loop

2017-09-12 Thread Frediano Ziglio
Avoid repeating the same code twice. red_channel_client_send send the item pending (or the a part of it). If there are no item pending the function does nothing (so checking for blocked channel is useless). Also red_channel_client_send is already called from red_channel_client_push checking for cha

Re: [Spice-devel] [PATCH spice-server 09/10] red-channel-client: Simplify red_channel_client_wait_pipe_item_sent

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:15:46AM +0100, Frediano Ziglio wrote: > > Instead of inserting the marker after the item (the tail of the queue > > is the first item to send) and then have to wait again if for > > the specific item place the marker before the item so waiting for > > the marker to b

Re: [Spice-devel] [PATCH spice-server 1/3] test-gst: Remove useless check

2017-09-12 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 06:28:40PM +0200, Christophe Fergeau wrote: > On Mon, Sep 11, 2017 at 09:12:16AM +0100, Frediano Ziglio wrote: > > encoder_name is never NULL as already initialized with "mjpeg" value. > > Note that this is going to be changed in patch 3/3 I guess no answer means this is i

Re: [Spice-devel] [PATCH spice-server 09/10] red-channel-client: Simplify red_channel_client_wait_pipe_item_sent

2017-09-12 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:15:46AM +0100, Frediano Ziglio wrote: > Instead of inserting the marker after the item (the tail of the queue > is the first item to send) and then have to wait again if for > the specific item place the marker before the item so waiting for > the marker to be sent assure

[Spice-devel] [PATCH spice-server v2] tests: Avoid to disable all deprecation warnings just for expect functions

2017-09-12 Thread Frediano Ziglio
In case GLib don't provide these functions we use replacements so there's no need to have a warning if these functions are called. This potentially capture other compatibility issues in the tests that would be ignored having all deprecation warnings disabled. Tested with GLib 2.28 and 2.52. Signed

Re: [Spice-devel] check style (was: test-gst: Remove options parsing leaks)

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 07:19:32AM -0400, Frediano Ziglio wrote: > > About checking for pointer assuming you have to check for NULL > > would mean the NULL is not 0 which would mean that > > memset(structure_ptr, 0, sizeof(structure)) cannot set pointer > > to NULL which would mean that assumi

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 07:28:59AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 06:55:41AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > > > > > In this case you are introducing a regression, current code is > > >

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 06:55:41AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > > > > In this case you are introducing a regression, current code is > > > > designed to support this already. I cannot surely say that this > > > >

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 07:19:32AM -0400, Frediano Ziglio wrote: > About checking for pointer assuming you have to check for NULL > would mean the NULL is not 0 which would mean that > memset(structure_ptr, 0, sizeof(structure)) cannot set pointer > to NULL which would mean that assuming pointer in

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 05:44:23AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Sep 12, 2017 at 04:11:57AM -0400, Frediano Ziglio wrote: > > > > > > > > > > On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > On Tue, Sep 12, 2017 at 03:19:12AM -

Re: [Spice-devel] [PATCH spice-server v3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Sep 12, 2017 at 10:45:08AM +0100, Frediano Ziglio wrote: > Command line options are not freed at the end of the program. > These are detected as leaks by leak detector tools like address sanitizer. > > Signed-off-by: Frediano Ziglio > --- > server/tests/te

Re: [Spice-devel] [spice-server v2] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 06:56:34AM -0400, Frediano Ziglio wrote: > > > > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > > defined this way, otherwise this will break display-channel.c > > compilation. > > This is different from most AC_DEFINE() preprocessor constants which

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 06:55:41AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > > > In this case you are introducing a regression, current code is > > > designed to support this already. I cannot surely say that this > > > patch is an imp

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > > > > On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > > > In this case you are introducing a regression, current code is > > > designed to support this already. I cannot surely say that this > > > patch is an improvement. > > > > By that reasoning, any patch which makes so

Re: [Spice-devel] [spice-server v2] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > defined this way, otherwise this will break display-channel.c > compilation. > This is different from most AC_DEFINE() preprocessor constants which are > usually either set to 1, or unset. > > This commit switches ENABLE_E

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > > In this case you are introducing a regression, current code is > > designed to support this already. I cannot surely say that this > > patch is an improvement. > > By that reasoning, any patch which makes some functions stat

Re: [Spice-devel] [PATCH spice-server v2 2/2] reds: Fix leaks if reds_init_client_ssl_connection fails

2017-09-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Sep 12, 2017 at 09:03:16AM +0100, Frediano Ziglio wrote: > If a client is unable to complete the TLS handshake phase > reds_init_client_ssl_connection leaked some memory as the stream is not > correctly freed. > This also causes the stream to send the SPICE_C

Re: [Spice-devel] [PATCH spice-server v2 1/2] tests: Check leaks in spice_server_add_ssl_client

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 09:03:15AM +0100, Frediano Ziglio wrote: > Currently is possible to trigger a leak passing an invalid connection. "by passing" > This can happen if the client open a connection and then closes it "opens" Acked-by: Christophe Fergeau _

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 06:42:16AM -0400, Frediano Ziglio wrote: > In this case you are introducing a regression, current code is > designed to support this already. I cannot surely say that this > patch is an improvement. By that reasoning, any patch which makes some functions static or remove so

[Spice-devel] [spice-server v2] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be defined this way, otherwise this will break display-channel.c compilation. This is different from most AC_DEFINE() preprocessor constants which are usually either set to 1, or unset. This commit switches ENABLE_EXTRA_CHECK settin

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 06:20:55AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Sep 12, 2017 at 06:06:29AM -0400, Frediano Ziglio wrote: > > > > > > > > > > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > > > > > defined this way, otherwise this will break display-

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 06:20:55AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 06:06:29AM -0400, Frediano Ziglio wrote: > > > > > > > > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > > > > defined this way, otherwise this will break display-channel.c > > >

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 06:06:29AM -0400, Frediano Ziglio wrote: > > > > > > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > > > defined this way, otherwise this will break display-channel.c > > > compilation. > > > This is different from most AC_DEFINE() preprocessor co

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 06:06:29AM -0400, Frediano Ziglio wrote: > > > > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > > defined this way, otherwise this will break display-channel.c > > compilation. > > This is different from most AC_DEFINE() preprocessor constants which

Re: [Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Frediano Ziglio
> > Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be > defined this way, otherwise this will break display-channel.c > compilation. > This is different from most AC_DEFINE() preprocessor constants which are > usually either set to 1, or unset. > > This commit switches ENABLE_E

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 05:44:23AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 04:11:57AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Zi

[Spice-devel] [spice-server] build-sys: Improve ENABLE_EXTRA_CHECK setting

2017-09-12 Thread Christophe Fergeau
Currently, ENABLE_EXTRA_CHECK is defined to be 0 or 1, and has to be defined this way, otherwise this will break display-channel.c compilation. This is different from most AC_DEFINE() preprocessor constants which are usually either set to 1, or unset. This commit switches ENABLE_EXTRA_CHECK settin

[Spice-devel] [PATCH spice-server v3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
Command line options are not freed at the end of the program. These are detected as leaks by leak detector tools like address sanitizer. Signed-off-by: Frediano Ziglio --- server/tests/test-gst.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) Change

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 04:11:57AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > > > > > > > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > > > > > > -const EncoderInfo *encoder = > > > > > > > >

Re: [Spice-devel] [PATCH spice-server 10/10] tests: Avoid to disable all deprecation warnings just for expect functions

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:48:06AM -0400, Frediano Ziglio wrote: > > > +static inline void > > > +g_test_assert_expected_messages_internal_no_warnings(const char *domain, > > > + const char *file, > > > int > > > line, const char *func) > > > +{

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 04:11:57AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > > > > > -const EncoderInfo *encoder = get_encoder_info(encoder_name)

Re: [Spice-devel] [PATCH spice-server 07/10] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 04:15:15AM -0400, Frediano Ziglio wrote: > > > > > > On Mon, Sep 11, 2017 at 11:15:44AM +0100, Frediano Ziglio wrote: > > > > Instead of having MarkerPipeItem pointing to a variable on an external > > > > stuff with the possibility to forget to reset it or having possi

Re: [Spice-devel] [PATCH spice-server 07/10] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 04:15:15AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 11:15:44AM +0100, Frediano Ziglio wrote: > > > Instead of having MarkerPipeItem pointing to a variable on an external > > > stuff with the possibility to forget to reset it or having possibly > > > dan

Re: [Spice-devel] [PATCH spice-server 07/10] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:15:44AM +0100, Frediano Ziglio wrote: > > Instead of having MarkerPipeItem pointing to a variable on an external > > stuff with the possibility to forget to reset it or having possibly > > dangling pointers use reference counting to keep the item and > > mark the ite

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > > > > -const EncoderInfo *encoder = get_encoder_info(encoder_name); > > > > > > +const EncoderInfo *encoder = get_encoder_info(encoder_na

[Spice-devel] [PATCH spice-server v2 2/2] red-channel-client: Prevent too tight loop waiting for ACKs

2017-09-12 Thread Frediano Ziglio
RedChannelClient has a "handle-acks" feature. If this feature is enabled after the configured number of messages it waits for an ACK. If is waiting for an ACK it stops sending messages. However the write notification was not disabled causing the loop event to always trigger as the socket in this ca

[Spice-devel] [PATCH spice-server v2 1/2] red-channel-client: Introduce a helper to update watch event mask

2017-09-12 Thread Frediano Ziglio
This helper will be reused by following patch. Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- server/red-channel-client.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) Changes since v1. - move SPICE_WATCH_EVENTS_READ_WRITE definition to

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:41:15AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > > > -const EncoderInfo *encoder = get_encoder_info(encoder_name); > > > > > +const EncoderInfo *encoder = get_encoder_info(encoder_name ? > > > >

Re: [Spice-devel] [PATCH spice-server 07/10] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-09-12 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:15:44AM +0100, Frediano Ziglio wrote: > Instead of having MarkerPipeItem pointing to a variable on an external > stuff with the possibility to forget to reset it or having possibly > dangling pointers use reference counting to keep the item and > mark the item when sent.

[Spice-devel] [PATCH spice-server v2 2/2] reds: Fix leaks if reds_init_client_ssl_connection fails

2017-09-12 Thread Frediano Ziglio
If a client is unable to complete the TLS handshake phase reds_init_client_ssl_connection leaked some memory as the stream is not correctly freed. This also causes the stream to send the SPICE_CHANNEL_EVENT_DISCONNECTED event. Otherwise only SPICE_CHANNEL_EVENT_CONNECTED was sent. Signed-off-by: F

[Spice-devel] [PATCH spice-server v2 1/2] tests: Check leaks in spice_server_add_ssl_client

2017-09-12 Thread Frediano Ziglio
Currently is possible to trigger a leak passing an invalid connection. This can happen if the client open a connection and then closes it without writing or reading any data. Signed-off-by: Frediano Ziglio --- server/tests/Makefile.am | 1 + server/tests/test-leaks.c | 12 2 files

Re: [Spice-devel] [PATCH spice-server 06/10] red-channel-client: Early check for valid stream

2017-09-12 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:15:43AM +0100, Frediano Ziglio wrote: > Code tested for the presence of a stream while initializing > RedChannelClient. "The code tests for the presence of RedChannelClient::stream while initializing RedChannelClient" > However the check was done too late possibly using

Re: [Spice-devel] [PATCH spice-server 10/10] tests: Avoid to disable all deprecation warnings just for expect functions

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:15:47AM +0100, Frediano Ziglio wrote: > > In case GLib don't provide these functions we use replacements so > > there's no need to have a warning if these functions are called. > > This potentially capture other compatibility issues in the tests > > that would be ign

Re: [Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:48:47AM -0400, Frediano Ziglio wrote: > > > > > > On Mon, Sep 11, 2017 at 11:15:42AM +0100, Frediano Ziglio wrote: > > > > Usually configuration macros are defined to 0 or undefined. > > > > For this reason these macros are sometimes checked using #if > > > > and som

[Spice-devel] [PATCH spice-html5 v2 4/4] Display: Add support for the VP9 codec type

2017-09-12 Thread Tomáš Bohdálek
--- display.js | 27 +-- spiceconn.js | 2 ++ webm.js | 13 +++-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/display.js b/display.js index 0868f91..d711ced 100644 --- a/display.js +++ b/display.js @@ -543,7 +543,8 @@ SpiceDisplayConn.pro

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
> > On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > > -const EncoderInfo *encoder = get_encoder_info(encoder_name); > > > > +const EncoderInfo *encoder = get_encoder_info(encoder_name ? > > > > encoder_name : "mjpeg"); > > > > if (!encoder) { > > > > g_

[Spice-devel] [PATCH spice-server v2] red-worker: Start processing commands as soon as possible

2017-09-12 Thread Frediano Ziglio
When the worker is started it could take a while to start processing commands. The reason is that the dispatcher handler is called after the worker so GLib will receive a FALSE answer to both prepare and check callbacks of the RedWorkerSource causing GLib to wait till another event is received. Thi

[Spice-devel] [PATCH spice-html5 v2 1/4] spiceconn: Add function to test channel capabilities

2017-09-12 Thread Tomáš Bohdálek
This will be used in other commits. --- spiceconn.js | 19 +++ 1 file changed, 19 insertions(+) diff --git a/spiceconn.js b/spiceconn.js index 33e7388..3948ae5 100644 --- a/spiceconn.js +++ b/spiceconn.js @@ -243,6 +243,9 @@ SpiceConn.prototype = else if (this.state == "l

Re: [Spice-devel] [PATCH spice-server 16/16] red-worker: Start processing commands as soon as possible

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 04:03:18AM -0400, Frediano Ziglio wrote: > > ping > > > > > > > > When the worker is started it could take a while to start > > > processing commands. > > > The reason is that the dispatcher handler is called after > > > the worker so GLib will receive a FALSE answer

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:19:12AM -0400, Frediano Ziglio wrote: > > > -const EncoderInfo *encoder = get_encoder_info(encoder_name); > > > +const EncoderInfo *encoder = get_encoder_info(encoder_name ? > > > encoder_name : "mjpeg"); > > > if (!encoder) { > > > g_printerr("Encod

Re: [Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:14:22AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 11:13:04AM +0100, Frediano Ziglio wrote: > > > Instead of assuming that the system can safely do unaligned access > > > to memory use packed structures to allow the compiler generate > > > best code po

[Spice-devel] [PATCH spice-server v2 1/3] test-gst: Remove useless check

2017-09-12 Thread Frediano Ziglio
encoder_name is never NULL as already initialized with "mjpeg" value. Signed-off-by: Frediano Ziglio --- server/tests/test-gst.c | 5 - 1 file changed, 5 deletions(-) diff --git a/server/tests/test-gst.c b/server/tests/test-gst.c index d4ebaacf6..40f738d78 100644 --- a/server/tests/test-gst

[Spice-devel] [PATCH spice-server v2 3/3] test-gst: Free pipelines

2017-09-12 Thread Frediano Ziglio
Pipelines are never freed. These are detected as leaks by leak detector tools like address sanitizer. Signed-off-by: Frediano Ziglio --- server/tests/test-gst.c | 15 +++ 1 file changed, 15 insertions(+) Changes since v1: - improved commit message. diff --git a/server/tests/test-gs

[Spice-devel] [PATCH spice-server v2 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
Command line options are not freed at the end of the program. These are detected as leaks by leak detector tools like address sanitizer. Signed-off-by: Frediano Ziglio --- server/tests/test-gst.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Changes since v1: - imp

Re: [Spice-devel] [PATCH spice-server 2/3] test-gst: Remove options parsing leaks

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 09:12:17AM +0100, Frediano Ziglio wrote: > > These leaks are detected for instance by address sanitizer. > > More details about what these leaks are would be welcome... > I can guess what these are, but the commit log is really where this > belongs. > > > > > > Sign

[Spice-devel] [PATCH spice-common v2] codegen: Make the compiler work out better way to write unaligned memory

2017-09-12 Thread Frediano Ziglio
Instead of assuming that the system can safely do unaligned access to memory use packed structures to allow the compiler generate best code possible. A packed structure tells the compiler to not leave padding inside it and that the structure can be unaligned so any field can be unaligned having to

Re: [Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:13:04AM +0100, Frediano Ziglio wrote: > > Instead of assuming that the system can safely do unaligned access > > to memory use packed structures to allow the compiler generate > > best code possible. > > It will generate the best code possible, but assuming all acce