viewer: use function pointer

Possibly slightly faster
This commit is contained in:
itsmattkc
2021-09-27 00:38:08 -07:00
parent 79e49d0b24
commit afe02c1033
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -122,6 +122,11 @@ list(APPEND OLIVE_LIBRARIES
FFMPEG::swresample
)
find_package(PortAudio REQUIRED)
list(APPEND OLIVE_LIBRARIES
portaudio
)
# Optional: Link OpenTimelineIO
find_package(OpenTimelineIO)
if (OpenTimelineIO_FOUND)
+3 -3
View File
@@ -246,7 +246,7 @@ void ViewerWidget::DisconnectNodeEvent(ViewerOutput *n)
waveform_view_->ConnectTimelinePoints(nullptr);
// Queue an UpdateStack so that when it runs, the viewer node will be fully disconnected
QMetaObject::invokeMethod(this, "UpdateStack", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, &ViewerWidget::UpdateStack, Qt::QueuedConnection);
}
void ViewerWidget::ConnectedNodeChangeEvent(ViewerOutput *n)
@@ -1394,7 +1394,7 @@ void ViewerWidget::ViewerInvalidatedVideoRange(const TimeRange &range)
{
// If our current frame is within this range, we need to update
if (GetTime() >= range.in() && (GetTime() < range.out() || range.in() == range.out())) {
QMetaObject::invokeMethod(this, "UpdateTextureFromNode", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, &ViewerWidget::UpdateTextureFromNode, Qt::QueuedConnection);
}
}
@@ -1410,7 +1410,7 @@ void ViewerWidget::ManualSwitchToWaveform(bool e)
void ViewerWidget::ViewerShiftedRange(const rational &from, const rational &to)
{
if (GetTime() >= qMin(from, to)) {
QMetaObject::invokeMethod(this, "UpdateTextureFromNode", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, &ViewerWidget::UpdateTextureFromNode, Qt::QueuedConnection);
}
}