From e1c0628bb9dff6f120afeb6febc21072226cd708 Mon Sep 17 00:00:00 2001 From: Loic Le Page Date: Wed, 26 Jan 2022 21:06:45 +0100 Subject: [PATCH] Add build files and fix build for gst-plugins-bad dshowsinkwrapper plugin dshowsinkwrapper plugin is the old dshowvideosink plugin that has been renamed to be compliant with the actuel plugin name in the source code. Part-of: --- .../dshowvideofakesrc.cpp | 0 .../dshowvideofakesrc.h | 0 .../dshowvideosink.cpp | 4 ++ .../dshowvideosink.h | 0 .../directshow/dshowsinkwrapper/meson.build | 38 +++++++++++++++++++ .../sys/directshow/dshowvideosink/README | 5 --- .../sys/directshow/meson.build | 2 +- 7 files changed, 43 insertions(+), 6 deletions(-) rename subprojects/gst-plugins-bad/sys/directshow/{dshowvideosink => dshowsinkwrapper}/dshowvideofakesrc.cpp (100%) rename subprojects/gst-plugins-bad/sys/directshow/{dshowvideosink => dshowsinkwrapper}/dshowvideofakesrc.h (100%) rename subprojects/gst-plugins-bad/sys/directshow/{dshowvideosink => dshowsinkwrapper}/dshowvideosink.cpp (99%) rename subprojects/gst-plugins-bad/sys/directshow/{dshowvideosink => dshowsinkwrapper}/dshowvideosink.h (100%) create mode 100644 subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build delete mode 100644 subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/README diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.cpp b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.cpp similarity index 100% rename from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.cpp rename to subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.cpp diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.h b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.h similarity index 100% rename from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.h rename to subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.h diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.cpp b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.cpp similarity index 99% rename from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.cpp rename to subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.cpp index f6e2d000e4..55664c1fb6 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.cpp +++ b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.cpp @@ -973,6 +973,8 @@ gst_dshowvideosink_change_state (GstElement * element, GstStateChange transition return ret; sink->graph_running = TRUE; break; + default: + break; } ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); @@ -997,6 +999,8 @@ gst_dshowvideosink_change_state (GstElement * element, GstStateChange transition case GST_STATE_CHANGE_READY_TO_NULL: gst_dshowvideosink_clear (sink); break; + default: + break; } return ret; diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.h b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.h similarity index 100% rename from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.h rename to subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.h diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build new file mode 100644 index 0000000000..37e14a67b4 --- /dev/null +++ b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build @@ -0,0 +1,38 @@ +dshowsinkwrapper_sources = [ + 'dshowvideofakesrc.cpp', + 'dshowvideosink.cpp' +] + +if not strmbase_dep.found() + message('strmbase not found, not building dshowsinkwrapper') + subdir_done() +endif + +winmm_dep = cxx.find_library('winmm', required: get_option('directshow')) +if not winmm_dep.found() + message('winmm not found, not building dshowsinkwrapper') + subdir_done() +endif + +mfuuid_dep = cxx.find_library('mfuuid', required: get_option('directshow')) +if not mfuuid_dep.found() + message('mfuuid not found, not building dshowsinkwrapper') + subdir_done() +endif + +gstdshowsinkwrapper = library('gstdshowsinkwrapper', + dshowsinkwrapper_sources, + cpp_args : gst_plugins_bad_args, + include_directories : [configinc], + dependencies : [ + gstvideo_dep, + strmbase_dep, + winmm_dep, + mfuuid_dep + ], + install : true, + install_dir : plugins_install_dir, + override_options : ['cpp_std=none']) + +pkgconfig.generate(gstdshowsinkwrapper, install_dir : plugins_pkgconfig_install_dir) +plugins += [gstdshowsinkwrapper] diff --git a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/README b/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/README deleted file mode 100644 index af296dc9af..0000000000 --- a/subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/README +++ /dev/null @@ -1,5 +0,0 @@ -To build this, you'll require the DirectShow base classes. These are supplied -in the Windows SDK, but under Samples\Multimedia\DirectShow\BaseClasses - -Once you've built that, you should be able to figure out the rest... - diff --git a/subprojects/gst-plugins-bad/sys/directshow/meson.build b/subprojects/gst-plugins-bad/sys/directshow/meson.build index b06f112c68..c043544b57 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/meson.build +++ b/subprojects/gst-plugins-bad/sys/directshow/meson.build @@ -23,4 +23,4 @@ endif subdir('strmbase') subdir('dshowdecwrapper') subdir('dshowsrcwrapper') -#subdir('dshowvideosink') +subdir('dshowsinkwrapper')