Question on release 1.12: How to enable MSDK on Windows?

Martin Maurer meinemailingliste2 at online.de
Fri May 5 06:06:05 UTC 2017


Hello,

first many thanks for the new release 1.12 of GStreamer.

In the release notes ( https://gstreamer.freedesktop.org/releases/1.12/ 
) there are the following entries:

In the highlights:

"new |msdk| plugin for Intel's Media SDK for hardware-accelerated video 
encoding and decoding on Intel graphics hardware on Windows or Linux."

In new elements:

"msdk: new plugin for Intel's Media SDK for hardware-accelerated video 
encoding and decoding on Intel graphics hardware on Windows or Linux. 
This includes an H.264 encoder/decoder (|msdkh264dec|, |msdkh264enc|), 
an H.265 encoder/decoder (|msdkh265dec|, |msdkh265enc|), an MJPEG 
encoder/encoder (|msdkmjpegdec|, |msdkmjpegenc|), an MPEG-2 video 
encoder (|msdkmpeg2enc|) and a VP8 encoder (|msdkvp8enc|)."

Can you describe how to enable it? It seems to be located in 
gst-plugins-bad. I have seen in configure.ac the following lines:

dnl check for intel mediasdk
translit(dnm, m, l) AM_CONDITIONAL(USE_MSDK, true)
AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [
   AC_ARG_WITH([msdk-prefix],
           AS_HELP_STRING([--with-msdk-prefix],
           [Use the provided prefix for detecting the Intel MediaSDK]),
           [AS_IF([test "x$with_msdk_prefix" != "x"],
                  [MSDK_PREFIX="$with_msdk_prefix"])],
           [AS_IF([test "x$MFX_HOME" != "x"],
                  [MSDK_PREFIX="$MFX_HOME"],
                  [MSDK_PREFIX="/opt/intel/media"])])
   MSDK_CFLAGS="-I$MSDK_PREFIX/include"
   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"
   AC_SUBST(MSDK_CFLAGS)
   AC_SUBST(MSDK_LIBS)

   save_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$MSDK_CFLAGS $save_CPPFLAGS"
   AC_CHECK_HEADER(mfxdefs.h, HAVE_MFXDEFS_H="yes", HAVE_MFXDEFS_H="no")
   CPPFLAGS="$save_CPPFLAGS"

   save_LIBS="$LIBS"
   LIBS="$MSDK_LIBS $LIBS"
   AC_LANG_PUSH([C++])
   AC_CHECK_LIB(mfx,MFXInit,HAVE_MFX_LIB="yes",HAVE_MFX_LIB="no")
   AC_LANG_POP([C++])
   LIBS="$save_LIBS"

   PKG_CHECK_MODULES(LIBVA_DRM, libva-drm, HAVE_LIBVA_DRM="yes", 
HAVE_LIBVA_DRM="no")

   if test "x$HAVE_MFXDEFS_H" = "xyes" \
       -a "x$HAVE_MFX_LIB" = "xyes" \
       -a "x$HAVE_LIBVA_DRM" = "xyes"; then
     HAVE_MSDK="yes"
   else
     HAVE_MSDK="no"
   fi
])
AM_CONDITIONAL(USE_MSDK_LIBVA,
     test "x$HAVE_MSDK" = "xyes" -a "x$HAVE_LIBVA_DRM" = "xyes")


So it seems I had to add --with-msdk-prefix and let it point to Intel 
Media SDK,

which must be downloaded from Intel. I assume the Windows Version?

Where is the correct place to add --with-msdk-prefix? In the recipe of 
the gst-plugins-bad?

There is the following line:

   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"

It looks like it is Linux dependant due to "lin" in "lin_x64". Are there 
always the Linux libraries used?

Shall/is "dl" available also on Windows?

It would be good to have a step-by-step instruction how to enable it. 
Can perhaps someone who has already built it shed light on how to do it?

Many, many thanks!

Best regards,

Martin




More information about the gstreamer-devel mailing list