[mythtv] Ticket #4376: Handle keypresses in the main UI thread (refs#4230 and #4085)

Andrei Tanas andrei at tanas.ca
Tue Jan 1 07:07:14 UTC 2008


> I'm sure MS Windows allows for multi-threaded GUIapplications, there are
> probably just some additional limitations. We need to trace the reason for
> the deadlock when switching from the program guide from LiveTV, and QTimer

The program guide window is created on a different thread (other than the main UI thread), and when SetFocus (Win32 API) is called from this thread, it hangs (this is 100% reproduceable). The only message loop runs in the main UI thread, the program guide (running in its own thread now) is not capable of processing window messages (one of the first of which would be WM_SETFOCUS, the result of the SetFocus call). That's the way I understand it, if this is not right, somebody please correct me.
As far as I can tell, the only way to correct it (compatible Windows environment) is to somehow send a signal to the main thread to start the program guide, rather than create it in the tv playback thread directly. Would this be the right way to go? If so, I'll work on a patch for this, I think it's the last "showstopper" issue for Windows frontend.

> can be replaced with something that works on MS Windows. QTimer in
> particular causes its own thread-safety problems in Linux and OS X anyway.

I can take a look at the sound muting (during seeks/channel switches) too, but I'm probably not the best person for it. Does sombody else want it?

Happy new year everyone!
Andrei
Sent from BlackBerry®


More information about the mythtv-dev mailing list