revised video renderer's invalidate cache to use ranges rather than discrete

frames

Previously, when the video renderer received a dirty cache signal, it would
proceed to extract all frames from the range and queue them. However, this could
be extremely slow for long ranges since it had to iterate through the entire
range and calculate the individual frames it contained. Now, we use the same
range combining system as audio and automatically calculate the next frame
within the range only when necessary. Essentially the same work, but split up
over time and done only when needed leading to no discernible UI pause when
invalidating cache.
This commit is contained in:
itsmattkc
2020-01-03 15:50:43 +11:00
parent db146b376a
commit 7f796bd99f
10 changed files with 118 additions and 128 deletions
+2
View File
@@ -55,6 +55,8 @@ public:
static int64_t timecode_to_timestamp(const QString& timecode, const rational& timebase, const Display& display, bool *ok = nullptr);
static rational snap_time_to_timebase(const rational& time, const rational& timebase);
static int64_t time_to_timestamp(const rational& time, const rational& timebase);
static int64_t time_to_timestamp(const double& time, const rational& timebase);