xbmc
Static Public Member Functions | List of all members
KODI::GAME::CGameClientTranslator Class Reference

Translates data types from Game API to the corresponding format in Kodi. More...

#include <GameClientTranslator.h>

Static Public Member Functions

static const char * ToString (GAME_ERROR error)
 Translates game errors to string representation (e.g. for logging). More...
 
static const char * ToString (GAME_MEMORY error)
 Translates game memory types to string representation (e.g. for logging). More...
 
static bool TranslateStreamType (GAME_STREAM_TYPE gameType, RETRO::StreamType &retroType)
 Translate stream type (Game API to RetroPlayer). More...
 
static AVPixelFormat TranslatePixelFormat (GAME_PIXEL_FORMAT format)
 Translate pixel format (Game API to RetroPlayer/FFMPEG). More...
 
static GAME_PIXEL_FORMAT TranslatePixelFormat (AVPixelFormat format)
 Translate pixel format (RetroPlayer/FFMPEG to Game API). More...
 
static RETRO::PCMFormat TranslatePCMFormat (GAME_PCM_FORMAT format)
 Translate audio PCM format (Game API to RetroPlayer). More...
 
static RETRO::AudioChannel TranslateAudioChannel (GAME_AUDIO_CHANNEL channel)
 Translate audio channels (Game API to RetroPlayer). More...
 
static RETRO::VideoRotation TranslateRotation (GAME_VIDEO_ROTATION rotation)
 Translate video rotation (Game API to RetroPlayer). More...
 
static GAME_KEY_MOD GetModifiers (KEYBOARD::Modifier modifier)
 Translate key modifiers (Kodi to Game API). More...
 
static const char * TranslateRegion (GAME_REGION region)
 Translate region to string representation (e.g. for logging). More...
 
static PORT_TYPE TranslatePortType (GAME_PORT_TYPE portType)
 Translate port type (Game API to Kodi) More...
 

Detailed Description

Translates data types from Game API to the corresponding format in Kodi.

This class is stateless.

Member Function Documentation

◆ GetModifiers()

GAME_KEY_MOD CGameClientTranslator::GetModifiers ( KEYBOARD::Modifier  modifier)
static

Translate key modifiers (Kodi to Game API).

Parameters
modifiersThe key modifiers to translate (e.g. Shift, Ctrl).
Returns
Translated key modifiers.

◆ ToString() [1/2]

const char * CGameClientTranslator::ToString ( GAME_ERROR  error)
static

Translates game errors to string representation (e.g. for logging).

Parameters
errorThe error to translate.
Returns
Translated error.

◆ ToString() [2/2]

static const char* KODI::GAME::CGameClientTranslator::ToString ( GAME_MEMORY  error)
static

Translates game memory types to string representation (e.g. for logging).

Parameters
memoryThe memory type to translate.
Returns
Translated memory type.

◆ TranslateAudioChannel()

RETRO::AudioChannel CGameClientTranslator::TranslateAudioChannel ( GAME_AUDIO_CHANNEL  channel)
static

Translate audio channels (Game API to RetroPlayer).

Parameters
formatThe audio channels to translate.
Returns
Translated audio channels.

◆ TranslatePCMFormat()

RETRO::PCMFormat CGameClientTranslator::TranslatePCMFormat ( GAME_PCM_FORMAT  format)
static

Translate audio PCM format (Game API to RetroPlayer).

Parameters
formatThe audio PCM format to translate.
Returns
Translated audio PCM format.

◆ TranslatePixelFormat() [1/2]

AVPixelFormat CGameClientTranslator::TranslatePixelFormat ( GAME_PIXEL_FORMAT  format)
static

Translate pixel format (Game API to RetroPlayer/FFMPEG).

Parameters
formatThe pixel format to translate.
Returns
Translated pixel format.

◆ TranslatePixelFormat() [2/2]

GAME_PIXEL_FORMAT CGameClientTranslator::TranslatePixelFormat ( AVPixelFormat  format)
static

Translate pixel format (RetroPlayer/FFMPEG to Game API).

Parameters
formatThe pixel format to translate.
Returns
Translated pixel format.

◆ TranslatePortType()

PORT_TYPE CGameClientTranslator::TranslatePortType ( GAME_PORT_TYPE  portType)
static

Translate port type (Game API to Kodi)

Parameters
portTypeThe port type to translate
Returns
Translated port type

◆ TranslateRegion()

const char * CGameClientTranslator::TranslateRegion ( GAME_REGION  region)
static

Translate region to string representation (e.g. for logging).

Parameters
errorThe region to translate (e.g. PAL, NTSC).
Returns
Translated region.

◆ TranslateRotation()

RETRO::VideoRotation CGameClientTranslator::TranslateRotation ( GAME_VIDEO_ROTATION  rotation)
static

Translate video rotation (Game API to RetroPlayer).

Parameters
rotationThe video rotation to translate.
Returns
Translated video rotation.

◆ TranslateStreamType()

bool CGameClientTranslator::TranslateStreamType ( GAME_STREAM_TYPE  gameType,
RETRO::StreamType &  retroType 
)
static

Translate stream type (Game API to RetroPlayer).

Parameters
gameTypeThe stream type to translate.
[out]retroTypeThe translated stream type.
Returns
True if the Game API type was translated to a valid RetroPlayer type

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