[gst-devel] gstreamer thread problem?
wim at fluendo.com
Wed Jun 14 11:45:58 CEST 2006
On Wed, 2006-06-14 at 09:32 +0000, woo john wrote:
> i am reading the plugin writer's guide. i am confused about scheduling
> It is clear for me that a filter or sink element can has its own
> thread(act as puller).There is a simple example in the PWG to explain this
> My question is :
> 1 whether a source element can work at pull mode or push mode ?
See the docs for basesrc
(http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstBaseSrc.html) for when the element can operate in pull mode.
> 2 if it is at pull mode, is there a thread assigned for it?
> if it is at push mode, is there a thread assigned for it?
An element operating in pull mode is not normally managing a thread
since it is being pulled by another element that normally uses a thread
to do this.
An element in push mode either uses a thread to push stuff out or uses
the thread from an upstream element (a typical _chain based element,
like a decoder).
> 3 As i know,I can insert a queue between a source element and the
> downstream elements. In this case,what mode does the source element work?
> pull or push?
Push, queue will not pull from any upstream peer. This means the source
starts a thread to push stuff into the queue. This also means that the
source has to perform the seeks on its own (currently).
Hope this helps,
> thanks in advance!
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
Wim Taymans <wim at fluendo.com>
More information about the gstreamer-devel