Re: [Spice-devel] Streaming video command line

2011-04-21 Thread Andrea Celestino
Thanks. Now I am trying to study the code I am interested in. Unfortunately, the file red_worker.c is very huge and there are not any comments that can help me. I would like to know: 1- which parts/functions of red_worker.c are video related stuff? 2- You said: determine if a given draw

Re: [Spice-devel] Streaming video command line

2011-04-21 Thread Alon Levy
On Thu, Apr 21, 2011 at 10:22:15AM +0200, Andrea Celestino wrote: Thanks. Now I am trying to study the code I am interested in. Unfortunately, the file red_worker.c is very huge and there are not any comments that can help me. I would like to know: 1- which parts/functions of red_worker.c

[Spice-devel] [PATCH 01/15] server: use is_primary_surface

2011-04-21 Thread Christophe Fergeau
red_worker.c has an is_primary_surface helper function, but there were some places in the file not using it. This patch fixes that --- server/red_worker.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index

[Spice-devel] [PATCH 03/15] configure.ac: fix use of AC_ARG_ENABLE

2011-04-21 Thread Christophe Fergeau
Most uses of AC_ARG_ENABLE were buggy: - when passing --disable-xxx, configure.ac would behave as if it was passed --enable-xxx - passing --enable-xxx=foo would leak into the summary, ie the summary (at the end of configure) would say xxx: foo instead of xxx: yes This patch fixes these 2

[Spice-devel] [PATCH 04/15] configure.ac: remove unused dynamic linkage flag

2011-04-21 Thread Christophe Fergeau
configure.ac defines a SPICEC_STATIC_LINKAGE_BDYNAMIC variable when --enable-static-linkage is not set, but it's never used. SPICEC_STATIC_LINKAGE_BSTATIC is used in client/, but since we are using libtool, it might be more appropriate to use 'make LDFLAGS=-all-static' to achieve static link. ---

[Spice-devel] [PATCH 06/15] client: make building client optional

2011-04-21 Thread Christophe Fergeau
--- Makefile.am |6 +- configure.ac |8 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index d90357f..853ffea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = common server client python_modules +SUBDIRS =

[Spice-devel] [PATCH 07/15] common: add extern C guards to headers

2011-04-21 Thread Christophe Fergeau
Since some spice C++ code is using code from common/, the C functions need to be marked as such for the C++ compiler, otherwise we'll get linkage issues. --- common/canvas_base.h |8 common/canvas_utils.h |8 common/draw.h |8 common/gdi_canvas.h

[Spice-devel] [PATCH 08/15] common: add missing header guards to gl_canvas.h

2011-04-21 Thread Christophe Fergeau
--- common/gl_canvas.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/gl_canvas.h b/common/gl_canvas.h index ff3fba0..4a15668 100644 --- a/common/gl_canvas.h +++ b/common/gl_canvas.h @@ -20,6 +20,9 @@ #include canvas_base.h #include region.h +#ifndef

[Spice-devel] [PATCH 09/15] client: remove c++ wrappers

2011-04-21 Thread Christophe Fergeau
client/ contains several .cpp file which only #include a .c file of the same name. This is unusual and seems to only be done to get C++ name mangling on the symbols defined in the C file. Now that all headers files in common/ use extern C, these wrappers are no longer useful. ---

[Spice-devel] [PATCH 10/15] server: remove extra arg in reds_on_main_agent_start call

2011-04-21 Thread Christophe Fergeau
--- server/main_channel.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/main_channel.c b/server/main_channel.c index 1f407e2..4ddd38b 100644 --- a/server/main_channel.c +++ b/server/main_channel.c @@ -677,7 +677,7 @@ static int

[Spice-devel] [PATCH 11/15] use foo(void) instead of foo() in prototypes

2011-04-21 Thread Christophe Fergeau
In C, the latter isn't a prototype for a function with no arg, but declares a function with an undefined number of args. --- common/gdi_canvas.c |2 +- common/gdi_canvas.h |2 +- common/gl_canvas.c |2 +- common/gl_canvas.h |2 +- common/quic.c |2

[Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Christophe Fergeau
--- server/smartcard.c| 17 + server/smartcard.h| 17 + server/zlib_encoder.c | 17 + 3 files changed, 51 insertions(+), 0 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index 892500b..d201f5f 100644 ---

[Spice-devel] [PATCH 0/8] Rework autotools build system

2011-04-21 Thread Christophe Fergeau
Hi, The autotools build system looked a bit convoluted when I looked at it, and after toying a bit with it when preparing the earlier patchset, it seemed more fragile than autotools build systems generally are. This patchseries rework the Makefile.am to get something more standard. make

[Spice-devel] [PATCH 1/8] autotools: refactor the whole build machinery

2011-04-21 Thread Christophe Fergeau
spice Makefile.am setup is a bit confusing, with source file names being listed several times in different Makefile.am (generally, once in EXTRA_DIST and another time in another Makefile.am in _SOURCES). The client binaries are built by client/x11/Makefile.am, which means recursing into client,

[Spice-devel] [PATCH 2/8] configure.ac: remove unused AC_SUBST

2011-04-21 Thread Christophe Fergeau
--- configure.ac |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 92957fa..7e77672 100644 --- a/configure.ac +++ b/configure.ac @@ -13,9 +13,6 @@ AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip subdir-objects])

[Spice-devel] [PATCH 4/8] add #include config.h to all source files

2011-04-21 Thread Christophe Fergeau
When using config.h, it must be the very first include in all source files since it contains #define that may change the compilation process (eg libc structure layout changes when it's used to enable large file support on 32 bit x86 archs). This commit adds it at the beginning of all .c and .cpp

[Spice-devel] [PATCH 5/8] add config.h to autogenerated files too

2011-04-21 Thread Christophe Fergeau
Modify the python (de)marshaller generator to add #include config.h at the beginning of the C files it generates --- spice_codegen.py |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/spice_codegen.py b/spice_codegen.py index 3a9989d..4dad06c 100755 ---

[Spice-devel] [PATCH 6/8] use AC_DEFINE instead of hardcoding preprocessor flags

2011-04-21 Thread Christophe Fergeau
Now that all source files include config.h, we can use AC_DEFINE to enable/disable optional features (opengl, cegui). This is cleaner than directly appending -Dxxx directives to the preprocessor flags. This also guarantees that everything will be appropriately rebuilt when using the same source

[Spice-devel] [PATCH 7/8] s/USE_OGL/USE_OPENGL

2011-04-21 Thread Christophe Fergeau
This is more explicit about what it does, and not much longer --- client/application.cpp |6 ++-- client/application.h |2 +- client/common.h |2 +- client/display_channel.cpp | 40 +++---

[Spice-devel] [PATCH 8/8] add comment to beginning of autogenerated files

2011-04-21 Thread Christophe Fergeau
--- spice_codegen.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spice_codegen.py b/spice_codegen.py index 4dad06c..05b47f6 100755 --- a/spice_codegen.py +++ b/spice_codegen.py @@ -142,6 +142,8 @@ writer.set_option(source, os.path.basename(proto_file))

Re: [Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Hans de Goede
Nitpick: you're adding a LGPL header, might be good to reflect that in the commit message. On 04/21/2011 01:53 PM, Christophe Fergeau wrote: --- server/smartcard.c| 17 + server/smartcard.h| 17 + server/zlib_encoder.c | 17 + 3

Re: [Spice-devel] [PATCH 00/15] Misc cleanup and fixes

2011-04-21 Thread Hans de Goede
Ack series (with one minor nitpick for 14/15). On 04/21/2011 01:53 PM, Christophe Fergeau wrote: Hi, Here are more cleanup and fixes I did while looking at spice code. The main changes are fixes for --enable/--disable in configure.ac, and the removal of the .cpp wrappers for files from common/

Re: [Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Christophe Fergeau
On Thu, Apr 21, 2011 at 02:03:10PM +0200, Hans de Goede wrote: Nitpick: you're adding a LGPL header, might be good to reflect that in the commit message. Indeed, will fix before pushing. For the record, I used the same licence as most of spice (a few files are under more permissive licences).

Re: [Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Hans de Goede
Hi, On 04/21/2011 02:09 PM, Christophe Fergeau wrote: On Thu, Apr 21, 2011 at 02:03:10PM +0200, Hans de Goede wrote: Nitpick: you're adding a LGPL header, might be good to reflect that in the commit message. Indeed, will fix before pushing. For the record, I used the same licence as most of

Re: [Spice-devel] [PATCH 09/15] client: remove c++ wrappers

2011-04-21 Thread Alon Levy
On Thu, Apr 21, 2011 at 01:53:34PM +0200, Christophe Fergeau wrote: client/ contains several .cpp file which only #include a .c file of the same name. This is unusual and seems to only be done to get C++ name mangling on the symbols defined in the C file. Now that all headers files in common/

Re: [Spice-devel] [PATCH 09/15] client: remove c++ wrappers

2011-04-21 Thread Uri Lublin
On 04/21/2011 02:53 PM, Christophe Fergeau wrote: client/ contains several .cpp file which only #include a .c file of the same name. This is unusual and seems to only be done to get C++ name mangling on the symbols defined in the C file. Now that all headers files in common/ use extern C, these