| 69 | } |
| 70 | |
| 71 | QString 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 | |
| 87 | QString TMPlayerSubtitleFormat::encodeToken(const SubToken &entry) const { |
| 88 | switch (entry.type) { |
nothing calls this directly
no outgoing calls
no test coverage detected