| 45 | } |
| 46 | |
| 47 | std::vector<int> indexed_keyframes(std::istream &file, int (*func)(std::string const&)) { |
| 48 | std::vector<int> ret; |
| 49 | for (auto line : agi::line_iterator<std::string>(file)) { |
| 50 | int frame_no = func(line); |
| 51 | if (frame_no >= 0) |
| 52 | ret.push_back(frame_no); |
| 53 | } |
| 54 | return ret; |
| 55 | } |
| 56 | |
| 57 | char xvid(std::string const& line) { |
| 58 | return line.empty() ? 0 : line[0]; |