Game operations
More...
|
| Class: CStream |
| Class: kodi::addon::CInstanceGame::CStream Game stream handler
|
|
Game operations
These are mandatory functions for using this addon to get the available channels.
Game operation parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ CloseGame()
void kodi::addon::CInstanceGame::CloseGame |
( |
void | | ) |
|
|
inline |
Callback to Kodi Function
Requests the frontend to stop the current game
◆ GetGameTiming()
Get timing information about the loaded game.
- Parameters
-
[out] | timing_info | The info structure to fill |
- Returns
- the error, or GAME_ERROR_NO_ERROR if info was filled
◆ GetRegion()
virtual GAME_REGION kodi::addon::CInstanceGame::GetRegion |
( |
| ) |
|
|
inlinevirtual |
Get region of the loaded game.
- Returns
- the region, or GAME_REGION_UNKNOWN if unknown or no game is loaded
◆ LoadGame()
virtual GAME_ERROR kodi::addon::CInstanceGame::LoadGame |
( |
const std::string & | url | ) |
|
|
inlinevirtual |
◆ LoadGameSpecial()
Load a game that requires multiple files.
- Parameters
-
[in] | type | The game type |
[in] | urls | An array of urls |
- Returns
- the error, or GAME_ERROR_NO_ERROR if the game was loaded
◆ LoadStandalone()
virtual GAME_ERROR kodi::addon::CInstanceGame::LoadStandalone |
( |
| ) |
|
|
inlinevirtual |
Begin playing without a game file.
If the add-on supports standalone mode, it must add the <supports_standalone> tag to the extension point in addon.xml:
<supports_no_game>false</supports_no_game>
- Returns
- the error, or GAME_ERROR_NO_ERROR if the game add-on was loaded
◆ RequiresGameLoop()
virtual bool kodi::addon::CInstanceGame::RequiresGameLoop |
( |
| ) |
|
|
inlinevirtual |
Return true if the client requires the frontend to provide a game loop.
The game loop is a thread that calls RunFrame() in a loop at a rate determined by the playback speed and the client's FPS.
- Returns
- true if the frontend should provide a game loop, false otherwise
◆ Reset()
virtual GAME_ERROR kodi::addon::CInstanceGame::Reset |
( |
| ) |
|
|
inlinevirtual |
◆ RunFrame()
virtual GAME_ERROR kodi::addon::CInstanceGame::RunFrame |
( |
| ) |
|
|
inlinevirtual |
Run a single frame for add-ons that use a game loop.
- Returns
- the error, or GAME_ERROR_NO_ERROR if there was no error
◆ UnloadGame()
virtual GAME_ERROR kodi::addon::CInstanceGame::UnloadGame |
( |
| ) |
|
|
inlinevirtual |
Unload the current game.
Unloads a currently loaded game
- Returns
- the error, or GAME_ERROR_NO_ERROR if the game was unloaded