MythTV
master
|
#include <textsubtitleparser.h>
Signals | |
void | TextSubtitlesUpdated () |
Public Member Functions | |
TextSubtitles () | |
~TextSubtitles () override | |
bool | HasSubtitleChanged (uint64_t timecode) const |
Returns true in case the subtitle to display has changed since the last GetSubtitles() call. More... | |
QStringList | GetSubtitles (uint64_t timecode) |
Returns the subtitles to display at the given timecode. More... | |
bool | IsFrameBasedTiming (void) const |
Returns true in case the subtitle timing data is frame-based. More... | |
void | SetFrameBasedTiming (bool frameBasedTiming) |
void | SetFilename (const QString &fileName) |
void | AddSubtitle (const text_subtitle_t &newSub) |
void | Clear (void) |
void | SetLastLoaded (void) |
void | SetByteCount (off_t count) |
off_t | GetByteCount (void) const |
void | SetInProgress (bool isInProgress) |
void | SetHasSubtitles (bool hasSubs) |
int | GetSubtitleCount (void) const |
void | Lock (void) |
void | Unlock (void) |
Private Attributes | |
TextSubtitleList | m_subtitles |
text_subtitle_t | m_lastReturnedSubtitle |
bool | m_frameBasedTiming {false} |
QString | m_fileName |
QDateTime | m_lastLoaded |
off_t | m_byteCount {0} |
bool | m_isInProgress {false} |
bool | m_hasSubtitles {false} |
QRecursiveMutex | m_lock |
Definition at line 36 of file textsubtitleparser.h.
|
inline |
Definition at line 44 of file textsubtitleparser.h.
|
override |
Definition at line 152 of file textsubtitleparser.cpp.
|
signal |
Referenced by SetLastLoaded(), and SubtitleReader::SubtitleReader().
bool TextSubtitles::HasSubtitleChanged | ( | uint64_t | timecode | ) | const |
Returns true in case the subtitle to display has changed since the last GetSubtitles() call.
This is used to avoid redisplaying subtitles that are already displaying.
timecode | The timecode (frame number or time stamp) of the current video position. |
Definition at line 167 of file textsubtitleparser.cpp.
Referenced by SubtitleScreen::DisplayTextSubtitles().
QStringList TextSubtitles::GetSubtitles | ( | uint64_t | timecode | ) |
Returns the subtitles to display at the given timecode.
timecode | The timecode (frame number or time stamp) of the current video position. |
Definition at line 180 of file textsubtitleparser.cpp.
Referenced by SubtitleScreen::DisplayTextSubtitles().
|
inline |
Returns true in case the subtitle timing data is frame-based.
If the timing is frame-based, the client should use frame counts as timecodes for the HasSubtitleChanged() and GetSubtitles() methods, otherwise the timecode is milliseconds from the video start.
Definition at line 62 of file textsubtitleparser.h.
Referenced by SubtitleScreen::DisplayTextSubtitles(), GetSubtitles(), and TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 65 of file textsubtitleparser.h.
Referenced by TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 70 of file textsubtitleparser.h.
Referenced by TextSubtitleParser::LoadSubtitles().
void TextSubtitles::AddSubtitle | ( | const text_subtitle_t & | newSub | ) |
Definition at line 251 of file textsubtitleparser.cpp.
Referenced by TextSubtitleParser::LoadSubtitles().
void TextSubtitles::Clear | ( | void | ) |
Definition at line 257 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::LoadExternalSubtitles(), TextSubtitleParser::LoadSubtitles(), and SubtitleReader::~SubtitleReader().
void TextSubtitles::SetLastLoaded | ( | void | ) |
Definition at line 263 of file textsubtitleparser.cpp.
Referenced by TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 78 of file textsubtitleparser.h.
Referenced by TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 82 of file textsubtitleparser.h.
Referenced by TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 83 of file textsubtitleparser.h.
Referenced by SubtitleReader::LoadExternalSubtitles().
|
inline |
Definition at line 87 of file textsubtitleparser.h.
Referenced by TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 90 of file textsubtitleparser.h.
Referenced by SubtitleReader::HasTextSubtitles(), and TextSubtitleParser::LoadSubtitles().
|
inline |
Definition at line 93 of file textsubtitleparser.h.
Referenced by SubtitleScreen::DisplayTextSubtitles().
|
inline |
Definition at line 94 of file textsubtitleparser.h.
Referenced by SubtitleScreen::DisplayTextSubtitles().
|
private |
Definition at line 97 of file textsubtitleparser.h.
Referenced by AddSubtitle(), Clear(), GetSubtitleCount(), and GetSubtitles().
|
mutableprivate |
Definition at line 98 of file textsubtitleparser.h.
Referenced by GetSubtitles(), HasSubtitleChanged(), and TextSubtitles().
Definition at line 99 of file textsubtitleparser.h.
Referenced by IsFrameBasedTiming(), and SetFrameBasedTiming().
|
private |
Definition at line 100 of file textsubtitleparser.h.
Referenced by GetSubtitles(), and SetFilename().
|
private |
Definition at line 101 of file textsubtitleparser.h.
Referenced by GetSubtitles(), and SetLastLoaded().
|
private |
Definition at line 102 of file textsubtitleparser.h.
Referenced by GetByteCount(), and SetByteCount().
Definition at line 105 of file textsubtitleparser.h.
Referenced by GetSubtitles(), and SetInProgress().
Definition at line 109 of file textsubtitleparser.h.
Referenced by GetSubtitleCount(), and SetHasSubtitles().
|
private |
Definition at line 113 of file textsubtitleparser.h.
Referenced by AddSubtitle(), Clear(), Lock(), SetByteCount(), SetFilename(), SetFrameBasedTiming(), SetInProgress(), SetLastLoaded(), and Unlock().