[gst-devel] Dropping buffers when pausing live stream

Arnout Vandecappelle arnout at mind.be
Tue Oct 13 08:20:46 CEST 2009

On Saturday 10 October 2009 16:48:58 William Gerecke wrote:
> Did you consider the valve element for this purpose? The element can be
> placed upstream of your processor intensive elements and turned on or off
> using the "drop" property.  When drop is set to TRUE the element drops data
> thereby preventing buffer overflows.
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-pl
> ugins/html/gst-plugins-bad-plugins-valve.html

 Nice one, I hadn't noticed it when searching with gst-inspect.

 However, it's a bit tricky to insert this element in the middle of 
decodebin2, I think.  I don't see how that could be accepted in core 
GStreamer.  In addition, as Olivier mentions, it's not good enough, because I 
want to keep the last keyframe.  The queue implementation does that IIRC.


> Bill
> On 10/9/09, Arnout Vandecappelle <arnout at mind.be> wrote:
> > Hoi all,
> >
> > My application is displaying live media that comes in over http or rtsp.
> > Sometimes the stream has to be paused (because it is invisible and I
> > don't want to waste CPU cycles on decoding).  However, simply pausing the
> > pipeline
> > will eventually disconnect the source because of overflowing socket
> > buffers.
> > Also, when playing again, I don't want to render a second of old data.
> >
> > The solution I had in mind is to port the dropping behaviour of queue to
> > multiqueue.  Then I pause the sink elements, which makes the queues fill
> > up and triggers the dropping.  When playing again, there is still a bit
> > of stale
> > data but it is recent stale data (and probably rendering delay will cause
> > some
> > more data to be dropped in the near future).
> >
> > Does this sound like a good idea?  Anybody have a better idea?
> >
> > Regards,
> > Arnout

Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  D206 D44B 5155 DF98 550D  3F2A 2213 88AA A1C7 C933

More information about the gstreamer-devel mailing list