xbmc
VideoSync.h
1 /*
2  * Copyright (C) 2005-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 "threads/Event.h"
12 
14 typedef void (*PUPDATECLOCK)(int NrVBlanks, uint64_t time, void *clock);
15 
17 {
18 public:
19  explicit CVideoSync(void* clock) { m_refClock = clock; }
20  virtual ~CVideoSync() = default;
21  virtual bool Setup(PUPDATECLOCK func) = 0;
22  virtual void Run(CEvent& stop) = 0;
23  virtual void Cleanup() = 0;
24  virtual float GetFps() = 0;
25  virtual void RefreshChanged() {}
26 
27 protected:
28  PUPDATECLOCK UpdateClock;
29  float m_fps;
30  void *m_refClock;
31 };
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Definition: VideoReferenceClock.h:19
Definition: VideoSync.h:16