11 #include "application/IApplicationComponent.h" 12 #include "threads/CriticalSection.h" 28 void OnPlayBackStarted(
const CFileItem& item);
179 CCriticalSection m_critSection;
194 m_lStackPartNumber = 0;
195 m_lStackPartStartTimeMs = 0;
196 m_lStackTotalTimeMs = 0;
198 uint64_t m_lStackPartStartTimeMs;
199 uint64_t m_lStackTotalTimeMs;
200 int m_lStackPartNumber;
201 std::shared_ptr<CFileItem> m_pStack;
204 typedef std::shared_ptr<StackPartInformation> StackPartInformationPtr;
205 typedef std::map<std::string, StackPartInformationPtr> Stackmap;
207 StackPartInformationPtr GetStackPartInformation(
const std::string& key);
208 StackPartInformationPtr GetStackPartInformation(
const std::string& key)
const;
210 std::unique_ptr<CFileItemList> m_currentStack;
211 int m_currentStackPosition = 0;
212 bool m_currentStackIsDiscImageStack =
false;
Definition: ApplicationStackHelper.h:21
uint64_t GetCurrentStackPartStartTimeMs() const
Returns the start time of the current FileItem part of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.h:102
bool HasRegisteredStack(const CFileItem &item) const
Returns true if there is a registered stack for the given CFileItem part.
Definition: ApplicationStackHelper.cpp:262
uint64_t GetStackPartEndTimeMs(int partNumber) const
Returns the end time of a FileItem part of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.cpp:227
const CFileItem & SetStackPartCurrentFileItem(int partNumber)
sets a given stack part as the current and returns a reference to it
Definition: ApplicationStackHelper.h:74
uint64_t GetRegisteredStackPartStartTimeMs(const CFileItem &item) const
Returns the start time of the part in the parameter.
Definition: ApplicationStackHelper.cpp:294
int GetStackPartNumberAtTimeMs(uint64_t msecs)
Returns the stack part number corresponding to the given timestamp in a (non-ISO) stack playback...
Definition: ApplicationStackHelper.cpp:237
uint64_t GetRegisteredStackTotalTimeMs(const CFileItem &item) const
Returns the total time of the stack associated to the part in the parameter.
Definition: ApplicationStackHelper.cpp:304
bool IsPlayingISOStack() const
Returns true if Application is currently playing an ISO stack.
Definition: ApplicationStackHelper.cpp:212
void SetRegisteredStackPartStartTimeMs(const CFileItem &item, uint64_t startTimeMs)
Stores the part start time in the item-stack map.
Definition: ApplicationStackHelper.cpp:299
Represents a list of files.
Definition: FileItem.h:721
int InitializeStackStartPartAndOffset(const CFileItem &item)
Initialize stack times for each part, start & end, total time, and current part number if resume offs...
Definition: ApplicationStackHelper.cpp:83
uint64_t GetStackTotalTimeMs() const
Returns the total time of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.cpp:232
void SetRegisteredStackPartNumber(const CFileItem &item, int partNumber)
Stores the part number in the item-stack map.
Definition: ApplicationStackHelper.cpp:289
bool HasNextStackPartFileItem() const
returns true if there is a next part available
Definition: ApplicationStackHelper.cpp:222
const CFileItem & SetNextStackPartCurrentFileItem()
sets the next stack part as the current and returns a reference to it
Definition: ApplicationStackHelper.h:65
bool IsPlayingRegularStack() const
Returns true if Application is currently playing a Regular (non-ISO) stack.
Definition: ApplicationStackHelper.cpp:217
int GetRegisteredStackPartNumber(const CFileItem &item)
Returns the part number of the part in the parameter.
Definition: ApplicationStackHelper.cpp:284
uint64_t GetStackPartStartTimeMs(int partNumber) const
Returns the start time of a FileItem part of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.h:97
bool InitializeStack(const CFileItem &item)
Initialize stack.
Definition: ApplicationStackHelper.cpp:60
void SetRegisteredStack(const CFileItem &item, std::shared_ptr< CFileItem > stackItem)
Stores a smart pointer to the stack CFileItem in the item-stack map.
Definition: ApplicationStackHelper.cpp:268
const CFileItem & GetCurrentStackPartFileItem() const
Returns the FileItem currently playing back as part of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.h:82
CFileItem & GetStackPartFileItem(int partNumber)
Returns a FileItem part of a (non-ISO) stack playback.
Definition: ApplicationStackHelper.cpp:274
Base class for application components.
Definition: IApplicationComponent.h:12
void SetRegisteredStackTotalTimeMs(const CFileItem &item, uint64_t totalTimeMs)
Stores the stack's total time associated to the part in the item-stack map.
Definition: ApplicationStackHelper.cpp:309
int GetCurrentPartNumber() const
returns the current part number
Definition: ApplicationStackHelper.h:45
std::shared_ptr< const CFileItem > GetRegisteredStack(const CFileItem &item) const
Returns a smart pointer to the stack CFileItem.
Definition: ApplicationStackHelper.cpp:256
void ClearAllRegisteredStackInformation()
Clear all entries in the item-stack map. To be called upon playback stopped.
Definition: ApplicationStackHelper.cpp:251
Represents a file on a share.
Definition: FileItem.h:102