@@ -19,7 +19,6 @@
*/
#include <mfxvideo.h>
-#include <mfxplugin.h>
#include <mfxjpeg.h>
#include <stdio.h>
@@ -37,11 +36,16 @@
#include "qsv_internal.h"
#define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl))
+#define QSV_HAVE_USER_PLUGIN !QSV_ONEVPL
#if QSV_VERSION_ATLEAST(1, 12)
#include "mfxvp8.h"
#endif
+#if QSV_HAVE_USER_PLUGIN
+#include <mfxplugin.h>
+#endif
+
int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
{
switch (codec_id) {
@@ -291,6 +295,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_HAVE_USER_PLUGIN
if (!load_plugins || !*load_plugins)
return 0;
@@ -334,6 +339,7 @@ load_plugin_fail:
if (err < 0)
return err;
}
+#endif
return 0;
@@ -60,6 +60,8 @@
((MFX_VERSION.Major > (MAJOR)) || \
(MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
+#define QSV_ONEVPL QSV_VERSION_ATLEAST(2, 0)
+
typedef struct QSVMid {
AVBufferRef *hw_frames_ref;
mfxHDLPair *handle_pair;