[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: [gst-devel] Loop-based elements and pause state
From:       Ramón García <ramon_garcia_f () yahoo ! com>
Date:       2004-08-19 11:24:54
Message-ID: 20040819112454.42085.qmail () web50305 ! mail ! yahoo ! com
[Download RAW message or body]

 --- David Schleef <ds@schleef.org> escribió: 
> 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.

Are you sure?

A loop-based element should implement the
release_locks function. Before a state change, that
callback will be called. That function should arrange
things so that it causes the termination of the loop.
For instance, the element might contain a variable
that if set the loop terminates, or the element
contains a pipe, so that the loop terminates when
there is data available in the pipe, and the
release_locks function writes data to the pipe.

The release_locks callback is specified in
GstElementClass.

The release_locks function runs in the thread that
caused the state change, such as the application
thread. For the mechanism above to work, that thread
must be different from the thread of the loop function
(the thread of the element). Placing the element in
its own thread would be enough.

Ramon


		
______________________________________________
Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
Nuevos servicios, más seguridad
http://correo.yahoo.es


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic