Debian Codegraph @

xbmc/windowing/wayland/VideoSyncWpPresentation.h

raw
1 /*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include "Signals.h"
12 #include "windowing/VideoSync.h"
13
14 #include <cstdint>
15
16 namespace KODI
17 {
18 namespace WINDOWING
19 {
20 namespace WAYLAND
21 {
22
23 class CWinSystemWayland;
24
25 class CVideoSyncWpPresentation : public CVideoSync
26 {
27 public:
28 explicit CVideoSyncWpPresentation(CVideoReferenceClock* clock, CWinSystemWayland& winSystem);
29
30 float GetFps() override;
31 bool Setup() override;
32 void Run(CEvent& stop) override;
33 void Cleanup() override;
34
35 private:
36 void HandlePresentation(timespec tv, std::uint32_t refresh, std::uint32_t syncOutputID, float syncOutputRefreshRate, std::uint64_t msc);
37
38 CEvent m_stopEvent;
39 CSignalRegistration m_presentationHandler;
40 std::uint64_t m_lastMsc{};
41 std::uint32_t m_syncOutputID{};
42 CWinSystemWayland &m_winSystem;
43 };
44
45 }
46 }
47 }