Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CLinuxRendererGL Class Reference

#include <LinuxRendererGL.h>

Inheritance diagram for CLinuxRendererGL:
CBaseRenderer CRendererVAAPIGL CRendererVDPAU CRendererVTB

Classes

struct  CPictureBuffer
 
struct  CYuvPlane
 

Public Member Functions

 CLinuxRendererGL ()
 
 ~CLinuxRendererGL () override
 
bool Configure (const VideoPicture &picture, float fps, unsigned int orientation) override
 
bool IsConfigured () override
 
void AddVideoPicture (const VideoPicture &picture, int index) override
 
void UnInit () override
 
bool Flush (bool saveBuffers) override
 
void SetBufferSize (int numBuffers) override
 
void ReleaseBuffer (int idx) override
 
void RenderUpdate (int index, int index2, bool clear, unsigned int flags, unsigned int alpha) override
 
void Update () override
 
bool RenderCapture (int index, CRenderCapture *capture) override
 
CRenderInfo GetRenderInfo () override
 
bool ConfigChanged (const VideoPicture &picture) override
 
bool SupportsMultiPassRendering () override
 
bool Supports (ERENDERFEATURE feature) const override
 
bool Supports (ESCALINGMETHOD method) const override
 
CRenderCaptureGetRenderCapture () override
 
- Public Member Functions inherited from CBaseRenderer
 CBaseRenderer ()
 
virtual ~CBaseRenderer ()
 
virtual bool IsPictureHW (const VideoPicture &picture)
 
virtual bool NeedBuffer (int idx)
 
virtual bool IsGuiLayer ()
 
virtual bool WantsDoublePass ()
 
void SetViewMode (int viewMode)
 
void GetVideoRect (CRect &source, CRect &dest, CRect &view) const
 Get video rectangle and view window.
 
float GetAspectRatio () const
 
unsigned int GetOrientation () const
 
void SetVideoSettings (const CVideoSettings &settings)
 
virtual DEBUG_INFO_VIDEO GetDebugInfo (int idx)
 

Static Public Member Functions

static CBaseRendererCreate (CVideoBuffer *buffer)
 
static bool Register ()
 
- Static Public Member Functions inherited from CBaseRenderer
static void SettingOptionsRenderMethodsFiller (const std::shared_ptr< const CSetting > &setting, std::vector< IntegerSettingOption > &list, int &current, void *data)
 

Protected Member Functions

bool Render (unsigned int flags, int renderBuffer)
 
void ClearBackBuffer ()
 
void ClearBackBufferQuad ()
 
void DrawBlackBars ()
 
bool ValidateRenderer ()
 
virtual bool ValidateRenderTarget ()
 
virtual void LoadShaders (int field=FIELD_FULL)
 
void SetTextureFilter (GLenum method)
 
void UpdateVideoFilter ()
 
void CheckVideoParameters (int index)
 
AVColorPrimaries GetSrcPrimaries (AVColorPrimaries srcPrimaries, unsigned int width, unsigned int height)
 
virtual bool UploadTexture (int index)
 
virtual void DeleteTexture (int index)
 
virtual bool CreateTexture (int index)
 
bool UploadYV12Texture (int index)
 
void DeleteYV12Texture (int index)
 
bool CreateYV12Texture (int index)
 
bool UploadNV12Texture (int index)
 
void DeleteNV12Texture (int index)
 
bool CreateNV12Texture (int index)
 
bool UploadYUV422PackedTexture (int index)
 
void DeleteYUV422PackedTexture (int index)
 
bool CreateYUV422PackedTexture (int index)
 
void CalculateTextureSourceRects (int source, int num_planes)
 
void RenderToFBO (int renderBuffer, int field, bool weave=false)
 
void RenderFromFBO ()
 
void RenderSinglePass (int renderBuffer, int field)
 
void RenderRGB (int renderBuffer, int field)
 
void RenderProgressiveWeave (int renderBuffer, int field)
 
void BindPbo (CPictureBuffer &buff)
 
void UnBindPbo (CPictureBuffer &buff)
 
void LoadPlane (CYuvPlane &plane, int type, unsigned width, unsigned height, int stride, int bpp, void *data)
 
void GetPlaneTextureSize (CYuvPlane &plane)
 
GLint GetInternalFormat (GLint format, int bpp)
 
virtual bool LoadShadersHook ()
 
virtual bool RenderHook (int idx)
 
virtual void AfterRenderHook (int idx)
 
virtual bool CanSaveBuffers ()
 
bool LoadCLUT ()
 
void DeleteCLUT ()
 
- Protected Member Functions inherited from CBaseRenderer
void CalcDestRect (float offsetX, float offsetY, float width, float height, float inputFrameRatio, float zoomAmount, float verticalShift, CRect &destRect)
 
void CalcNormalRenderRect (float offsetX, float offsetY, float width, float height, float inputFrameRatio, float zoomAmount, float verticalShift)
 
void CalculateFrameAspectRatio (unsigned int desired_width, unsigned int desired_height)
 
virtual void ManageRenderArea ()
 
virtual void ReorderDrawPoints ()
 
virtual EShaderFormat GetShaderFormat ()
 
void MarkDirty ()
 
void EnableAlwaysClip ()
 
void saveRotatedCoords ()
 
void syncDestRectToRotatedPoints ()
 
void restoreRotatedCoords ()
 

Protected Attributes

struct { 
 
   CFrameBufferObject   fbo 
 
   float   width 
 
   float   height 
 
m_fbo 
 
GLint m_intermediateFormat {GL_RGBA8}
 
GLint m_intermediateType {GL_UNSIGNED_BYTE}
 
bool m_intermediateGammaCorrection {false}
 
int m_iYV12RenderBuffer = 0
 
int m_NumYV12Buffers = 0
 
bool m_bConfigured = false
 
bool m_bValidated = false
 
GLenum m_textureTarget = GL_TEXTURE_2D
 
int m_renderMethod = RENDER_GLSL
 
RenderQuality m_renderQuality = RQ_SINGLEPASS
 
CRenderSystemGLm_renderSystem = nullptr
 
int m_currentField = FIELD_FULL
 
int m_reloadShaders = 0
 
CPictureBuffer m_buffers [NUM_BUFFERS]
 
Shaders::GL::BaseYUV2RGBGLSLShaderm_pYUVShader = nullptr
 
Shaders::GL::BaseVideoFilterShaderm_pVideoFilterShader = nullptr
 
ESCALINGMETHOD m_scalingMethod = VS_SCALINGMETHOD_LINEAR
 
ESCALINGMETHOD m_scalingMethodGui = VS_SCALINGMETHOD_MAX
 
bool m_useDithering
 
unsigned int m_ditherDepth
 
bool m_fullRange
 
AVColorPrimaries m_srcPrimaries
 
bool m_toneMap = false
 
ETONEMAPMETHOD m_toneMapMethod = VS_TONEMAPMETHOD_OFF
 
float m_clearColour = 0.0f
 
bool m_pboSupported = true
 
bool m_pboUsed = false
 
bool m_nonLinStretch = false
 
bool m_nonLinStretchGui = false
 
float m_pixelRatio = 0.0f
 
CRect m_viewRect
 
std::unique_ptr< CColorManagerm_ColorManager
 
GLuint m_tCLUTTex
 
uint16_t * m_CLUT
 
int m_CLUTsize
 
int m_cmsToken
 
bool m_cmsOn
 
- Protected Attributes inherited from CBaseRenderer
unsigned int m_sourceWidth = 720
 
unsigned int m_sourceHeight = 480
 
float m_sourceFrameRatio = 1.0f
 
float m_fps = 0.0f
 
unsigned int m_renderOrientation = 0
 
CPoint m_rotatedDestCoords [4]
 
CPoint m_savedRotatedDestCoords [4]
 
CRect m_destRect
 
CRect m_sourceRect
 
CRect m_viewRect
 
unsigned m_iFlags = 0
 
AVPixelFormat m_format = AV_PIX_FMT_NONE
 
CVideoSettings m_videoSettings
 

Constructor & Destructor Documentation

◆ CLinuxRendererGL()

CLinuxRendererGL::CLinuxRendererGL ( )

◆ ~CLinuxRendererGL()

CLinuxRendererGL::~CLinuxRendererGL ( )
override

Member Function Documentation

◆ AddVideoPicture()

void CLinuxRendererGL::AddVideoPicture ( const VideoPicture & picture,
int index )
overridevirtual

Implements CBaseRenderer.

◆ AfterRenderHook()

virtual void CLinuxRendererGL::AfterRenderHook ( int idx)
inlineprotectedvirtual

◆ BindPbo()

void CLinuxRendererGL::BindPbo ( CPictureBuffer & buff)
protected

◆ CalculateTextureSourceRects()

void CLinuxRendererGL::CalculateTextureSourceRects ( int source,
int num_planes )
protected

◆ CanSaveBuffers()

virtual bool CLinuxRendererGL::CanSaveBuffers ( )
inlineprotectedvirtual

Reimplemented in CRendererVDPAU.

◆ CheckVideoParameters()

void CLinuxRendererGL::CheckVideoParameters ( int index)
protected

◆ ClearBackBuffer()

void CLinuxRendererGL::ClearBackBuffer ( )
protected

◆ ClearBackBufferQuad()

void CLinuxRendererGL::ClearBackBufferQuad ( )
protected

◆ ConfigChanged()

bool CLinuxRendererGL::ConfigChanged ( const VideoPicture & picture)
overridevirtual

Implements CBaseRenderer.

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ Configure()

bool CLinuxRendererGL::Configure ( const VideoPicture & picture,
float fps,
unsigned int orientation )
overridevirtual

Implements CBaseRenderer.

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ Create()

CBaseRenderer * CLinuxRendererGL::Create ( CVideoBuffer * buffer)
static

◆ CreateNV12Texture()

bool CLinuxRendererGL::CreateNV12Texture ( int index)
protected

◆ CreateTexture()

bool CLinuxRendererGL::CreateTexture ( int index)
protectedvirtual

◆ CreateYUV422PackedTexture()

bool CLinuxRendererGL::CreateYUV422PackedTexture ( int index)
protected

◆ CreateYV12Texture()

bool CLinuxRendererGL::CreateYV12Texture ( int index)
protected

◆ DeleteCLUT()

void CLinuxRendererGL::DeleteCLUT ( )
protected

◆ DeleteNV12Texture()

void CLinuxRendererGL::DeleteNV12Texture ( int index)
protected

◆ DeleteTexture()

void CLinuxRendererGL::DeleteTexture ( int index)
protectedvirtual

◆ DeleteYUV422PackedTexture()

void CLinuxRendererGL::DeleteYUV422PackedTexture ( int index)
protected

◆ DeleteYV12Texture()

void CLinuxRendererGL::DeleteYV12Texture ( int index)
protected

◆ DrawBlackBars()

void CLinuxRendererGL::DrawBlackBars ( )
protected

◆ Flush()

bool CLinuxRendererGL::Flush ( bool saveBuffers)
overridevirtual

Reimplemented from CBaseRenderer.

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ GetInternalFormat()

GLint CLinuxRendererGL::GetInternalFormat ( GLint format,
int bpp )
protected

◆ GetPlaneTextureSize()

void CLinuxRendererGL::GetPlaneTextureSize ( CYuvPlane & plane)
protected

◆ GetRenderCapture()

CRenderCapture * CLinuxRendererGL::GetRenderCapture ( )
overridevirtual

Reimplemented from CBaseRenderer.

◆ GetRenderInfo()

CRenderInfo CLinuxRendererGL::GetRenderInfo ( )
overridevirtual

Reimplemented from CBaseRenderer.

◆ GetSrcPrimaries()

AVColorPrimaries CLinuxRendererGL::GetSrcPrimaries ( AVColorPrimaries srcPrimaries,
unsigned int width,
unsigned int height )
protected

◆ IsConfigured()

bool CLinuxRendererGL::IsConfigured ( )
inlineoverridevirtual

Implements CBaseRenderer.

◆ LoadCLUT()

bool CLinuxRendererGL::LoadCLUT ( )
protected

◆ LoadPlane()

void CLinuxRendererGL::LoadPlane ( CYuvPlane & plane,
int type,
unsigned width,
unsigned height,
int stride,
int bpp,
void * data )
protected

◆ LoadShaders()

void CLinuxRendererGL::LoadShaders ( int field = FIELD_FULL)
protectedvirtual

◆ LoadShadersHook()

virtual bool CLinuxRendererGL::LoadShadersHook ( )
inlineprotectedvirtual

◆ Register()

bool CLinuxRendererGL::Register ( )
static

◆ ReleaseBuffer()

void CLinuxRendererGL::ReleaseBuffer ( int idx)
overridevirtual

Reimplemented from CBaseRenderer.

Reimplemented in CRendererVAAPIGL, CRendererVDPAU, CRendererVTB, and CRendererVTB.

◆ Render()

bool CLinuxRendererGL::Render ( unsigned int flags,
int renderBuffer )
protected

◆ RenderCapture()

bool CLinuxRendererGL::RenderCapture ( int index,
CRenderCapture * capture )
overridevirtual

Implements CBaseRenderer.

◆ RenderFromFBO()

void CLinuxRendererGL::RenderFromFBO ( )
protected

◆ RenderHook()

virtual bool CLinuxRendererGL::RenderHook ( int idx)
inlineprotectedvirtual

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ RenderProgressiveWeave()

void CLinuxRendererGL::RenderProgressiveWeave ( int renderBuffer,
int field )
protected

◆ RenderRGB()

void CLinuxRendererGL::RenderRGB ( int renderBuffer,
int field )
protected

◆ RenderSinglePass()

void CLinuxRendererGL::RenderSinglePass ( int renderBuffer,
int field )
protected

◆ RenderToFBO()

void CLinuxRendererGL::RenderToFBO ( int renderBuffer,
int field,
bool weave = false )
protected

◆ RenderUpdate()

void CLinuxRendererGL::RenderUpdate ( int index,
int index2,
bool clear,
unsigned int flags,
unsigned int alpha )
overridevirtual

Implements CBaseRenderer.

◆ SetBufferSize()

void CLinuxRendererGL::SetBufferSize ( int numBuffers)
inlineoverridevirtual

Reimplemented from CBaseRenderer.

◆ SetTextureFilter()

void CLinuxRendererGL::SetTextureFilter ( GLenum method)
protected

◆ Supports() [1/2]

bool CLinuxRendererGL::Supports ( ERENDERFEATURE feature) const
overridevirtual

Reimplemented from CBaseRenderer.

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ Supports() [2/2]

bool CLinuxRendererGL::Supports ( ESCALINGMETHOD method) const
overridevirtual

Implements CBaseRenderer.

Reimplemented in CRendererVAAPIGL, and CRendererVDPAU.

◆ SupportsMultiPassRendering()

bool CLinuxRendererGL::SupportsMultiPassRendering ( )
overridevirtual

Implements CBaseRenderer.

◆ UnBindPbo()

void CLinuxRendererGL::UnBindPbo ( CPictureBuffer & buff)
protected

◆ UnInit()

void CLinuxRendererGL::UnInit ( )
overridevirtual

Implements CBaseRenderer.

◆ Update()

void CLinuxRendererGL::Update ( )
overridevirtual

Implements CBaseRenderer.

◆ UpdateVideoFilter()

void CLinuxRendererGL::UpdateVideoFilter ( )
protected

◆ UploadNV12Texture()

bool CLinuxRendererGL::UploadNV12Texture ( int index)
protected

◆ UploadTexture()

bool CLinuxRendererGL::UploadTexture ( int index)
protectedvirtual

◆ UploadYUV422PackedTexture()

bool CLinuxRendererGL::UploadYUV422PackedTexture ( int index)
protected

◆ UploadYV12Texture()

bool CLinuxRendererGL::UploadYV12Texture ( int index)
protected

◆ ValidateRenderer()

bool CLinuxRendererGL::ValidateRenderer ( )
protected

◆ ValidateRenderTarget()

bool CLinuxRendererGL::ValidateRenderTarget ( )
protectedvirtual

Member Data Documentation

◆ fbo

CFrameBufferObject CLinuxRendererGL::fbo

◆ height

float CLinuxRendererGL::height

◆ m_bConfigured

bool CLinuxRendererGL::m_bConfigured = false
protected

◆ m_buffers

CPictureBuffer CLinuxRendererGL::m_buffers[NUM_BUFFERS]
protected

◆ m_bValidated

bool CLinuxRendererGL::m_bValidated = false
protected

◆ m_clearColour

float CLinuxRendererGL::m_clearColour = 0.0f
protected

◆ m_CLUT

uint16_t* CLinuxRendererGL::m_CLUT
protected

◆ m_CLUTsize

int CLinuxRendererGL::m_CLUTsize
protected

◆ m_cmsOn

bool CLinuxRendererGL::m_cmsOn
protected

◆ m_cmsToken

int CLinuxRendererGL::m_cmsToken
protected

◆ m_ColorManager

std::unique_ptr<CColorManager> CLinuxRendererGL::m_ColorManager
protected

◆ m_currentField

int CLinuxRendererGL::m_currentField = FIELD_FULL
protected

◆ m_ditherDepth

unsigned int CLinuxRendererGL::m_ditherDepth
protected

◆ [struct]

struct { ... } CLinuxRendererGL::m_fbo

◆ m_fullRange

bool CLinuxRendererGL::m_fullRange
protected

◆ m_intermediateFormat

GLint CLinuxRendererGL::m_intermediateFormat {GL_RGBA8}
protected

◆ m_intermediateGammaCorrection

bool CLinuxRendererGL::m_intermediateGammaCorrection {false}
protected

◆ m_intermediateType

GLint CLinuxRendererGL::m_intermediateType {GL_UNSIGNED_BYTE}
protected

◆ m_iYV12RenderBuffer

int CLinuxRendererGL::m_iYV12RenderBuffer = 0
protected

◆ m_nonLinStretch

bool CLinuxRendererGL::m_nonLinStretch = false
protected

◆ m_nonLinStretchGui

bool CLinuxRendererGL::m_nonLinStretchGui = false
protected

◆ m_NumYV12Buffers

int CLinuxRendererGL::m_NumYV12Buffers = 0
protected

◆ m_pboSupported

bool CLinuxRendererGL::m_pboSupported = true
protected

◆ m_pboUsed

bool CLinuxRendererGL::m_pboUsed = false
protected

◆ m_pixelRatio

float CLinuxRendererGL::m_pixelRatio = 0.0f
protected

◆ m_pVideoFilterShader

Shaders::GL::BaseVideoFilterShader* CLinuxRendererGL::m_pVideoFilterShader = nullptr
protected

◆ m_pYUVShader

Shaders::GL::BaseYUV2RGBGLSLShader* CLinuxRendererGL::m_pYUVShader = nullptr
protected

◆ m_reloadShaders

int CLinuxRendererGL::m_reloadShaders = 0
protected

◆ m_renderMethod

int CLinuxRendererGL::m_renderMethod = RENDER_GLSL
protected

◆ m_renderQuality

RenderQuality CLinuxRendererGL::m_renderQuality = RQ_SINGLEPASS
protected

◆ m_renderSystem

CRenderSystemGL* CLinuxRendererGL::m_renderSystem = nullptr
protected

◆ m_scalingMethod

ESCALINGMETHOD CLinuxRendererGL::m_scalingMethod = VS_SCALINGMETHOD_LINEAR
protected

◆ m_scalingMethodGui

ESCALINGMETHOD CLinuxRendererGL::m_scalingMethodGui = VS_SCALINGMETHOD_MAX
protected

◆ m_srcPrimaries

AVColorPrimaries CLinuxRendererGL::m_srcPrimaries
protected

◆ m_tCLUTTex

GLuint CLinuxRendererGL::m_tCLUTTex
protected

◆ m_textureTarget

GLenum CLinuxRendererGL::m_textureTarget = GL_TEXTURE_2D
protected

◆ m_toneMap

bool CLinuxRendererGL::m_toneMap = false
protected

◆ m_toneMapMethod

ETONEMAPMETHOD CLinuxRendererGL::m_toneMapMethod = VS_TONEMAPMETHOD_OFF
protected

◆ m_useDithering

bool CLinuxRendererGL::m_useDithering
protected

◆ m_viewRect

CRect CLinuxRendererGL::m_viewRect
protected

◆ width

float CLinuxRendererGL::width

The documentation for this class was generated from the following files: