From 101dc08e5b9f1ba9a4605cfe22dee101db056653 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 24 Jun 2020 15:59:03 +0200 Subject: [PATCH] basetextoverlay: mark valign and halign props as DOC_SHOW_DEFAULT To document it, we instantiate a subclass and inspect the properties on the created object. Subclasses (in that case textrender) may initialize those properties with a different default, we do not want to expose that in the base class documentation. Part-of: --- docs/plugins/gst_plugins_cache.json | 2 +- ext/pango/gstbasetextoverlay.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index e43e729..145f922 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -8036,7 +8036,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "left (0)", + "default": "center (1)", "mutable": "null", "readable": true, "type": "GstBaseTextOverlayHAlign", diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index d1f6be0..4e5024e 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -379,7 +379,8 @@ gst_base_text_overlay_class_init (GstBaseTextOverlayClass * klass) g_param_spec_uint ("shading-value", "background shading value", "Shading value to apply if shaded-background is true", 1, 255, DEFAULT_PROP_SHADING_VALUE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + GST_PARAM_DOC_SHOW_DEFAULT)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VALIGNMENT, g_param_spec_enum ("valignment", "vertical alignment", "Vertical alignment of the text", GST_TYPE_BASE_TEXT_OVERLAY_VALIGN, @@ -387,7 +388,9 @@ gst_base_text_overlay_class_init (GstBaseTextOverlayClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HALIGNMENT, g_param_spec_enum ("halignment", "horizontal alignment", "Horizontal alignment of the text", GST_TYPE_BASE_TEXT_OVERLAY_HALIGN, - DEFAULT_PROP_HALIGNMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_PROP_HALIGNMENT, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + GST_PARAM_DOC_SHOW_DEFAULT)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_XPAD, g_param_spec_int ("xpad", "horizontal paddding", "Horizontal paddding when using left/right alignment", 0, G_MAXINT, @@ -403,8 +406,8 @@ gst_base_text_overlay_class_init (GstBaseTextOverlayClass * klass) GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DELTAY, g_param_spec_int ("deltay", "Y position modifier", - "Shift Y position up or down. Unit is pixels.", - G_MININT, G_MAXINT, DEFAULT_PROP_DELTAY, + "Shift Y position up or down. Unit is pixels.", G_MININT, G_MAXINT, + DEFAULT_PROP_DELTAY, GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** -- 2.7.4