viewer: improve visual appearance of scrubbing
This commit is contained in:
@@ -108,6 +108,18 @@ void PreviewAutoCacher::ClearSingleFrameRenders()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreviewAutoCacher::ClearSingleFrameRendersThatArentRunning()
|
||||||
|
{
|
||||||
|
QMap<RenderTicketWatcher*, QVector<RenderTicketPtr> > copy = video_immediate_passthroughs_;
|
||||||
|
for (auto it=copy.cbegin(); it!=copy.cend(); it++) {
|
||||||
|
if (!it.key()->IsRunning()) {
|
||||||
|
it.key()->Cancel();
|
||||||
|
RenderManager::instance()->RemoveTicket(it.key()->GetTicket());
|
||||||
|
emit it.key()->GetTicket()->Finished();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PreviewAutoCacher::VideoInvalidatedFromCache(ViewerOutput *context, const TimeRange &range)
|
void PreviewAutoCacher::VideoInvalidatedFromCache(ViewerOutput *context, const TimeRange &range)
|
||||||
{
|
{
|
||||||
PlaybackCache *cache = static_cast<PlaybackCache*>(sender());
|
PlaybackCache *cache = static_cast<PlaybackCache*>(sender());
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public:
|
|||||||
RenderTicketPtr GetRangeOfAudio(ViewerOutput *viewer, TimeRange range);
|
RenderTicketPtr GetRangeOfAudio(ViewerOutput *viewer, TimeRange range);
|
||||||
|
|
||||||
void ClearSingleFrameRenders();
|
void ClearSingleFrameRenders();
|
||||||
|
void ClearSingleFrameRendersThatArentRunning();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the viewer node to auto-cache
|
* @brief Set the viewer node to auto-cache
|
||||||
|
|||||||
@@ -900,7 +900,7 @@ void ViewerWidget::UpdateTextureFromNode()
|
|||||||
nonqueue_watchers_.append(watcher);
|
nonqueue_watchers_.append(watcher);
|
||||||
|
|
||||||
// Clear queue because we want this frame more than any others
|
// Clear queue because we want this frame more than any others
|
||||||
RenderManager::instance()->GetCacher()->ClearSingleFrameRenders();
|
RenderManager::instance()->GetCacher()->ClearSingleFrameRendersThatArentRunning();
|
||||||
|
|
||||||
DetectMulticamNode(time);
|
DetectMulticamNode(time);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user