Re: [Spice-devel] [spice v10 09/27] server: Let the video encoder manage the compressed buffer

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > > +static SpiceGstVideoBuffer* create_gst_video_buffer(void) > > +{ > > +SpiceGstVideoBuffer *buffer = spice_new0(SpiceGstVideoBuffer, 1); > > +buffer->base.free = &gst_video_buffer_free; > > +return buffer; > > I forgot to mention

Re: [Spice-devel] [protocol v10 01/27] protocol: Add support for the VP8 and h264 video codecs

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Frediano Ziglio wrote: [...] > Should we bump the spice-protocol version too? The last post-release version bump was in september (017ddbe7). It does not look like there has been a new release since (nothing in NEWS or git log). So I believe a version bump is not necessary ye

Re: [Spice-devel] [spice v10 09/27] server: Let the video encoder manage the compressed buffer

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > > +static void gst_video_buffer_free(VideoBuffer *video_buffer) > > +{ > > +SpiceGstVideoBuffer *buffer = (SpiceGstVideoBuffer*)video_buffer; > > +gst_buffer_unref(buffer->gst_buffer); > > You need a if (buffer->gst_buffer != NULL) test

Re: [Spice-devel] [spice v10 08/27] server: Add VP8 support to the GStreamer video encoder

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > > > +if (system("egrep -l '^flags\\b.*: .*\\bht\\b' /proc/cpuinfo > > > >/dev/null 2>&1") == 0) { > > > +/* Hyperthreading is enabled so divide by two to get the > > > number > > > + * of physical cores. > > > +

Re: [Spice-devel] [spice v10 06/27] server: Let the administrator pick the video encoder and codec

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > > +void display_channel_set_video_codecs(DisplayChannel *display, GArray > > *video_codecs) > > +{ > > +spice_return_if_fail(display); > > + > > +g_array_set_size(display->video_codecs, 0); > > +g_array_insert_vals(display->video_co

Re: [Spice-devel] [spice v10 05/27] server: Check the client video codec capabilities

2016-03-03 Thread Francois Gouget
On Thu, 3 Mar 2016, Christophe Fergeau wrote: [...] > > -void dcc_create_stream(DisplayChannelClient *dcc, Stream *stream) > > +gboolean dcc_create_stream(DisplayChannelClient *dcc, Stream *stream) > > @@ -739,9 +751,13 @@ void dcc_create_stream(DisplayChannelClient *dcc, > > Stream *stream) > >

Re: [Spice-devel] [PATCH] server: Fix the order of the attach_stream() asserts

2016-03-03 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2016-03-03 at 21:22 +0100, Francois Gouget wrote: > Signed-off-by: Francois Gouget > --- > > I assume the reason for having two asserts is to help with diagnosis so > I did not merge them. > > server/stream.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [Spice-devel] [PATCH v2 4/4] worker: remove useless qxl_state

2016-03-03 Thread Jonathon Jongsma
Nice. Acked-by: Jonathon Jongsma On Thu, 2016-03-03 at 16:28 +, Frediano Ziglio wrote: > qxl_state can be extracted now easily from qxl. > > Signed-off-by: Frediano Ziglio > --- > server/red-qxl.c| 5 ++--- > server/red-worker.c | 14 ++ > server/red-worker.h | 2 +- >

Re: [Spice-devel] [PATCH v2 3/4] use QXLState instead of RedDispatcher

2016-03-03 Thread Jonathon Jongsma
On Thu, 2016-03-03 at 16:28 +, Frediano Ziglio wrote: > Considering that: > - RedsState is the state of QXLInstance implementation (RedDispatcher); I don't understand this sentence. Do you mean QxlState instead of RedsState? Why is RedDispatcher in parentheses here? > - qif (QXLInterface*) fi

[Spice-devel] [PATCH] server: Fix the order of the attach_stream() asserts

2016-03-03 Thread Francois Gouget
Signed-off-by: Francois Gouget --- I assume the reason for having two asserts is to help with diagnosis so I did not merge them. server/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stream.c b/server/stream.c index 2bfb993..f1edec7 100644 --- a/server/stre

Re: [Spice-devel] [PATCH v2 1/4] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Frediano Ziglio
> > On Thu, 2016-03-03 at 16:28 +, Frediano Ziglio wrote: > > RedDispatcher is basically implementing QXLInstance. > > After some internal discussion in order to avoid rewriting too > > many time the patch we came out with RedQXL name. > > I guess this message will need to be updated slightly

Re: [Spice-devel] [PATCH v2 2/4] rename red-dispatcher.* files to red-qxl.*

2016-03-03 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2016-03-03 at 16:28 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/Makefile.am|4 +- > server/agent-msg-filter.c |2 +- > server/display-channel.h |2 +- > server/red-dispatcher.c | 1032 --

Re: [Spice-devel] [PATCH v2 1/4] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Jonathon Jongsma
On Thu, 2016-03-03 at 16:28 +, Frediano Ziglio wrote: > RedDispatcher is basically implementing QXLInstance. > After some internal discussion in order to avoid rewriting too > many time the patch we came out with RedQXL name. I guess this message will need to be updated slightly if we decide n

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-03 Thread Frediano Ziglio
> > On Tue, Mar 01, 2016 at 04:53:10PM +0100, Francois Gouget wrote: > > Signed-off-by: Francois Gouget > > --- > > > > In theory this could be needed by the next patch. > > > > server/red-parse-qxl.h | 4 ++-- > > server/red-worker.c| 7 ++- > > 2 files changed, 8 insertions(+), 3 del

Re: [Spice-devel] [spice v10 09/27] server: Let the video encoder manage the compressed buffer

2016-03-03 Thread Christophe Fergeau
On Tue, Mar 01, 2016 at 04:53:03PM +0100, Francois Gouget wrote: > 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

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-03 Thread Christophe Fergeau
On Tue, Mar 01, 2016 at 04:53:10PM +0100, Francois Gouget wrote: > Signed-off-by: Francois Gouget > --- > > In theory this could be needed by the next patch. > > server/red-parse-qxl.h | 4 ++-- > server/red-worker.c| 7 ++- > 2 files changed, 8 insertions(+), 3 deletions(-) > > diff -

Re: [Spice-devel] [protocol v10 01/27] protocol: Add support for the VP8 and h264 video codecs

2016-03-03 Thread Frediano Ziglio
> Acked-by: Christophe Fergeau > Agree! Should we bump the spice-protocol version too? Frediano > On Tue, Mar 01, 2016 at 04:50:16PM +0100, Francois Gouget wrote: > > Clients that support multiple codecs must advertise the > > SPICE_DISPLAY_CAP_MULTI_CODEC capability and one > > SPICE_DISPLA

Re: [Spice-devel] [protocol v10 01/27] protocol: Add support for the VP8 and h264 video codecs

2016-03-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Mar 01, 2016 at 04:50:16PM +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 > ---

Re: [Spice-devel] [spice v10 09/27] server: Let the video encoder manage the compressed buffer

2016-03-03 Thread Christophe Fergeau
Hey, On Tue, Mar 01, 2016 at 04:53:03PM +0100, Francois Gouget wrote: > 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. Yes, thi

Re: [Spice-devel] Gstreamer, RHEL 7, OpenGL and stripes

2016-03-03 Thread Marc-André Lureau
Hi - Original Message - > It sounds like somebody agreed with the patch but then > loosed interest in it. > > Why didn't you removed patches 5 and 6 and defined/used a > DRM_API_HANDLE_TYPE_SHMID > instead of WINSYS_HANDLE_TYPE_SHMID and post again? Looks like was the only > "big" complai

Re: [Spice-devel] Gstreamer, RHEL 7, OpenGL and stripes

2016-03-03 Thread Frediano Ziglio
It sounds like somebody agreed with the patch but then loosed interest in it. Why didn't you removed patches 5 and 6 and defined/used a DRM_API_HANDLE_TYPE_SHMID instead of WINSYS_HANDLE_TYPE_SHMID and post again? Looks like was the only "big" complaint. I'm not sure would be worth spending time

Re: [Spice-devel] [spice v10 08/27] server: Add VP8 support to the GStreamer video encoder

2016-03-03 Thread Christophe Fergeau
On Thu, Mar 03, 2016 at 05:22:58PM +0100, Christophe Fergeau wrote: > On Thu, Mar 03, 2016 at 09:50:26AM -0500, Frediano Ziglio wrote: > > > diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c > > > index aae47c7..3dfbdfb 100644 > > > --- a/server/gstreamer-encoder.c > > > +++ b/se

[Spice-devel] [PATCH v2 4/4] worker: remove useless qxl_state

2016-03-03 Thread Frediano Ziglio
qxl_state can be extracted now easily from qxl. Signed-off-by: Frediano Ziglio --- server/red-qxl.c| 5 ++--- server/red-worker.c | 14 ++ server/red-worker.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 11dc1

[Spice-devel] [PATCH v2 2/4] rename red-dispatcher.* files to red-qxl.*

2016-03-03 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/Makefile.am|4 +- server/agent-msg-filter.c |2 +- server/display-channel.h |2 +- server/red-dispatcher.c | 1032 - server/red-dispatcher.h | 272 server/red-qxl.c

[Spice-devel] [PATCH v2 0/4] Make clear RedDispatcher is not a Dispatcher

2016-03-03 Thread Frediano Ziglio
RedDispatcher name is quite misleading. Change name to make more clear that is just a QXL implementation. Also make more similar to the way other interfaces (like sound one) are implemented. Changes from v1: - use QXLState directly instead of defining a RedQXL type which is just a typedef. Fred

[Spice-devel] [PATCH v2 1/4] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Frediano Ziglio
RedDispatcher is basically implementing QXLInstance. After some internal discussion in order to avoid rewriting too many time the patch we came out with RedQXL name. This is the first of 3 patches that rename functions, structure and files. Signed-off-by: Frediano Ziglio --- server/display-chann

[Spice-devel] [PATCH v2 3/4] use QXLState instead of RedDispatcher

2016-03-03 Thread Frediano Ziglio
Considering that: - RedsState is the state of QXLInstance implementation (RedDispatcher); - qif (QXLInterface*) field can be computed really easy from QXLInstance; - mostly of its state is private. Make all structure private. Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 2 +-

Re: [Spice-devel] [spice v10 08/27] server: Add VP8 support to the GStreamer video encoder

2016-03-03 Thread Christophe Fergeau
On Thu, Mar 03, 2016 at 09:50:26AM -0500, Frediano Ziglio wrote: > > diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c > > index aae47c7..3dfbdfb 100644 > > --- a/server/gstreamer-encoder.c > > +++ b/server/gstreamer-encoder.c > > @@ -188,14 +188,70 @@ static void set_appsrc_caps

Re: [Spice-devel] [spice v10 07/27] replay: Add an option to change video codec

2016-03-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Mar 01, 2016 at 04:52:15PM +0100, Pavel Grunt wrote: > Signed-off-by: Francois Gouget > --- > server/tests/replay.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/server/tests/replay.c b/server/tests/replay.c > index f

Re: [Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Christophe Fergeau
On Thu, Mar 03, 2016 at 10:12:25AM -0500, Frediano Ziglio wrote: > > > > On Tue, Mar 01, 2016 at 12:42:20PM -0500, Frediano Ziglio wrote: > > > > with QXLState an internal structure as well (defined in reds.h), and > > > > RedDispatcher/RedQXL is one of the few members of this QXLState > > > > str

Re: [Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Frediano Ziglio
> > On Tue, Mar 01, 2016 at 12:42:20PM -0500, Frediano Ziglio wrote: > > > with QXLState an internal structure as well (defined in reds.h), and > > > RedDispatcher/RedQXL is one of the few members of this QXLState > > > structure. Should they be merged? > > > > > > > I think you should check pat

Re: [Spice-devel] [spice v10 08/27] server: Add VP8 support to the GStreamer video encoder

2016-03-03 Thread Frediano Ziglio
> > Signed-off-by: Francois Gouget > --- > > Changed the VP8 encoder parameters based on the realtime profile to > improve performance. The patch does not use the realtime profile > directly because profiles don't seem to be supported from 'gst-launch' > pipeline strings yet. > > Furthermore it

Re: [Spice-devel] [spice v10 06/27] server: Let the administrator pick the video encoder and codec

2016-03-03 Thread Christophe Fergeau
Hey, Mostly looks good, couple of minor comments below, On Tue, Mar 01, 2016 at 04:51:29PM +0100, Francois Gouget wrote: > The Spice server administrator can specify the encoder and codec > preferences to optimize for CPU or bandwidth usage. Preferences are > described in a semi-colon separated l

Re: [Spice-devel] [spice v10 05/27] server: Check the client video codec capabilities

2016-03-03 Thread Christophe Fergeau
Hey, On Tue, Mar 01, 2016 at 04:51:14PM +0100, Francois Gouget wrote: > Signed-off-by: Francois Gouget > --- > server/dcc.c| 5 - > server/dcc.h| 2 +- > server/stream.c | 41 + > 3 files changed, 34 insertions(+), 14 deletions(-) > > diff -

Re: [Spice-devel] Gstreamer, RHEL 7, OpenGL and stripes

2016-03-03 Thread Marc-André Lureau
Hi - Original Message - > upstream afaik. Another attempt I had, at least for fixing gnome3 & > llvmpipe, use XShm: > https://lists.freedesktop.org/archives/mesa-dev/2015-June/085860.html fwiw, I think the last iteration was https://lists.freedesktop.org/archives/mesa-dev/2015-June/08645

Re: [Spice-devel] Gstreamer, RHEL 7, OpenGL and stripes

2016-03-03 Thread Marc-André Lureau
Hi - Original Message - > Hi, > yesterday/today I attempted to test the gstreamer patches. > My approach was mainly as "user", install and see how does it work. > > I installed Francois patches for spice-protocol and spice-server > (not clients so I tested with mjpeg). > The initial tes

Re: [Spice-devel] [spice v10 04/27] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-03-03 Thread Christophe Fergeau
Forgot to add Acked-by: Christophe Fergeau (with the small fixes you did below). On Wed, Mar 02, 2016 at 07:46:26PM +0100, Francois Gouget wrote: > On Wed, 2 Mar 2016, Christophe Fergeau wrote: > [...] > > > +if test "x$enable_gstreamer" != "xno"; then > > > +SPICE_CHECK_GSTREAMER(GSTREAM

Re: [Spice-devel] [spice v10 04/27] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-03-03 Thread Christophe Fergeau
On Wed, Mar 02, 2016 at 07:46:26PM +0100, Francois Gouget wrote: > On Wed, 2 Mar 2016, Christophe Fergeau wrote: > [...] > > > +if test "x$enable_gstreamer" != "xno"; then > > > +SPICE_CHECK_GSTREAMER(GSTREAMER_1_0, 1.0, [gstreamer-1.0 > > > gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-video

[Spice-devel] Gstreamer, RHEL 7, OpenGL and stripes

2016-03-03 Thread Frediano Ziglio
Hi, yesterday/today I attempted to test the gstreamer patches. My approach was mainly as "user", install and see how does it work. I installed Francois patches for spice-protocol and spice-server (not clients so I tested with mjpeg). The initial test was playing this video: https://www.youtube

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-03 Thread Christophe Fergeau
On Thu, Mar 03, 2016 at 01:50:30PM +0100, Marc-André Lureau wrote: > Hi > > On Fri, Feb 26, 2016 at 6:58 PM, Frediano Ziglio wrote: > >> > >> codegen generated code depends on spice-common code (marshaller, messages > >> etc), > >> it makes more sense to keep the generator along this. Otherwise a

Re: [Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

2016-03-03 Thread Christophe Fergeau
On Tue, Mar 01, 2016 at 12:42:20PM -0500, Frediano Ziglio wrote: > > with QXLState an internal structure as well (defined in reds.h), and > > RedDispatcher/RedQXL is one of the few members of this QXLState > > structure. Should they be merged? > > > > I think you should check patch 4/5 :) Ah ind

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-03 Thread Marc-André Lureau
Hi On Fri, Feb 26, 2016 at 6:58 PM, Frediano Ziglio wrote: >> >> codegen generated code depends on spice-common code (marshaller, messages >> etc), >> it makes more sense to keep the generator along this. Otherwise a newer >> protocol >> release will fail to build older projects (as is the case t

Re: [Spice-devel] [server PATCH 2/3] replay: learn how to skip the first N (slow) commands

2016-03-03 Thread Frediano Ziglio
> > Note that the commands are executed by spice-server. > The "skip" is only done on the "sleep" part of the > "slow" command-line option. > > This is helpful to run quickly through uninsteresting commands > in a beginning of a recorded file and going slowly when > interesting parts appear > ---

Re: [Spice-devel] [server PATCH 1/3] replay: learn how to count commands

2016-03-03 Thread Frediano Ziglio
> > --- > server/tests/replay.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/server/tests/replay.c b/server/tests/replay.c > index f3b670f..83411d3 100644 > --- a/server/tests/replay.c > +++ b/server/tests/replay.c > @@ -47,6 +47,8 @@ static QXLWorker *qxl_worker = NULL;

Re: [Spice-devel] [server PATCH 3/3] replay: do not use argv after g_option_context_parse

2016-03-03 Thread Frediano Ziglio
Acked-by: Frediano Ziglio Frediano > > Apparently, after using g_option_context_parse with G_OPTION_REMAINING > argv is modified and should not be used. > This patch uses "file" instead of "argv" and makes sure > file is freed later. > No free is called upon error - exit takes care of it. > ---

Re: [Spice-devel] [spice v10 02/27] server: Store the opaque pointer in VideoEncoderRateControlCbs

2016-03-03 Thread Frediano Ziglio
> > I believe this was already reviewed separately, in a way it's odd to > store instance data along with vfunc (ie class) data, but why not, makes > more sense this way indeed. > > Acked-by: Christophe Fergeau > Merged. It's actually not so different that passing a pointer to a real interfac

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-03 Thread Frediano Ziglio
> > On Wed, 2 Mar 2016, Frediano Ziglio wrote: > > > > > > > Signed-off-by: Francois Gouget > > > --- > > > > > > In theory this could be needed by the next patch. > > > > > > > Are you saying that now compression is done in another thread? > > Nothing has changed with regards to threading.

Re: [Spice-devel] Hotkeys are disable when use spice-usbredir-redirect-on-connect option

2016-03-03 Thread Uri Lublin
On 03/02/2016 03:00 PM, Christophe Fergeau wrote: Hey, On Wed, Feb 17, 2016 at 01:54:48PM +0330, Hamid Mazrae Mollaie wrote: Hi, Tank you for replay. yes, my mouse and keyboard are usb and redirect to vm... and all pressed key sent to vm all hotkeys and Ctrl+Alt+F[n] does not work for example.

[Spice-devel] [server PATCH 2/3] replay: learn how to skip the first N (slow) commands

2016-03-03 Thread Uri Lublin
Note that the commands are executed by spice-server. The "skip" is only done on the "sleep" part of the "slow" command-line option. This is helpful to run quickly through uninsteresting commands in a beginning of a recorded file and going slowly when interesting parts appear --- server/tests/repl

[Spice-devel] [server PATCH 1/3] replay: learn how to count commands

2016-03-03 Thread Uri Lublin
--- server/tests/replay.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/server/tests/replay.c b/server/tests/replay.c index f3b670f..83411d3 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -47,6 +47,8 @@ static QXLWorker *qxl_worker = NULL; static gboolean star

[Spice-devel] [server PATCH 0/3] replay: add count and skip

2016-03-03 Thread Uri Lublin
This patch-set touches only server/tests/replay utility. It adds 2 commands and fixes an access to a NULL pointer. With count and skip new commands, it's possible to fast-forward the replay to an interesting point. How to use it: First run only with --count: spice-server-replay --count $spice-re

[Spice-devel] [server PATCH 3/3] replay: do not use argv after g_option_context_parse

2016-03-03 Thread Uri Lublin
Apparently, after using g_option_context_parse with G_OPTION_REMAINING argv is modified and should not be used. This patch uses "file" instead of "argv" and makes sure file is freed later. No free is called upon error - exit takes care of it. --- server/tests/replay.c | 8 1 file changed,

Re: [Spice-devel] [PATCH] Attempt to manage redirection in a way similar to Unix

2016-03-03 Thread Christophe Fergeau
On Wed, Mar 02, 2016 at 01:18:41PM -0500, Frediano Ziglio wrote: > > > > This patch allows remote-viewer to redirect output/error streams to > > files. > > Also if launched from a console program (for instance from the command > > prompt) you are able to see output from the console where you launc

Re: [Spice-devel] [PATCH libcacard 1/2] nss: report error on invalid db= argument

2016-03-03 Thread Christophe Fergeau
ACK series. On Thu, Mar 03, 2016 at 01:58:16AM +0100, Marc-André Lureau wrote: > The db argument must end with " or \n. > > Found thanks to clang scan-build. > > Signed-off-by: Marc-André Lureau > Reported-by: Miroslav Rezanina > --- > src/vcard_emul_nss.c | 4 > 1 file changed, 4 insert