MCPcopy Create free account
hub / github.com/QNapi/qnapi / encodeEntry

Method encodeEntry

libqnapi/src/subconvert/formats/tmplayer.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71QString TMPlayerSubtitleFormat::encodeEntry(const SubEntry &entry) const {
72 QString tokensBuff;
73 foreach (const SubToken &token, entry.tokens) {
74 tokensBuff += encodeToken(token);
75 }
76 long ss = entry.frameStart / 1000;
77 int h = ss / 3600;
78 int m = (ss - h * 3600) / 60;
79 int s = ss - h * 3600 - m * 60;
80 return QString("%1:%2:%3: %4")
81 .arg(h, 2, 10, QChar('0'))
82 .arg(m, 2, 10, QChar('0'))
83 .arg(s, 2, 10, QChar('0'))
84 .arg(tokensBuff);
85}
86
87QString TMPlayerSubtitleFormat::encodeToken(const SubToken &entry) const {
88 switch (entry.type) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected