| 95 | } |
| 96 | |
| 97 | void VideoController::JumpToFrame(int n) { |
| 98 | if (!provider) return; |
| 99 | |
| 100 | bool was_playing = IsPlaying(); |
| 101 | if (was_playing) |
| 102 | Stop(); |
| 103 | |
| 104 | frame_n = mid(0, n, provider->GetFrameCount() - 1); |
| 105 | RequestFrame(); |
| 106 | Seek(frame_n); |
| 107 | |
| 108 | if (was_playing) |
| 109 | Play(); |
| 110 | } |
| 111 | |
| 112 | void VideoController::JumpToTime(int ms, agi::vfr::Time end) { |
| 113 | JumpToFrame(FrameAtTime(ms, end)); |
no test coverage detected