renderer: share render backend for auto-cache tasks

Since auto-cache events start and stop fairly frequently (and are somewhat
heavy to create/destroy), we can save a lot of cycles over time by sharing
the same backend between them all.
This commit is contained in:
itsmattkc
2020-07-06 14:22:17 +10:00
parent 936d077077
commit a45f514f68
8 changed files with 128 additions and 58 deletions
+3
View File
@@ -31,6 +31,7 @@ class CacheTask : public RenderTask
{
Q_OBJECT
public:
CacheTask(RenderBackend* backend, bool in_out_only);
CacheTask(ViewerOutput* viewer,
const VideoParams &vparams,
const AudioParams &aparams,
@@ -46,6 +47,8 @@ protected:
virtual void AudioDownloaded(const TimeRange& range, SampleBufferPtr samples) override;
private:
void Init();
bool in_out_only_;
QThreadPool download_threads_;