rendercache/decodercache: moved qmutex that was only used by decodercache into
decodercache's derived class
This commit is contained in:
@@ -5,6 +5,16 @@
|
||||
#include "project/item/footage/stream.h"
|
||||
#include "rendercache.h"
|
||||
|
||||
using DecoderCache = RenderCache<Stream*, DecoderPtr>;
|
||||
class DecoderCache : public RenderCache<Stream*, DecoderPtr>
|
||||
{
|
||||
public:
|
||||
DecoderCache() = default;
|
||||
|
||||
QMutex* lock() {return &lock_;}
|
||||
|
||||
private:
|
||||
QMutex lock_;
|
||||
|
||||
};
|
||||
|
||||
#endif // DECODERCACHE_H
|
||||
|
||||
@@ -18,17 +18,9 @@ public:
|
||||
|
||||
bool Has(K key) const {return values_.contains(key);}
|
||||
|
||||
void Lock() { lock_.lock(); }
|
||||
|
||||
void Unlock() { lock_.unlock(); }
|
||||
|
||||
QMutex* lock() { return &lock_; }
|
||||
|
||||
private:
|
||||
QHash<K, V> values_;
|
||||
|
||||
QMutex lock_;
|
||||
|
||||
};
|
||||
|
||||
#endif // RENDERCACHE_H
|
||||
|
||||
Reference in New Issue
Block a user