MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / NotifyPlaybackPosition

Method NotifyPlaybackPosition

src/Qt/VideoCacheThread.cpp:288–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

getFrameMethod · 0.80

Calls 2

GetCacheMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected