[mythtv] Ticket #4270: MythTV on Windows (with MinGW)

Andrei Tanas andrei at tanas.ca
Thu Dec 13 16:17:10 UTC 2007


The migration to SVN is now complete (with one minor patch, see
http://svn.mythtv.org/trac/ticket/4270).

Daniel, I need to thank you for helping clean up the patch, obviously, my
approach with all those #ifdefs needed a lot of work.


I updated instructions on the wiki page
http://www.mythtv.org/wiki/index.php/Windows_Port

If something is missing or doesn't work as described, let me know.

Currently, there is one major issue with frontend, I am writing this off the
top of my head, so may not remember correctly, but the basic idea should be
clear: NuppelVideoPlayer starts video decoding on a separate thread, which
somewhere in tv_out.cpp creates an "event loop" and listens for keystrokes.
When a key corresponding to program guide is pressed, it creates the program
guide widget (still on this thread), and tries to attach it to main window.
So here's the problem: in Windows, UI is essentially single-threaded, child
windows should all be created on the same thread, if two child windows are
created on different threads, SetFocus() function (inside Win32 API call,
not just QT) will deadlock. This is what happens with the current version
inside MythMainWindow::attach.
I also think that this might be causing timer events not reaching the
playback widget, which leads to sound being muted on every channel change.

The problem is, this issue cannot be just "#ifdef'ed" in MinGW port, it
needs some upstream change - ideally, all the "widgets" should be created on
the main thread by the MythMainWindow, and instead of implementing event
loops inside other classes, there should be just one in MythMainWindow, and
all other widgets should be receiving signals from it. I am not that good
with QT, so don't really know where to start...
I think I'll create a ticket for this.

By the way, I think this might be related:
http://svn.mythtv.org/trac/ticket/4085




More information about the mythtv-dev mailing list