ui: draw clip cache on timeline
This commit is contained in:
@@ -292,6 +292,8 @@ void ClipBlock::InputConnectedEvent(const QString &input, int element, Node *out
|
||||
if (input == kBufferIn) {
|
||||
connect(output->thumbnail_cache(), &FrameHashCache::Validated, this, &Block::PreviewChanged);
|
||||
connect(output->waveform_cache(), &AudioPlaybackCache::Validated, this, &Block::PreviewChanged);
|
||||
connect(output->video_frame_cache(), &FrameHashCache::Validated, this, &Block::PreviewChanged);
|
||||
connect(output->audio_playback_cache(), &AudioPlaybackCache::Validated, this, &Block::PreviewChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,6 +304,8 @@ void ClipBlock::InputDisconnectedEvent(const QString &input, int element, Node *
|
||||
if (input == kBufferIn) {
|
||||
disconnect(output->thumbnail_cache(), &FrameHashCache::Validated, this, &Block::PreviewChanged);
|
||||
disconnect(output->waveform_cache(), &AudioPlaybackCache::Validated, this, &Block::PreviewChanged);
|
||||
disconnect(output->video_frame_cache(), &FrameHashCache::Validated, this, &Block::PreviewChanged);
|
||||
disconnect(output->audio_playback_cache(), &AudioPlaybackCache::Validated, this, &Block::PreviewChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,15 @@ public:
|
||||
return block_links_;
|
||||
}
|
||||
|
||||
const FrameHashCache *connected_video_cache() const
|
||||
{
|
||||
if (Node *n = GetConnectedOutput(kBufferIn)) {
|
||||
return n->video_frame_cache();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const FrameHashCache *thumbnails()
|
||||
{
|
||||
if (Node *n = GetConnectedOutput(kBufferIn)) {
|
||||
|
||||
Reference in New Issue
Block a user