[Spice-devel] [PATCH spice-server] style: Specify the possibility of "pragma once" usage

2019-08-11 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- docs/spice_style.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index e4d7fc6d1..89a550fb8 100644 --- a/docs/spice_style.txt +++ b/docs/spice_style.txt @@ -372,6 +372,15 @@ The macro may include addit

[Spice-devel] [PATCH spice-server v3] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Frediano Ziglio
On LLP64 platforms (like Windows) a virtual address cannot be represented by a "unsigned long" type, so use uintptr_t which is defined as an integral type large like a pointer. "address_delta" and "addr_delta" are a difference of pointers so use same type size. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Snir Sheriber
On 8/11/19 7:41 PM, Frediano Ziglio wrote: On 8/11/19 3:12 PM, Frediano Ziglio wrote: Hi On 7/23/19 11:22 AM, Frediano Ziglio wrote: When to Say "a" or "an" | Pronunciation | EnglishClub https://www.

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Frediano Ziglio
> On 8/11/19 3:12 PM, Frediano Ziglio wrote: > > > Hi > > > > > > On 7/23/19 11:22 AM, Frediano Ziglio wrote: > > > > > > > When to Say "a" or "an" | Pronunciation | EnglishClub > > > > > > > > > > https://www.englishclub.com/pronunciation/a-an.htm > > > > > > > > > > On LLP64 platforms

Re: [Spice-devel] [spice-server PATCH 2/3] test-loop: increment a variable outside of spice_assert

2019-08-11 Thread Frediano Ziglio
> > On 8/11/19 2:56 PM, Frediano Ziglio wrote: > >> > >> spice_assert is a macro and it may be that variable will > >> be incremented twice (in theory, possibly not in practice). > >> > > > > No, the issue is that Coverity assume that code can be stripped out > > as usually assert can be stripped

Re: [Spice-devel] [spice-server PATCH 3/3] valgrind/spice.supp: add missing ...

2019-08-11 Thread Uri Lublin
On 8/11/19 2:57 PM, Frediano Ziglio wrote: There may to be another function (cache_alt_names) between gnutls_x509_ext_import_subject_alt_names and gnutls_x509_crt_import cache_alt_names is a static function in gnutls/lib/x509/x509.c used only in gnutls_x509_crt_import and may be inlined b

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Snir Sheriber
On 8/11/19 3:12 PM, Frediano Ziglio wrote: Hi On 7/23/19 11:22 AM, Frediano Ziglio wrote: When to Say "a" or "an" | Pronunciation | EnglishClub https://www.englishclub.com/pronunciation/a-an.htm On LLP64 platforms (like Windows) a virtual address canno

Re: [Spice-devel] [RFC spice-streaming-agent 2/4] spice-streaming-agent: fully reset the capture loop on start/stop requests

2019-08-11 Thread Snir Sheriber
Hi, On 8/6/19 6:34 PM, Kevin Pouget wrote: With this patch, spice-streaming-agent exits the frame-sending loop when START/STOP requests are received. This allows the recomputation of the most suitable capture/encoding plugin, that may have been updated with START/STOP message. Signed-off-by: K

Re: [Spice-devel] [RFC spice-streaming-agent 4/4] concrete-agent: prioritize requested codec for plugin selection

2019-08-11 Thread Snir Sheriber
On 8/6/19 6:34 PM, Kevin Pouget wrote: This patch gives more priority to the requested video codecs when selecting the FrameCapture plugin, instead of its hard-coded rank. We may want to mention this priority also in the header file. Snir. The client_codecs storage structure is changed fro

Re: [Spice-devel] [RFC spice-streaming-agent 1/4] gst-plugin: allow the instantiation of multiple GST encoder plugins

2019-08-11 Thread Snir Sheriber
Hi, Tested, seems to work well! switching is smooth, if codec fails it falls back to mjpeg (not very loudly), no default gstreamer codec currently. As mentioned i find this feature useful :) another comment below On 8/6/19 6:34 PM, Kevin Pouget wrote: With this patch, spice-streaming-agent

Re: [Spice-devel] [spice-server PATCH 2/3] test-loop: increment a variable outside of spice_assert

2019-08-11 Thread Uri Lublin
On 8/11/19 2:56 PM, Frediano Ziglio wrote: spice_assert is a macro and it may be that variable will be incremented twice (in theory, possibly not in practice). No, the issue is that Coverity assume that code can be stripped out as usually assert can be stripped out (defining NDEBUG for normal

Re: [Spice-devel] [spice-server PATCH 1/3] compress_seg: comment out unused assignment

2019-08-11 Thread Frediano Ziglio
> > CLANG warning: "Value stored to 'ref_limit' is never read" > > Commenting out since there is a ToDo that refers to ref_limit > > Found by Covscan. > > Signed-off-by: Uri Lublin > --- > > Should the comment be deleted too ? > I think would be time to revise the comment and maybe the code

Re: [Spice-devel] [PATCH v2 spice-streaming-agent 2/2] gst-plugin: Shorten template declarations

2019-08-11 Thread Uri Lublin
I'd add a comment saying that The typeUPtr templates are very similar except for the unref-function. This patch is replacing the templates with a macro which also accepts an unref-function and is using this macro to define all typeUPtr types. On 8/11/19 11:54 AM, Frediano Ziglio wrote: Signed-o

[Spice-devel] [PATCH spice-server v2] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Frediano Ziglio
On LLP64 platforms (like Windows) a virtual address cannot be represented by a "unsigned long" type, so use uintptr_t which is defined as an integral type large like a pointer. "address_delta" and "addr_delta" are a difference of pointers so use same type size. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Frediano Ziglio
> Hi > On 7/23/19 11:22 AM, Frediano Ziglio wrote: > > When to Say "a" or "an" | Pronunciation | EnglishClub > > > https://www.englishclub.com/pronunciation/a-an.htm > > > On LLP64 platforms (like Windows) a virtual address cannot > > > be represented by a "unsigned long" type, so use uintptr_t

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Snir Sheriber
On 8/11/19 2:56 PM, Snir Sheriber wrote: Hi On 7/23/19 11:22 AM, Frediano Ziglio wrote:  When to Say "a" or "an" | Pronunciation | EnglishClub https://www.englishclub.com/pronunciation/a-an.htm Oops, wrong pasting, please ignore :P On LLP64 platforms (like Windows) a virtual a

Re: [Spice-devel] [spice-server PATCH 3/3] valgrind/spice.supp: add missing ...

2019-08-11 Thread Frediano Ziglio
> > There may to be another function (cache_alt_names) between > gnutls_x509_ext_import_subject_alt_names and > gnutls_x509_crt_import > > cache_alt_names is a static function in gnutls/lib/x509/x509.c > used only in gnutls_x509_crt_import and may be inlined by > the compiler. > > Signed-off

Re: [Spice-devel] [spice-server PATCH 2/3] test-loop: increment a variable outside of spice_assert

2019-08-11 Thread Frediano Ziglio
> > spice_assert is a macro and it may be that variable will > be incremented twice (in theory, possibly not in practice). > No, the issue is that Coverity assume that code can be stripped out as usually assert can be stripped out (defining NDEBUG for normal assert). > Simply do it one line abo

Re: [Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-08-11 Thread Snir Sheriber
Hi On 7/23/19 11:22 AM, Frediano Ziglio wrote:  When to Say "a" or "an" | Pronunciation | EnglishClub https://www.englishclub.com/pronunciation/a-an.htm On LLP64 platforms (like Windows) a virtual address cannot be represented by a "unsigned long" type, so use uintptr_t which is define

[Spice-devel] [spice-server PATCH 3/3] valgrind/spice.supp: add missing ...

2019-08-11 Thread Uri Lublin
There may to be another function (cache_alt_names) between gnutls_x509_ext_import_subject_alt_names and gnutls_x509_crt_import cache_alt_names is a static function in gnutls/lib/x509/x509.c used only in gnutls_x509_crt_import and may be inlined by the compiler. Signed-off-by: Uri Lublin ---

[Spice-devel] [spice-server PATCH 1/3] compress_seg: comment out unused assignment

2019-08-11 Thread Uri Lublin
CLANG warning: "Value stored to 'ref_limit' is never read" Commenting out since there is a ToDo that refers to ref_limit Found by Covscan. Signed-off-by: Uri Lublin --- Should the comment be deleted too ? --- server/glz-encode.tmpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[Spice-devel] [spice-server PATCH 2/3] test-loop: increment a variable outside of spice_assert

2019-08-11 Thread Uri Lublin
spice_assert is a macro and it may be that variable will be incremented twice (in theory, possibly not in practice). Simply do it one line above. Found by covscan Signed-off-by: Uri Lublin --- server/tests/test-loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server

Re: [Spice-devel] [PATCH spice-gtk] Use "#pragma once" instead of preprocessor guards

2019-08-11 Thread Frediano Ziglio
> > > Oh, just noticed, if this pushed, we may want to change the spice > style doc as well > > Snir. > Nice idea. Maybe add this style for new file. Would also be nice to update also spice-common and spice-server. > On 8/11/19 12:01 PM, Snir Sheriber wrote: > > Hi, > > > > It could be an iss

Re: [Spice-devel] [spice-common PATCH 2/2] test-marshallers.proto: ArrayMessage: make space for name

2019-08-11 Thread Frediano Ziglio
> > Do it by adding @end tag. > Without it 'name' is a non-allocated pointer. > > Signed-off-by: Uri Lublin > --- > > Is there a better way to do it ? Is not clear what you are trying to achieve with this patch. > > --- > > tests/test-marshallers.proto | 2 +- > 1 file changed, 1 insertion

Re: [Spice-devel] [spice-common PATCH 1/2] ptypes.py: remove useless condition member != None

2019-08-11 Thread Frediano Ziglio
> > member = None is set before the if/else condition. > In the else code, when member is set it is checked > and if not-None it breaks out of the loop. > If the code is still in the loop for sure member is None. > > Found by covscan. > > Signed-off-by: Uri Lublin Acked > --- > python_module

Re: [Spice-devel] [PATCH spice-html5] Make the audio and video uids different.

2019-08-11 Thread Frediano Ziglio
Hi, I saw no updated since the review. Is this patch still useful? Frediano > > Hi, > > On Fri, 2016-12-23 at 10:53 -0600, Jeremy White wrote: > > This does not appear to matter, but let's just be safe. > > > sure > > > > Signed-off-by: Jeremy White > > --- > >  webm.js | 2 +- > >  1 file

Re: [Spice-devel] [PATCH spice-html5] Review the webm audio track header and remove the fixmes.

2019-08-11 Thread Frediano Ziglio
Hi, why this was not merged ? Frediano > > Ack > > Thanks, > Pavel > > On Fri, 2016-12-23 at 10:53 -0600, Jeremy White wrote: > > This involved a review of the Firefox parsing code along > > with the official specifcation, and setting these fields > > to the specified default values. > > >

[Spice-devel] [spice-common PATCH 1/2] ptypes.py: remove useless condition member != None

2019-08-11 Thread Uri Lublin
member = None is set before the if/else condition. In the else code, when member is set it is checked and if not-None it breaks out of the loop. If the code is still in the loop for sure member is None. Found by covscan. Signed-off-by: Uri Lublin --- python_modules/ptypes.py | 2 -- 1 file chan

[Spice-devel] [spice-common PATCH 2/2] test-marshallers.proto: ArrayMessage: make space for name

2019-08-11 Thread Uri Lublin
Do it by adding @end tag. Without it 'name' is a non-allocated pointer. Signed-off-by: Uri Lublin --- Is there a better way to do it ? --- tests/test-marshallers.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-marshallers.proto b/tests/test-marshallers.pro

Re: [Spice-devel] [PATCH spice-gtk] Use "#pragma once" instead of preprocessor guards

2019-08-11 Thread Snir Sheriber
Oh, just noticed, if this pushed, we may want to change the spice style doc as well Snir. On 8/11/19 12:01 PM, Snir Sheriber wrote: Hi, It could be an issue with duplicated name headers but seems we do not have such headers. Ack On 7/29/19 5:23 PM, Frediano Ziglio wrote: Guards currently a

Re: [Spice-devel] [PATCH spice-server] red-replay-qxl: Fix replay on 32 bit systems

2019-08-11 Thread Snir Sheriber
Hi, Acked-by: Snir Sheriber nice catch Snir. On 7/23/19 11:22 AM, Frediano Ziglio wrote: On 32 systems pointers are 32 bit while QXLPHYSICAL is always 64 bit. Using pointer -> intptr_t -> QXLPHYSICAL conversion cause pointers to have higher 32 bit set to 1 if the address is >= 0x8000. Th

Re: [Spice-devel] [PATCH spice-server 1/2] replay: Remove some goto statement

2019-08-11 Thread Snir Sheriber
Acked-by: Snir Sheriber On 7/23/19 11:22 AM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- server/tests/replay.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index e3ef7bf15..992f26d63 10064

Re: [Spice-devel] [PATCH spice-gtk] Use "#pragma once" instead of preprocessor guards

2019-08-11 Thread Snir Sheriber
Hi, It could be an issue with duplicated name headers but seems we do not have such headers. Ack On 7/29/19 5:23 PM, Frediano Ziglio wrote: Guards currently are quite different in format. Unify updating to "#pragma once" syntax. This syntax is used by GTK tools too. To avoid possible regressio

Re: [Spice-devel] [PATCH v2 spice-streaming-agent 2/2] gst-plugin: Shorten template declarations

2019-08-11 Thread Frediano Ziglio
> > Signed-off-by: Snir Sheriber > --- > Another suggestion to shoten the templates + changing subject It looks pretty neat this version, see below for minor comments. And more type safe too. > --- > src/gst-plugin.cpp | 64 +++--- > 1 file changed, 20 i

Re: [Spice-devel] [PATCH v2 spice-streaming-agent 1/2] gst-plugin: Free input buffer and XImage as soon as possible

2019-08-11 Thread Frediano Ziglio
> > This also fixes a memory leak of GstBuffer > > Signed-off-by: Snir Sheriber Acked > --- > Changes from v1: > -commit message > -Style > -- > src/gst-plugin.cpp | 36 +++- > 1 file changed, 23 insertions(+), 13 deletions(-) > > diff --git a/src/gst-plugin.