From afe02c1033fe3e4fb94afa3e710e1584553a3b1f Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Mon, 27 Sep 2021 00:38:08 -0700 Subject: [PATCH] viewer: use function pointer Possibly slightly faster --- CMakeLists.txt | 5 +++++ app/widget/viewer/viewer.cpp | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b73ca1160..3b4540f48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/app/widget/viewer/viewer.cpp b/app/widget/viewer/viewer.cpp index 7f4f590fe..a114099c8 100644 --- a/app/widget/viewer/viewer.cpp +++ b/app/widget/viewer/viewer.cpp @@ -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); } }