avtp: documentation fixes
authorTim-Philipp Müller <tim@centricular.com>
Wed, 1 Jul 2020 11:35:32 +0000 (12:35 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 1 Jul 2020 17:41:25 +0000 (18:41 +0100)
Unclear why hotdoc wants 'gstavtp' as the plugin name here,
that's just wrong.

Add since marker and mark private subclasses as plugin API
so hotdoc knows they belong to the plugin and aren't external.

Fix GstAvtpAafTstampMode get_type() function.

docs/plugins/gst_plugins_cache.json
ext/avtp/gstavtp.c
ext/avtp/gstavtpaafpay.c
ext/avtp/gstavtpbasedepayload.c
ext/avtp/gstavtpbasepayload.c
ext/avtp/gstavtpcrfbase.c

index a89c8fe..cc487a4 100644 (file)
         },
         "filename": "gstavtp",
         "license": "LGPL",
-        "other-types": {},
+        "other-types": {
+            "GstAvtpAafTstampMode": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Normal timestamping mode",
+                        "name": "normal",
+                        "value": "0"
+                    },
+                    {
+                        "desc": "Sparse timestamping mode",
+                        "name": "sparse",
+                        "value": "1"
+                    }
+                ]
+            },
+            "GstAvtpBaseDepayload": {
+                "hierarchy": [
+                    "GstAvtpBaseDepayload",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "kind": "object",
+                "properties": {
+                    "streamid": {
+                        "blurb": "Stream ID associated with the AVTPDU",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "12302652060662169600",
+                        "max": "18446744073709551615",
+                        "min": "0",
+                        "mutable": "paused",
+                        "readable": true,
+                        "type": "guint64",
+                        "writable": true
+                    }
+                }
+            },
+            "GstAvtpBasePayload": {
+                "hierarchy": [
+                    "GstAvtpBasePayload",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "kind": "object",
+                "properties": {
+                    "mtt": {
+                        "blurb": "Maximum Transit Time (MTT) in nanoseconds",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "50000000",
+                        "max": "-1",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "processing-deadline": {
+                        "blurb": "Maximum amount of time (in ns) the pipeline can take for processing the buffer",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "20000000",
+                        "max": "18446744073709551615",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint64",
+                        "writable": true
+                    },
+                    "streamid": {
+                        "blurb": "Stream ID associated with the AVTPDU",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "12302652060662169600",
+                        "max": "18446744073709551615",
+                        "min": "0",
+                        "mutable": "ready",
+                        "readable": true,
+                        "type": "guint64",
+                        "writable": true
+                    },
+                    "tu": {
+                        "blurb": "Timing Uncertainty (TU) in nanoseconds",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "1000000",
+                        "max": "-1",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                }
+            },
+            "GstAvtpCrfBase": {
+                "hierarchy": [
+                    "GstAvtpCrfBase",
+                    "GstBaseTransform",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "kind": "object",
+                "properties": {
+                    "address": {
+                        "blurb": "Destination MAC address expected on the Ethernet frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "01:AA:AA:AA:AA:AA",
+                        "mutable": "ready",
+                        "readable": true,
+                        "type": "gchararray",
+                        "writable": true
+                    },
+                    "ifname": {
+                        "blurb": "Network interface utilized to receive CRF AVTPDUs",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "eth0",
+                        "mutable": "ready",
+                        "readable": true,
+                        "type": "gchararray",
+                        "writable": true
+                    },
+                    "streamid": {
+                        "blurb": "Stream ID associated with the CRF AVTPDU",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "12302652060662173696",
+                        "max": "18446744073709551615",
+                        "min": "0",
+                        "mutable": "ready",
+                        "readable": true,
+                        "type": "guint64",
+                        "writable": true
+                    }
+                }
+            }
+        },
         "package": "GStreamer Bad Plug-ins",
         "source": "gst-plugins-bad",
         "tracers": {},
index 9ece65f..a587d1c 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * plugin-avtp:
+ * plugin-gstavtp:
  *
  * ## Audio Video Transport Protocol (AVTP) Plugin
  *
  * a malicious software do it for Denial of Service attempts, or other
  * compromises attempts.
  *
+ * Since: 1.18
  */
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index fd6b1e6..e51ac65 100644 (file)
@@ -66,17 +66,23 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
 static GType
 gst_avtp_aaf_tstamp_mode_get_type (void)
 {
-  static GType tstamp_mode_type = 0;
   static const GEnumValue tstamp_mode_types[] = {
     {GST_AVTP_AAF_TSTAMP_MODE_NORMAL, "Normal timestamping mode", "normal"},
     {GST_AVTP_AAF_TSTAMP_MODE_SPARSE, "Sparse timestamping mode", "sparse"},
     {0, NULL, NULL},
   };
+  static gsize id = 0;
 
-  tstamp_mode_type =
-      g_enum_register_static ("GstAvtpAafTstampMode", tstamp_mode_types);
+  if (g_once_init_enter (&id)) {
+    GType new_type;
 
-  return tstamp_mode_type;
+    new_type =
+        g_enum_register_static ("GstAvtpAafTstampMode", tstamp_mode_types);
+
+    g_once_init_leave (&id, (gsize) new_type);
+  }
+
+  return (GType) id;
 }
 
 #define gst_avtp_aaf_pay_parent_class parent_class
@@ -129,6 +135,8 @@ gst_avtp_aaf_pay_class_init (GstAvtpAafPayClass * klass)
 
   GST_DEBUG_CATEGORY_INIT (avtpaafpay_debug, "avtpaafpay", 0,
       "AAF AVTP Payloader");
+
+  gst_type_mark_as_plugin_api (GST_TYPE_AVTP_AAF_TSTAMP_MODE, 0);
 }
 
 static void
index 420911e..4ee2f61 100644 (file)
@@ -97,6 +97,8 @@ gst_avtp_base_depayload_class_init (GstAvtpBaseDepayloadClass * klass)
 
   GST_DEBUG_CATEGORY_INIT (avtpbasedepayload_debug, "avtpbasedepayload", 0,
       "Base class for AVTP depayloaders");
+
+  gst_type_mark_as_plugin_api (GST_TYPE_AVTP_BASE_DEPAYLOAD, 0);
 }
 
 static void
index c75ea65..aa3af39 100644 (file)
@@ -115,6 +115,8 @@ gst_avtp_base_payload_class_init (GstAvtpBasePayloadClass * klass)
 
   GST_DEBUG_CATEGORY_INIT (avtpbasepayload_debug, "avtpbasepayload", 0,
       "Base class for AVTP payloaders");
+
+  gst_type_mark_as_plugin_api (GST_TYPE_AVTP_BASE_PAYLOAD, 0);
 }
 
 static void
index 26109f7..8baf29f 100644 (file)
@@ -112,6 +112,8 @@ gst_avtp_crf_base_class_init (GstAvtpCrfBaseClass * klass)
   gst_element_class_add_static_pad_template (element_class, &src_template);
 
   GST_DEBUG_CATEGORY_INIT (avtpcrfbase_debug, "avtpcrfbase", 0, "CRF Base");
+
+  gst_type_mark_as_plugin_api (GST_TYPE_AVTP_CRF_BASE, 0);
 }
 
 static void