mediafoundation: Skip doc for non-default encoder elements
authorSeungha Yang <seungha@centricular.com>
Wed, 17 Nov 2021 13:46:17 +0000 (22:46 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 19 Nov 2021 13:38:19 +0000 (13:38 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360>

subprojects/gst-plugins-bad/sys/mediafoundation/gstmfh264enc.cpp
subprojects/gst-plugins-bad/sys/mediafoundation/gstmfh265enc.cpp
subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoenc.cpp
subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvp9enc.cpp
subprojects/gst-plugins-bad/sys/mediafoundation/plugin.c

index 522e590..6ab7198 100644 (file)
@@ -469,12 +469,26 @@ gst_mf_h264_enc_class_init (GstMFH264EncClass * klass, gpointer data)
                 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   }
 
+  /**
+   * GstMFH264Enc:d3d11-aware:
+   *
+   * Whether element supports Direct3D11 texture as an input or not
+   *
+   * Since: 1.20
+   */
   g_object_class_install_property (gobject_class, PROP_D3D11_AWARE,
       g_param_spec_boolean ("d3d11-aware", "D3D11 Aware",
           "Whether device can support Direct3D11 interop",
           device_caps->d3d11_aware,
           (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
 
+  /**
+   * GstMFH264Enc:adapter-luid:
+   *
+   * DXGI Adapter LUID for this elemenet
+   *
+   * Since: 1.20
+   */
   if (device_caps->d3d11_aware) {
     g_object_class_install_property (gobject_class, PROP_ADAPTER_LUID,
         g_param_spec_int64 ("adapter-luid", "Adapter LUID",
index e844ce8..ec37ace 100644 (file)
@@ -357,12 +357,26 @@ gst_mf_h265_enc_class_init (GstMFH265EncClass * klass, gpointer data)
                 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   }
 
+  /**
+   * GstMFH265Enc:d3d11-aware:
+   *
+   * Whether element supports Direct3D11 texture as an input or not
+   *
+   * Since: 1.20
+   */
   g_object_class_install_property (gobject_class, PROP_D3D11_AWARE,
       g_param_spec_boolean ("d3d11-aware", "D3D11 Aware",
           "Whether device can support Direct3D11 interop",
           device_caps->d3d11_aware,
           (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
 
+  /**
+   * GstMFH265Enc:adapter-luid:
+   *
+   * DXGI Adapter LUID for this elemenet
+   *
+   * Since: 1.20
+   */
   if (device_caps->d3d11_aware) {
     g_object_class_install_property (gobject_class, PROP_ADAPTER_LUID,
         g_param_spec_int64 ("adapter-luid", "Adapter LUID",
index 94cdef0..d90f8e8 100644 (file)
@@ -1911,6 +1911,9 @@ gst_mf_video_enc_register_internal (GstPlugin * plugin, guint rank,
   if (rank > 0 && !is_default)
     rank--;
 
+  if (!is_default)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index ef38d08..f435227 100644 (file)
@@ -254,12 +254,26 @@ gst_mf_vp9_enc_class_init (GstMFVP9EncClass * klass, gpointer data)
                 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   }
 
+  /**
+   * GstMFVP9Enc:d3d11-aware:
+   *
+   * Whether element supports Direct3D11 texture as an input or not
+   *
+   * Since: 1.20
+   */
   g_object_class_install_property (gobject_class, PROP_D3D11_AWARE,
       g_param_spec_boolean ("d3d11-aware", "D3D11 Aware",
           "Whether device can support Direct3D11 interop",
           device_caps->d3d11_aware,
           (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
 
+  /**
+   * GstMFVP9Enc:adapter-luid:
+   *
+   * DXGI Adapter LUID for this elemenet
+   *
+   * Since: 1.20
+   */
   if (device_caps->d3d11_aware) {
     g_object_class_install_property (gobject_class, PROP_ADAPTER_LUID,
         g_param_spec_int64 ("adapter-luid", "Adapter LUID",
index 9d97da7..131d727 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:plugin-mediafoundation
+ *
+ * Microsoft MediaFoundation plugin.
+ *
+ * This plugin consists of various hardware/software video encoders
+ * software audio encoders, and video capture (from webcam) elements.
+ *
+ * GstMediaFoundation plugin supports H.264/AVC, H.265/HEVC, VP9, codecs for
+ * hardware-accelerate encoding.
+ *
+ * However, depending on the hardware it runs on, some elements might not be
+ * registered in case that underlying hardware doesn't support the feature.
+ *
+ * Moreover, depending on hardware vendor's MediaFoundation implementation,
+ * secendary GPU may not be usable. In that case, user could use vendor
+ * specific plugins, Intel Media SDK and NVCODEC plugins for example.
+ *
+ * For a system with multiple MediaFoundation compatible hardwares (i.e., GPU),
+ * there can be multiple plugin features having the same role.
+ * Also, there would be additional software video encoder element the system
+ * meets requirement.
+ *
+ * The naming rule for the non-primary encoder is `mf{codec}device{index}enc`
+ * where `index` is an arbitrary index number of hardware starting from 1.
+ *
+ * To get a list of all available elements, user can run
+ * ```sh
+ * gst-inspect-1.0.exe mediafoundation
+ * ```
+ *
+ * Since: 1.18
+ *
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -155,12 +190,6 @@ plugin_init (GstPlugin * plugin)
   GstRank rank = GST_RANK_SECONDARY;
   GList *device_list = NULL;
 
-  /**
-   * plugin-mediafoundation:
-   *
-   * Since: 1.18
-   */
-
   GST_DEBUG_CATEGORY_INIT (gst_mf_debug, "mf", 0, "media foundation");
   GST_DEBUG_CATEGORY_INIT (gst_mf_utils_debug,
       "mfutils", 0, "media foundation utility functions");