diff mbox series

[FFmpeg-devel,2/6] qsv: libmfx no longer supports user plugin since version 2.0 (oneVPL)

Message ID 20200916064457.181230-3-haihao.xiang@intel.com
State New
Headers show
Series qsv: Fix compiler errors when using libmfx 2.0 (oneVPL) | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Xiang, Haihao Sept. 16, 2020, 6:44 a.m. UTC
See
https://spec.oneapi.com/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals
https://github.com/oneapi-src/oneVPL
---
 libavcodec/qsv.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 55184e075a..472e0952b3 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -19,7 +19,6 @@ 
  */
 
 #include <mfxvideo.h>
-#include <mfxplugin.h>
 #include <mfxjpeg.h>
 
 #include <stdio.h>
@@ -40,6 +39,10 @@ 
 #include "mfxvp8.h"
 #endif
 
+#if !QSV_VERSION_ATLEAST(2, 0)
+#include <mfxplugin.h>
+#endif
+
 int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
 {
     switch (codec_id) {
@@ -295,6 +298,7 @@  enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
 static int qsv_load_plugins(mfxSession session, const char *load_plugins,
                             void *logctx)
 {
+#if !QSV_VERSION_ATLEAST(2, 0)
     if (!load_plugins || !*load_plugins)
         return 0;
 
@@ -338,6 +342,7 @@  load_plugin_fail:
         if (err < 0)
             return err;
     }
+#endif
 
     return 0;