2 * Copyright (C) 2007-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
12 #include "cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h"
18 class IVaapiWinSystem
;
21 class CRendererVAAPIGL
: public CLinuxRendererGL
25 ~CRendererVAAPIGL() override
;
27 static CBaseRenderer
* Create(CVideoBuffer
*buffer
);
28 static void Register(VAAPI::IVaapiWinSystem
*winSystem
, VADisplay vaDpy
, EGLDisplay eglDisplay
, bool &general
, bool &deepColor
);
30 bool Configure(const VideoPicture
&picture
, float fps
, unsigned int orientation
) override
;
33 bool ConfigChanged(const VideoPicture
&picture
) override
;
34 void ReleaseBuffer(int idx
) override
;
35 bool NeedBuffer(int idx
) override
;
36 bool Flush(bool saveBuffers
) override
;
39 bool Supports(ERENDERFEATURE feature
) const override
;
40 bool Supports(ESCALINGMETHOD method
) const override
;
43 bool LoadShadersHook() override
;
44 bool RenderHook(int idx
) override
;
45 void AfterRenderHook(int idx
) override
;
48 bool UploadTexture(int index
) override
;
49 void DeleteTexture(int index
) override
;
50 bool CreateTexture(int index
) override
;
52 EShaderFormat
GetShaderFormat() override
;
54 bool m_isVAAPIBuffer
= true;
55 std::unique_ptr
<VAAPI::CVaapiTexture
> m_vaapiTextures
[NUM_BUFFERS
];
56 GLsync m_fences
[NUM_BUFFERS
];
57 static VAAPI::IVaapiWinSystem
*m_pWinSystem
;