Opened 18 years ago

Closed 18 years ago

#573 closed defect (fixed)

OpenGL VSync broken for Xinerama

Reported by: danielk Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The problem is that the invisible window that the OpenGL sync method opens isn't always on the same display as the video. Obviously it can not cope with a video window that spans two unsynced monitors, but it should work correctly when the video is playing on a single monitor.

To fix this, the OpenGL window should be on the same monitor as the video playback window.

Change History (1)

comment:1 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7684]) Fixes #573. References #545.

This fixes the problem of VSync syncing to the wrong screen in multiple screen configurations most of the time. If you span multiple screens, or move the window after it is initialized the sync may be off. I do create the OpenGL window in the center of the playback window, so if a just the edges of the window are on another screen, you are probably OK.

As for the segfault, this probably fixes it. But since I can't reproduce it I can't be sure. It appears the problem was that Start()/WaitForFrame?()/Stop() and the dtor of OpenGLVideoSync were not being called in the same thread. It looks like there was an earlier attempt to fix this by calling Stop() in the same thread as the destructor in tv_play, but this raced with the WaitForFrame?() calls in the NVP thread. I've put the vsync delete in the NVP thread, which should solve the problem in altogether in non-error conditions. And, I've put a call to Stop() in the OpenGLVideoSync dtor, which should grab the OpenGL context just before it is used in the dtor.

Note: See TracTickets for help on using tickets.