xbmc
Public Member Functions | List of all members
KODI::SHADER::IShaderPreset Class Referenceabstract
Inheritance diagram for KODI::SHADER::IShaderPreset:
Inheritance graph
[legend]

Public Member Functions

virtual bool ReadPresetFile (const std::string &presetPath)=0
 Reads/Parses a shader preset file and loads its state to the object. What this state is is implementation specific. More...
 
virtual bool RenderUpdate (const CPoint dest[], IShaderTexture *source, IShaderTexture *target)=0
 Updates state if needed and renderes the preset to the target texture. More...
 
virtual void SetSpeed (double speed)=0
 Informs about the speed of playback. More...
 
virtual void SetVideoSize (const unsigned videoWidth, const unsigned videoHeight)=0
 Size of the input/source frame in pixels. More...
 
virtual bool SetShaderPreset (const std::string &shaderPresetPath)=0
 Set the preset to be rendered on the next frame. More...
 
virtual const std::string & GetShaderPreset () const =0
 Gets the full path to the shader preset. More...
 
virtual ShaderPassVec & GetPasses ()=0
 Gets the passes of the loaded preset. More...
 

Member Function Documentation

◆ GetPasses()

virtual ShaderPassVec& KODI::SHADER::IShaderPreset::GetPasses ( )
pure virtual

Gets the passes of the loaded preset.

Returns
All the video shader passes of the currently loaded preset

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ GetShaderPreset()

virtual const std::string& KODI::SHADER::IShaderPreset::GetShaderPreset ( ) const
pure virtual

Gets the full path to the shader preset.

Returns
The full path to the currently loaded preset file

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ ReadPresetFile()

virtual bool KODI::SHADER::IShaderPreset::ReadPresetFile ( const std::string &  presetPath)
pure virtual

Reads/Parses a shader preset file and loads its state to the object. What this state is is implementation specific.

Parameters
presetPathFull path of the preset file.
Returns
True on successful parsing, false on failed.

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ RenderUpdate()

virtual bool KODI::SHADER::IShaderPreset::RenderUpdate ( const CPoint  dest[],
IShaderTexture source,
IShaderTexture target 
)
pure virtual

Updates state if needed and renderes the preset to the target texture.

Parameters
destCoordinates of the 4 corners of the output viewport/window
sourceInput texture. The source of the video frame, in is original resolution (unscaled)
targetThe target texture. The texture that the final result will be rendered in.
Returns
Returns false if updating or rendering failed, true if both succeeded.

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ SetShaderPreset()

virtual bool KODI::SHADER::IShaderPreset::SetShaderPreset ( const std::string &  shaderPresetPath)
pure virtual

Set the preset to be rendered on the next frame.

Parameters
shaderPresetPathFull path to the preset file to be loaded
Returns
Returns false if loading the preset failed, true otherwise.

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ SetSpeed()

virtual void KODI::SHADER::IShaderPreset::SetSpeed ( double  speed)
pure virtual

Informs about the speed of playback.

Parameters
speedCommonly 1.0 for normal playback, and 0.0 if paused

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.

◆ SetVideoSize()

virtual void KODI::SHADER::IShaderPreset::SetVideoSize ( const unsigned  videoWidth,
const unsigned  videoHeight 
)
pure virtual

Size of the input/source frame in pixels.

Parameters
videoWidthHeight of the source frame in pixels
videoHeightHeight of the source frame in pixels

Implemented in KODI::SHADER::CShaderPresetGL, and KODI::SHADER::CShaderPresetDX.


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