kodi
RendererDRMPRIME.h
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 "cores/VideoPlayer/VideoRenderers/BaseRenderer.h"
12 
13 class CVideoBuffer;
15 
17 {
18 public:
19  CRendererDRMPRIME() = default;
20  ~CRendererDRMPRIME() override;
21 
22  // Registration
23  static CBaseRenderer* Create(CVideoBuffer* buffer);
24  static void Register();
25 
26  // Player functions
27  bool Configure(const VideoPicture& picture, float fps, unsigned int orientation) override;
28  bool IsConfigured() override { return m_bConfigured; }
29  void AddVideoPicture(const VideoPicture& picture, int index) override;
30  void UnInit() override {}
31  bool Flush(bool saveBuffers) override;
32  void ReleaseBuffer(int idx) override;
33  bool NeedBuffer(int idx) override;
34  bool IsGuiLayer() override { return false; }
35  CRenderInfo GetRenderInfo() override;
36  void Update() override;
37  void RenderUpdate(
38  int index, int index2, bool clear, unsigned int flags, unsigned int alpha) override;
39  bool RenderCapture(int index, CRenderCapture* capture) override;
40  bool ConfigChanged(const VideoPicture& picture) override;
41 
42  // Feature support
43  bool SupportsMultiPassRendering() override { return false; }
44  bool Supports(ERENDERFEATURE feature) const override;
45  bool Supports(ESCALINGMETHOD method) const override;
46 
47 protected:
48  void ManageRenderArea() override;
49 
50 private:
51  bool m_bConfigured = false;
52  int m_iLastRenderBuffer = -1;
53  CRect m_planeDestRect;
54 
55  std::shared_ptr<CVideoLayerBridgeDRMPRIME> m_videoLayerBridge;
56 
57  struct BUFFER
58  {
59  CVideoBuffer* videoBuffer = nullptr;
60  } m_buffers[NUM_BUFFERS];
61 };
Definition: VideoBuffer.h:85
Definition: RenderCapture.h:23
Definition: RenderInfo.h:19
Definition: VideoLayerBridgeDRMPRIME.h:31
Definition: DVDVideoCodec.h:36
Definition: RendererDRMPRIME.h:16
Definition: BaseRenderer.h:48