kodi
xbmc
cores
VideoPlayer
VideoRenderers
HwDecRender
RendererDRMPRIMEGLES.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 "DRMPRIMEEGL.h"
12
#include "cores/VideoPlayer/VideoRenderers/BaseRenderer.h"
13
14
#include <memory>
15
16
namespace
KODI
17
{
18
namespace
UTILS
19
{
20
namespace
EGL
21
{
22
class
CEGLFence;
23
}
24
}
// namespace UTILS
25
}
// namespace KODI
26
27
class
CRendererDRMPRIMEGLES
:
public
CBaseRenderer
28
{
29
public
:
30
CRendererDRMPRIMEGLES
() =
default
;
31
~
CRendererDRMPRIMEGLES
()
override
;
32
33
// Registration
34
static
CBaseRenderer
* Create(
CVideoBuffer
* buffer);
35
static
void
Register();
36
37
// Player functions
38
bool
Configure(
const
VideoPicture
& picture,
float
fps,
unsigned
int
orientation)
override
;
39
bool
IsConfigured()
override
{
return
m_configured; }
40
void
AddVideoPicture(
const
VideoPicture
& picture,
int
index)
override
;
41
void
UnInit()
override
{}
42
bool
Flush(
bool
saveBuffers)
override
;
43
void
ReleaseBuffer(
int
idx)
override
;
44
bool
NeedBuffer(
int
idx)
override
;
45
CRenderInfo
GetRenderInfo()
override
;
46
void
Update()
override
;
47
void
RenderUpdate(
48
int
index,
int
index2,
bool
clear,
unsigned
int
flags,
unsigned
int
alpha)
override
;
49
bool
RenderCapture(
int
index,
CRenderCapture
* capture)
override
;
50
bool
ConfigChanged(
const
VideoPicture
& picture)
override
;
51
52
// Feature support
53
bool
SupportsMultiPassRendering()
override
{
return
false
; }
54
bool
Supports(ERENDERFEATURE feature)
const override
;
55
bool
Supports(ESCALINGMETHOD method)
const override
;
56
57
private
:
58
void
DrawBlackBars();
59
void
Render(
unsigned
int
flags,
int
index);
60
61
bool
m_configured =
false
;
62
float
m_clearColour{0.0f};
63
64
struct
BUFFER
65
{
66
CVideoBuffer
* videoBuffer =
nullptr
;
67
std::unique_ptr<KODI::UTILS::EGL::CEGLFence> fence;
68
CDRMPRIMETexture
texture;
69
} m_buffers[NUM_BUFFERS];
70
};
CVideoBuffer
Definition:
VideoBuffer.h:85
CRenderCapture
Definition:
RenderCapture.h:23
CRenderInfo
Definition:
RenderInfo.h:19
UTILS
Definition:
ColorUtils.h:18
CDRMPRIMETexture
Definition:
DRMPRIMEEGL.h:17
KODI
Definition:
AudioDecoder.h:18
VideoPicture
Definition:
DVDVideoCodec.h:36
CBaseRenderer
Definition:
BaseRenderer.h:48
CRendererDRMPRIMEGLES
Definition:
RendererDRMPRIMEGLES.h:27
Generated by
1.8.13