significance of STREAM_LOCK

ved kpl ved.kpl at gmail.com
Wed Dec 7 23:29:25 PST 2011


Stream lock on a  pad is taken (by the core), before entering it's
processing function such as chain, loop.
It is a recursive lock and can be locked by the same thread n times,
which means no other thread can acquire
the lock during this. This assures that the processing of buffers
won't happen from two different threads.

FLUSH_START is a non serialized event, which means it does not require
STREAM LOCK to be taken.
So it is possible that you could receive the FLUSH_START event in your
event handler of the element, while
your element is busy processing in it's chain function. The
significance of this event is that you tell your element
to come out of its chain function immediately (unblock, flush everything).

FLUSH_STOP event is serialized which means it will ensure that your
element is done with flushing
and is not in its chain function, hence ready to accept new buffers.

Streaming threads are part of your pipeline buffer flow. The data
processing happens in separate thread contexts.
chain, loop are all part of it.


On Thu, Dec 8, 2011 at 9:31 AM, chandu
<chandrakala.madhira at incubesol.com> wrote:
> Hi,
>
> Iam a bit confused with STREAM_LOCK functionality. my doubts are
>
> ->what is the significance of STREAM_LOCK. how any one can use it.
> ->why FLUSH_START does not require STREAM_LOCK and why FLUSH_STOP require
> STREAM_LOCK
> ->what are streaming threads
> ->how the chain function block them
>
> Can any one please help me on this.
>
> Thanks in advance.
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/significance-of-STREAM-LOCK-tp4171489p4171489.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list