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

Victor Toso lists at victortoso.com
Mon Aug 22 13:06:21 UTC 2016


Hi,

On Wed, Aug 17, 2016 at 06:54:50PM +0200, Francois Gouget wrote:
> 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.

Right. What I was thinking before is that, if the decoder failed on
client we don't try to encode the stream again with that codec but it
does not seem the right approach.

I'm afraid of the situation where sever is always trying to encode with
something that it will always fail on client.

>
> --
> Francois Gouget <fgouget at codeweavers.com>


More information about the Spice-devel mailing list