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

#include <BaseRenderer.h>

Inheritance diagram for CBaseRenderer:
CLinuxRendererGL CLinuxRendererGLES CRendererDRMPRIME CRendererDRMPRIMEGLES CRendererMediaCodecSurface CRendererStarfish CWinRenderer CRendererVAAPIGL CRendererVDPAU CRendererVTB CRendererMediaCodec CRendererVAAPIGLES CRendererVTB

Public Member Functions

 CBaseRenderer ()
 
virtual ~CBaseRenderer ()
 
virtual bool Configure (const VideoPicture &picture, float fps, unsigned int orientation)=0
 
virtual bool IsConfigured ()=0
 
virtual void AddVideoPicture (const VideoPicture &picture, int index)=0
 
virtual bool IsPictureHW (const VideoPicture &picture)
 
virtual void UnInit ()=0
 
virtual bool Flush (bool saveBuffers)
 
virtual void SetBufferSize (int numBuffers)
 
virtual void ReleaseBuffer (int idx)
 
virtual bool NeedBuffer (int idx)
 
virtual bool IsGuiLayer ()
 
virtual CRenderInfo GetRenderInfo ()
 
virtual void Update ()=0
 
virtual void RenderUpdate (int index, int index2, bool clear, unsigned int flags, unsigned int alpha)=0
 
virtual bool RenderCapture (int index, CRenderCapture *capture)=0
 
virtual bool ConfigChanged (const VideoPicture &picture)=0
 
virtual bool SupportsMultiPassRendering ()=0
 
virtual bool Supports (ERENDERFEATURE feature) const
 
virtual bool Supports (ESCALINGMETHOD method) const =0
 
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)
 
virtual CRenderCaptureGetRenderCapture ()
 

Static Public Member Functions

static void SettingOptionsRenderMethodsFiller (const std::shared_ptr< const CSetting > &setting, std::vector< IntegerSettingOption > &list, int &current, void *data)
 

Protected Member Functions

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

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

◆ CBaseRenderer()

CBaseRenderer::CBaseRenderer ( )

◆ ~CBaseRenderer()

CBaseRenderer::~CBaseRenderer ( )
virtualdefault

Member Function Documentation

◆ AddVideoPicture()

virtual void CBaseRenderer::AddVideoPicture ( const VideoPicture & picture,
int index )
pure virtual

◆ CalcDestRect()

void CBaseRenderer::CalcDestRect ( float offsetX,
float offsetY,
float width,
float height,
float inputFrameRatio,
float zoomAmount,
float verticalShift,
CRect & destRect )
protected

◆ CalcNormalRenderRect()

void CBaseRenderer::CalcNormalRenderRect ( float offsetX,
float offsetY,
float width,
float height,
float inputFrameRatio,
float zoomAmount,
float verticalShift )
protected

◆ CalculateFrameAspectRatio()

void CBaseRenderer::CalculateFrameAspectRatio ( unsigned int desired_width,
unsigned int desired_height )
protected

◆ ConfigChanged()

◆ Configure()

virtual bool CBaseRenderer::Configure ( const VideoPicture & picture,
float fps,
unsigned int orientation )
pure virtual

◆ EnableAlwaysClip()

void CBaseRenderer::EnableAlwaysClip ( )
protected

◆ Flush()

virtual bool CBaseRenderer::Flush ( bool saveBuffers)
inlinevirtual

◆ GetAspectRatio()

float CBaseRenderer::GetAspectRatio ( ) const

◆ GetDebugInfo()

virtual DEBUG_INFO_VIDEO CBaseRenderer::GetDebugInfo ( int idx)
inlinevirtual

Reimplemented in CWinRenderer.

◆ GetOrientation()

unsigned int CBaseRenderer::GetOrientation ( ) const
inline

◆ GetRenderCapture()

virtual CRenderCapture * CBaseRenderer::GetRenderCapture ( )
inlinevirtual

◆ GetRenderInfo()

◆ GetShaderFormat()

EShaderFormat CBaseRenderer::GetShaderFormat ( )
protectedvirtual

◆ GetVideoRect()

void CBaseRenderer::GetVideoRect ( CRect & source,
CRect & dest,
CRect & view ) const

Get video rectangle and view window.

Parameters
sourceis original size of the video
destis the target rendering area honoring aspect ratio of source
viewis the entire target rendering area for the video (including black bars)

◆ IsConfigured()

virtual bool CBaseRenderer::IsConfigured ( )
pure virtual

◆ IsGuiLayer()

virtual bool CBaseRenderer::IsGuiLayer ( )
inlinevirtual

◆ IsPictureHW()

virtual bool CBaseRenderer::IsPictureHW ( const VideoPicture & picture)
inlinevirtual

◆ ManageRenderArea()

void CBaseRenderer::ManageRenderArea ( )
protectedvirtual

Reimplemented in CRendererDRMPRIME, and CRendererStarfish.

◆ MarkDirty()

void CBaseRenderer::MarkDirty ( )
protected

◆ NeedBuffer()

virtual bool CBaseRenderer::NeedBuffer ( int idx)
inlinevirtual

◆ ReleaseBuffer()

◆ RenderCapture()

virtual bool CBaseRenderer::RenderCapture ( int index,
CRenderCapture * capture )
pure virtual

◆ RenderUpdate()

virtual void CBaseRenderer::RenderUpdate ( int index,
int index2,
bool clear,
unsigned int flags,
unsigned int alpha )
pure virtual

◆ ReorderDrawPoints()

void CBaseRenderer::ReorderDrawPoints ( )
inlineprotectedvirtual

Reimplemented in CRendererMediaCodecSurface.

◆ restoreRotatedCoords()

void CBaseRenderer::restoreRotatedCoords ( )
protected

◆ saveRotatedCoords()

void CBaseRenderer::saveRotatedCoords ( )
protected

◆ SetBufferSize()

virtual void CBaseRenderer::SetBufferSize ( int numBuffers)
inlinevirtual

◆ SettingOptionsRenderMethodsFiller()

void CBaseRenderer::SettingOptionsRenderMethodsFiller ( const std::shared_ptr< const CSetting > & setting,
std::vector< IntegerSettingOption > & list,
int & current,
void * data )
static

◆ SetVideoSettings()

void CBaseRenderer::SetVideoSettings ( const CVideoSettings & settings)

◆ SetViewMode()

void CBaseRenderer::SetViewMode ( int viewMode)

◆ Supports() [1/2]

◆ Supports() [2/2]

◆ SupportsMultiPassRendering()

virtual bool CBaseRenderer::SupportsMultiPassRendering ( )
pure virtual

◆ syncDestRectToRotatedPoints()

void CBaseRenderer::syncDestRectToRotatedPoints ( )
protected

◆ UnInit()

◆ Update()

◆ WantsDoublePass()

virtual bool CBaseRenderer::WantsDoublePass ( )
inlinevirtual

Reimplemented in CWinRenderer.

Member Data Documentation

◆ m_destRect

CRect CBaseRenderer::m_destRect
protected

◆ m_format

AVPixelFormat CBaseRenderer::m_format = AV_PIX_FMT_NONE
protected

◆ m_fps

float CBaseRenderer::m_fps = 0.0f
protected

◆ m_iFlags

unsigned CBaseRenderer::m_iFlags = 0
protected

◆ m_renderOrientation

unsigned int CBaseRenderer::m_renderOrientation = 0
protected

◆ m_rotatedDestCoords

CPoint CBaseRenderer::m_rotatedDestCoords[4]
protected

◆ m_savedRotatedDestCoords

CPoint CBaseRenderer::m_savedRotatedDestCoords[4]
protected

◆ m_sourceFrameRatio

float CBaseRenderer::m_sourceFrameRatio = 1.0f
protected

◆ m_sourceHeight

unsigned int CBaseRenderer::m_sourceHeight = 480
protected

◆ m_sourceRect

CRect CBaseRenderer::m_sourceRect
protected

◆ m_sourceWidth

unsigned int CBaseRenderer::m_sourceWidth = 720
protected

◆ m_videoSettings

CVideoSettings CBaseRenderer::m_videoSettings
protected

◆ m_viewRect

CRect CBaseRenderer::m_viewRect
protected

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