nvcodec: Update for documentation
authorSeungha Yang <seungha@centricular.com>
Fri, 21 Oct 2022 18:02:56 +0000 (03:02 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 24 Oct 2022 12:42:51 +0000 (12:42 +0000)
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Fix some typos
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>

subprojects/gst-docs/symbols/symbol_index.json
subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c
subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.cpp
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp

index 3630a7f..033dbca 100644 (file)
   "GstNvDec:max-display-delay",
   "GstNvDevice0H264Enc",
   "GstNvDevice0H265Enc",
-  "GstNvH264Dec",
   "GstNvH264Enc",
   "GstNvH264Enc!sink",
   "GstNvH264Enc!src",
   "GstNvH264Enc:temporal-aq",
   "GstNvH264Enc:vbv-buffer-size",
   "GstNvH264Enc:weighted-pred",
-  "GstNvH264StatelessDec",
-  "GstNvH264StatelessDec!sink",
-  "GstNvH264StatelessDec!src",
-  "GstNvH265Dec",
   "GstNvH265Enc",
   "GstNvH265Enc!sink",
   "GstNvH265Enc!src",
   "GstNvH265Enc:temporal-aq",
   "GstNvH265Enc:vbv-buffer-size",
   "GstNvH265Enc:weighted-pred",
-  "GstNvH265StatelessDec",
-  "GstNvH265StatelessDec!sink",
-  "GstNvH265StatelessDec!src",
   "GstNvPreset",
   "GstNvPreset::default",
   "GstNvPreset::hp",
   "GstNvRCMode::vbr",
   "GstNvRCMode::vbr-hq",
   "GstNvRCMode::vbr-minqp",
-  "GstNvVP8StatelessDec!sink",
-  "GstNvVP8StatelessDec!src",
-  "GstNvVP9StatelessDec!sink",
-  "GstNvVP9StatelessDec!src",
-  "GstNvVp8Dec",
-  "GstNvVp9Dec",
   "GstOSXVideoSink!sink",
   "GstObject",
   "GstObject.flags",
   "element-nleurisource",
   "element-nvh264dec",
   "element-nvh264enc",
-  "element-nvh264sldec",
   "element-nvh265dec",
   "element-nvh265enc",
-  "element-nvh265sldec",
   "element-nvjpegdec",
   "element-nvmpeg2videodec",
   "element-nvmpeg4videodec",
   "nvh264enc:temporal-aq",
   "nvh264enc:vbv-buffer-size",
   "nvh264enc:weighted-pred",
-  "nvh264sldec",
   "nvh265dec",
   "nvh265dec!sink",
   "nvh265dec!src",
   "nvh265enc:temporal-aq",
   "nvh265enc:vbv-buffer-size",
   "nvh265enc:weighted-pred",
-  "nvh265sldec",
   "nvjpegdec",
   "nvjpegdec!sink",
   "nvjpegdec!src",
   "nvvp8dec",
   "nvvp8dec!sink",
   "nvvp8dec!src",
-  "nvvp8sldec",
   "nvvp9dec",
   "nvvp9dec!sink",
   "nvvp9dec!src",
-  "nvvp9sldec",
   "oggaviparse",
   "oggdemux",
   "oggmux",
index e7a0e48..3961ee8 100644 (file)
@@ -102,6 +102,11 @@ typedef struct _GstCudaDownloadClass
   GstCudaMemoryCopyClass parent_class;
 } GstCudaDownloadClass;
 
+/**
+ * GstCudaMemoryCopy:
+ *
+ * Since: 1.22
+ */
 #define gst_cuda_memory_copy_parent_class parent_class
 G_DEFINE_ABSTRACT_TYPE (GstCudaMemoryCopy, gst_cuda_memory_copy,
     GST_TYPE_CUDA_BASE_TRANSFORM);
@@ -149,6 +154,9 @@ gst_cuda_memory_copy_class_init (GstCudaMemoryCopyClass * klass)
   trans_class->query = GST_DEBUG_FUNCPTR (gst_cuda_memory_copy_query);
 
   btrans_class->set_info = GST_DEBUG_FUNCPTR (gst_cuda_memory_copy_set_info);
+
+  gst_type_mark_as_plugin_api (GST_TYPE_CUDA_MEMORY_COPY,
+      (GstPluginAPIFlags) 0);
 }
 
 static void
index 7c84378..3b3e403 100644 (file)
@@ -94,6 +94,11 @@ struct _GstNvEncoderPrivate
   GstFlowReturn last_flow;
 };
 
+/**
+ * GstNvEncoder:
+ *
+ * Since: 1.22
+ */
 #define gst_nv_encoder_parent_class parent_class
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GstNvEncoder, gst_nv_encoder,
     GST_TYPE_VIDEO_ENCODER);
@@ -143,6 +148,12 @@ gst_nv_encoder_class_init (GstNvEncoderClass * klass)
   videoenc_class->flush = GST_DEBUG_FUNCPTR (gst_nv_encoder_flush);
 
   GST_DEBUG_CATEGORY_INIT (gst_nv_encoder_debug, "nvencoder", 0, "nvencoder");
+
+  gst_type_mark_as_plugin_api (GST_TYPE_NV_ENCODER, (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_NV_ENCODER_PRESET,
+      (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_NV_ENCODER_RC_MODE,
+      (GstPluginAPIFlags) 0);
 }
 
 static void
@@ -1982,6 +1993,11 @@ gst_nv_encoder_set_device_mode (GstNvEncoder * encoder,
   priv->dxgi_adapter_luid = adapter_luid;
 }
 
+/**
+ * GstNvEncoderPreset:
+ *
+ * Since: 1.22
+ */
 GType
 gst_nv_encoder_preset_get_type (void)
 {
@@ -2045,6 +2061,11 @@ gst_nv_encoder_preset_to_guid (GstNvEncoderPreset preset, GUID * guid)
   *guid = NV_ENC_PRESET_DEFAULT_GUID;
 }
 
+/**
+ * GstNvEncoderRCMode:
+ *
+ * Since: 1.22
+ */
 GType
 gst_nv_encoder_rc_mode_get_type (void)
 {
index 21dc5ba..92371ff 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * element-nvcudah264enc:
+ *
+ * NVIDIA CUDA mode H.264 encoder
+ *
+ * Since: 1.22
+ */
+
+/**
+ * element-nvd3d11h264enc:
+ *
+ * NVIDIA Direct3D11 mode H.264 encoder
+ *
+ * Since: 1.22
+ */
+
+/**
+ * element-nvautogpuh264enc:
+ *
+ * NVIDIA auto GPU select mode H.264 encoder
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -230,29 +254,34 @@ gst_nv_h264_encoder_class_init (GstNvH264EncoderClass * klass, gpointer data)
       g_object_class_install_property (object_class, PROP_CUDA_DEVICE_ID,
           g_param_spec_uint ("cuda-device-id", "CUDA Device ID",
               "CUDA device ID of associated GPU",
-              0, G_MAXINT, cdata->cuda_device_id,
-              (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+              0, G_MAXINT, 0,
+              (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+                  G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
       break;
     case GST_NV_ENCODER_DEVICE_D3D11:
       g_object_class_install_property (object_class, PROP_ADAPTER_LUID,
           g_param_spec_int64 ("adapter-luid", "Adapter LUID",
               "DXGI Adapter LUID (Locally Unique Identifier) of associated GPU",
-              G_MININT64, G_MAXINT64, cdata->adapter_luid,
-              (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+              G_MININT64, G_MAXINT64, 0,
+              (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+                  G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
       break;
     case GST_NV_ENCODER_DEVICE_AUTO_SELECT:
       if (cdata->cuda_device_id_size > 0) {
         g_object_class_install_property (object_class, PROP_CUDA_DEVICE_ID,
             g_param_spec_uint ("cuda-device-id", "CUDA Device ID",
                 "CUDA device ID to use",
-                0, G_MAXINT, cdata->cuda_device_id, conditional_param_flags));
+                0, G_MAXINT, 0,
+                (GParamFlags) (conditional_param_flags |
+                    GST_PARAM_DOC_SHOW_DEFAULT)));
       }
       if (cdata->adapter_luid_size > 0) {
         g_object_class_install_property (object_class, PROP_ADAPTER_LUID,
             g_param_spec_int64 ("adapter-luid", "Adapter LUID",
                 "DXGI Adapter LUID (Locally Unique Identifier) to use",
-                G_MININT64, G_MAXINT64, cdata->adapter_luid,
-                conditional_param_flags));
+                G_MININT64, G_MAXINT64, 0,
+                (GParamFlags) (conditional_param_flags |
+                    GST_PARAM_DOC_SHOW_DEFAULT)));
       }
       break;
     default:
@@ -1952,6 +1981,9 @@ gst_nv_h264_encoder_register_cuda (GstPlugin * plugin, GstCudaContext * context,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    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);
 
@@ -2028,6 +2060,9 @@ gst_nv_h264_encoder_register_d3d11 (GstPlugin * plugin, GstD3D11Device * device,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    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 3d6b779..9be4879 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * element-nvcudah265enc:
+ *
+ * NVIDIA CUDA mode H.265 encoder
+ *
+ * Since: 1.22
+ */
+
+/**
+ * element-nvd3d11h265enc:
+ *
+ * NVIDIA Direct3D11 mode H.265 encoder
+ *
+ * Since: 1.22
+ */
+
+/**
+ * element-nvautogpuh265enc:
+ *
+ * NVIDIA auto GPU select mode H.265 encoder
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -235,29 +259,34 @@ gst_nv_h265_encoder_class_init (GstNvH265EncoderClass * klass, gpointer data)
       g_object_class_install_property (object_class, PROP_CUDA_DEVICE_ID,
           g_param_spec_uint ("cuda-device-id", "CUDA Device ID",
               "CUDA device ID of associated GPU",
-              0, G_MAXINT, cdata->cuda_device_id,
-              (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+              0, G_MAXINT, 0,
+              (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+                  G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
       break;
     case GST_NV_ENCODER_DEVICE_D3D11:
       g_object_class_install_property (object_class, PROP_ADAPTER_LUID,
           g_param_spec_int64 ("adapter-luid", "Adapter LUID",
               "DXGI Adapter LUID (Locally Unique Identifier) of associated GPU",
-              G_MININT64, G_MAXINT64, cdata->adapter_luid,
-              (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
+              G_MININT64, G_MAXINT64, 0,
+              (GParamFlags) (GST_PARAM_DOC_SHOW_DEFAULT |
+                  G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
       break;
     case GST_NV_ENCODER_DEVICE_AUTO_SELECT:
       if (cdata->cuda_device_id_size > 0) {
         g_object_class_install_property (object_class, PROP_CUDA_DEVICE_ID,
             g_param_spec_uint ("cuda-device-id", "CUDA Device ID",
                 "CUDA device ID to use",
-                0, G_MAXINT, cdata->cuda_device_id, conditional_param_flags));
+                0, G_MAXINT, 0,
+                (GParamFlags) (conditional_param_flags |
+                    GST_PARAM_DOC_SHOW_DEFAULT)));
       }
       if (cdata->adapter_luid_size > 0) {
         g_object_class_install_property (object_class, PROP_ADAPTER_LUID,
             g_param_spec_int64 ("adapter-luid", "Adapter LUID",
                 "DXGI Adapter LUID (Locally Unique Identifier) to use",
-                G_MININT64, G_MAXINT64, cdata->adapter_luid,
-                conditional_param_flags));
+                G_MININT64, G_MAXINT64, 0,
+                (GParamFlags) (conditional_param_flags |
+                    GST_PARAM_DOC_SHOW_DEFAULT)));
       }
       break;
     default:
@@ -406,14 +435,14 @@ gst_nv_h265_encoder_class_init (GstNvH265EncoderClass * klass, gpointer data)
       gst_element_class_set_static_metadata (element_class,
           "NVENC H.265 Video Encoder Direct3D11 Mode",
           "Codec/Encoder/Video/Hardware",
-          "Encode H.264 video streams using NVCODEC API Direct3D11 Mode",
+          "Encode H.265 video streams using NVCODEC API Direct3D11 Mode",
           "Seungha Yang <seungha@centricular.com>");
       break;
     case GST_NV_ENCODER_DEVICE_AUTO_SELECT:
       gst_element_class_set_static_metadata (element_class,
           "NVENC H.265 Video Encoder Auto GPU select Mode",
           "Codec/Encoder/Video/Hardware",
-          "Encode H.264 video streams using NVCODEC API auto GPU select Mode",
+          "Encode H.265 video streams using NVCODEC API auto GPU select Mode",
           "Seungha Yang <seungha@centricular.com>");
       break;
     default:
@@ -1963,6 +1992,9 @@ gst_nv_h265_encoder_register_cuda (GstPlugin * plugin, GstCudaContext * context,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    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);
 
@@ -2039,6 +2071,9 @@ gst_nv_h265_encoder_register_d3d11 (GstPlugin * plugin, GstD3D11Device * device,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    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);