diff options
author | Scott D Phillips <scott.d.phillips@intel.com> | 2016-09-09 15:43:25 -0700 |
---|---|---|
committer | Josep Torra <n770galaxy@gmail.com> | 2016-11-14 15:17:01 +0100 |
commit | 22551a42cc0bf31485b2b19abfe2ebadcffbfaf9 (patch) | |
tree | 22a2c3606719a26232c166cae65ae85d8f306374 | |
parent | 7d68d40239aa4162ff58fa63dad4baef8edc97c5 (diff) | |
download | gstreamer-plugins-bad-22551a42cc0bf31485b2b19abfe2ebadcffbfaf9.tar.gz |
msdk: add to build
https://bugzilla.gnome.org/show_bug.cgi?id=770990
-rw-r--r-- | configure.ac | 42 | ||||
-rw-r--r-- | sys/Makefile.am | 10 | ||||
-rw-r--r-- | sys/msdk/Makefile.am | 44 |
3 files changed, 94 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 7cdb1e28f..5657afa92 100644 --- a/configure.ac +++ b/configure.ac @@ -2014,6 +2014,47 @@ AG_GST_CHECK_FEATURE(TINYALSA, [tinyalsa], tinyalsa, [ AC_CHECK_HEADER(tinyalsa/asoundlib.h, HAVE_TINYALSA="yes", HAVE_TINYALSA="no") ]) +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") + dnl *** ext plug-ins *** dnl keep this list sorted alphabetically ! @@ -3739,6 +3780,7 @@ sys/dvb/Makefile sys/fbdev/Makefile sys/kms/Makefile sys/linsys/Makefile +sys/msdk/Makefile sys/nvenc/Makefile sys/opensles/Makefile sys/shm/Makefile diff --git a/sys/Makefile.am b/sys/Makefile.am index 53653166b..4e6e58125 100644 --- a/sys/Makefile.am +++ b/sys/Makefile.am @@ -154,10 +154,16 @@ else TINYALSA_DIR= endif -SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(KMS_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(NVENC_DIR) $(TINYALSA_DIR) +if USE_MSDK +MSDK_DIR=msdk +else +MSDK_DIR= +endif + +SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(KMS_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(NVENC_DIR) $(TINYALSA_DIR) $(MSDK_DIR) DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia avc bluez d3dvideosink decklink directsound dvb linsys fbdev kms dshowdecwrapper dshowsrcwrapper dshowvideosink \ opensles pvr2d shm uvch264 vcd vdpau wasapi wininet winks winscreencap \ - nvenc tinyalsa + nvenc tinyalsa msdk include $(top_srcdir)/common/parallel-subdirs.mak diff --git a/sys/msdk/Makefile.am b/sys/msdk/Makefile.am new file mode 100644 index 000000000..2432ecec8 --- /dev/null +++ b/sys/msdk/Makefile.am @@ -0,0 +1,44 @@ +plugin_LTLIBRARIES = libgstmsdk.la + +libgstmsdk_la_SOURCES = \ + gstmsdkh264enc.c \ + gstmsdkh265enc.c \ + gstmsdkmpeg2enc.c \ + gstmsdkvp8enc.c \ + gstmsdkenc.c \ + gstmsdk.c + +# Causes linking libgstmsdk.la with CXXLINK, required by libmfx +nodist_EXTRA_libgstmsdk_la_SOURCES = not_present.cxx + +noinst_HEADERS = \ + msdk.h \ + gstmsdkh264enc.h \ + gstmsdkh265enc.h \ + gstmsdkmpeg2enc.h \ + gstmsdkvp8enc.h \ + gstmsdkenc.h + +libgstmsdk_la_CFLAGS = \ + $(GST_CFLAGS) \ + $(GST_PBUTILS_CFLAGS) \ + $(GST_VIDEO_CFLAGS) \ + $(MSDK_CFLAGS) + +libgstmsdk_la_LIBADD = \ + $(GST_LIBS) \ + $(GST_PBUTILS_LIBS) \ + $(GST_VIDEO_LIBS) \ + $(MSDK_LIBS) + +if USE_MSDK_LIBVA +libgstmsdk_la_SOURCES += \ + msdk_libva.c +libgstmsdk_la_CFLAGS += \ + $(LIBVA_DRM_CFLAGS) +libgstmsdk_la_LIBADD += \ + $(LIBVA_DRM_LIBS) +endif + +libgstmsdk_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstmsdk_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) |