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

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc.c| 5 - server/dcc.h| 2 +- server/stream.c | 41 + 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index d4a6c7c..d

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

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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 strin

[Spice-devel] [spice v10 13/27] server: Shape the bit rate of the GStreamer codecs output

2016-03-01 Thread Francois Gouget
information and also annotate the client report debug traces with the corresponding bit rate information. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 291 +++-- 1 file changed, 284 insertions(+), 7 deletions(-)

[Spice-devel] [spice v10 14/27] server: Adjust the GStreamer encoder bit rate to the network

2016-03-01 Thread Francois Gouget
is lowered to minimize the risk of frame loss and/or long freezes. It also relies on the existing shaping of the GStreamer output bit rate to minimize the pipeline reconfigurations. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c

[Spice-devel] [client v10 23/27] spice-gtk: Let the video decoder queue, schedule and drop the frames

2016-03-01 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-mjpeg.c | 141 --- src/channel-display-priv.h | 10 ++- src/channel-display.c | 201 +++- 3 files changed, 188 insertions(+), 164 del

[Spice-devel] [spice v10 15/27] server: Give up after a while if GStreamer cannot handle the video

2016-03-01 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 <fgou...@codeweavers.com> --- server/gstreamer-encoder.

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

2016-03-02 Thread Francois Gouget
On Wed, 2 Mar 2016, Frediano Ziglio wrote: > > > > Signed-off-by: Francois Gouget <fgou...@codeweavers.com> > > --- > > > > In theory this could be needed by the next patch. > > > > Are you saying that now compression is done in another thread

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

2016-03-08 Thread Francois Gouget
ion `qxl->st == NULL' failed Removing the offending assert gets Xspice to start again but that's probably not be the right fix... -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http

Re: [Spice-devel] RFC: XSpice shift to an 'x11spice' approach

2016-03-29 Thread Francois Gouget
Would alternative mechanism be able to compensate? Spice can also remote other resources but I don't have a sense of how much those would be impacted. Also, would that mean that the Xspice script would become a wrapper for starting an X session and the related x11spice client? -- Fra

[Spice-devel] [client 1/2] streaming: Constify the video stream's dest and clip parameters

2016-05-24 Thread Francois Gouget
They are only supposed to be changed when receiving the relevant server message. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-priv.h | 2 +- src/channel-display.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/channel-d

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-24 Thread Francois Gouget
to be copied. That does not seem very bandwidth efficient but it side-steps any src_bitmap vs. src_area consistency issues. [2] So the client does not validate the SpiceCopy object either. Whether its behavior is sensible is not clear however. -- Francois Gouget <fgou...@codeweavers.com

Re: [Spice-devel] [spice v13 10/29] server: Handle and recover from GStreamer encoding errors

2016-05-11 Thread Francois Gouget
s.log.xz) My understanding is that x264enc did not like the first frame, so the pipeline remained in preroll, a state in which an EOS cannot be sent. I also tried variants like sending a gst_event_new_flush_stop() event but the send operation failed altogether (and had no effect obviously).

Re: [Spice-devel] [spice v13 11/29] server: Avoid copying the input frame in the GStreamer encoder

2016-05-11 Thread Francois Gouget
; +return FALSE; > > +} > > + if (wrapper) { > > +wrapper->refs++; > > It would probably be safer to only change this with g_atomic_int_inc() Ok. -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice v13 16/29] server: Give up after a while if GStreamer cannot handle the video

2016-05-03 Thread Francois Gouget
hink using > get_gst_codec_name() here brings much, and that things are more readable > without these changes to create_pipeline() > I'm fine with keeping things as in this patch if you prefer it this way. I think it's useful to be able to p

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-03 Thread Francois Gouget
* in > spice_gst_encoder_encode_frame for now, but I'd prefer that the > information loss happens in encode_frame rather than being already lost > in pull_compressed_buffer. data_size is the size of the encoded frame. It it exceeds 2GB then something is seriously wrong. That said, the

[Spice-devel] [client v14 26/29] spice-gtk: Add a GStreamer video decoder for MJPEG, VP8 and h264

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 26 ++- src/Makefile.am| 8 + src/channel-display-gst.c | 433 + src/channel-display-priv.h | 6 + src/channel-display.c | 10 ++ 5

[Spice-devel] [client v14 25/29] spice-gtk: Let the video decoder queue, schedule and drop the frames

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-mjpeg.c | 142 --- src/channel-display-priv.h | 10 ++- src/channel-display.c | 201 +++- 3 files changed, 189 insertions(+), 164 del

[Spice-devel] [client v14 23/29] spice-gtk: Optimize handling of the decoded frame buffer

2016-05-04 Thread Francois Gouget
The MJPEG decoder does not need a zero-filled buffer. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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 c

[Spice-devel] [qxl v14 20/29] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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(+)

[Spice-devel] [qxl v14 21/29] Xspice: Add --video-codecs to specify encoder and codec preferences

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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('

[Spice-devel] [spice v14 18/29] server: Dynamically adjust the GStreamer encoder bitrate if possible

2016-05-04 Thread Francois Gouget
This is faster and lets the encoder leverage past bitrate shaping history to attain the target faster. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/server/gst

[Spice-devel] [client v14 22/29] spice-gtk: Enable adding alternative video decoders

2016-05-04 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 <f

[Spice-devel] [spice v14 17/29] server: Respect the GStreamer encoder's valid bit rate range

2016-05-04 Thread Francois Gouget
GObject returns an error instead of clamping if given an out of range property value. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 67 ++ 1 file changed, 50 insertions(+), 17 deletions(-) diff

[Spice-devel] [spice v14 16/29] server: Give up after a while if GStreamer cannot handle the video

2016-05-04 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 <fgou...@codeweavers.com> --- server/gstreamer-encoder.

[Spice-devel] [spice v14 15/29] server: Adjust the frame rate based on the GStreamer encoding time

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 40 +--- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c index 3b223c9..2b20c99 100644 --- a/

[Spice-devel] [spice v14 14/29] server: Adjust the GStreamer encoder bit rate to the network

2016-05-04 Thread Francois Gouget
is lowered to minimize the risk of frame loss and/or long freezes. It also relies on the existing shaping of the GStreamer output bit rate to minimize the pipeline reconfigurations. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c

[Spice-devel] [spice v14 11/29] server: Avoid copying the input frame in the GStreamer encoder

2016-05-04 Thread Francois Gouget
in practice the GStreamer encoder will only modify the RedDrawable refcount during the encode_frame(), in theory the refcount could be decremented from the GStreamer thread after encode_frame() returns. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c

[Spice-devel] [spice v14 13/29] server: Shape the bit rate of the GStreamer codecs output

2016-05-04 Thread Francois Gouget
information and also annotate the client report debug traces with the corresponding bit rate information. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 288 +++-- 1 file changed, 281 insertions(+), 7 deletions(-)

[Spice-devel] [spice v14 10/29] server: Handle and recover from GStreamer encoding errors

2016-05-04 Thread Francois Gouget
This avoids getting stuck if the codec is buggy or fails to encode a frame for whatever reason (e.g. odd frame size). Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 105 ++--- 1 file changed, 90 insertions(

[Spice-devel] [spice v14 12/29] server: Add h264 support to the GStreamer video encoder

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 1 + server/gstreamer-encoder.c | 17 - server/reds.c | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6

Re: [Spice-devel] [spice v13 10/29] server: Handle and recover from GStreamer encoding errors

2016-05-04 Thread Francois Gouget
n idle this way is currently not > working, you have to workaround it with g_timeout_source_new(1). I had tried using g_timeout_add() but maybe I was missing the g_timeout_source_new() call. In any case I'm not sure it would really help. -- Francois Gouget <fgou...@codeweavers.com>__

[Spice-devel] [spice v14 02/29] server: Enable adding alternative MJPEG video encoders

2016-05-04 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 <fgou...@codeweavers.com> --- server/Makefile.am | 2 +- serv

[Spice-devel] [spice v14 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-04 Thread Francois Gouget
ibspice_server_la_SOURCES = diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c new file mode 100644 index 000..6fa2d23 --- /dev/null +++ b/server/gstreamer-encoder.c @@ -0,0 +1,556 @@ +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + Copyright (C) 2015 Je

[Spice-devel] [spice v14 00/29] Add GStreamer support for video streaming

2016-05-04 Thread Francois Gouget
issing in GLib < 2.46 (e.g. for Debian 8). -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [spice v14 01/29] server: Correctly handle and trace stream report errors

2016-05-04 Thread Francois Gouget
-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c index 038d74d..3be1e96 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -1387,15 +1387,25 @@ static int dcc_handle_stream_

[Spice-devel] [client v14 24/29] spice-gtk: Rename num_drops_on_receive to arrive_late_count

2016-05-04 Thread Francois Gouget
The frame may not get dropped once that's left up to video decoders. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-priv.h | 2 +- src/channel-display.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/channel-display-

[Spice-devel] [spice v14 19/29] server: Add support for GStreamer 0.10

2016-05-04 Thread Francois Gouget
configure will use GStreamer 1.0 if present and fall back to GStreamer 0.10 otherwise. ffenc_mjpeg takes its bitrate as a long so extend set_gstenc_bitrate(). Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 36 ++--- server/Makef

[Spice-devel] [client v14 29/29] spice-gtk: Use decodebin as a fallback for the GStreamer video decoder

2016-05-04 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 <fgou...@codeweavers.com> --- src/channel-display-gst.c | 16 ++-- 1 file changed, 14 insertions(+), 2 del

[Spice-devel] [client v14 28/29] spice-gtk: Probe GStreamer before advertising support for a codec

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-gst.c | 17 +++-- src/channel-display-priv.h | 4 ++-- src/channel-display.c | 21 + 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/channel-display-g

[Spice-devel] [client v14 27/29] spice-gtk: Allow disabling support for the builtin MJPEG video decoder

2016-05-04 Thread Francois Gouget
This makes it possible to test the GStreamer video decoder with MJPEG streams. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 11 +++ src/Makefile.am| 7 ++- src/channel-display-priv.h | 2 ++ src/channel-display.c

[Spice-devel] [spice v14 05/29] server: Let the administrator pick the video encoder and codec

2016-05-04 Thread Francois Gouget
'. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c | 2 +- server/display-channel.c | 10 +++ server/display-channel.h | 4 ++ server/gstreamer-encoder.c | 6 +- server/mjpeg-encoder.c | 6 +- server/red-qxl.c | 9 +++ server/red

[Spice-devel] [spice v14 07/29] server: Add VP8 support to the GStreamer video encoder

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 1 + server/gstreamer-encoder.c | 67 -- server/reds.c | 4 ++- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/configur

[Spice-devel] [spice v14 09/29] server: Let the video encoder manage the compressed buffer

2016-05-04 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 <fgou...@codeweavers.com> --- server/dcc-

[Spice-devel] [spice v14 08/29] server: Use the optimal number of threads for VP8 encoding

2016-05-04 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 4 server/gstreamer-encoder.c | 27 ++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9bd8ccb..6093431

[Spice-devel] [spice v14 04/29] server: Check the client video codec capabilities

2016-05-04 Thread Francois Gouget
to write clients that don't support MJPEG. * SPICE_DISPLAY_CAP_CODEC_XXX, where XXX is a supported codec. Note that for now the server only supports the MJPEG codec. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c | 3 ++- server/stream.c

Re: [Spice-devel] [spice v13 10/29] server: Handle and recover from GStreamer encoding errors

2016-05-03 Thread Francois Gouget
e a glib main loop in Xspice. If we did I would expect APIs like g_idle_source_new() to work. See: https://lists.freedesktop.org/archives/spice-devel/2016-March/027502.html -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice v13 16/29] server: Give up after a while if GStreamer cannot handle the video

2016-05-03 Thread Francois Gouget
selects which GStreamer encoder to use. If the two places got out of sync it would be worse than not havign the name in the error message. -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-03 Thread Francois Gouget
py which could only happen if the video is higher than the provided bitmap. Again I don't think that makes sense or that it can happen. -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [spice] server: Correctly handle and trace stream report errors

2016-04-15 Thread Francois Gouget
-by: Francois Gouget <fgou...@codeweavers.com> --- For the history records: the spice_return_val_if_fail() calls have been introduced in 1549f751 with a partial revert in 1b6af477. server/dcc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Francois Gouget
should still compile in this configuration. -- Francois Gouget <fgou...@codeweavers.com>___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH 1/2] server: Remove the width and height parameters of encode_frame()

2016-04-18 Thread Francois Gouget
NTAINER which is the case if rect_contains(_drawable->bbox, other_dest). [2] See also https://lists.freedesktop.org/archives/spice-devel/2016-March/027699.html -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Sp

Re: [Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-19 Thread Francois Gouget
On Tue, 19 Apr 2016, Francois Gouget wrote: > Signed-off-by: Francois Gouget <fgou...@codeweavers.com> > --- > > I don't know if this is right but it is currently necessary to compile > the Spice server. Ah. I see now that spice is not yet using the spice-commo

[Spice-devel] [common] canvas: canvas_fix_alignment() is unused so remove it.

2016-04-18 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- I don't know if this is right but it is currently necessary to compile the Spice server. common/canvas_base.c | 17 - 1 file changed, 17 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c

[Spice-devel] [client v13 26/29] spice-gtk: Add a GStreamer video decoder for MJPEG, VP8 and h264

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 26 ++- src/Makefile.am| 8 + src/channel-display-gst.c | 433 + src/channel-display-priv.h | 6 + src/channel-display.c | 10 ++ 5

[Spice-devel] [client v13 25/29] spice-gtk: Let the video decoder queue, schedule and drop the frames

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-mjpeg.c | 142 --- src/channel-display-priv.h | 10 ++- src/channel-display.c | 201 +++- 3 files changed, 189 insertions(+), 164 del

[Spice-devel] [client v13 22/29] spice-gtk: Enable adding alternative video decoders

2016-04-19 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 <f

[Spice-devel] [spice v13 19/29] server: Add support for GStreamer 0.10

2016-04-19 Thread Francois Gouget
configure will use GStreamer 1.0 if present and fall back to GStreamer 0.10 otherwise. ffenc_mjpeg takes its bitrate as a long so extend set_gstenc_bitrate(). Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 36 ++--- server/Makef

[Spice-devel] [spice v13 18/29] server: Dynamically adjust the GStreamer encoder bitrate if possible

2016-04-19 Thread Francois Gouget
This is faster and lets the encoder leverage past bitrate shaping history to attain the target faster. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/server/gst

[Spice-devel] [qxl v13 21/29] Xspice: Add --video-codecs to specify encoder and codec preferences

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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('

[Spice-devel] [qxl v13 20/29] spiceqxl: Add SpiceVideoCodecs to specify video codec preferences

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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(+)

[Spice-devel] [client v13 27/29] spice-gtk: Allow disabling support for the builtin MJPEG video decoder

2016-04-19 Thread Francois Gouget
This makes it possible to test the GStreamer video decoder with MJPEG streams. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 11 +++ src/Makefile.am| 7 ++- src/channel-display-priv.h | 2 ++ src/channel-display.c

[Spice-devel] [client v13 24/29] spice-gtk: Rename num_drops_on_receive to arrive_late_count

2016-04-19 Thread Francois Gouget
The frame may not get dropped once that's left up to video decoders. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display-priv.h | 2 +- src/channel-display.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/channel-display-

[Spice-devel] [client v13 23/29] spice-gtk: Optimize handling of the decoded frame buffer

2016-04-19 Thread Francois Gouget
The MJPEG decoder does not need a zero-filled buffer. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- 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 c

[Spice-devel] [spice v13 02/29] server: Enable adding alternative MJPEG video encoders

2016-04-19 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 <fgou...@codeweavers.com> --- server/Makefile.am | 2 +- serv

[Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-04-19 Thread Francois Gouget
ibspice_server_la_SOURCES = diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c new file mode 100644 index 000..3cc1281 --- /dev/null +++ b/server/gstreamer-encoder.c @@ -0,0 +1,556 @@ +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + Copyright (C) 2015 Je

[Spice-devel] [spice v13 00/29] Add GStreamer support for video streaming

2016-04-19 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 gst branch of the repositories below: spice: https://github.com/fgouget/spice spice-gtk:

[Spice-devel] [spice v13 04/29] server: Check the client video codec capabilities

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c | 3 ++- server/stream.c | 25 - 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/server/dcc-send.c b/server/dcc-send.c index 89ff199..9331e02 100644 --- a/server/dcc-

[Spice-devel] [spice v13 01/29] server: Correctly handle and trace stream report errors

2016-04-19 Thread Francois Gouget
-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c index 91c3f82..36048da 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -1380,15 +1380,25 @@ static int dcc_handle_stream_

[Spice-devel] [spice v13 11/29] server: Avoid copying the input frame in the GStreamer encoder

2016-04-19 Thread Francois Gouget
in practice the GStreamer encoder will only modify the RedDrawable refcount during the encode_frame(), in theory the refcount could be decremented from the GStreamer thread after encode_frame() returns. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c

[Spice-devel] [spice v13 14/29] server: Adjust the GStreamer encoder bit rate to the network

2016-04-19 Thread Francois Gouget
is lowered to minimize the risk of frame loss and/or long freezes. It also relies on the existing shaping of the GStreamer output bit rate to minimize the pipeline reconfigurations. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c

[Spice-devel] [spice v13 07/29] server: Add VP8 support to the GStreamer video encoder

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 1 + server/gstreamer-encoder.c | 67 -- server/reds.c | 4 ++- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/configur

[Spice-devel] [spice v13 16/29] server: Give up after a while if GStreamer cannot handle the video

2016-04-19 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 <fgou...@codeweavers.com> --- server/gstreamer-encoder.

[Spice-devel] [spice v13 13/29] server: Shape the bit rate of the GStreamer codecs output

2016-04-19 Thread Francois Gouget
information and also annotate the client report debug traces with the corresponding bit rate information. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 288 +++-- 1 file changed, 281 insertions(+), 7 deletions(-)

[Spice-devel] [spice v13 09/29] server: Let the video encoder manage the compressed buffer

2016-04-19 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 <fgou...@codeweavers.com> --- server/dcc-

[Spice-devel] [spice v13 12/29] server: Add h264 support to the GStreamer video encoder

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 1 + server/gstreamer-encoder.c | 17 - server/reds.c | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6

[Spice-devel] [spice v13 05/29] server: Let the administrator pick the video encoder and codec

2016-04-19 Thread Francois Gouget
to write clients that don't support MJPEG. * SPICE_DISPLAY_CAP_CODEC_XXX, where XXX is a supported codec. Note that for now the server only supports the MJPEG codec. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-send.c | 2 +- server/display-cha

[Spice-devel] [spice v13 10/29] server: Handle and recover from GStreamer encoding errors

2016-04-19 Thread Francois Gouget
This avoids getting stuck if the codec is buggy or fails to encode a frame for whatever reason (e.g. odd frame size). Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/gstreamer-encoder.c | 105 ++--- 1 file changed, 90 insertions(

[Spice-devel] [spice v13 08/29] server: Use the optimal number of threads for VP8 encoding

2016-04-19 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- configure.ac | 4 server/gstreamer-encoder.c | 27 ++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9bd8ccb..6093431

[Spice-devel] [spice] server: Don't define a static function if it's not going to be used

2016-05-25 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- Otherwise you get compiler warnings... server/display-channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index b970c9b..b0875e8 100644 --- a/

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-25 Thread Francois Gouget
On Wed, 25 May 2016, Francois Gouget wrote: > On Tue, 24 May 2016, Francois Gouget wrote: > [...] > > Now if the content of SpiceCopy cannot be trusted, the GStreamer encoder > > is the wrong place to check for issues : there are at least three places > > where the Spic

Re: [Spice-devel] [spice v13 03/29] server: Add a GStreamer 1.0 MJPEG video encoder and use it by default

2016-05-25 Thread Francois Gouget
On Tue, 24 May 2016, Francois Gouget wrote: [...] > Now if the content of SpiceCopy cannot be trusted, the GStreamer encoder > is the wrong place to check for issues : there are at least three places > where the SpiceCopy bitmap can be used: the MJPEG encoder, the GStreamer

[Spice-devel] [server] streaming: Don't start streaming if there is no video encoder

2016-07-22 Thread Francois Gouget
Without a video encoder no frame will be streamed anyway. This fixes the case where the client does not support any of the server's codecs, such as if it was compiled with --enable-gstvideo=no --disable-builtin-mjpeg. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/dcc-

[Spice-devel] [spice] server: Make sure g_object_new receive the correct data

2016-07-22 Thread Francois Gouget
ed-off-by: Francois Gouget <fgou...@codeweavers.com> --- I ran into this crash so I thought I'd resubmit this patch so nobody else has to dig for this patch. This version keeps just the part of Frediano Ziglio's patch that seemed uncontroversial. server/reds.c | 4 ++-- 1 file changed, 2 inse

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread Francois Gouget
s, it will be decoded by your media player in the guest, then reencoded, possibly with a different video codec, by the spice server, and finally decoded by the Spice client. So the codec of the original video file is quite irrelevant. -- Francois Gouget <

[Spice-devel] [common] codegen: Fix compatibility with Python 2.6

2016-07-29 Thread Francois Gouget
This is needed for RHEL 6.8. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- This is not the only patch needed to get the latest Spice server to compile on RHEL 6.8. But this dependency on Python 2.7 seems pretty needless so it may be worth applying. python_modules/mars

Re: [Spice-devel] [spice] server: Make sure g_object_new receive the correct data

2016-07-25 Thread Francois Gouget
here more explicitly indicates that the property is 64 bit than a cast hidden in a far away macro. (One could also argue for an explicit comment but I think that would be overkill. Why add a comment here and not for every other cast?) -- Francois Gouget <fgou...@codeweavers.com>

[Spice-devel] [common v2] codegen: Fix compatibility with Python 2.6

2016-07-29 Thread Francois Gouget
Python 2.6 does not have a flags parameter. This is needed for RHEL 6.8. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- python_modules/marshal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_modules/marshal.py b/python_modules/marshal.py index 0

Re: [Spice-devel] [server] streaming: Don't start streaming if there is no video encoder

2016-07-25 Thread Francois Gouget
even attempt to create a video encoder. But there may be cases where we attempt to create the video encoder only to have that fail, for instance if create_pipeline() starts failing for whatever reason. So repeated attempts could start being a bit expensive. -- Francois Goug

Re: [Spice-devel] [server] streaming: Don't start streaming if there is no video encoder

2016-07-25 Thread Francois Gouget
supported. Yes, there is a --disable-builtin-mjpeg configure option in spice-gtk but it's only meant as a way to test GStreamer's MJPEG support or this sort of special condition. I don't expect anyone to actually disable the builtin MJPEG decoder in a production build. -- Francois Gouget <fgou.

[Spice-devel] [client] streaming: Don't crash if the stream creation fails

2016-07-25 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- As far as I can tell there is no way to tell the server that the stream creation failed. So the client will still receive the video as a stream and won't be able to display it. But at least it will not crash. src/channel-dis

[Spice-devel] [client v3 2/4] streaming: Don't crash if no frame was received before closing the stream

2016-08-11 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- This could potentially happen if we detect a stream right before it ends. But it's mostly useful for the next patch. src/channel-display.c | 39 --- 1 file changed, 20 insertions(+), 19 del

[Spice-devel] [client v3 3/4] streaming: Don't crash if the stream creation fails

2016-08-11 Thread Francois Gouget
Note that this implies closing the stream before receiving any frame. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/channel-display.c b/src/channel-display.c index 22c54f2..709b3d2 100644 ---

[Spice-devel] [client v3 4/4] streaming: Create the pipeline at the same time as the GStreamer decoder

2016-08-11 Thread Francois Gouget
This lets create_gstreamer_decoder() fail if it cannot create the pipeline it needs, allowing the caller to try fallbacks. This also means the pipeline has the same lifetime as the decoder which makes it possible to remove a check in queue_frame(). Signed-off-by: Francois Gouget <f

[Spice-devel] [client v3 1/4] streaming: Check the stream id in display_update_stream_report() too

2016-08-11 Thread Francois Gouget
It's safer and more consistent than assuming the caller has done the check already. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/channel-display.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/channel-display.c b/src/channel-display.c

[Spice-devel] [client 1/2] streaming: Send a special stream report to signal streaming errors

2016-08-11 Thread Francois Gouget
Servers that recognize this special report then stop streaming (sending regular screen updates instead) while older ones essentially ignore it. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- This patchset is based on Victor Toso's idea [1] of using the stream reports t

[Spice-devel] [spice 2/2] streaming: Stop streaming if the client reports a streaming error

2016-08-11 Thread Francois Gouget
Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- If there's enough bandwidth it's as if nothing wrong ever happened :-) server/dcc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/server/dcc.c b/server/dcc.c index d387e8b..b4066f5 100644 --- a/server/dcc.c +++ b/

[Spice-devel] [protocol 0/3] Fixing the *_DEPRECATED set of macros

2016-08-11 Thread Francois Gouget
mplies spice and spice-gtk will need an up-to-date spice-protocol to compile. -- Francois Gouget <fgou...@codeweavers.com> ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

2016-08-11 Thread Francois Gouget
If the user specifically requests access to the deprecated APIs by defining the SPICE_DEPRECATED macro, then turn off the SPICE_GNUC_DEPRECATED* warnings. Also automatically use G_GNUC_DEPRECATED if available. Add SPICE_GNUC_DEPRECATED_FOR(). Signed-off-by: Francois Gouget <f

[Spice-devel] [spice 2/3] server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h

2016-08-11 Thread Francois Gouget
spice-server.h cannot include glib.h because it is a public header and is used by projects that do not use GLib. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- server/spice-migration.h | 4 ++-- server/spice-server.h| 13 ++--- 2 files changed, 8 insertions

[Spice-devel] [client 3/3] spice-gtk: Use spice-protocol's SPICE_GNUC_DEPRECATED* macros

2016-08-11 Thread Francois Gouget
compilation directive. - Finally replace SPICE_NO_DEPRECATED with spice-protocol's SPICE_DEPRECATED macro which has the exact same meaning despite the missing NO. Signed-off-by: Francois Gouget <fgou...@codeweavers.com> --- src/Makefile.am | 2 +- src/channel-main.h

<    1   2   3   4   5   6   7   8   9   >