xbmc
WinRenderer.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 "BaseRenderer.h"
12 #include "windows/RendererBase.h"
13 
14 struct VideoPicture;
15 class CRenderCapture;
16 
18 {
19 public:
20  CWinRenderer();
21  ~CWinRenderer();
22 
23  static CBaseRenderer* Create(CVideoBuffer *buffer);
24  static bool Register();
25 
26  void Update() override;
27  bool RenderCapture(CRenderCapture* capture) override;
28 
29  // Player functions
30  bool Configure(const VideoPicture &picture, float fps, unsigned int orientation) override;
31  void AddVideoPicture(const VideoPicture &picture, int index) override;
32  void UnInit() override;
33  bool IsConfigured() override { return m_bConfigured; }
34  bool Flush(bool saveBuffers) override;
35  CRenderInfo GetRenderInfo() override;
36  void RenderUpdate(int index, int index2, bool clear, unsigned int flags, unsigned int alpha) override;
37  void SetBufferSize(int numBuffers) override;
38  void ReleaseBuffer(int idx) override;
39  bool NeedBuffer(int idx) override;
40 
41  // Feature support
42  bool SupportsMultiPassRendering() override { return false; }
43  bool Supports(ERENDERFEATURE feature) const override;
44  bool Supports(ESCALINGMETHOD method) const override;
45 
46  bool WantsDoublePass() override;
47  bool ConfigChanged(const VideoPicture& picture) override;
48 
49  // Debug info video
50  DEBUG_INFO_VIDEO GetDebugInfo(int idx) override;
51 
52  CRenderCapture* GetRenderCapture() override;
53 
54 protected:
55  void PreInit();
56  int NextBuffer() const;
57  CRendererBase* SelectRenderer(const VideoPicture &picture);
58  CRect GetScreenRect() const;
59 
60  bool m_bConfigured = false;
61  std::unique_ptr<CRendererBase> m_renderer;
62 };
Definition: VideoBuffer.h:85
Definition: RenderCapture.h:23
Definition: RenderInfo.h:19
Definition: WinRenderer.h:17
Definition: DebugInfo.h:21
Definition: DVDVideoCodec.h:36
Definition: BaseRenderer.h:48
Definition: RendererBase.h:109