| 92 | } |
| 93 | |
| 94 | void VideoCacheThread::setSpeed(int new_speed) |
| 95 | { |
| 96 | // Only update last_speed and last_dir when new_speed != 0 |
| 97 | if (new_speed != 0) { |
| 98 | last_speed.store(new_speed); |
| 99 | last_dir.store(new_speed > 0 ? 1 : -1); |
| 100 | // Leaving paused/scrub context: resume normal cache behavior. |
| 101 | scrub_active.store(false); |
| 102 | } |
| 103 | speed.store(new_speed); |
| 104 | } |
| 105 | |
| 106 | // Get the size in bytes of a frame (rough estimate) |
| 107 | int64_t VideoCacheThread::getBytes(int width, |
no outgoing calls
no test coverage detected