Skip to content

VideoCacheThread: Add Directional Pre-roll#1032

Open
jonoomph wants to merge 2 commits intodevelopfrom
cache-before-playhead
Open

VideoCacheThread: Add Directional Pre-roll#1032
jonoomph wants to merge 2 commits intodevelopfrom
cache-before-playhead

Conversation

@jonoomph
Copy link
Member

@jonoomph jonoomph commented Feb 5, 2026

  • start cache rebuilds with a preroll offset (settings-based)
  • tighten isReady to require frames ahead/behind playhead add unit tests for preroll clamping and readiness

The primary idea is to cache "some" small amount of frames (30) prior to the playhead or seek position, to allow cached access to "before playhead" frames without busting cache. This seems to be a common issue on a video editor, where seeing to a spot, and then needing to go forwards and backwards quickly around this position without busting and clearing the entire cache.

- start cache rebuilds with a preroll offset (settings-based)
- tighten isReady to require frames ahead/behind playhead add unit tests for preroll clamping and readiness
@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 50.86207% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.60%. Comparing base (47b3081) to head (de012ac).

Files with missing lines Patch % Lines
src/FFmpegReader.cpp 24.48% 37 Missing ⚠️
src/Qt/VideoCacheThread.cpp 39.39% 20 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1032   +/-   ##
========================================
  Coverage    59.60%   59.60%           
========================================
  Files          206      206           
  Lines        20374    20472   +98     
========================================
+ Hits         12143    12202   +59     
- Misses        8231     8270   +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonoomph
Copy link
Member Author

jonoomph commented Feb 5, 2026

- add adaptive seek fallback and switch fprintf to ZmqLogger
- improves seeking on certain files by up to 30% (faster)
- avoids situations where seeking too far would sometimes freeze on certain videos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant