d3d12: Enable plugin only for Windows8 or newer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
This commit is contained in:
Seungha Yang 2023-12-27 00:04:06 +09:00 committed by GStreamer Marge Bot
parent 3e49d6a75f
commit eeb57061d2

View file

@ -35,7 +35,8 @@
#include "gstd3d12h265dec.h" #include "gstd3d12h265dec.h"
#include "gstd3d12vp9dec.h" #include "gstd3d12vp9dec.h"
#include "gstd3d12av1dec.h" #include "gstd3d12av1dec.h"
#include <windows.h>
#include <versionhelpers.h>
#include <wrl.h> #include <wrl.h>
/* *INDENT-OFF* */ /* *INDENT-OFF* */
@ -54,6 +55,12 @@ static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_d3d12_debug, "d3d12", 0, "d3d12"); GST_DEBUG_CATEGORY_INIT (gst_d3d12_debug, "d3d12", 0, "d3d12");
if (!IsWindows8OrGreater ()) {
GST_WARNING ("Not supported OS");
return TRUE;
}
GST_DEBUG_CATEGORY_INIT (gst_d3d12_allocator_debug, "d3d12allocator", 0, GST_DEBUG_CATEGORY_INIT (gst_d3d12_allocator_debug, "d3d12allocator", 0,
"d3d12allocator"); "d3d12allocator");
GST_DEBUG_CATEGORY_INIT (gst_d3d12_decoder_debug, "d3d12decoder", 0, GST_DEBUG_CATEGORY_INIT (gst_d3d12_decoder_debug, "d3d12decoder", 0,