kodi
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
OVERLAY::CRenderer Class Reference
Inheritance diagram for OVERLAY::CRenderer:
Inheritance graph
[legend]
Collaboration diagram for OVERLAY::CRenderer:
Collaboration graph
[legend]

Classes

struct  SElement
 

Public Member Functions

void Notify (const Observable &obs, const ObservableMessage msg) override
 Process a message from an observable. More...
 
void AddOverlay (std::shared_ptr< CDVDOverlay > o, double pts, int index)
 
virtual void Render (int idx)
 
void UnInit ()
 Release resources.
 
void Flush ()
 
void Reset ()
 Reset to default values.
 
void Release (int idx)
 
bool HasOverlay (int idx)
 
void SetVideoRect (CRect &source, CRect &dest, CRect &view)
 
void SetStereoMode (const std::string &stereomode)
 
void SetSubtitleVerticalPosition (const int value, bool save)
 Set the subtitle vertical position, it depends on current screen resolution. More...
 

Protected Types

enum  PositonResInfoState { POSRESINFO_UNSET = -1, POSRESINFO_SAVE_CHANGES = -2 }
 

Protected Member Functions

void ResetSubtitlePosition ()
 Reset the subtitle position to default value.
 
void OnViewChange ()
 Called when the screen resolution is changed.
 
void Render (COverlay *o)
 
std::shared_ptr< COverlayConvert (CDVDOverlay &o, double pts)
 
std::shared_ptr< COverlayConvertLibass (CDVDOverlayLibass &o, double pts, bool updateStyle, const std::shared_ptr< struct KODI::SUBTITLES::STYLE::style > &overlayStyle)
 Convert the overlay to a overlay renderer. More...
 
void CreateSubtitlesStyle ()
 
void Release (std::vector< SElement > &list)
 
void ReleaseCache ()
 
void ReleaseUnused ()
 
void LoadSettings ()
 Load and store settings locally.
 

Protected Attributes

CCriticalSection m_section
 
std::vector< SElementm_buffers [NUM_BUFFERS]
 
std::map< unsigned int, std::shared_ptr< COverlay > > m_textureCache
 
CRect m_rv
 
CRect m_rs
 
CRect m_rd
 
std::string m_stereomode
 
int m_subtitlePosition {0}
 
int m_subtitlePosResInfo {POSRESINFO_UNSET}
 
int m_subtitleVerticalMargin {0}
 
bool m_saveSubtitlePosition {false}
 
KODI::SUBTITLES::HorizontalAlign m_subtitleHorizontalAlign
 
KODI::SUBTITLES::Align m_subtitleAlign {KODI::SUBTITLES::Align::BOTTOM_OUTSIDE}
 
std::shared_ptr< struct KODI::SUBTITLES::STYLE::stylem_overlayStyle
 
std::atomic< bool > m_isSettingsChanged {false}
 

Static Protected Attributes

static unsigned int m_textureid = 1
 

Member Function Documentation

◆ ConvertLibass()

std::shared_ptr< COverlay > CRenderer::ConvertLibass ( CDVDOverlayLibass o,
double  pts,
bool  updateStyle,
const std::shared_ptr< struct KODI::SUBTITLES::STYLE::style > &  overlayStyle 
)
protected

Convert the overlay to a overlay renderer.

Parameters
oThe overlay to convert
ptsThe current PTS time
subStyleThe style to be used, MUST BE SET ONLY at the first call or when user change settings
Returns
True if success, false if error

◆ Notify()

void CRenderer::Notify ( const Observable obs,
const ObservableMessage  msg 
)
overridevirtual

Process a message from an observable.

Parameters
obsThe observable that sends the message.
msgThe message.

Implements Observer.

◆ SetSubtitleVerticalPosition()

void CRenderer::SetSubtitleVerticalPosition ( const int  value,
bool  save 
)

Set the subtitle vertical position, it depends on current screen resolution.

Parameters
valueThe subtitle position in pixels
saveIf true, the value will be saved to resolution info

Member Data Documentation

◆ m_subtitleHorizontalAlign

KODI::SUBTITLES::HorizontalAlign OVERLAY::CRenderer::m_subtitleHorizontalAlign
protected
Initial value:
{
KODI::SUBTITLES::HorizontalAlign::CENTER}

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