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

#include <WinRenderer.h>

Inheritance diagram for CWinRenderer:
CBaseRenderer

Public Member Functions

 CWinRenderer ()
 
 ~CWinRenderer ()
 
void Update () override
 
bool Configure (const VideoPicture &picture, float fps, unsigned int orientation) override
 
void AddVideoPicture (const VideoPicture &picture, int index) override
 
void UnInit () override
 
void PrepareForReconfigure () override
 Called before the renderer is deleted to be replaced by a new one for the same playback.
 
bool IsConfigured () override
 
bool Flush (bool saveBuffers) override
 
CRenderInfo GetRenderInfo () override
 
void RenderUpdate (int index, int index2, bool clear, unsigned int flags, unsigned int alpha) override
 
void SetBufferSize (int numBuffers) override
 
void ReleaseBuffer (int idx) override
 
bool NeedBuffer (int idx) override
 
bool SupportsMultiPassRendering () override
 
bool Supports (ERENDERFEATURE feature) const override
 
bool Supports (ESCALINGMETHOD method) const override
 
bool WantsDoublePass () override
 
bool ConfigChanged (const VideoPicture &picture) override
 
bool ChangePictureSize (const VideoPicture &picture) override
 Take pictures of another size from here on, keeping all else Configure() set up. The pictures the renderer holds are released.
 
DEBUG_INFO_VIDEO GetDebugInfo (int idx) override
 
- Public Member Functions inherited from CBaseRenderer
 CBaseRenderer ()
 
virtual ~CBaseRenderer ()
 
virtual bool IsPictureHW (const VideoPicture &picture)
 
virtual bool IsGuiLayer ()
 
virtual bool VideoBypassesFramebuffer ()
 
virtual bool CaptureVideoFrame (const KODI::RENDERING::CAPTURE::CaptureSpec &spec, KODI::RENDERING::CAPTURE::CaptureResult &result)
 Render this renderer's video frame for screencap into result. Overridden by renderers whose VideoBypassesFramebuffer() is true. Default: capture unavailable.
 
virtual bool CompositeVideoCapture (KODI::RENDERING::CAPTURE::CaptureResult &result)
 Composite externally rendered video into a finished framebuffer capture.
 
void SetFps (float fps)
 
void SetViewMode (int viewMode)
 
void SetFrameContentRect (const CRectInt &rect)
 Take VideoPicture::contentRect for the frame about to be drawn. Empty leaves the stored measurement in charge.
 
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)
 

Static Public Member Functions

static CBaseRenderer * Create (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)
 

Protected Member Functions

void PreInit ()
 
int NextBuffer () const
 
CRendererBase * SelectRenderer (const VideoPicture &picture)
 
CRect GetScreenRect () const
 
void ClearBackBuffer () const
 
void ClearBackBufferQuad () const
 
- 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 ()
 
CRect ApplyContentGeometry (float &contentRatio)
 The content geometry's part of ManageRenderArea(): cut to the frame's own measurement, fit the mask opening, then honour a maintained ratio.
 
virtual void ReorderDrawPoints ()
 
virtual EShaderFormat GetShaderFormat ()
 
void MarkDirty ()
 
void EnableAlwaysClip ()
 
void saveRotatedCoords ()
 
void syncDestRectToRotatedPoints ()
 
void restoreRotatedCoords ()
 

Protected Attributes

bool m_bConfigured = false
 
std::unique_ptr< CRendererBase > m_renderer
 
bool m_replaced = false
 
- 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
 
CRectInt m_frameContentRect
 
unsigned m_iFlags = 0
 
AVPixelFormat m_format = AV_PIX_FMT_NONE
 
CVideoSettings m_videoSettings
 

Constructor & Destructor Documentation

◆ CWinRenderer()

CWinRenderer::CWinRenderer ( )

◆ ~CWinRenderer()

CWinRenderer::~CWinRenderer ( )

Member Function Documentation

◆ AddVideoPicture()

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

Implements CBaseRenderer.

◆ ChangePictureSize()

bool CWinRenderer::ChangePictureSize ( const VideoPicture & picture)
overridevirtual

Take pictures of another size from here on, keeping all else Configure() set up. The pictures the renderer holds are released.

Returns
false if the renderer has to be configured again for them

Reimplemented from CBaseRenderer.

◆ ClearBackBuffer()

void CWinRenderer::ClearBackBuffer ( ) const
protected

◆ ClearBackBufferQuad()

void CWinRenderer::ClearBackBufferQuad ( ) const
protected

◆ ConfigChanged()

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

Implements CBaseRenderer.

◆ Configure()

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

Implements CBaseRenderer.

◆ Create()

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

◆ Flush()

bool CWinRenderer::Flush ( bool saveBuffers)
overridevirtual

Reimplemented from CBaseRenderer.

◆ GetDebugInfo()

DEBUG_INFO_VIDEO CWinRenderer::GetDebugInfo ( int idx)
overridevirtual

Reimplemented from CBaseRenderer.

◆ GetRenderInfo()

CRenderInfo CWinRenderer::GetRenderInfo ( )
overridevirtual

Reimplemented from CBaseRenderer.

◆ GetScreenRect()

CRect CWinRenderer::GetScreenRect ( ) const
protected

◆ IsConfigured()

bool CWinRenderer::IsConfigured ( )
inlineoverridevirtual

Implements CBaseRenderer.

◆ NeedBuffer()

bool CWinRenderer::NeedBuffer ( int idx)
overridevirtual

Reimplemented from CBaseRenderer.

◆ NextBuffer()

int CWinRenderer::NextBuffer ( ) const
protected

◆ PreInit()

void CWinRenderer::PreInit ( )
protected

◆ PrepareForReconfigure()

void CWinRenderer::PrepareForReconfigure ( )
overridevirtual

Called before the renderer is deleted to be replaced by a new one for the same playback.

Reimplemented from CBaseRenderer.

◆ Register()

bool CWinRenderer::Register ( )
static

◆ ReleaseBuffer()

void CWinRenderer::ReleaseBuffer ( int idx)
overridevirtual

Reimplemented from CBaseRenderer.

◆ RenderUpdate()

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

Implements CBaseRenderer.

◆ SelectRenderer()

CRendererBase * CWinRenderer::SelectRenderer ( const VideoPicture & picture)
protected

◆ SetBufferSize()

void CWinRenderer::SetBufferSize ( int numBuffers)
overridevirtual

Reimplemented from CBaseRenderer.

◆ Supports() [1/2]

bool CWinRenderer::Supports ( ERENDERFEATURE feature) const
overridevirtual

Reimplemented from CBaseRenderer.

◆ Supports() [2/2]

bool CWinRenderer::Supports ( ESCALINGMETHOD method) const
overridevirtual

Implements CBaseRenderer.

◆ SupportsMultiPassRendering()

bool CWinRenderer::SupportsMultiPassRendering ( )
inlineoverridevirtual

Implements CBaseRenderer.

◆ UnInit()

void CWinRenderer::UnInit ( )
overridevirtual

Implements CBaseRenderer.

◆ Update()

void CWinRenderer::Update ( )
overridevirtual

Implements CBaseRenderer.

◆ WantsDoublePass()

bool CWinRenderer::WantsDoublePass ( )
overridevirtual

Reimplemented from CBaseRenderer.

Member Data Documentation

◆ m_bConfigured

bool CWinRenderer::m_bConfigured = false
protected

◆ m_renderer

std::unique_ptr<CRendererBase> CWinRenderer::m_renderer
protected

◆ m_replaced

bool CWinRenderer::m_replaced = false
protected

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