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

Francois Gouget fgouget at codeweavers.com
Wed Aug 17 16:54:50 UTC 2016


On Tue, 16 Aug 2016, Victor Toso wrote:
[...]
> > +    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;
> > +    }
> > +
> 
> And what would happen as soon as a new stream is detected? Would it try
> to create a new encoder (same as before) or would not allow streaming?

If a new, different, video is later detected then the server would 
create a new video stream and try to send it to the client.

It would make sense too because there is no way to know why the previous 
stream failed. It may be because the decoding hardware was being used by 
another application at the time (assuming hardware decoding does become 
usable and there was no fallback available), or maybe the decoder only 
handles even widths/heights, etc. There is no way to communicate these 
conditions to the server because there is no way for even the client to 
know about them.

The point is: with GStreamer we interact with third-party software and 
hardware that may thorw erors at us in circumstances totally out of our 
control and we need some way to handle that; preferably in a way that 
does not involve crashing the client, or freezing a large part of the 
screen.

-- 
Francois Gouget <fgouget at codeweavers.com>


More information about the Spice-devel mailing list