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

Helper class to gather all playback details for a file item. Usage: Construct with stack helper → call GatherPlaybackDetails() → retrieve results via getters. More...

#include <ApplicationPlay.h>

Public Types

enum class  GatherPlaybackDetailsResult { RESULT_SUCCESS , RESULT_ERROR , RESULT_NO_PLAYLIST_SELECTED }
 

Public Member Functions

 CApplicationPlay (CApplicationStackHelper &stackHelper)
 
GatherPlaybackDetailsResult GatherPlaybackDetails (const CFileItem &item, std::string player, bool restart)
 Gathers all details needed to play the given item. This includes resolving the item to get the item that actually shall be played, determining the player to be used and the player options.
 
const CFileItemGetResolvedItem () const
 Get the resolved item, that is to be used for playback.
 
const std::string & GetResolvedPlayer () const
 Get the player for playback of the resolved item.
 
const CPlayerOptionsGetPlayerOptions () const
 Get the player options for playback of the resolved item.
 

Detailed Description

Helper class to gather all playback details for a file item. Usage: Construct with stack helper → call GatherPlaybackDetails() → retrieve results via getters.

Member Enumeration Documentation

◆ GatherPlaybackDetailsResult

Enumerator
RESULT_SUCCESS 
RESULT_ERROR 
RESULT_NO_PLAYLIST_SELECTED 

Constructor & Destructor Documentation

◆ CApplicationPlay()

CApplicationPlay::CApplicationPlay ( CApplicationStackHelper & stackHelper)
inlineexplicit

Member Function Documentation

◆ GatherPlaybackDetails()

CApplicationPlay::GatherPlaybackDetailsResult CApplicationPlay::GatherPlaybackDetails ( const CFileItem & item,
std::string player,
bool restart )

Gathers all details needed to play the given item. This includes resolving the item to get the item that actually shall be played, determining the player to be used and the player options.

Parameters
itemThe file item to play
playerThe default player to be used for playback
restartA flag indicating whether file shall be played from the beginning, ignoring possibly existing resume points.
Returns
the result

◆ GetPlayerOptions()

const CPlayerOptions & CApplicationPlay::GetPlayerOptions ( ) const
inline

Get the player options for playback of the resolved item.

Returns
the options.

◆ GetResolvedItem()

const CFileItem & CApplicationPlay::GetResolvedItem ( ) const
inline

Get the resolved item, that is to be used for playback.

Returns
the item.

◆ GetResolvedPlayer()

const std::string & CApplicationPlay::GetResolvedPlayer ( ) const
inline

Get the player for playback of the resolved item.

Returns
the player.

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