From afe6967c467e5426cd3373f939f48443fc74bc2c Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 30 Nov 2025 18:13:27 +0100 Subject: [PATCH] GstEnginePipeline: Handle "missing-plugin" messages --- src/engine/gstenginepipeline.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/gstenginepipeline.cpp b/src/engine/gstenginepipeline.cpp index 1999d1035..9e226353b 100644 --- a/src/engine/gstenginepipeline.cpp +++ b/src/engine/gstenginepipeline.cpp @@ -1525,7 +1525,15 @@ void GstEnginePipeline::ElementMessageReceived(GstMessage *msg) { const GstStructure *structure = gst_message_get_structure(msg); - if (gst_structure_has_name(structure, "redirect")) { + if (gst_structure_has_name(structure, "missing-plugin")) { + gchar *description = gst_missing_plugin_message_get_description(msg); + gchar *detail = gst_missing_plugin_message_get_installer_detail(msg); + const QString message = QLatin1String("Missing GStreamer plugin for %1 (%2)").arg(QString::fromLocal8Bit(description)).arg(QString::fromLocal8Bit(detail)); + g_free(description); + g_free(detail); + Q_EMIT Error(id(), static_cast(GST_LIBRARY_ERROR), GST_CORE_ERROR_MISSING_PLUGIN, message, QString()); + } + else if (gst_structure_has_name(structure, "redirect")) { const char *uri = gst_structure_get_string(structure, "new-location"); // Set the redirect URL. In mmssrc redirect messages come during the initial state change to PLAYING, so callers can pick up this URL after the state change has failed.