|
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <ApplicationStackHelper.h>
Public Member Functions | |
| void | Clear () |
| void | OnPlayBackStarted () |
| bool | InitializeStack (const CFileItem &item) |
| Initialize stack and times for each part. | |
| void | GetStackPartAndOptions (CFileItem &item, CPlayerOptions &options, bool restart) |
| Initialize stack times for each part, start & end, total time, and current part number if resume offset is specified. | |
| bool | UpdateDiscStackAndTimes (const CFileItem &playedFile) |
| Updates the stack, fileItem and database stacktimes with new times. The stack should have already been updated with the new dynpath. | |
| void | SetNextPartBookmark (const std::string &path) |
| If a disc stack is stopped between parts when the next part has not been determined (ie. playlist not selected), then we need to save the bookmark for the next part before exiting playback. | |
| int | GetCurrentPartNumber () const |
| returns the current part number | |
| int | GetTotalPartNumbers () const |
| returns the total number of parts | |
| bool | IsPlayingStack () const |
| Returns true if Application is currently playing any stack. | |
| bool | IsPlayingDiscStack () const |
| Returns true if Application is currently playing a disc (ISO/BMDV/VIDEO_TS) stack. | |
| bool | IsPlayingRegularStack () const |
| Returns true if Application is currently playing a regular (non-disc) stack. | |
| bool | IsPlayingResolvedDiscStack () const |
| Returns true if Application is currently playing a disc stack where all parts up to the current one have been resolved. | |
| bool | HasNextStackPartFileItem () const |
| Returns true if there is another stack part available. | |
| bool | IsPlayingLastStackPart () const |
| Returns true if playing the last part of the stack. | |
| CFileItem & | SetNextStackPartAsCurrent () |
| Sets the next stack part as the current and returns a reference to it. | |
| CFileItem & | SetStackPartAsCurrent (int partNumber) |
| Sets a given stack part as the current and returns a reference to it. | |
| CFileItem & | GetCurrentStackPart () const |
| Returns the FileItem currently playing back as part of a stack playback. | |
| std::chrono::milliseconds | GetStackPartEndTime (int partNumber) const |
| Returns the end time of a FileItem part of a stack playback. | |
| std::chrono::milliseconds | GetStackPartStartTime (int partNumber) const |
| Returns the start time of a FileItem part of a stack playback. | |
| std::chrono::milliseconds | GetCurrentStackPartStartTime () const |
| Returns the start time of the current FileItem part of a stack playback. | |
| std::chrono::milliseconds | GetStackTotalTime () const |
| Returns the total time of a stack playback. | |
| int | GetStackPartNumberAtTime (std::chrono::milliseconds msecs) const |
| Returns the stack part number corresponding to the given timestamp in a stack playback. | |
| std::shared_ptr< const CFileItem > | GetStack (const CFileItem &item) const |
| Returns a smart pointer to the stack CFileItem. | |
| bool | IsInStack (const CFileItem &item) const |
| Returns true if there is a stack for the given CFileItem part. | |
| int | GetStackPartNumber (const CFileItem &item) const |
| Returns the part number of the part in the parameter. | |
| std::chrono::milliseconds | GetStackPartStartTime (const CFileItem &item) const |
| Returns the start time of the part in the parameter. | |
| void | SetStackPartStartTime (const CFileItem &item, std::chrono::milliseconds startTime) const |
| Stores the part start time in the item-stack map. | |
| void | SetStackFileIds (int fileId) |
| Sets the file id of the VideoInfoTag of each part in the stack. | |
| void | SetStackPartStreamDetails (const CFileItem &item) |
| Sets the stream details of the VideoInfoTag of the given part of the stack. | |
| void | SetStackDynPaths (const std::string &newPath) const |
| Updates the DynPath (which contains the entire stack://) of each part in the stack. | |
| void | SetStackPartPath (const CFileItem &item) |
| Updates the stack:// with the DynPath of the given item and then updates all parts in the stack. | |
| std::string | GetStackDynPath () const |
| Returns the stack:// path of the stack. | |
| std::string | GetOldStackDynPath () const |
| Returns the stack:// path of the stack prior to the last resolved part being updated. | |
| void | SetStackTotalTime (std::chrono::milliseconds totalTime) |
| Sets the total time of the stack in each stack part. | |
| void | SetStackPartOffsets (const CFileItem &item, const std::chrono::milliseconds startOffset, const std::chrono::milliseconds endOffset) const |
| Sets the starting and ending offsets of a stack part. | |
| int | GetKnownStackParts () const |
| Returns the number of parts in the stack that are currently resolved (ie. a playlist has been selected and path is bluray://) | |
| void | IncreaseKnownStackParts () |
| Increases the number of known (resolved) stack parts by one. | |
| bool | HasDiscParts () const |
| Returns true if any part of the stack are disc parts (ISO/BMDV/VIDEO_TS) | |
| bool | WasPlayingDiscStack () const |
| Returns true if any part of the stack was a disc part (ISO/BMDV/VIDEO_TS) \ (prior to being resolved to a playlist bluray:// path) | |
| bool | IsCurrentPartFinished () const |
| Returns true if the current part has finished playing. | |
| void | SetCurrentPartFinished (bool finished) |
| Set the status of the current playing part. | |
| bool | IsSeekingParts () const |
| Returns true if currently seeking between parts. | |
| void | SetSeekingParts (bool seeking) |
| Flag if currently seeking between parts. | |
Public Member Functions inherited from IApplicationComponent | |
| virtual | ~IApplicationComponent ()=default |
| void CApplicationStackHelper::Clear | ( | ) |
|
inline |
returns the current part number
| CFileItem & CApplicationStackHelper::GetCurrentStackPart | ( | ) | const |
Returns the FileItem currently playing back as part of a stack playback.
| std::chrono::milliseconds CApplicationStackHelper::GetCurrentStackPartStartTime | ( | ) | const |
Returns the start time of the current FileItem part of a stack playback.
|
inline |
Returns the number of parts in the stack that are currently resolved (ie. a playlist has been selected and path is bluray://)
| std::string CApplicationStackHelper::GetOldStackDynPath | ( | ) | const |
Returns the stack:// path of the stack prior to the last resolved part being updated.
| std::shared_ptr< const CFileItem > CApplicationStackHelper::GetStack | ( | const CFileItem & | item | ) | const |
Returns a smart pointer to the stack CFileItem.
| std::string CApplicationStackHelper::GetStackDynPath | ( | ) | const |
Returns the stack:// path of the stack.
| void CApplicationStackHelper::GetStackPartAndOptions | ( | CFileItem & | item, |
| CPlayerOptions & | options, | ||
| bool | restart ) |
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 |
| options | player options to update |
| restart | true if playback is a restart, false otherwise |
| std::chrono::milliseconds CApplicationStackHelper::GetStackPartEndTime | ( | int | partNumber | ) | const |
Returns the end time of a FileItem part of a stack playback.
| partNumber | the requested part number in the stack |
Returns the part number of the part in the parameter.
| item | the reference to the item that is part of a stack |
| int CApplicationStackHelper::GetStackPartNumberAtTime | ( | std::chrono::milliseconds | msecs | ) | const |
Returns the stack part number corresponding to the given timestamp in a stack playback.
| msecs | the requested timestamp in the stack (in milliseconds) |
| std::chrono::milliseconds CApplicationStackHelper::GetStackPartStartTime | ( | const CFileItem & | item | ) | const |
Returns the start time of the part in the parameter.
| item | the reference to the item that is part of a stack |
| std::chrono::milliseconds CApplicationStackHelper::GetStackPartStartTime | ( | int | partNumber | ) | const |
Returns the start time of a FileItem part of a stack playback.
| partNumber | the requested part number in the stack |
| std::chrono::milliseconds CApplicationStackHelper::GetStackTotalTime | ( | ) | const |
Returns the total time of a stack playback.
|
inline |
returns the total number of parts
| bool CApplicationStackHelper::HasDiscParts | ( | ) | const |
Returns true if any part of the stack are disc parts (ISO/BMDV/VIDEO_TS)
| bool CApplicationStackHelper::HasNextStackPartFileItem | ( | ) | const |
Returns true if there is another stack part available.
| void CApplicationStackHelper::IncreaseKnownStackParts | ( | ) |
Increases the number of known (resolved) stack parts by one.
Initialize stack and times for each part.
| item | the FileItem object that is the stack |
|
inline |
Returns true if the current part has finished playing.
Returns true if there is a stack for the given CFileItem part.
| item | the reference to the item that is part of a stack |
| bool CApplicationStackHelper::IsPlayingDiscStack | ( | ) | const |
Returns true if Application is currently playing a disc (ISO/BMDV/VIDEO_TS) stack.
| bool CApplicationStackHelper::IsPlayingLastStackPart | ( | ) | const |
Returns true if playing the last part of the stack.
| bool CApplicationStackHelper::IsPlayingRegularStack | ( | ) | const |
Returns true if Application is currently playing a regular (non-disc) stack.
| bool CApplicationStackHelper::IsPlayingResolvedDiscStack | ( | ) | const |
Returns true if Application is currently playing a disc stack where all parts up to the current one have been resolved.
| bool CApplicationStackHelper::IsPlayingStack | ( | ) | const |
Returns true if Application is currently playing any stack.
|
inline |
Returns true if currently seeking between parts.
| void CApplicationStackHelper::OnPlayBackStarted | ( | ) |
Set the status of the current playing part.
| finished | true if the current part has finished playing, false otherwise |
| void CApplicationStackHelper::SetNextPartBookmark | ( | const std::string & | path | ) |
If a disc stack is stopped between parts when the next part has not been determined (ie. playlist not selected), then we need to save the bookmark for the next part before exiting playback.
| path | the stack:// path |
| CFileItem & CApplicationStackHelper::SetNextStackPartAsCurrent | ( | ) |
Sets the next stack part as the current and returns a reference to it.
Flag if currently seeking between parts.
| seeking | true if currently seeking between parts, false if not |
| void CApplicationStackHelper::SetStackDynPaths | ( | const std::string & | newPath | ) | const |
Updates the DynPath (which contains the entire stack://) of each part in the stack.
| newPath | the updated stack:// path |
Sets the file id of the VideoInfoTag of each part in the stack.
| fileId | the file id |
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 |
| void CApplicationStackHelper::SetStackPartOffsets | ( | const CFileItem & | item, |
| const std::chrono::milliseconds | startOffset, | ||
| const std::chrono::milliseconds | endOffset ) const |
Sets the starting and ending offsets of a stack part.
| item | the FileItem in the stack that has an updated DynPath (eg. bluray://) |
| startOffset | the start offset in ms |
| endOffset | the end offset in ms |
Updates the stack:// with the DynPath of the given item and then updates all parts in the stack.
| item | the FileItem in the stack that has an updated DynPath (eg. bluray://) |
| void CApplicationStackHelper::SetStackPartStartTime | ( | const CFileItem & | item, |
| std::chrono::milliseconds | startTime ) const |
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 |
Sets the stream details of the VideoInfoTag of the given part of the stack.
| item | the reference to the item that is part of a stack |
| void CApplicationStackHelper::SetStackTotalTime | ( | std::chrono::milliseconds | totalTime | ) |
Sets the total time of the stack in each stack part.
| totalTime | the total time of the stack (in ms) |
Updates the stack, fileItem and database stacktimes with new times. The stack should have already been updated with the new dynpath.
| playedFile | The FileItem of the actual file played (updated in InputStream). |
|
inline |
Returns true if any part of the stack was a disc part (ISO/BMDV/VIDEO_TS) \ (prior to being resolved to a playlist bluray:// path)