summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2020-06-24 15:59:03 +0200
committerTim-Philipp Müller <tim@centricular.com>2020-07-01 19:44:57 +0100
commit101dc08e5b9f1ba9a4605cfe22dee101db056653 (patch)
treee4166320ab5a28d20c67ed207d2eb83de5b1d3f8
parent0826fb95b7b6b9019f0dc18a769a88d71487ce4b (diff)
downloadgstreamer-plugins-base-101dc08e5b9f1ba9a4605cfe22dee101db056653.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/723>
-rw-r--r--docs/plugins/gst_plugins_cache.json2
-rw-r--r--ext/pango/gstbasetextoverlay.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json
index e43e72901..145f9225e 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 d1f6be026..4e5024ece 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));
/**