| 286 | } |
| 287 | |
| 288 | void VideoCacheThread::NotifyPlaybackPosition(int64_t new_position) |
| 289 | { |
| 290 | if (new_position <= 0) { |
| 291 | return; |
| 292 | } |
| 293 | if (scrub_active.load()) { |
| 294 | return; |
| 295 | } |
| 296 | |
| 297 | int64_t new_cached_count = cached_frame_count.load(); |
| 298 | if (CacheBase* cache = reader ? reader->GetCache() : nullptr) { |
| 299 | new_cached_count = cache->Count(); |
| 300 | } |
| 301 | { |
| 302 | std::lock_guard<std::mutex> guard(seek_state_mutex); |
| 303 | requested_display_frame.store(new_position); |
| 304 | cached_frame_count.store(new_cached_count); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | int VideoCacheThread::computeDirection() const |
| 309 | { |
no test coverage detected