From 9b84d6398a24faf188d6dbe7d98070c7c04732df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 28 Jan 2023 02:15:24 +0000 Subject: [PATCH] qsv: use new plugin status message API Minimal example. Part-of: --- subprojects/gst-plugins-bad/sys/qsv/plugin.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/qsv/plugin.cpp b/subprojects/gst-plugins-bad/sys/qsv/plugin.cpp index 15887f888f..a6fdddd40d 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/plugin.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/plugin.cpp @@ -61,6 +61,8 @@ #include #endif +#include + GST_DEBUG_CATEGORY (gst_qsv_debug); GST_DEBUG_CATEGORY (gst_qsv_allocator_debug); @@ -214,8 +216,11 @@ plugin_init (GstPlugin * plugin) #ifdef G_OS_WIN32 /* D3D11 Video API is supported since Windows 8. * Do we want to support old OS (Windows 7 for example) with D3D9 ?? */ - if (!IsWindows8OrGreater ()) + if (!IsWindows8OrGreater ()) { + gst_plugin_add_status_warning (plugin, + N_("This plugin requires at least Windows 8 or newer.")); return TRUE; + } enc_rank = GST_RANK_PRIMARY; #endif @@ -225,11 +230,15 @@ plugin_init (GstPlugin * plugin) "qsvallocator", 0, "qsvallocator"); loader = gst_qsv_get_loader (); - if (!loader) + if (!loader) { + // FIXME: any status/error/warning message we should show here? return TRUE; + } platform_devices = gst_qsv_get_platform_devices (); if (!platform_devices) { + gst_plugin_add_status_warning (plugin, + N_("No Intel graphics cards detected!")); gst_qsv_deinit (); return TRUE; }