| 75 | } |
| 76 | |
| 77 | bool would_exceed_text_limit( |
| 78 | const std::vector<runtime::WordTimestamp> & words, |
| 79 | size_t begin, |
| 80 | size_t candidate_end, |
| 81 | const SubtitleFormatOptions & options) { |
| 82 | const auto lines = wrap_words(words, begin, candidate_end, options.max_chars_per_line); |
| 83 | return static_cast<int>(lines.size()) > options.max_lines; |
| 84 | } |
| 85 | |
| 86 | std::string format_time(int64_t sample, int sample_rate) { |
| 87 | const int64_t ms = (sample * 1000 + sample_rate / 2) / sample_rate; |
no test coverage detected