[spice-protocol] RFC protocol: Allows to send partial frame data

Submitted by Frediano Ziglio on Nov. 6, 2017, 5:13 p.m.

Details

Message ID 20171106171311.12305-1-fziglio@redhat.com
State New
Headers show
Series "RFC protocol: Allows to send partial frame data" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 6, 2017, 5:13 p.m.
Reduce the needs to buffer the entire frame and than send
and on the other end to wait the entire frame before processing.
Some encodings allow to start processing before having a full
frame allowing to reduce latency and buffering with huge frames.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 spice/protocol.h | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/spice/protocol.h b/spice/protocol.h
index cbf2f01..16590d4 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -143,6 +143,7 @@  enum {
     SPICE_DISPLAY_CAP_CODEC_H264,
     SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,
     SPICE_DISPLAY_CAP_CODEC_VP9,
+    SPICE_DISPLAY_CAP_STREAM_PARTIAL,
 };
 
 enum {

Comments

Frediano Ziglio writes:

> Reduce the needs to buffer the entire frame and than send
> and on the other end to wait the entire frame before processing.

I think that you want a little more than "reduce the need", making
explicit what is allowed. Something like: "When both server and
client have the capability, the server will send partial frames
to the client using  SpiceMsgDisplayStreamPartialData messages."


> Some encodings allow to start processing before having a full
> frame allowing to reduce latency and buffering with huge frames.

1. Could you add some examples of encodings to the description?
You could be referring to progressive JPEG, but in the context, I wonder
if there is also a case with H264 that I am not aware of.

2. Could you add in the description how the capability flag would be
used, i.e. what changes in behavior are expected from server and client?
(I made a suggestion of wording above, trying to guess what the intent
was based on other patches you sent)

>
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

I like the idea.

> ---
>  spice/protocol.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/spice/protocol.h b/spice/protocol.h
> index cbf2f01..16590d4 100644
> --- a/spice/protocol.h
> +++ b/spice/protocol.h
> @@ -143,6 +143,7 @@ enum {
>      SPICE_DISPLAY_CAP_CODEC_H264,
>      SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,
>      SPICE_DISPLAY_CAP_CODEC_VP9,
> +    SPICE_DISPLAY_CAP_STREAM_PARTIAL,
>  };
>
>  enum {


--
Cheers,
Christophe de Dinechin (IRC c3d)