[sugar] gobject idle_add signal and waiting in the main loop

Arjun Sarwal arjun
Sun Jan 27 23:22:01 EST 2008


Hi

In the code I am working on, upon a user generated event, queuing of a
gobject idle add is enabled that queues an idle add whenever I get new data
from the gstreamer pipeline.

a rough sequence of desired events is as follows -->


-user event generated
-enable gobject.idle_add to queue up data buffer upon receiving a "handoff"
signal from the gstreamer fakesink
-attempt to wait for 2/3 buffers to accumulate in the appropriate callback
functions
-disable gobject.idle_add  and disable the handoff signal
-process the data buffers



I need to wait in my main thread for a few of these buffers to acquire
before moving forward.  If I use time.sleep it seems to me that i stop
getting data buffers too. It may be that the handoff signal gets disabled
and/or the gobject.idle_add doesn't get invoked


I'm looking to use a different choice of either (a) time/wait or (b)
gobject.idle_add

Kindly let me know with suggestions to help me overcome this problem.


thanks
Arjun



-- 
Arjun Sarwal
<arjun at laptop.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20080127/86b4f6e1/attachment.htm 



More information about the Sugar-devel mailing list