[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / windowing / osx / VideoSyncOsx.h
blobbaa651da74764cd8fc1670af639943e327345592
1 /*
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.
7 */
9 #pragma once
11 #include "guilib/DispResource.h"
12 #include "threads/Event.h"
13 #include "windowing/VideoSync.h"
15 class CVideoSyncOsx : public CVideoSync, IDispResource
17 public:
18 CVideoSyncOsx(CVideoReferenceClock* clock) : CVideoSync(clock) {}
20 // CVideoSync interface
21 bool Setup() override;
22 void Run(CEvent& stopEvent) override;
23 void Cleanup() override;
24 float GetFps() override;
25 void RefreshChanged() override;
27 // IDispResource interface
28 void OnLostDisplay() override;
29 void OnResetDisplay() override;
31 // used in the displaylink callback
32 void VblankHandler(int64_t nowtime, uint32_t timebase);
34 private:
35 virtual bool InitDisplayLink();
36 virtual void DeinitDisplayLink();
38 int64_t m_LastVBlankTime =
39 0; //timestamp of the last vblank, used for calculating how many vblanks happened
40 volatile bool m_displayLost = false;
41 volatile bool m_displayReset = false;
42 CEvent m_lostEvent;