docs: plugins-scanner: Handle interface used for plugin API properties
authorThibault Saunier <tsaunier@igalia.com>
Fri, 21 Oct 2022 09:11:13 +0000 (11:11 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 21 Oct 2022 09:14:25 +0000 (09:14 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3236>

subprojects/gstreamer/docs/gst-hotdoc-plugins-scanner.c

index 239d16d..ffcdd3c 100644 (file)
@@ -406,8 +406,15 @@ _add_properties (GString * json, GString * other_types,
       } else if (G_IS_PARAM_SPEC_FLAGS (spec)) {
         _serialize_flags (other_types, spec->value_type);
       } else if (G_IS_PARAM_SPEC_OBJECT (spec)) {
+        GType inst_type = spec->value_type;
+        GObject *obj = g_value_get_object (&value);
+
+        if (obj) {
+          inst_type = G_OBJECT_TYPE (obj);
+        }
+
         _serialize_object (other_types, seen_other_types, spec->value_type,
-            spec->value_type);
+            inst_type);
       }
     }