2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "guilib/DispResource.h"
12 #include "threads/Event.h"
13 #include "windowing/VideoSync.h"
19 #include "system_gl.h"
30 class CWinSystemX11GLContext
;
32 class CVideoSyncGLX
: public CVideoSync
, IDispResource
35 explicit CVideoSyncGLX(CVideoReferenceClock
* clock
, CWinSystemX11GLContext
& winSystem
)
36 : CVideoSync(clock
), m_winSystem(winSystem
)
39 bool Setup() override
;
40 void Run(CEvent
& stopEvent
) override
;
41 void Cleanup() override
;
42 float GetFps() override
;
43 void OnLostDisplay() override
;
44 void OnResetDisplay() override
;
47 int (*m_glXWaitVideoSyncSGI
) (int, int, unsigned int*);
48 int (*m_glXGetVideoSyncSGI
) (unsigned int*);
50 static Display
* m_Dpy
;
51 CWinSystemX11GLContext
&m_winSystem
;
55 volatile bool m_displayLost
;
56 volatile bool m_displayReset
;