Debian Codegraph @

xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererDRMPRIME.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 "cores/VideoPlayer/VideoRenderers/BaseRenderer.h"
12
13 class CVideoBuffer;
14 class CVideoLayerBridgeDRMPRIME;
15
16 class CRendererDRMPRIME : public CBaseRenderer
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 };