![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
#include <ApplicationStackHelper.h>
Classes | |
class | StackPartInformation |
Public Member Functions | |
CApplicationStackHelper (void) | |
~CApplicationStackHelper (void) | |
void | Clear () |
void | OnPlayBackStarted (const CFileItem &item) |
bool | InitializeStack (const CFileItem &item) |
Initialize stack. More... | |
int | InitializeStackStartPartAndOffset (const CFileItem &item) |
Initialize stack times for each part, start & end, total time, and current part number if resume offset is specified. More... | |
int | GetCurrentPartNumber () const |
returns the current part number More... | |
bool | IsPlayingISOStack () const |
Returns true if Application is currently playing an ISO stack. More... | |
bool | IsPlayingRegularStack () const |
Returns true if Application is currently playing a Regular (non-ISO) stack. More... | |
CFileItem & | GetStackPartFileItem (int partNumber) const |
Returns a FileItem part of a (non-ISO) stack playback. More... | |
bool | HasNextStackPartFileItem () const |
returns true if there is a next part available More... | |
CFileItem & | SetNextStackPartCurrentFileItem () |
sets the next stack part as the current and returns a reference to it More... | |
CFileItem & | SetStackPartCurrentFileItem (int partNumber) |
sets a given stack part as the current and returns a reference to it More... | |
CFileItem & | GetCurrentStackPartFileItem () const |
Returns the FileItem currently playing back as part of a (non-ISO) stack playback. More... | |
uint64_t | GetStackPartEndTimeMs (int partNumber) const |
Returns the end time of a FileItem part of a (non-ISO) stack playback. More... | |
uint64_t | GetStackPartStartTimeMs (int partNumber) const |
Returns the start time of a FileItem part of a (non-ISO) stack playback. More... | |
uint64_t | GetCurrentStackPartStartTimeMs () const |
Returns the start time of the current FileItem part of a (non-ISO) stack playback. More... | |
uint64_t | GetStackTotalTimeMs () const |
Returns the total time of a (non-ISO) stack playback. More... | |
int | GetStackPartNumberAtTimeMs (uint64_t msecs) |
Returns the stack part number corresponding to the given timestamp in a (non-ISO) stack playback. More... | |
void | ClearAllRegisteredStackInformation () |
Clear all entries in the item-stack map. To be called upon playback stopped. More... | |
CFileItemPtr | GetRegisteredStack (const CFileItem &item) |
Returns a smart pointer to the stack CFileItem. More... | |
bool | HasRegisteredStack (const CFileItem &item) |
Returns true if there is a registered stack for the given CFileItem part. More... | |
void | SetRegisteredStack (const CFileItem &item, CFileItemPtr stackItem) |
Stores a smart pointer to the stack CFileItem in the item-stack map. More... | |
int | GetRegisteredStackPartNumber (const CFileItem &item) |
Returns the part number of the part in the parameter. More... | |
void | SetRegisteredStackPartNumber (const CFileItem &item, int partNumber) |
Stores the part number in the item-stack map. More... | |
uint64_t | GetRegisteredStackPartStartTimeMs (const CFileItem &item) |
Returns the start time of the part in the parameter. More... | |
void | SetRegisteredStackPartStartTimeMs (const CFileItem &item, uint64_t startTimeMs) |
Stores the part start time in the item-stack map. More... | |
uint64_t | GetRegisteredStackTotalTimeMs (const CFileItem &item) |
Returns the total time of the stack associated to the part in the parameter. More... | |
void | SetRegisteredStackTotalTimeMs (const CFileItem &item, uint64_t totalTimeMs) |
Stores the stack's total time associated to the part in the item-stack map. More... | |
Public Attributes | |
CCriticalSection | m_critSection |
Protected Types | |
typedef std::shared_ptr< StackPartInformation > | StackPartInformationPtr |
typedef std::map< std::string, StackPartInformationPtr > | Stackmap |
Protected Member Functions | |
StackPartInformationPtr | GetStackPartInformation (std::string key) |
Protected Attributes | |
Stackmap | m_stackmap |
std::unique_ptr< CFileItemList > | m_currentStack |
int | m_currentStackPosition = 0 |
bool | m_currentStackIsDiscImageStack = false |
|
protected |
|
protected |
CApplicationStackHelper::CApplicationStackHelper | ( | void | ) |
CApplicationStackHelper::~CApplicationStackHelper | ( | void | ) |
void CApplicationStackHelper::Clear | ( | ) |
void CApplicationStackHelper::ClearAllRegisteredStackInformation | ( | ) |
Clear all entries in the item-stack map. To be called upon playback stopped.
|
inline |
returns the current part number
|
inline |
Returns the FileItem currently playing back as part of a (non-ISO) stack playback.
|
inline |
Returns the start time of the current FileItem part of a (non-ISO) stack playback.
CFileItemPtr CApplicationStackHelper::GetRegisteredStack | ( | const CFileItem & | item | ) |
Returns a smart pointer to the stack CFileItem.
int CApplicationStackHelper::GetRegisteredStackPartNumber | ( | const CFileItem & | item | ) |
Returns the part number of the part in the parameter.
item | the reference to the item that is part of a stack |
uint64_t CApplicationStackHelper::GetRegisteredStackPartStartTimeMs | ( | const CFileItem & | item | ) |
Returns the start time of the part in the parameter.
item | the reference to the item that is part of a stack |
uint64_t CApplicationStackHelper::GetRegisteredStackTotalTimeMs | ( | const CFileItem & | item | ) |
Returns the total time of the stack associated to the part in the parameter.
item | the reference to the item that is part of a stack |
|
inline |
Returns the end time of a FileItem part of a (non-ISO) stack playback.
partNumber | the requested part number in the stack |
|
inline |
Returns a FileItem part of a (non-ISO) stack playback.
partNumber | the requested part number in the stack |
|
protected |
int CApplicationStackHelper::GetStackPartNumberAtTimeMs | ( | uint64_t | msecs | ) |
Returns the stack part number corresponding to the given timestamp in a (non-ISO) stack playback.
msecs | the requested timestamp in the stack (in milliseconds) |
|
inline |
Returns the start time of a FileItem part of a (non-ISO) stack playback.
partNumber | the requested part number in the stack |
|
inline |
Returns the total time of a (non-ISO) stack playback.
|
inline |
returns true if there is a next part available
bool CApplicationStackHelper::HasRegisteredStack | ( | const CFileItem & | item | ) |
Returns true if there is a registered stack for the given CFileItem part.
item | the reference to the item that is part of a stack |
bool CApplicationStackHelper::InitializeStack | ( | const CFileItem & | item | ) |
Initialize stack.
item | the FileItem object that is the stack |
int CApplicationStackHelper::InitializeStackStartPartAndOffset | ( | const CFileItem & | item | ) |
Initialize stack times for each part, start & end, total time, and current part number if resume offset is specified.
item | the FileItem object that is the stack |
|
inline |
Returns true if Application is currently playing an ISO stack.
|
inline |
Returns true if Application is currently playing a Regular (non-ISO) stack.
|
inline |
sets the next stack part as the current and returns a reference to it
void CApplicationStackHelper::SetRegisteredStack | ( | const CFileItem & | item, |
CFileItemPtr | stackItem | ||
) |
void CApplicationStackHelper::SetRegisteredStackPartNumber | ( | const CFileItem & | item, |
int | partNumber | ||
) |
Stores the part number in the item-stack map.
item | the reference to the item that is part of a stack |
partNumber | the part number of the part in other parameter |
void CApplicationStackHelper::SetRegisteredStackPartStartTimeMs | ( | const CFileItem & | item, |
uint64_t | startTimeMs | ||
) |
Stores the part start time in the item-stack map.
item | the reference to the item that is part of a stack |
startTime | the start time of the part in other parameter |
void CApplicationStackHelper::SetRegisteredStackTotalTimeMs | ( | const CFileItem & | item, |
uint64_t | totalTimeMs | ||
) |
Stores the stack's total time associated to the part in the item-stack map.
item | the reference to the item that is part of a stack |
totalTime | the total time of the stack |
|
inline |
sets a given stack part as the current and returns a reference to it
partNumber | the number of the part that needs to become the current one |
CCriticalSection CApplicationStackHelper::m_critSection |
|
protected |
|
protected |
|
protected |
|
protected |