From 587b2e6bcb3aa1f8040b98035a6d9f56df768976 Mon Sep 17 00:00:00 2001 From: Loic Le Page Date: Wed, 26 Jan 2022 20:58:12 +0100 Subject: [PATCH] Add build files and fix build for gst-plugins-bad dshowdecwrapper plugin Part-of: --- .../sys/directshow/dshowdecwrapper/CMakeLists.txt | 58 ---------------------- .../dshowdecwrapper/gstdshowvideodec.cpp | 1 - .../sys/directshow/dshowdecwrapper/meson.build | 49 ++++++++++++++++++ .../gst-plugins-bad/sys/directshow/meson.build | 2 +- 4 files changed, 50 insertions(+), 60 deletions(-) delete mode 100644 subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/CMakeLists.txt create mode 100644 subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/meson.build diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/CMakeLists.txt b/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/CMakeLists.txt deleted file mode 100644 index 8e642e4..0000000 --- a/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ - -CMAKE_MINIMUM_REQUIRED (VERSION 2.8) - -PROJECT(dshowsdecwrapper) - -SET(GST_INSTALL_BASE "C:\\gstreamer\\1.0\\x86" CACHE PATH "Path to the GStreamer install base") -SET(SDK_INSTALL_BASE "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0" CACHE PATH "Path to the Windows SDK root") - -SET_PROPERTY( - DIRECTORY - APPEND PROPERTY COMPILE_DEFINITIONS - HAVE_CONFIG_H -) - -INCLUDE_DIRECTORIES( - ${GST_INSTALL_BASE}/include - ${GST_INSTALL_BASE}/include/gstreamer-1.0 - ${GST_INSTALL_BASE}/include/glib-2.0 - ${GST_INSTALL_BASE}/lib/glib-2.0/include - ${SDK_INSTALL_BASE}/Samples/multimedia/directshow/baseclasses - ${PROJECT_SOURCE_DIR}/../../win32/common -) - -LINK_DIRECTORIES( - ${GST_INSTALL_BASE}/lib - ${SDK_INSTALL_BASE}/Samples/multimedia/directshow/baseclasses/Release_MBCS - ${SDK_INSTALL_BASE}/Samples/multimedia/directshow/baseclasses/Debug_MBCS -) - -ADD_LIBRARY(libgstdshowdecwrapper SHARED - gstdshowaudiodec.cpp - gstdshowaudiodec.h - gstdshowvideodec.cpp - gstdshowvideodec.h - gstdshowdecwrapper.cpp - gstdshowdecwrapper.h - gstdshowfakesrc.cpp - gstdshowfakesrc.h - gstdshowutil.cpp - gstdshowutil.h -) - -TARGET_LINK_LIBRARIES(libgstdshowdecwrapper - gstreamer-1.0 - gstaudio-1.0 - gstvideo-1.0 - gstbase-1.0 - glib-2.0 - gobject-2.0 - debug strmbasd - optimized strmbase - rpcrt4 - uuid - winmm - dmoguids - wmcodecdspuuid - msdmo -) diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/gstdshowvideodec.cpp b/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/gstdshowvideodec.cpp index 2f4b400..ea5a213 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/gstdshowvideodec.cpp +++ b/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/gstdshowvideodec.cpp @@ -607,7 +607,6 @@ gst_dshowvideodec_sink_setcaps (GstPad * pad, GstCaps * caps) GstBufferPool *pool = NULL; GstStructure *pool_config = NULL; guint pool_size, pool_min, pool_max; - GstVideoInfo video_info; /* read data */ if (!gst_structure_get_int (s, "width", &vdec->width) || diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/meson.build b/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/meson.build new file mode 100644 index 0000000..af71a98 --- /dev/null +++ b/subprojects/gst-plugins-bad/sys/directshow/dshowdecwrapper/meson.build @@ -0,0 +1,49 @@ +dshowdecwrapper_sources = [ + 'gstdshowaudiodec.cpp', + 'gstdshowdecwrapper.cpp', + 'gstdshowfakesrc.cpp', + 'gstdshowutil.cpp', + 'gstdshowvideodec.cpp' +] + +if not strmbase_dep.found() + message('strmbase not found, not building dshowdecwrapper') + subdir_done() +endif + +winmm_dep = cxx.find_library('winmm', required: get_option('directshow')) +if not winmm_dep.found() + message('winmm not found, not building dshowdecwrapper') + subdir_done() +endif + +dmoguids_dep = cxx.find_library('dmoguids', required: get_option('directshow')) +if not dmoguids_dep.found() + message('dmoguids not found, not building dshowdecwrapper') + subdir_done() +endif + +wmcodecdspuuid_dep = cxx.find_library('wmcodecdspuuid', required: get_option('directshow')) +if not wmcodecdspuuid_dep.found() + message('wmcodecdspuuid not found, not building dshowdecwrapper') + subdir_done() +endif + +gstdshowdecwrapper = library('gstdshowdecwrapper', + dshowdecwrapper_sources, + cpp_args : gst_plugins_bad_args, + include_directories : [configinc], + dependencies : [ + gstaudio_dep, + gstvideo_dep, + strmbase_dep, + winmm_dep, + dmoguids_dep, + wmcodecdspuuid_dep + ], + install : true, + install_dir : plugins_install_dir, + override_options : ['cpp_std=none']) + +pkgconfig.generate(gstdshowdecwrapper, install_dir : plugins_pkgconfig_install_dir) +plugins += [gstdshowdecwrapper] diff --git a/subprojects/gst-plugins-bad/sys/directshow/meson.build b/subprojects/gst-plugins-bad/sys/directshow/meson.build index 1af20f5..b84d249 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/meson.build +++ b/subprojects/gst-plugins-bad/sys/directshow/meson.build @@ -21,6 +21,6 @@ if cxx.get_id() != 'msvc' or get_option('directshow').disabled() endif subdir('strmbase') -#subdir('dshowdecwrapper') +subdir('dshowdecwrapper') #subdir('dshowsrcwrapper') #subdir('dshowvideosink') -- 2.7.4