msdk: don't load user plugins for MFX version 2.0+
authorHaihao Xiang <haihao.xiang@intel.com>
Tue, 4 Aug 2020 04:53:35 +0000 (12:53 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Mon, 17 May 2021 01:58:24 +0000 (01:58 +0000)
MFX version 2.0+ no longer supports user plugins, please refer to the
links for details

https://spec.oneapi.com/versions/latest/elements/oneVPL/source/appendix/VPL_intel_media_sdk.html#msdk-full-name-feature-removals
https://github.com/oneapi-src/oneVPL

This is in preparation for oneVPL support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1503>

sys/msdk/msdk.c
sys/msdk/msdk.h

index df7fd75..d085991 100644 (file)
@@ -492,6 +492,7 @@ gboolean
 gst_msdk_load_plugin (mfxSession session, const mfxPluginUID * uid,
     mfxU32 version, const gchar * plugin)
 {
+#if (MFX_VERSION < 2000)
   mfxStatus status;
 
   status = MFXVideoUSER_Load (session, uid, version);
@@ -506,6 +507,7 @@ gst_msdk_load_plugin (mfxSession session, const mfxPluginUID * uid,
     GST_WARNING ("Media SDK Plugin for %s load warning: %s", plugin,
         msdk_status_to_string (status));
   }
+#endif
 
   return TRUE;
 }
index 87867f6..8f11d80 100644 (file)
 #include <gst/allocators/allocators.h>
 
 #include <mfxvideo.h>
+
+#if (MFX_VERSION < 2000)
 #include <mfxplugin.h>
+#else
+#define mfxPluginUID char
+static const char MFX_PLUGINID_HEVCD_SW;
+static const char MFX_PLUGINID_HEVCD_HW;
+static const char MFX_PLUGINID_HEVCE_SW;
+static const char MFX_PLUGINID_HEVCE_HW;
+static const char MFX_PLUGINID_VP8D_HW;
+static const char MFX_PLUGINID_VP9E_HW;
+static const char MFX_PLUGINID_VP9D_HW;
+#endif
 
 G_BEGIN_DECLS