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

Victor Toso victortoso at redhat.com
Fri Dec 2 07:51:23 UTC 2016


Hi!

On Tue, Nov 22, 2016 at 06:01:48PM +0100, Francois Gouget wrote:
> By removing the stream's video encoder we force the stream to send
> future frames using the fallback code, that is as regular screen
> updates.
> However note that we keep the stream object: we have to. Otherwise
> future frames would trigger the creation of a new stream object with a
> new video encoder which would again try to stream the video and fail
> again and again.
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

So, I postpone this for some time because it was reviewed by Christophe
and I was waiting to see if he would come back to it.

The thing is, he acked! For the future, I recommend you to include the
Acked-by metadata in acked patches, which always help a lot.

The server side patch was my main worry and I'm happy to see this was
acked.

> ---
>
> v5 was acked so no change.

Yep!

I intend to push this one soon today.

>
>  server/dcc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index e9b438f..cf5f44c 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -1059,6 +1059,15 @@ static int dcc_handle_stream_report(DisplayChannelClient *dcc,
>          return TRUE;
>      }
>  
> +    if (report->num_frames == 0 && report->num_drops == UINT_MAX) {
> +        spice_warning("stream_report: the client does not support stream %u",
> +                      report->stream_id);
> +        /* Stop streaming the video so the client can see it */
> +        agent->video_encoder->destroy(agent->video_encoder);
> +        agent->video_encoder = NULL;
> +        return TRUE;
> +    }
> +
>      if (report->unique_id != agent->report_id) {
>          spice_warning("stream_report: unique id mismatch: local (%u) != msg (%u) "
>                        "The old stream was probably replaced by a new one",
> -- 
> 2.10.1
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161202/ac69c731/attachment.sig>


More information about the Spice-devel mailing list