[mythtv] Advice on inter-thread communication and QT

Paul Volkaerts paul.volkaerts at lineone.net
Sun Oct 3 21:26:11 UTC 2004


I am in the process of reworking the webcam code in MythPhone to make it run
as a separate thread instead of in the GUI thread since it can block if
there are no frames available.

So I have a thread which fills buffers with frames from the webcam
asynchronously say every 100ms. Is there a decent mechanism for this thread
to cause the GUI thread to wake up and process an event?

Currently I have a timer running every 100ms in the GUI thread which polls
to see if there are webcam frames ready; but I really hate that kind of
approach. Ideally I'd like the equivelant of "emit" but one that causes the
callback to be called within the GUI thread instead of the calling thread
(which I don't believe is the case, right?).


More information about the mythtv-dev mailing list