Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:46PM -0500, Yonit Halperin wrote: ACK series, sorry for the delay. I have to admit I don't understand the first patches as well as I should, but seeing as they have been tested and that I would just be delaying them further, I prefer to let you push them. I hope to wo

Re: [Spice-devel] [PATCH spice-server 24/28] server/red_worker.c: use the bit rate of old streams as a start point for new streams

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:10PM -0500, Yonit Halperin wrote: > mjpeg_encoder modify the initial bit we supply it, according to the > client feedback. If it reaches a bit rate which is higher than the > initial one, we use the higher bit rate as the new bit rate estimation. ACK to this and the r

Re: [Spice-devel] [PATCH spice-server 23/28] red_worker: video streams - adjust client playback latency

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:09PM -0500, Yonit Halperin wrote: ACK one comment below > --- > server/red_worker.c | 56 > - > 1 file changed, 51 insertions(+), 5 deletions(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index

Re: [Spice-devel] [PATCH spice-server 22/28] reds: support mm_time latency adjustments

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:08PM -0500, Yonit Halperin wrote: > When there is no audio playback, we set the mm_time in the client to be older > than the one in the server by at least the requested latency (the delta is > actually bigger, due to the network latency). > When there is an audio playb

Re: [Spice-devel] [PATCH spice-server 21/28] snd_worker: support sending SPICE_MSG_PLAYBACK_LATENCY

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:07PM -0500, Yonit Halperin wrote: > also update spice-common submodule ACK with one line removed. > --- > server/snd_worker.c | 45 + > server/snd_worker.h | 2 ++ > 2 files changed, 47 insertions(+) > > diff --git a/ser

Re: [Spice-devel] [PATCH spice-server 20/28] dispatcher.h: fix - s/#define MAIN_DISPATCHER_H/#define DISPATCHER_H

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:06PM -0500, Yonit Halperin wrote: ACK > --- > server/dispatcher.h | 6 +++--- > server/main_dispatcher.h | 1 + > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/server/dispatcher.h b/server/dispatcher.h > index a468c58..1b389bd 100644 > ---

Re: [Spice-devel] [PATCH spice-server 19/28] red_worker: ignoring video frame drops that are not due to pipe congestion

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:05PM -0500, Yonit Halperin wrote: > A frame can be dropped if a new frame was added during the same > call to red_process_command (we didn't attempt to send the older > frame). Such drops are ignored. ACK. red_detach_stream / red_attach_stream and red_stream_mainten

Re: [Spice-devel] [PATCH spice-server 18/28] red_worker: notify mjpeg_encoder on server frame drops

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:04PM -0500, Yonit Halperin wrote: ACK > --- > server/red_worker.c | 17 + > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index 23f9ca5..ff26f84 100644 > --- a/server/red_worker.c > +++

Re: [Spice-devel] [PATCH spice-server 17/28] red_worker: support SPICE_MSGC_DISPLAY_STREAM_REPORT

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:03PM -0500, Yonit Halperin wrote: ACK, one spelling error below. > update mjpeg_encoder with reports from the client about > the playback quality. > --- > server/red_dispatcher.c | 1 + > server/red_worker.c | 86 > +

Re: [Spice-devel] [PATCH spice-server 16/28] red_worker: start using mjpeg_encoder rate control capabilities

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:02PM -0500, Yonit Halperin wrote: > This patch only employs setting the stream parameters based on > the initial given bit-rate, the latency, and the encoding size. > Later patches will also employ mjpeg_encoder response to client reports, > and its control over frame

Re: [Spice-devel] [PATCH spice-server 15/28] server/red_worker: enable latency monitoring in the display channel

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:01PM -0500, Yonit Halperin wrote: ACK > --- > server/red_worker.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index 82f2fc9..5043c10 100644 > --- a/server/red_worker.c > +++ b/server/red_w

Re: [Spice-devel] [PATCH spice-server 14/28] red_worker: stream - update periodically the input frame rate

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:04:00PM -0500, Yonit Halperin wrote: > Periodically calculate the rate of frames arriving from the guest to the > server. ACK. red_now should be put in a header later. > --- > server/red_worker.c | 36 +++- > 1 file changed, 35 insertio

Re: [Spice-devel] [PATCH spice-server 13/28] red_channel: monitor connection latency using MSG_PING

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:59PM -0500, Yonit Halperin wrote: ACK. just a note: maybe we should not send our time, but an id, to not leak information? another note: should we drop the special case main channel ping later? other notes (all nitpick quality) below. > --- > server/inputs_channe

Re: [Spice-devel] [PATCH spice-server 12/28] server/red_worker: assign timer callbacks to worker_core, using spice_timer_queue

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:58PM -0500, Yonit Halperin wrote: > display channel - supplying timeouts interface to red_channel, in order to > allow > periodic latency monitoring (see next patch). ACK > --- > server/red_worker.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff

Re: [Spice-devel] [PATCH spice-server 11/28] server: spice_timer_queue

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:57PM -0500, Yonit Halperin wrote: > Each thread can create a spice_timer_queue, for managing its > own timers. ACK. nitpick: why ms and not nano? > --- > server/Makefile.am | 2 + > server/spice_timer_queue.c | 268 > +

Re: [Spice-devel] [PATCH spice-server 10/28] mjpeg_encoder: add stream warmup time, in which we avoid server and client drops

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:56PM -0500, Yonit Halperin wrote: > The stream starts after lossless frames were sent to the client, > and without rate control (except for pipe congestion). Thus, on the beginning > of the stream, we might observe frame drops on the client and server side > which > a

Re: [Spice-devel] [PATCH spice-server 09/28] mjpeg_encoder: keep the average observed fps similar to the defined fps

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:55PM -0500, Yonit Halperin wrote: > The actual frames distribution does not necessarily fit the > condition "at least one frame every (1000/rate_contorl->fps) > milliseconds". > For keeping the average frame rate close to the defined fps, we > periodically measure the

Re: [Spice-devel] [PATCH spice-server 08/28] mjpeg_encoder: move the control over frame drops to mjpeg_encoder

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:54PM -0500, Yonit Halperin wrote: ACK with one comment. > --- > server/mjpeg_encoder.c | 20 +--- > server/mjpeg_encoder.h | 21 ++--- > server/red_worker.c| 21 - > 3 files changed, 39 insertions(+), 23 deleti

Re: [Spice-devel] [PATCH spice-server 07/28] mjpeg_encoder: update the client with estimations for the required playback latency

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:53PM -0500, Yonit Halperin wrote: > The required client playback latency is assessed based on the current > estimation of the bit rate, the network latency, and the encoding size > of the frames. When the playback delay that is reported by the client > seems too small,

Re: [Spice-devel] [PATCH spice-server 06/28] mjpeg_encoder: modify stream bit rate based on server side pipe congestion

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:52PM -0500, Yonit Halperin wrote: > Downgrading stream bit rate when the input frame rate in the server > exceeds the output frame rate, and frames are being dropped from the > output pipe. ACK. > --- > server/mjpeg_encoder.c | 103 > +++

Re: [Spice-devel] [PATCH spice-server 05/28] mjpeg_encoder: adjust the stream bit rate based on periodic client feedback

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:51PM -0500, Yonit Halperin wrote: > mjpeg_encoder can receive periodic reports about the playback status on > the client side. Then, mjpeg_encoder analyses the report and can > increase or decrease the stream bit rate, depending on the report. > When the bit rate is ch

Re: [Spice-devel] [PATCH spice-server 04/28] mjpeg_encoder: re-configure stream parameters when the frame's encoding size changes

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:50PM -0500, Yonit Halperin wrote: > If the encoding size seems to get smaller/bigger, re-evaluate the > stream quality and frame rate. ACK. > --- > server/mjpeg_encoder.c | 147 > ++--- > 1 file changed, 139 insertions(+)

Re: [Spice-devel] [PATCH spice-server 03/28] mjpeg_encoder: configure mjpeg quality and frame rate according to a given bit rate

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:49PM -0500, Yonit Halperin wrote: > Previously, the mjpeg quality was always 70. The frame rate was > tuned according to the frames' congestion in the pipe. > This patch sets the quality and frame rate according to > a given bit rate and the size of the first encoded f

Re: [Spice-devel] [PATCH spice-server 02/28] server/red_worker: streams: moving mjpeg_encoder from Stream to StreamAgent

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:48PM -0500, Yonit Halperin wrote: > The mjpeg_encoder should be client specific, and not shared between > different clients**, for the following reasons: > (1) Since we use abbreviated jpeg datastream for mjpeg, employing the same > mjpeg_encoder for different clie

Re: [Spice-devel] [PATCH spice-server 01/28] red_worker: stream agent - fix miscounting of frames

2013-04-14 Thread Alon Levy
On Tue, Feb 26, 2013 at 01:03:47PM -0500, Yonit Halperin wrote: > Frames counting was skipped when the previous frame was already > sent completely to the client. ACK > --- > server/red_worker.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/server/re