Add build files and fix build for gst-plugins-bad dshowsinkwrapper plugin
authorLoic Le Page <llepage@fluendo.com>
Wed, 26 Jan 2022 20:06:45 +0000 (21:06 +0100)
committerLoïc Le Page <llepage@fluendo.com>
Fri, 18 Feb 2022 13:59:25 +0000 (14:59 +0100)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>

subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.cpp [moved from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.cpp with 100% similarity]
subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideofakesrc.h [moved from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideofakesrc.h with 100% similarity]
subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.cpp [moved from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.cpp with 99% similarity]
subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/dshowvideosink.h [moved from subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/dshowvideosink.h with 100% similarity]
subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/directshow/dshowvideosink/README [deleted file]
subprojects/gst-plugins-bad/sys/directshow/meson.build

@@ -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/dshowsinkwrapper/meson.build b/subprojects/gst-plugins-bad/sys/directshow/dshowsinkwrapper/meson.build
new file mode 100644 (file)
index 0000000..37e14a6
--- /dev/null
@@ -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 (file)
index af296dc..0000000
+++ /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...
-
index b06f112..c043544 100644 (file)
@@ -23,4 +23,4 @@ endif
 subdir('strmbase')
 subdir('dshowdecwrapper')
 subdir('dshowsrcwrapper')
-#subdir('dshowvideosink')
+subdir('dshowsinkwrapper')