From 5b2da0835e58db875a076d9f7b1b8ec00634907d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 22 Oct 2018 11:32:45 +0200 Subject: [PATCH] doc: Fix and add some missing docstrings --- gst/gstdynamictypefactory.c | 7 +++++++ gst/gstelement.c | 7 +++++++ gst/gstelementfactory.h | 5 +++++ gst/gsttracer.h | 5 +++++ gst/gsttracerrecord.h | 5 +++++ gst/gstutils.c | 12 ++++++++++++ libs/gst/check/gstcheck.c | 15 +++++++++++++++ libs/gst/check/gstcheck.h | 12 ++++++++++++ plugins/elements/gstqueue.c | 2 +- 9 files changed, 69 insertions(+), 1 deletion(-) diff --git a/gst/gstdynamictypefactory.c b/gst/gstdynamictypefactory.c index cb388a5..d94b3b4 100644 --- a/gst/gstdynamictypefactory.c +++ b/gst/gstdynamictypefactory.c @@ -141,6 +141,13 @@ gst_dynamic_type_factory_create (GstRegistry * registry, return factory; } +/** + * gst_dynamic_type_register: + * @plugin: The #GstPlugin to register @dyn_type for + * @type: The #GType to register dynamically + * + * Registers a new #GstDynamicTypeFactory in the registry + */ gboolean gst_dynamic_type_register (GstPlugin * plugin, GType dyn_type) { diff --git a/gst/gstelement.c b/gst/gstelement.c index 64aa39a..383cfa7 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -3740,6 +3740,13 @@ _priv_gst_element_cleanup (void) } } +/** + * gst_make_element_message_details: + * @name: Name of the first field to set + * @...: variable arguments in the same form as #GstStructure + * + * Create a #GstStructure to be used with #gst_element_message_full_with_details + */ GstStructure * gst_make_element_message_details (const char *name, ...) { diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index 88d4172..7af4c84 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -120,6 +120,11 @@ gboolean gst_element_register (GstPlugin *plug * matching the specified media types will be selected. */ +/** + * GstElementFactoryListType: + * + * A type defining the type of an element factory. + */ typedef guint64 GstElementFactoryListType; #define GST_ELEMENT_FACTORY_TYPE_DECODER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 0)) diff --git a/gst/gsttracer.h b/gst/gsttracer.h index 1d2726d..4bb4f45 100644 --- a/gst/gsttracer.h +++ b/gst/gsttracer.h @@ -41,6 +41,11 @@ typedef struct _GstTracerClass GstTracerClass; #define GST_TRACER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_TRACER,GstTracerClass)) #define GST_TRACER_CAST(obj) ((GstTracer *)(obj)) +/** + * GstTracer: + * + * The opaque GstTracer instance structure + */ struct _GstTracer { GstObject parent; /*< private >*/ diff --git a/gst/gsttracerrecord.h b/gst/gsttracerrecord.h index 2392d1c..2c80d37 100644 --- a/gst/gsttracerrecord.h +++ b/gst/gsttracerrecord.h @@ -26,6 +26,11 @@ G_BEGIN_DECLS +/** + * GstTracerRecord: + * + * The opaque GstTracerRecord instance structure + */ typedef struct _GstTracerRecord GstTracerRecord; typedef struct _GstTracerRecordClass GstTracerRecordClass; diff --git a/gst/gstutils.c b/gst/gstutils.c index e41399e..4f06608 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -265,6 +265,12 @@ gst_util_get_object_array (GObject * object, const gchar * name, * double conversion is not defined/implemented. */ +/** + * gst_util_guint64_to_gdouble: + * @value: The #guint64 value to convert to double + * + * Returns: @value casted to #gdouble + */ gdouble gst_util_guint64_to_gdouble (guint64 value) { @@ -274,6 +280,12 @@ gst_util_guint64_to_gdouble (guint64 value) return (gdouble) ((gint64) value); } +/** + * gst_util_gdouble_to_guint64: + * @value: The #gdouble value to convert guint64 double + * + * Returns: @value casted to #guint64 + */ guint64 gst_util_gdouble_to_guint64 (gdouble value) { diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index 9b2227a..7058e38 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -434,6 +434,12 @@ gst_check_message_error (GstMessage * message, GstMessageType type, } /* helper functions */ +/** + * gst_check_chain_func: + * + * A fake chain function that appends the buffer to the internal list of + * buffers. + */ GstFlowReturn gst_check_chain_func (GstPad * pad, GstObject * parent, GstBuffer * buffer) { @@ -1001,6 +1007,15 @@ gst_check_element_push_buffer (const gchar * element_name, GST_FLOW_OK); } +/** + * gst_check_abi_list: + * @list: A list of GstCheckABIStruct to be verified + * @have_abi_sizes: Whether there is a reference ABI size already specified, + * if it is %FALSE and the `GST_ABI` environment variable is set, usable code + * for @list will be printed. + * + * Verifies that reference values and current values are equals in @list. + */ void gst_check_abi_list (GstCheckABIStruct list[], gboolean have_abi_sizes) { diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index f59f400..9900728 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -57,6 +57,12 @@ GST_CHECK_API GList * buffers; GST_CHECK_API GMutex check_mutex; GST_CHECK_API GCond check_cond; +/** + * GstCheckABIStruct: + * @name: The name of the structure + * @size: The current size of a structure + * @abi_size: The reference size of the structure + */ typedef struct { const char *name; @@ -65,6 +71,12 @@ typedef struct } GstCheckABIStruct; +/** + * GstCheckLogFilter: + * + * Opaque structure containing data about a log filter + * function. + */ typedef struct _GstCheckLogFilter GstCheckLogFilter; /** diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index a8753ea..e443ac3 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -383,7 +383,7 @@ gst_queue_class_init (GstQueueClass * klass) G_PARAM_STATIC_STRINGS)); /** - * GstQueue:flush-on-eos + * queue:flush-on-eos: * * Discard all data in the queue when an EOS event is received, and pass * on the EOS event as soon as possible (instead of waiting until all -- 2.7.4