kodi
RendererVDPAU.h
1 /*
2  * Copyright (C) 2007-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 "VdpauGL.h"
12 #include "cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h"
13 
15 {
16 public:
18  ~CRendererVDPAU() override;
19 
20  static CBaseRenderer* Create(CVideoBuffer *buffer);
21  static bool Register();
22 
23  bool Configure(const VideoPicture &picture, float fps, unsigned int orientation) override;
24 
25  // Player functions
26  void ReleaseBuffer(int idx) override;
27  bool ConfigChanged(const VideoPicture &picture) override;
28  bool NeedBuffer(int idx) override;
29  bool Flush(bool saveBuffers) override;
30 
31  // Feature support
32  bool Supports(ERENDERFEATURE feature) const override;
33  bool Supports(ESCALINGMETHOD method) const override;
34 
35 protected:
36  bool LoadShadersHook() override;
37  bool RenderHook(int idx) override;
38  void AfterRenderHook(int idx) override;
39 
40  // textures
41  bool UploadTexture(int index) override;
42  void DeleteTexture(int index) override;
43  bool CreateTexture(int index) override;
44 
45  bool CreateVDPAUTexture(int index);
46  void DeleteVDPAUTexture(int index);
47  bool UploadVDPAUTexture(int index);
48 
49  bool CreateVDPAUTexture420(int index);
50  void DeleteVDPAUTexture420(int index);
51  bool UploadVDPAUTexture420(int index);
52 
53  EShaderFormat GetShaderFormat() override;
54 
55  bool CanSaveBuffers() override { return false; }
56 
57  bool m_isYuv = false;
58 
59  VDPAU::CInteropState m_interopState;
60  VDPAU::CVdpauTexture m_vdpauTextures[NUM_BUFFERS];
61  GLsync m_fences[NUM_BUFFERS];
62 };
Definition: VideoBuffer.h:85
Definition: RendererVDPAU.h:14
Definition: VdpauGL.h:39
Definition: LinuxRendererGL.h:56
Definition: DVDVideoCodec.h:36
Definition: BaseRenderer.h:48
Definition: VdpauGL.h:54