use different signals when the audio invalidates vs the video

Both audio and video renderers were working off the same invalidation signal
(i.e. changing audio would also trigger a re-render of the video). This is
obviously suboptimal and now they are separate.
This commit is contained in:
itsmattkc
2019-11-17 13:44:50 +09:00
parent b1f4bf3dbb
commit 9d154e1909
8 changed files with 48 additions and 20 deletions
+10 -5
View File
@@ -44,12 +44,17 @@ void AudioRenderBackend::InvalidateCache(const rational &start_range, const rati
CacheNext();
}
void AudioRenderBackend::ViewerNodeChangedEvent(ViewerOutput *node)
void AudioRenderBackend::ConnectViewer(ViewerOutput *node)
{
if (node != nullptr) {
// FIXME: Hardcoded format
SetParameters(AudioRenderingParams(node->audio_params(), SAMPLE_FMT_FLT));
}
connect(node, SIGNAL(AudioChangedBetween(const rational&, const rational&)), this, SLOT(InvalidateCache(const rational&, const rational&)));
// FIXME: Hardcoded format
SetParameters(AudioRenderingParams(node->audio_params(), SAMPLE_FMT_FLT));
}
void AudioRenderBackend::DisconnectViewer(ViewerOutput *node)
{
disconnect(node, SIGNAL(AudioChangedBetween(const rational&, const rational&)), this, SLOT(InvalidateCache(const rational&, const rational&)));
}
bool AudioRenderBackend::GenerateCacheIDInternal(QCryptographicHash &hash)