Re: [PATCH] streaming: Tweak the GStreamer decoder to avoid a compiler warning

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

 



On Wed, 1 Jun 2016, Marc-André Lureau wrote:

> hi
> 
> On Mon, May 30, 2016 at 9:37 PM, Francois Gouget
> <fgouget@xxxxxxxxxxxxxxx> wrote:
> > We check that there is a matching frame in the queue before popping the
> > old ones. So we know the inner loop will find a match and thus that
> > frame will not be NULL. But figuring that out is too hard for the
> > compiler.
> >
> 
> oh ok..
> 
> (btw, that's a weird code block, I don't really get why it's necessary)

The GStreamer pipeline may drop frames, for instance if the CPU is too 
slow to decode the stream. So initially the code was just dropping the 
SpiceFrame objects until it found the one matching the new buffer.

However, some element in the GStreamer pipeline sometimes changes the 
buffer PTS. So in new_sample() we get a buffer with a totally unknown 
PTS which we are unable to match with a SpiceFrame object.

Since there was no match the initial version of that loop was dropping 
every SpiceFrame object, including the one for the next buffer that was 
still in the GStreamer pipeline. So when that next buffer came out its 
PTS did not match any SpiceFrame object either, resulting into a new 
flushing of the decoding_queue, etc. This lead to no frame being 
displayed until such a time that both the GStreamer pipeline and 
decoding_queue were empty.

So the current code first checks that the buffer does match a SpiceFrame 
object before dropping the old ones from the decoding_queue.


-- 
Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
_______________________________________________
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]