[gst-devel] Loop-based elements and pause state
Daniel Gazard
dany42 at free.fr
Wed Aug 18 22:03:10 CEST 2004
David Schleef <ds at schleef.org> writes:
> On Wed, Aug 18, 2004 at 10:33:33PM +0200, Daniel Gazard wrote:
>> I have wrote a GStreamer loop-based plugin, i.e. an element that enter
>> into an infinite processing loop (by opposition to chain-based
>> plugin).
>
> Loop-based elements are not "infinite loops", they are supposed to
> do as little as possible and then return. Infinite-loop elements
> will fail miserably.
So the documentation have to be updated since I can read in the
«Loop-based elements» section:
As opposed to chain-based elements, loop-based elements enter an
infinite loop that looks like this:
GstBuffer *buffer, *outbuffer;
while (1) {
buffer = gst_pad_pull (sinkpad);
...
// process buffer, create outbuffer
while (!done) {
....
// optionally request another buffer
buffer = gst_pad_pull (sinkpad);
....
}
...
gst_pad_push (srcpad, outbuffer);
}
More information about the gstreamer-devel
mailing list