Re: [client v5 1/4] streaming: Report invalid streams to the server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 15, 2016 at 05:33:07PM +0100, Christophe Fergeau wrote:
> On Mon, Oct 31, 2016 at 09:25:33PM +0100, Francois Gouget wrote:
> > The error is sent using the existing client stream report message where
> > the dropped frame count is maxed out while the received frame count is
> > zero. Servers that recognize it can then switch to sending regular
> > screen updates for that area so the client is not stuck with a frozen
> > area on the screen.
> > This can be useful in case the client is unable to decode the stream for
> > some reason like a bug in the GStreamer plugins, the decoder not liking
> > odd video dimensions, etc.
> > 
> > Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
> > ---
> > 
> > Changed the commit log. Hope it's as desired.
> > 
> > 
> >  src/channel-display.c | 68 ++++++++++++++++++++++++++++-----------------------
> >  1 file changed, 38 insertions(+), 30 deletions(-)
> > 
> > diff --git a/src/channel-display.c b/src/channel-display.c
> > index 709b3d2..6cbbdd3 100644
> > --- a/src/channel-display.c
> > +++ b/src/channel-display.c
> > @@ -1077,6 +1077,38 @@ static void display_update_stream_region(display_stream *st)
> >      }
> >  }
> >  
> > +static display_stream *get_stream_by_id(SpiceChannel *channel, uint32_t id)
> > +{
> > +    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
> > +
> > +    if (c != NULL && c->streams != NULL && id < c->nstreams &&
> > +        c->streams[id] != NULL) {
> > +        return c->streams[id];
> > +    }
> > +
> > +    if (spice_channel_test_capability(channel, SPICE_DISPLAY_CAP_STREAM_REPORT)) {
> > +        SpiceMsgcDisplayStreamReport report;
> > +        SpiceMsgOut *msg;
> > +
> > +        /* Send a special stream report to indicate there is no such stream */
> 
> Can you add to the comment which values are special? (what you already
> said in the commit log). This would be better in a helper function in my
> opinion, see my comment on one of the next commits.

One way of doing that maybe to memset() the whole struct to 0, and only
set the fields we need, rather than setting everything to 0.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]