| 
    Kodi Documentation 22.0
    
   Kodi is an open source media player and entertainment hub. 
   | 
 
#include <Visualization.h>
  
Public Member Functions | |
| CInstanceVisualization () | |
| Visualization class constructor.   | |
| CInstanceVisualization (const IInstanceInfo &instance) | |
| Visualization class constructor used to support multiple instance types.   | |
| ~CInstanceVisualization () override=default | |
| Destructor.   | |
| virtual bool | Start (int channels, int samplesPerSec, int bitsPerSample, const std::string &songName) | 
| Used to notify the visualization that a new song has been started.   | |
| virtual void | Stop () | 
| Used to inform the visualization that the rendering control was stopped.   | |
| virtual void | AudioData (const float *audioData, size_t audioDataLength) | 
| Pass audio data to the visualization.   | |
| virtual bool | IsDirty () | 
| Used to inform Kodi that the rendered region is dirty and need an update.   | |
| virtual void | Render () | 
| Used to indicate when the add-on should render.   | |
| virtual int | GetSyncDelay () | 
| Used to get the number of buffers from the current visualization.   | |
| virtual bool | GetPresets (std::vector< std::string > &presets) | 
| Used to get a list of visualization presets the user can select. from.   | |
| virtual int | GetActivePreset () | 
| Get the index of the current preset.   | |
| virtual bool | IsLocked () | 
| Check if the add-on is locked to the current preset.   | |
| virtual bool | PrevPreset () | 
| Load the previous visualization preset.   | |
| virtual bool | NextPreset () | 
| Load the next visualization preset.   | |
| virtual bool | LoadPreset (int select) | 
| Load a visualization preset.   | |
| virtual bool | RandomPreset () | 
| Switch to a new random preset.   | |
| virtual bool | LockPreset (bool lockUnlock) | 
| Lock the current visualization preset, preventing it from changing.   | |
| virtual bool | RatePreset (bool plusMinus) | 
| Used to increase/decrease the visualization preset rating.   | |
| virtual bool | UpdateAlbumart (const std::string &albumart) | 
| Inform the visualization of the current album art image.   | |
| virtual bool | UpdateTrack (const kodi::addon::VisualizationTrack &track) | 
| Inform the visualization of the current track's tag information.   | |
| void | TransferPresets (const std::vector< std::string > &presets) | 
| To transfer available presets on addon.   | |
| kodi::HardwareContext | Device () | 
| Device that represents the display adapter.   | |
| int | X () | 
| Returns the X position of the rendering window.   | |
| int | Y () | 
| Returns the Y position of the rendering window.   | |
| int | Width () | 
| Returns the width of the rendering window.   | |
| int | Height () | 
| Returns the height of the rendering window.   | |
| float | PixelRatio () | 
| Pixel aspect ratio (often abbreviated PAR) is a ratio that describes how the width of a pixel compares to the height of that pixel.   | |
  Public Member Functions inherited from kodi::addon::IAddonInstance | |
| IAddonInstance (const kodi::addon::IInstanceInfo &instance) | |
| virtual | ~IAddonInstance ()=default | 
| virtual ADDON_STATUS | CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl) | 
| std::string | GetInstanceAPIVersion () const | 
| virtual ADDON_STATUS | SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue) | 
| bool | IsInstanceSettingUsingDefault (const std::string &settingName) | 
| std::string | GetInstanceUserPath (const std::string &append="") | 
| bool | CheckInstanceSettingString (const std::string &settingName, std::string &settingValue) | 
| std::string | GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="") | 
| void | SetInstanceSettingString (const std::string &settingName, const std::string &settingValue) | 
| bool | CheckInstanceSettingInt (const std::string &settingName, int &settingValue) | 
| int | GetInstanceSettingInt (const std::string &settingName, int defaultValue=0) | 
| void | SetInstanceSettingInt (const std::string &settingName, int settingValue) | 
| bool | CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue) | 
| bool | GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false) | 
| void | SetInstanceSettingBoolean (const std::string &settingName, bool settingValue) | 
| bool | CheckInstanceSettingFloat (const std::string &settingName, float &settingValue) | 
| float | GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f) | 
| void | SetInstanceSettingFloat (const std::string &settingName, float settingValue) | 
| template<typename enumType > | |
| bool | CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue) | 
| template<typename enumType > | |
| enumType | GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0)) | 
| template<typename enumType > | |
| void | SetInstanceSettingEnum (const std::string &settingName, enumType settingValue) |