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

Class to concentrate all methods related to GPU information. More...

#include <GpuInfo.h>

Inheritance diagram for CGPUInfo:
CGPUInfoPosix CGPUInfoWin10 CGPUInfoWin32 CGPUInfoAndroid CGPUInfoDarwinEmbed CGPUInfoFreebsd CGPUInfoLinux CGPUInfoMacOS

Public Member Functions

 CGPUInfo ()=default
 
virtual ~CGPUInfo ()=default
 
bool GetTemperature (CTemperature &temperature) const
 Get the temperature of the GPU.
 

Static Public Member Functions

static std::unique_ptr< CGPUInfoGetGPUInfo ()
 Getter from the specific platform GPUInfo.
 

Protected Member Functions

virtual bool SupportsCustomTemperatureCommand () const
 Checks if the specific platform implementation supports obtaining the GPU temperature via the execution of a custom command line command.
 
virtual bool SupportsPlatformTemperature () const
 Checks if the specific platform implementation supports obtaining the GPU temperature from the platform SDK itself.
 
virtual bool GetGPUPlatformTemperature (CTemperature &temperature) const =0
 Get the GPU temperature from the platform SDK.
 
virtual bool GetGPUTemperatureFromCommand (CTemperature &temperature, const std::string &cmd) const =0
 Get the GPU temperature from a user provided command (advanced settings)
 

Detailed Description

Class to concentrate all methods related to GPU information.

This is used by the Info interface to obtain the current GPU temperature

Constructor & Destructor Documentation

◆ CGPUInfo()

CGPUInfo::CGPUInfo ( )
default

◆ ~CGPUInfo()

virtual CGPUInfo::~CGPUInfo ( )
virtualdefault

Member Function Documentation

◆ GetGPUInfo()

std::unique_ptr< CGPUInfo > CGPUInfo::GetGPUInfo ( )
static

Getter from the specific platform GPUInfo.

Returns
the platform specific implementation of GPUInfo

◆ GetGPUPlatformTemperature()

virtual bool CGPUInfo::GetGPUPlatformTemperature ( CTemperature & temperature) const
protectedpure virtual

Get the GPU temperature from the platform SDK.

Note
platform implementations must override this. For this to take effect SupportsPlatformTemperature must be true.
Parameters
[in,out]temperature- the temperature to fill with the result
Returns
true if obtaining the GPU temperature succeeded, false otherwise

◆ GetGPUTemperatureFromCommand()

virtual bool CGPUInfo::GetGPUTemperatureFromCommand ( CTemperature & temperature,
const std::string & cmd ) const
protectedpure virtual

Get the GPU temperature from a user provided command (advanced settings)

Note
platform implementations must override this. For this to take effect SupportsCustomTemperatureCommand must be true.
Parameters
[in,out]temperature- the temperature to fill with the result
Returns
true if obtaining the GPU temperature succeeded, false otherwise

Implemented in CGPUInfoPosix.

◆ GetTemperature()

bool CGPUInfo::GetTemperature ( CTemperature & temperature) const

Get the temperature of the GPU.

Parameters
[in,out]temperature- the temperature to fill with the result
Returns
true if it was possible to obtain the GPU temperature, false otherwise

◆ SupportsCustomTemperatureCommand()

virtual bool CGPUInfo::SupportsCustomTemperatureCommand ( ) const
inlineprotectedvirtual

Checks if the specific platform implementation supports obtaining the GPU temperature via the execution of a custom command line command.

Note
this is false on the base class but may be overridden by the specific platform implementation. Custom GPU command is defined in advancedsettings.
Returns
true if the implementation supports obtaining the GPU temperature from a custom command, false otherwise

Reimplemented in CGPUInfoPosix.

◆ SupportsPlatformTemperature()

virtual bool CGPUInfo::SupportsPlatformTemperature ( ) const
inlineprotectedvirtual

Checks if the specific platform implementation supports obtaining the GPU temperature from the platform SDK itself.

Note
this is false on the base class but may be overridden by the specific platform implementation.
Returns
true if the implementation supports obtaining the GPU temperature from the platform SDK, false otherwise

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