diff --git a/src/core/metatypes.cpp b/src/core/metatypes.cpp index 8b9c4f5a9..d071929d1 100644 --- a/src/core/metatypes.cpp +++ b/src/core/metatypes.cpp @@ -110,6 +110,7 @@ void RegisterMetaTypes() { #ifdef HAVE_GSTREAMER qRegisterMetaType("GstBuffer*"); qRegisterMetaType("GstElement*"); + qRegisterMetaType("GstState"); qRegisterMetaType("GstEnginePipeline*"); #endif qRegisterMetaType("CollectionDirectory"); diff --git a/src/engine/gstenginepipeline.cpp b/src/engine/gstenginepipeline.cpp index 2e36734df..94e81e731 100644 --- a/src/engine/gstenginepipeline.cpp +++ b/src/engine/gstenginepipeline.cpp @@ -1552,7 +1552,9 @@ QFuture GstEnginePipeline::SetState(const GstState state) void GstEnginePipeline::SetStateDelayed(const GstState state) { - QTimer::singleShot(300, this, [this, state]() { SetState(state); }); + QMetaObject::invokeMethod(this, [this, state]() { + QTimer::singleShot(300, this, [this, state]() { SetState(state); }); + }, Qt::QueuedConnection); } @@ -1591,7 +1593,9 @@ void GstEnginePipeline::SeekQueued(const qint64 nanosec) { void GstEnginePipeline::SeekDelayed(const qint64 nanosec) { - QTimer::singleShot(100, this, [this, nanosec]() { SeekQueued(nanosec); }); + QMetaObject::invokeMethod(this, [this, nanosec]() { + QTimer::singleShot(100, this, [this, nanosec]() { Seek(nanosec); }); + }, Qt::QueuedConnection); }