timeruler: reworked and improved cache status

This commit is contained in:
itsmattkc
2020-05-15 16:15:24 +10:00
parent a40eaa1ed5
commit 7c2280944b
9 changed files with 54 additions and 45 deletions
+2 -2
View File
@@ -45,10 +45,10 @@ void PlaybackCache::SetLength(const rational &r)
if (r > length_) {
// If new length is greater, simply extend the invalidated range for now
invalidated_.InsertTimeRange(TimeRange(r, length_));
invalidated_.InsertTimeRange(TimeRange(length_, r));
} else {
// If new length is smaller, removed hashes
invalidated_.RemoveTimeRange(TimeRange(length_, r));
invalidated_.RemoveTimeRange(TimeRange(r, length_));
}
LengthChangedEvent(length_, r);
+5
View File
@@ -35,6 +35,11 @@ public:
void Invalidate(const TimeRange& r);
const rational& GetLength() const
{
return length_;
}
void SetLength(const rational& r);
bool IsFullyValidated() const;