kodi
DebugRenderer.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 "DebugInfo.h"
12 #include "OverlayRenderer.h"
13 #include "cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlay.h"
14 #include "cores/VideoPlayer/DVDSubtitles/SubtitlesAdapter.h"
15 
16 #include <atomic>
17 #include <memory>
18 #include <string>
19 
21 {
22 public:
24  virtual ~CDebugRenderer();
25  void Initialize();
26  void Dispose();
27  void SetInfo(DEBUG_INFO_PLAYER& info);
28  void SetInfo(DEBUG_INFO_VIDEO& video, DEBUG_INFO_RENDER& render);
29  void Render(CRect& src, CRect& dst, CRect& view);
30  void Flush();
31 
32 protected:
34  {
35  public:
36  CRenderer();
37  void Render(int idx) override;
38  void CreateSubtitlesStyle();
39 
40  private:
41  // Implementation of Observer
42  void Notify(const Observable& obs, const ObservableMessage msg) override{};
43 
44  std::shared_ptr<struct KODI::SUBTITLES::STYLE::style> m_debugOverlayStyle;
45  };
46 
47  CRenderer m_overlayRenderer;
48 
49 private:
50  CSubtitlesAdapter* m_adapter{nullptr};
51  std::atomic_bool m_isInitialized{false};
52  std::shared_ptr<CDVDOverlay> m_overlay;
53 };
Definition: DebugRenderer.h:33
Definition: OverlayRenderer.h:92
Definition: DebugRenderer.h:20
Definition: DebugInfo.h:13
Definition: DebugInfo.h:30
Definition: DebugInfo.h:21
Definition: SubtitlesAdapter.h:22
Definition: Observer.h:44