[mythtv] Handle keypresses in the main UI thread (ticket #4376)

Andrei Tanas andrei at tanas.ca
Thu Dec 27 19:16:25 UTC 2007


Hi,

I submitted a patch under ticket #4376
(http://svn.mythtv.org/trac/ticket/4376), here's the description:

-------
Handling keypresses outside of main UI leads to events and dialogs being
created on different threads and not being handled properly. On Windows,
this leads to: 
  a) mythfrontend deadlocks when trying to switch to program guide from
livetv.
  b) muteTimer never fires, sound stays muted after any seek or channel
change. 

The overhead associated with creating separate threads the way it is
currently being done seems to be unnecessary, but I could be missing
something. The proposed patch processes keypresses on the main thread, which
fixes both problems. 

If the patch cannot be accepted as is, we need to look for a similar
solution, as having a single UI thread is the only way to have application
behave predictably on Windows.
-------

Can somebody who've been here a while (the two-year-old tv_play.cpp already
has all that) explain why the keypresses are being handled on a separate
thread? Does this patch has a chance of being implemented?

Thanks,
Andrei Tanas.



More information about the mythtv-dev mailing list