mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
docs: Add list of interfaces implemented by elements to the docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/486>
This commit is contained in:
parent
1c97dac2b1
commit
a3562b0d2a
1 changed files with 18 additions and 0 deletions
|
@ -708,6 +708,9 @@ static void
|
||||||
_add_object_details (GString * json, GObject * object)
|
_add_object_details (GString * json, GObject * object)
|
||||||
{
|
{
|
||||||
GType type;
|
GType type;
|
||||||
|
GType *interfaces;
|
||||||
|
guint n_interfaces;
|
||||||
|
|
||||||
g_string_append (json, "\"hierarchy\": [");
|
g_string_append (json, "\"hierarchy\": [");
|
||||||
|
|
||||||
for (type = G_OBJECT_TYPE (object);; type = g_type_parent (type)) {
|
for (type = G_OBJECT_TYPE (object);; type = g_type_parent (type)) {
|
||||||
|
@ -718,6 +721,21 @@ _add_object_details (GString * json, GObject * object)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
g_string_append (json, "]");
|
g_string_append (json, "]");
|
||||||
|
|
||||||
|
interfaces = g_type_interfaces (G_OBJECT_TYPE (object), &n_interfaces);
|
||||||
|
if (n_interfaces) {
|
||||||
|
GType *iface;
|
||||||
|
|
||||||
|
g_string_append (json, ",\"interfaces\": [");
|
||||||
|
for (iface = interfaces; *iface; iface++, n_interfaces--) {
|
||||||
|
g_string_append_printf (json, "\"%s\"%c", g_type_name (*iface),
|
||||||
|
n_interfaces > 1 ? ',' : ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
g_string_append (json, "]");
|
||||||
|
g_free (interfaces);
|
||||||
|
}
|
||||||
|
|
||||||
_add_properties (json, object, G_OBJECT_GET_CLASS (object));
|
_add_properties (json, object, G_OBJECT_GET_CLASS (object));
|
||||||
_add_signals (json, object);
|
_add_signals (json, object);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue