Re: [Spice-devel] [PATCH spice 02/18] build-sys: build a utility libserver.la

2015-12-16 Thread Frediano Ziglio
> > This allow tests programs to link with statically built library to access all > symbols > Why is this necessary? libtool can run programs pointing to shared libraries. Frediano > Signed-off-by: Marc-André Lureau > --- > server/Makefile.am | 10 +++--- > 1 file changed, 7 insertions(+

Re: [Spice-devel] [PATCH spice 02/18] build-sys: build a utility libserver.la

2015-12-16 Thread Frediano Ziglio
> > > > > This allow tests programs to link with statically built library to access > > all > > symbols > > > > Why is this necessary? libtool can run programs pointing to shared libraries. > > Frediano > > > Signed-off-by: Marc-André Lureau > > --- > > server/Makefile.am | 10 +++--- >

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Frediano Ziglio
> > Group the test utility in a library, to avoid repeating the same > sources. > > Signed-off-by: Marc-André Lureau > --- > server/tests/Makefile.am | 25 ++--- > 1 file changed, 10 insertions(+), 15 deletions(-) > > diff --git a/server/tests/Makefile.am b/server/tests/Mak

Re: [Spice-devel] [PATCH spice 01/18] stream: consitify reds_stream_get_family() argument

2015-12-16 Thread Frediano Ziglio
> > Signed-off-by: Marc-André Lureau > --- > server/reds-stream.c | 2 +- > server/reds-stream.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/server/reds-stream.c b/server/reds-stream.c > index f5244e2..c0f443b 100644 > --- a/server/reds-stream.c > +++ b/server/re

Re: [Spice-devel] [PATCH spice 06/18] tests: remote test_util.h

2015-12-16 Thread Frediano Ziglio
> > Replace ASSERT() with spice_assert(). > Typo on comment "remove" not "remote". > Signed-off-by: Marc-André Lureau > --- > server/tests/Makefile.am | 2 -- > server/tests/basic_event_loop.c | 1 - > server/tests/test_display_base.c | 23 +++ > server/tests/te

Re: [Spice-devel] [PATCH spice 02/18] build-sys: build a utility libserver.la

2015-12-16 Thread Marc-André Lureau
- Original Message - > > > > > > > > This allow tests programs to link with statically built library to access > > > all > > > symbols > > > > > > > Why is this necessary? libtool can run programs pointing to shared > > libraries. Because I access symbols that are not exported ("all

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Marc-André Lureau
Hi - Original Message - > > > > Group the test utility in a library, to avoid repeating the same > > sources. > > > > Signed-off-by: Marc-André Lureau > > --- > > server/tests/Makefile.am | 25 ++--- > > 1 file changed, 10 insertions(+), 15 deletions(-) > > > > dif

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > Group the test utility in a library, to avoid repeating the same > > > sources. > > > > > > Signed-off-by: Marc-André Lureau > > > --- > > > server/tests/Makefile.am | 25 ++--- > > > 1 file changed, 10 insertions(+), 15

[Spice-devel] [PATCH] stats: use CLOCK_THREAD_CPUTIME_ID for cpu statistics

2015-12-16 Thread Frediano Ziglio
Avoid to call red_worker_get_clockid. This function returns uninitialized value at the timer DisplayChannel is build resulting in setting statistics to CLOCK_REALTIME (which is 0) instead to cpu time as expected. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 2 +- server/red-work

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-16 Thread Frediano Ziglio
> On Tue, 2015-12-15 at 10:42 -0500, Frediano Ziglio wrote: > > > > > > > > > > > Hi > > > > > > > > - Original Message - > > > > > Same comment as > > > > > http://lists.freedesktop.org/archives/spice-devel/2015-December/024682.h > > > > > tml > > > > > > > > > > "I don't really unders

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-16 Thread Marc-André Lureau
Hi - Original Message - > > Then with a > > $ cat stderr_from_replay | grep 'release on ' | sort | uniq -c > 3 release on dispatch > 502 release on display >3249 release on push >1843 release on watch > > So mostly of the times items are released pushing (which is expe

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-16 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > Then with a > > > > $ cat stderr_from_replay | grep 'release on ' | sort | uniq -c > > 3 release on dispatch > > 502 release on display > >3249 release on push > >1843 release on watch > > > > So mostly of the times items are re

Re: [Spice-devel] [PATCH spice 04/18] reds-stream: add reds_stream_is_plain_unix()

2015-12-16 Thread Frediano Ziglio
> > From: Marc-André Lureau > > Utility function used in follow-up code. > > Signed-off-by: Marc-André Lureau > --- > server/reds-stream.c | 18 ++ > server/reds-stream.h | 1 + > 2 files changed, 19 insertions(+) > > diff --git a/server/reds-stream.c b/server/reds-stream.c

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Frediano Ziglio
> > This is the simplest way I could find to have a AsyncCommand in > QXLState in following patch. > The following patch just update spice-common repository. This patch is referring the "following"? The reasoning looks a bit weak to me. Frediano > Signed-off-by: Marc-André Lureau > --- > se

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Marc-André Lureau
- Original Message - > > > > This is the simplest way I could find to have a AsyncCommand in > > QXLState in following patch. > > > > The following patch just update spice-common repository. > This patch is referring the "following"? > > The reasoning looks a bit weak to me. Why? I j

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Frediano Ziglio
> > > This is the simplest way I could find to have a AsyncCommand in > > > QXLState in following patch. > > > > > > > The following patch just update spice-common repository. > > This patch is referring the "following"? > > > > The reasoning looks a bit weak to me. > > Why? I just wanted to s

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Marc-André Lureau
Hi On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio wrote: > You are not... convenient library should not be linked to programs! > Is in libtool documentation. https://www.gnu.org/software/libtool/manual/html_node/Static-libraries.html "The key is remembering that a convenience library contains

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Marc-André Lureau
Hi - Original Message - > > > > > This is the simplest way I could find to have a AsyncCommand in > > > > QXLState in following patch. > > > > > > > > > > The following patch just update spice-common repository. > > > This patch is referring the "following"? > > > > > > The reasoning l

[Spice-devel] [spice-common v3 2/7] log: Use glib for logging

2015-12-16 Thread Christophe Fergeau
spice-common has been duplicating glib logging methods for a long while. Now that spice-common is depending on glib, it's more consistent to use glib logging too. However, the code base is still using spice logging functions. This commit aims to make spice logging go through glib logging system, wh

[Spice-devel] [spice-common v3 0/7] log: Use glib for logging

2015-12-16 Thread Christophe Fergeau
Hey, Here is a new iteration of the glib patch series. Various changes since the last iteration. I've reworked how SPICE_DEBUG_LEVEL is managed, now it should be very similar to how it behaved before switching to glib. It also applies to glib log messages emitted in the 'Spice' domain. G_LOG_LEVEL

[Spice-devel] [spice-common v3 3/7] log: Add test case for logging code

2015-12-16 Thread Christophe Fergeau
This gives us a baseline of how the SPICE/glib integration is supposed to behave. --- tests/Makefile.am| 19 ++- tests/test-logging.c | 410 +++ 2 files changed, 427 insertions(+), 2 deletions(-) create mode 100644 tests/test-logging.c diff --

[Spice-devel] [spice-common v3 6/7] log: Kill spice_warn_if

2015-12-16 Thread Christophe Fergeau
It's redundant with spice_warn_if_fail(), and can even be confusing. Acked-by: Jonathon Jongsma --- common/log.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/common/log.h b/common/log.h index a56105a..0e03f59 100644 --- a/common/log.h +++ b/common/log.h @@ -95,12 +95,6 @@ void spice_

[Spice-devel] [spice-common v3 5/7] log: Remove unneeded #ifdef/#endif

2015-12-16 Thread Christophe Fergeau
If header guards are working as expected, there should not be multiple definitions of these macros. If they are redefined somewhere else, this is a bug we want to fix. Acked-by: Jonathon Jongsma --- common/log.h | 26 -- 1 file changed, 26 deletions(-) diff --git a/commo

[Spice-devel] [spice-common v3 1/7] test: Use _LDADD rather than _LDFLAGS

2015-12-16 Thread Christophe Fergeau
This allows libtool/automake to correctly add a dependency from libspice-common.la to test_marshallers. With _LDFLAGS, the binary won't automatically get rebuilt/relinked when the lib changes. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.

[Spice-devel] [spice-common v3 7/7] log: Introduce spice_assert_if_fail

2015-12-16 Thread Christophe Fergeau
They can be used in spice-server to replace spice_return_if_fail. Currently spice_return_if_fail aborts in spice-server, and it's not always clear whether using a non-aborting g_return_if_fail is acceptable or not. Having a spice_assert_if_fail alternative makes it clearer that this is not going to

[Spice-devel] [spice-common v3 4/7] log: Use more glib macros

2015-12-16 Thread Christophe Fergeau
No need to have our own SPICE_STMT_BEGIN/END and SPICE_STRINGIFY Acked-by: Jonathon Jongsma --- common/log.h | 67 ++-- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/common/log.h b/common/log.h index f336909..af8f86c 10064

[Spice-devel] [spice-server] build: Remove unused SPICEC_STATIC_LINKAGE_BSTATIC

2015-12-16 Thread Christophe Fergeau
A left-over from the client code. --- configure.ac | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2eb8128..9278fde 100644 --- a/configure.ac +++ b/configure.ac @@ -263,8 +263,6 @@ AC_SUBST(SPICE_REQUIRES) AC_SUBST(SPICE_NONPKGCONFIG_CFLAGS) AC_SUBST(SPICE_

Re: [Spice-devel] [spice-server] build: Remove unused SPICEC_STATIC_LINKAGE_BSTATIC

2015-12-16 Thread Marc-André Lureau
ack - Original Message - > A left-over from the client code. > --- > configure.ac | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 2eb8128..9278fde 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -263,8 +263,6 @@ AC_SUBST(SPICE_REQUIRES)

Re: [Spice-devel] [spice-common v3 1/7] test: Use _LDADD rather than _LDFLAGS

2015-12-16 Thread Marc-André Lureau
ack - Original Message - > This allows libtool/automake to correctly add a dependency from > libspice-common.la to test_marshallers. With _LDFLAGS, the binary won't > automatically get rebuilt/relinked when the lib changes. > --- > tests/Makefile.am | 2 +- > 1 file changed, 1 insertion(+

Re: [Spice-devel] [PATCH spice 02/18] build-sys: build a utility libserver.la

2015-12-16 Thread Christophe Fergeau
On Wed, Dec 16, 2015 at 12:49:16AM +0100, Marc-André Lureau wrote: > This allow tests programs to link with statically built library to access all > symbols configure.ac now has LT_INIT([disable-static]), will static libraries need to be manually enabled for this to work as expected? Christophe

Re: [Spice-devel] [PATCH spice 02/18] build-sys: build a utility libserver.la

2015-12-16 Thread Marc-André Lureau
Hi - Original Message - > On Wed, Dec 16, 2015 at 12:49:16AM +0100, Marc-André Lureau wrote: > > This allow tests programs to link with statically built library to access > > all symbols > > configure.ac now has LT_INIT([disable-static]), will static libraries > need to be manually enable

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Christophe Fergeau
On Wed, Dec 16, 2015 at 07:54:07AM -0500, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > > > > This is the simplest way I could find to have a AsyncCommand in > > > > > QXLState in following patch. > > > > > > > > > > > > > The following patch just update spice-common re

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Frediano Ziglio
> > Hi > > On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio wrote: > > You are not... convenient library should not be linked to programs! > > Is in libtool documentation. > > https://www.gnu.org/software/libtool/manual/html_node/Static-libraries.html > "The key is remembering that a convenien

Re: [Spice-devel] [PATCH spice 12/18] Declare AsyncCommand in red-common

2015-12-16 Thread Frediano Ziglio
> Hi > > - Original Message - > > > > > > > This is the simplest way I could find to have a AsyncCommand in > > > > > QXLState in following patch. > > > > > > > > > > > > > The following patch just update spice-common repository. > > > > This patch is referring the "following"? > > > >

[Spice-devel] [spice-server PATCH] display-channel: Don't disconnect when lz4 not supported

2015-12-16 Thread Lukas Venhoda
Don't diconnect client, if lz4 is requested as a preferred compression, but the server doesn't support it. --- Sidenote: Should server disconnect, when unsupported compression is requested? FE if client sends unknown compression, and this switch goes to default. Default could always return TRUE, ju

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Marc-André Lureau
- Original Message - > > > > Hi > > > > On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio > > wrote: > > > You are not... convenient library should not be linked to programs! > > > Is in libtool documentation. > > > > https://www.gnu.org/software/libtool/manual/html_node/Static-librar

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Marc-André Lureau
On Wed, Dec 16, 2015 at 2:53 PM, Marc-André Lureau wrote: > > > - Original Message - >> > >> > Hi >> > >> > On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio >> > wrote: >> > > You are not... convenient library should not be linked to programs! >> > > Is in libtool documentation. >> > >>

Re: [Spice-devel] [spice-server PATCH] display-channel: Don't disconnect when lz4 not supported

2015-12-16 Thread Pavel Grunt
Hi Lukas, is the client disconnected? On Wed, 2015-12-16 at 14:48 +0100, Lukas Venhoda wrote: > Don't diconnect client, if lz4 is requested as a preferred typo     ^ > compression, > but the server doesn't support it. Please add the reference to the bug  > --- > Sidenote: > Should server disco

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Frediano Ziglio
> > > > > > Hi > > > > > > On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio > > > wrote: > > > > You are not... convenient library should not be linked to programs! > > > > Is in libtool documentation. > > > > > > https://www.gnu.org/software/libtool/manual/html_node/Static-libraries.html > >

Re: [Spice-devel] [spice-server] build: Remove unused SPICEC_STATIC_LINKAGE_BSTATIC

2015-12-16 Thread Christophe Fergeau
On Wed, Dec 16, 2015 at 08:38:54AM -0500, Marc-André Lureau wrote: > ack Pushed. signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice-common v3 1/7] test: Use _LDADD rather than _LDFLAGS

2015-12-16 Thread Christophe Fergeau
On Wed, Dec 16, 2015 at 08:38:33AM -0500, Marc-André Lureau wrote: > ack Pushed. Christophe signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-dev

Re: [Spice-devel] [spice-common v3 2/7] log: Use glib for logging

2015-12-16 Thread Victor Toso
Hi, On Wed, Dec 16, 2015 at 02:27:08PM +0100, Christophe Fergeau wrote: > spice-common has been duplicating glib logging methods for a long while. > Now that spice-common is depending on glib, it's more consistent to use > glib logging too. However, the code base is still using spice logging > fun

Re: [Spice-devel] [spice-common v3 5/7] log: Remove unneeded #ifdef/#endif

2015-12-16 Thread Victor Toso
Hi, On Wed, Dec 16, 2015 at 02:27:11PM +0100, Christophe Fergeau wrote: > If header guards are working as expected, there should not be multiple > definitions of these macros. If they are redefined somewhere else, this > is a bug we want to fix. > > Acked-by: Jonathon Jongsma Acked-by: Victor To

Re: [Spice-devel] [spice-common v3 4/7] log: Use more glib macros

2015-12-16 Thread Victor Toso
Hi, On Wed, Dec 16, 2015 at 02:27:10PM +0100, Christophe Fergeau wrote: > No need to have our own SPICE_STMT_BEGIN/END and SPICE_STRINGIFY > > Acked-by: Jonathon Jongsma > --- > common/log.h | 67 > ++-- > 1 file changed, 33 insertions(+),

Re: [Spice-devel] [spice-common v3 6/7] log: Kill spice_warn_if

2015-12-16 Thread Victor Toso
Hi, On Wed, Dec 16, 2015 at 02:27:12PM +0100, Christophe Fergeau wrote: > It's redundant with spice_warn_if_fail(), and can even be confusing. > > Acked-by: Jonathon Jongsma Acked-by: Victor Toso > --- > common/log.h | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/common/log.h b

Re: [Spice-devel] [spice-server PATCH] display-channel: Don't disconnect when lz4 not supported

2015-12-16 Thread Lukas Venhoda
Hi Pavel, On Wed, Dec 16, 2015 at 3:01 PM, Pavel Grunt wrote: > Hi Lukas, > > is the client disconnected? > If the function that handles preferred compression returns FALSE, red_channel_client_disconnect() is called. > > On Wed, 2015-12-16 at 14:48 +0100, Lukas Venhoda wrote: > > Don't diconn

Re: [Spice-devel] [spice-common v3 7/7] log: Introduce spice_assert_if_fail

2015-12-16 Thread Victor Toso
Hi, On Wed, Dec 16, 2015 at 02:27:13PM +0100, Christophe Fergeau wrote: > They can be used in spice-server to replace spice_return_if_fail. > Currently spice_return_if_fail aborts in spice-server, and it's not > always clear whether using a non-aborting g_return_if_fail is acceptable > or not. Hav

Re: [Spice-devel] [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

2015-12-16 Thread Marc-André Lureau
Hi On Wed, Dec 16, 2015 at 3:02 PM, Frediano Ziglio wrote: >> > > >> > > Hi >> > > >> > > On Wed, Dec 16, 2015 at 10:44 AM, Frediano Ziglio >> > > wrote: >> > > > You are not... convenient library should not be linked to programs! >> > > > Is in libtool documentation. >> > > >> > > https://www.g

Re: [Spice-devel] [PATCH 11/22] server: rename files

2015-12-16 Thread Christophe Fergeau
On Wed, Dec 02, 2015 at 02:57:16PM -0600, Jonathon Jongsma wrote: > > diff --git a/server/spice_bitmap_utils.h b/server/spice_bitmap_utils.h > > deleted file mode 100644 > > index 69860e5..000 > > --- a/server/spice_bitmap_utils.h > > +++ /dev/null > > @@ -1,8 +0,0 @@ > > -#ifndef H_SPICE_BITMA

[Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Lukas Venhoda
Don't disconnect the display channel, when unsupported compression is requested from the client. Not changing the compression is enough. --- Changes since v1: - Not only for lz4, but now for all unsupported compressions --- server/dcc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) dif

[Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Lukas Venhoda
Don't disconnect the display channel, when unsupported compression is requested from the client. Not changing the compression is enough. https://bugs.freedesktop.org/show_bug.cgi?id=92821 --- Forgot to add bug reference Changes since v1: - Not only for lz4, but now for all unsupported compressio

Re: [Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Victor Toso
On Wed, Dec 16, 2015 at 03:31:46PM +0100, Lukas Venhoda wrote: > Don't disconnect the display channel, when unsupported compression is > requested from the client. Not changing the compression is enough. > --- > Changes since v1: > - Not only for lz4, but now for all unsupported compressions > ---

[Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Lukas Venhoda
Don't disconnect the display channel, when unsupported compression is requested from the client. Not changing the compression is enough. https://bugs.freedesktop.org/show_bug.cgi?id=92821 --- Forgot to add bug reference Forgot to add break Changes since v1: - Not only for lz4, but now for all un

Re: [Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Victor Toso
On Wed, Dec 16, 2015 at 03:51:11PM +0100, Lukas Venhoda wrote: > Don't disconnect the display channel, when unsupported compression is > requested from the client. Not changing the compression is enough. > > https://bugs.freedesktop.org/show_bug.cgi?id=92821 Acked-by: Victor Toso Thanks, > ---

Re: [Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Frediano Ziglio
> > On Wed, Dec 16, 2015 at 03:51:11PM +0100, Lukas Venhoda wrote: > > Don't disconnect the display channel, when unsupported compression is > > requested from the client. Not changing the compression is enough. > > > > https://bugs.freedesktop.org/show_bug.cgi?id=92821 > > Acked-by: Victor Toso

Re: [Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Lukas Venhoda
Hi On Wed, Dec 16, 2015 at 4:03 PM, Frediano Ziglio wrote: > So mainly this function has to return always TRUE (success). > > Why not ignoring the return value? > Or returning void? > > Frediano > The function that calls this one (dcc_handle_message()) looks like this: switch (type) {

[Spice-devel] [PATCH v7 00/23] Add GStreamer support for video streaming

2015-12-16 Thread Francois Gouget
This patch series adds support for using GStreamer to encode and decode the video streams, adding support for VP8 and h264 codecs. As before the patches can also be grabbed from the repositories below: spice: https://github.com/fgouget/spice spice-gtk: https://github.com/fgouget/s

[Spice-devel] [PATCH v7 03/23] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2015-12-16 Thread Francois Gouget
This introduces a pared down GStreamer-based video encoder to serve as the basis for later enhancements. In this form the new encoder supports both regular and sized streams but lacks any rate control. It should still work fine if bandwidth is sufficient such as on LANs. Signed-off-by: Francois Go

[Spice-devel] [PATCH v7 01/23] protocol: Add support for the VP8 and h264 video codecs

2015-12-16 Thread Francois Gouget
Clients that support multiple codecs must advertise the SPICE_DISPLAY_CAP_MULTI_CODEC capability and one SPICE_DISPLAY_CAP_CODEC_XXX per supported codec. Signed-off-by: Francois Gouget --- configure.ac | 2 +- spice.proto | 2 ++ spice/enums.h| 2 ++ spice/protocol.h | 4 4 fil

[Spice-devel] [PATCH v7 02/23] server: Enable adding alternative MJPEG video encoders

2015-12-16 Thread Francois Gouget
This replaces the original mjpeg_encoder API with a VideoEncoder base class which can be reimplemented by other encoders. This also renames the members and enums from mjpeg_* to video_*. Signed-off-by: Francois Gouget --- server/Makefile.am | 2 +- server/dcc-send.c | 24 se

[Spice-devel] [PATCH v7 06/23] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- examples/spiceqxl.xorg.conf.example | 7 +++ src/qxl.h | 1 + src/qxl_driver.c| 2 ++ src/spiceqxl_spice_server.c | 15 +++ 4 files changed, 25 insertions(+) diff --git a/examples/spiceqxl

[Spice-devel] [PATCH v7 05/23] server: Let the administrator pick the video encoder and codec

2015-12-16 Thread Francois Gouget
The Spice server administrator can specify the preferred encoder and codec preferences to optimize for CPU or bandwidth usage. Preferences are described in a semi-colon separated list of encoder:codec pairs. The server has a default preference list which can explicitly be selected by specifying 'au

[Spice-devel] [PATCH v7 07/23] Xspice: Add --video-codecs to specify encoder and codec preferences

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- scripts/Xspice | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Xspice b/scripts/Xspice index 15a5a5e..bf8112f 100755 --- a/scripts/Xspice +++ b/scripts/Xspice @@ -87,6 +87,7 @@ parser.add_argument('--zlib-glz-wan-compression', # TO

[Spice-devel] [PATCH v7 10/23] server: Add VP8 support to the GStreamer video encoder

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac | 4 +++ server/gstreamer-encoder.c | 73 +++--- server/video-encoder.h | 2 +- 3 files changed, 68 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 20cf429..b

[Spice-devel] [PATCH v7 12/23] server: Shape the bit rate of the GStreamer codecs output

2015-12-16 Thread Francois Gouget
The GStreamer codecs don't follow the specified bit rate very closely: they can decide to exceed it for ten seconds or more if they consider the scene deserves it. Such long bursts are enough to cause network congestion, resulting in many lost frames which cause significant display corruption. So t

[Spice-devel] [PATCH v7 14/23] server: Give up after a while if GStreamer cannot handle the video

2015-12-16 Thread Francois Gouget
This typically happens when sending very small frames (less than 16 pixels in one dimension) to the x264enc encoder. This avoids repeatedly wasting time rebuilding the pipeline. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 46 +- 1 f

[Spice-devel] [PATCH v7 21/23] spice-gtk: Allow disabling support for the builtin MJPEG video decoder

2015-12-16 Thread Francois Gouget
This makes it possible to test the GStreamer video decoder with MJPEG streams. Signed-off-by: Francois Gouget --- configure.ac | 11 +++ src/Makefile.am| 7 ++- src/channel-display-priv.h | 2 ++ src/channel-display.c | 5 + 4 files changed, 24 i

[Spice-devel] [PATCH v7 20/23] spice-gtk: Add a GStreamer video decoder for MJPEG, VP8 and h264

2015-12-16 Thread Francois Gouget
Based on a patch by Jeremy White. Signed-off-by: Francois Gouget --- configure.ac | 28 +- src/Makefile.am| 8 ++ src/channel-display-gst.c | 238 + src/channel-display-priv.h | 6 ++ src/channel-display.c | 10

[Spice-devel] [PATCH v7 22/23] spice-gtk: Avoid copying the compressed message data for SpiceGstDecoder

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- src/channel-display-gst.c | 88 +-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index c5ad2e9..79f7744 100644 --- a/src/channel-display-gst.c +++

[Spice-devel] [PATCH v7 13/23] server: Adjust the GStreamer encoder bit rate to the network

2015-12-16 Thread Francois Gouget
The video encoder uses the client reports and/or notifications of server frame drops as its feedback mechanisms. In particular it keeps track of the maximum video margin and reduces the bit rate whenever the margin goes below certain thresholds or decreases too sharply. It uses these to figure out

[Spice-devel] [PATCH v7 23/23] spice-gtk: Use decodebin as a fallback for the GStreamer video decoder

2015-12-16 Thread Francois Gouget
This means future video codecs may be supported automatically. One can also force usage of decodebin by setting $SPICE_GSTVIDEO_AUTO. Signed-off-by: Francois Gouget --- src/channel-display-gst.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/channe

[Spice-devel] [PATCH v7 04/23] server: Check the client video codec capabilities

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- configure.ac| 2 +- server/dcc.c| 5 - server/dcc.h| 2 +- server/stream.c | 41 + 4 files changed, 35 insertions(+), 15 deletions(-) Note: * This depends on the spice-protocol changes of 01/23 and thu

[Spice-devel] [PATCH v7 15/23] server: Cap the VP8 and h264 video quality to limit the bit rate

2015-12-16 Thread Francois Gouget
This prevents the bit rate from going insanely high on fast networks for no visible video quality improvement. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c index bf60773

[Spice-devel] [PATCH v7 08/23] server: Let the video encoder manage the compressed buffer

2015-12-16 Thread Francois Gouget
This way the video encoder is not forced to use malloc()/free(). This also allows more flexibility in how the video encoder manages the buffer which allows for a zero-copy implementation in both video encoders. Signed-off-by: Francois Gouget --- server/dcc-send.c | 24 +++-- ser

[Spice-devel] [PATCH v7 11/23] server: Add h264 support to the GStreamer video encoder

2015-12-16 Thread Francois Gouget
Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 17 - server/reds.c | 2 ++ server/video-encoder.h | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c index 11be91b..fe07

[Spice-devel] [PATCH v7 09/23] server: Avoid copying the input frame in the GStreamer encoder

2015-12-16 Thread Francois Gouget
This relies on the GStreamer buffer's lifetime being short enough which it is because: - We encode frames one by one. - For all encoders but MJPEG, the first element of the pipeline will convert the bitmap to another image format which entails copying it. So by the time the encoder starts i

[Spice-devel] [PATCH v7 19/23] spice-gtk: Optimize handling of the decoded frame buffer

2015-12-16 Thread Francois Gouget
The MJPEG decoder does not need a zero-filled buffer. Signed-off-by: Francois Gouget --- src/channel-display-mjpeg.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/channel-display-mjpeg.c b/src/channel-display-mjpeg.c index 78e3d5a..6271cfb 100644 --- a/src/chan

[Spice-devel] [PATCH v7 16/23] server: Respect the GStreamer encoder's valid bit rate range

2015-12-16 Thread Francois Gouget
Otherwise it may get wrapped to a much lower value than intended. Signed-off-by: Francois Gouget --- server/gstreamer-encoder.c | 65 +++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encode

[Spice-devel] [PATCH v7 17/23] server: Add support for GStreamer 0.10

2015-12-16 Thread Francois Gouget
configure will use GStreamer 1.0 if present and fall back to GStreamer 0.10 otherwise. Signed-off-by: Francois Gouget --- configure.ac | 36 server/Makefile.am | 8 server/gstreamer-encoder.c | 102 + serv

[Spice-devel] [PATCH v7 18/23] spice-gtk: Enable adding alternative video decoders

2015-12-16 Thread Francois Gouget
This replaces the original channel-display-mjpeg API with a VideoDecoder base class which can be reimplemented by other decoders. Furthermore this moves the MJPEG-specific state information from the display_stream struct to a derived class of VideoDecoder. Signed-off-by: Francois Gouget --- src/

Re: [Spice-devel] [PATCH v7 01/23] protocol: Add support for the VP8 and h264 video codecs

2015-12-16 Thread Daniel P. Berrange
On Wed, Dec 16, 2015 at 04:16:04PM +0100, Francois Gouget wrote: > Clients that support multiple codecs must advertise the > SPICE_DISPLAY_CAP_MULTI_CODEC capability and one > SPICE_DISPLAY_CAP_CODEC_XXX per supported codec. > > Signed-off-by: Francois Gouget > --- > configure.ac | 2 +- > s

Re: [Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

2015-12-16 Thread Frediano Ziglio
> Hi > On Wed, Dec 16, 2015 at 4:03 PM, Frediano Ziglio < fzig...@redhat.com > > wrote: > > So mainly this function has to return always TRUE (success). > > > Why not ignoring the return value? > > > Or returning void? > > > Frediano > > The function that calls this one (dcc_handle_message

Re: [Spice-devel] [PATCH spice v0.12.6] Flush display commands before validating the surface.

2015-12-16 Thread Jeremy White
>> To me, the logical next step would be to modify the Spice API to allow >> Xspice to do everything directly. That would be faster and make for a >> much cleaner interface (not to mention a more sensible use of memory). >> > > What do you have in mind? Well, I didn't have anything specific in m

Re: [Spice-devel] [PATCH spice 14/18] Add new spice-gl stubs API

2015-12-16 Thread Frediano Ziglio
> > - spice_gl_scanout() to take the current scanout > > - spice_gl_draw_async() to draw the scanout, is like other Spice async > functions, it takes a cookie and will return in the > QXLInterface.async_complete() > > Two new fields are also added to QXLState, in order to save the current >

[Spice-devel] [PATCH v3] build-sys: Use sasl check from spice-common

2015-12-16 Thread Pavel Grunt
Support only libsasl2 providing libsasl2.pc file --- configure.ac | 54 ++ spice-common | 2 +- 2 files changed, 3 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index 2eb8128..1aaa0f2 100644 --- a/configure.ac +++ b/co

[Spice-devel] [PATCH v3] build-sys: Use sasl check from spice-common

2015-12-16 Thread Pavel Grunt
Support only libsasl2 providing libsasl2.pc file --- sasl without .pc file (RHEL6) can be enabled, e.g.: CFLAGS="-DHAVE_SASL" SASL_LIBS="-lsasl2" ./configure --- configure.ac | 47 ++- spice-common | 2 +- 2 files changed, 3 insertions(+), 46 deletions(

[Spice-devel] [PATCH v3] m4: Add macro for --with-sasl

2015-12-16 Thread Pavel Grunt
It is not used by spice-common, but both server and client can use it. Compared to current checks in spice-gtk and spice server this macro only supports libsasl2. --- v3: - removed unused AM_CONDITIONAL v2: - only supports libsasl2 - PKG_CHECK_MODULES is used instead of AC_CHECK_LIB and AC_CHEC

Re: [Spice-devel] [PATCH v7 01/23] protocol: Add support for the VP8 and h264 video codecs

2015-12-16 Thread Jeremy White
On 12/16/2015 09:33 AM, Daniel P. Berrange wrote: > On Wed, Dec 16, 2015 at 04:16:04PM +0100, Francois Gouget wrote: > > I understand the general desire to support something better than > MJPEG, but what is the compelling rationale for adding both VP8 > and H264, as opposed to just VP8 ? > > Supp

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-16 Thread Jonathon Jongsma
On Wed, 2015-12-16 at 05:57 -0500, Frediano Ziglio wrote: > > On Tue, 2015-12-15 at 10:42 -0500, Frediano Ziglio wrote: > > > > > > > > > > > > > > Hi > > > > > > > > > > - Original Message - > > > > > > Same comment as > > > > > > http://lists.freedesktop.org/archives/spice-devel/

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-16 Thread Marc-André Lureau
Hi - Original Message - > > > It seems that "watch" is related to watches on non-Dispatcher fds, and > "dispatch" is related to the watch on the Dispatcher fd. > > Items can be released in the "display" stage when we try to queue pipe items > when the client is not connected (see red_ch

Re: [Spice-devel] [PATCH spice 14/18] Add new spice-gl stubs API

2015-12-16 Thread Marc-André Lureau
- Original Message - > > > > - spice_gl_scanout() to take the current scanout > > > > - spice_gl_draw_async() to draw the scanout, is like other Spice async > > functions, it takes a cookie and will return in the > > QXLInterface.async_complete() > > > > Two new fields are also add