playbackcache: more intelligent job matching

Ensures audio ranges can be anticipated and accurately ignored if they're
old or acknowledged if they're current.
This commit is contained in:
itsmattkc
2020-06-05 15:23:16 +10:00
parent b143b39869
commit 7609754103
5 changed files with 141 additions and 103 deletions
+7 -11
View File
@@ -84,10 +84,6 @@ protected:
void NoLockValidate(const TimeRange& r);
void NoLockSetLength(const rational& r);
bool JobIsCurrent(const TimeRange& r, qint64 job_time);
const rational& NoLockGetLength() const
{
return length_;
@@ -109,13 +105,6 @@ protected:
return &lock_;
}
private:
void RemoveRangeFromJobs(const TimeRange& remove);
QMutex lock_;
TimeRangeList invalidated_;
struct JobIdentifier {
TimeRange range;
qint64 job_time;
@@ -123,6 +112,13 @@ private:
QList<JobIdentifier> jobs_;
private:
void RemoveRangeFromJobs(const TimeRange& remove);
QMutex lock_;
TimeRangeList invalidated_;
rational length_;
};