From: <en...@ke...> - 2008-01-24 10:41:14
|
CVS Root: /cvs/gstreamer Module: common Changes by: ensonic Date: Thu Jan 24 2008 10:41:20 UTC Log message: * ChangeLog: ChangeLog surgery. * gstdoc-scangobj: Sync the object scanner with gtk-doc fixes. Update args and hierarchy files. Modified files: . : ChangeLog gstdoc-scangobj Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/common/ChangeLog.diff?r1=1.188&r2=1.189 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/common/gstdoc-scangobj.diff?r1=1.8&r2=1.9 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/common/ChangeLog,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- ChangeLog 24 Jan 2008 10:26:36 -0000 1.188 +++ ChangeLog 24 Jan 2008 10:41:06 -0000 1.189 @@ -1,6 +1,9 @@ 2008-01-24 Stefan Kost <en...@us...> - * gtk-doc-plugins.mak: + * ChangeLog: + ChangeLog surgery. + + * gstdoc-scangobj: Sync the object scanner with gtk-doc fixes. Update args and hierarchy files. Index: gstdoc-scangobj RCS file: /cvs/gstreamer/common/gstdoc-scangobj,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gstdoc-scangobj 23 Mar 2006 15:59:37 -0000 1.8 +++ gstdoc-scangobj 24 Jan 2008 10:41:06 -0000 1.9 @@ -151,10 +151,11 @@ plugin = (GstPlugin *) (plugins->data); plugins = g_list_next (plugins); source = gst_plugin_get_source (plugin); - g_print ("source: %s\\n", source); - if (!source || strcmp (gst_plugin_get_source (plugin), "$SOURCE") != 0) { + /*g_print ("plugin: %s source: %s\\n", plugin->desc.name, source);*/ + if (!source || strcmp (source, "$SOURCE") != 0) { continue; } + g_print ("plugin: %s source: %s\\n", plugin->desc.name, source); features = gst_registry_get_feature_list_by_plugin (gst_registry_get_default (), @@ -170,7 +171,7 @@ if (GST_IS_ELEMENT_FACTORY (feature)) { factory = GST_ELEMENT_FACTORY (feature); - factories = g_list_append (factories, factory); + factories = g_list_prepend (factories, factory); } features = g_list_next (features); @@ -188,9 +189,8 @@ while (l) { GType type; factory = GST_ELEMENT_FACTORY (l->data); - g_message ("adding type for factory %s", gst_element_factory_get_longname (factory)); type = gst_element_factory_get_element_type (factory); - g_message ("adding type %p", (void *) type); + g_message ("adding type %p for factory %s", (void *) type, gst_element_factory_get_longname (factory)); object_types[i] = type; i++; l = g_list_next (l); @@ -206,6 +206,9 @@ for (i=0; object_types[i]; i++) { if (G_TYPE_IS_CLASSED (object_types[i])) g_type_class_ref (object_types[i]); + else { + g_warning ("not reffing type: %s", g_type_name (object_types[i])); + } } return object_types; @@ -536,6 +539,11 @@ if (g_type_is_a (type, G_TYPE_POINTER)) *is_pointer = TRUE; + /* But enums are not */ + if (g_type_is_a (type, G_TYPE_ENUM) || + g_type_is_a (type, G_TYPE_FLAGS)) + *is_pointer = FALSE; return type_name; } @@ -835,12 +843,23 @@ for (i=0; object_types[i]; i++) { if (!g_type_parent (object_types[i]) && + (object_types[i] != G_TYPE_NONE) && (object_types[i] != G_TYPE_OBJECT) && (object_types[i] != G_TYPE_INTERFACE) ) { + g_warning ("printing hierarchy for root type: %s", + g_type_name (object_types[i])); output_hierarchy (fp, object_types[i], 0); } + /* for debugging + for (i=0; object_types[i]; i++) { + if(object_types[i] != G_TYPE_NONE) { + g_print ("type has not been added to hierarchy: %s\\n", + g_type_name (object_types[i])); + } + } + for debugging */ fclose (fp); @@ -858,6 +877,17 @@ if (!type) return; + if(object_types[i] == type) { + g_print ("added type to hierarchy (level %d): %s\\n", + level, g_type_name (type)); + object_types[i] = G_TYPE_NONE; + break; for (i = 0; i < level; i++) fprintf (fp, " "); fprintf (fp, g_type_name (type)); @@ -865,14 +895,16 @@ children = g_type_children (type, &n_children); - for (i=0; i < n_children; i++) + for (i=0; i < n_children; i++) { output_hierarchy (fp, children[i], level + 1); g_free (children); static void output_object_interfaces (void) { + guint i; FILE *fp; fp = fopen (interfaces_filename, "w"); @@ -882,6 +914,16 @@ return; output_interfaces (fp, G_TYPE_OBJECT); + for (i = 0; object_types[i]; i++) + { + if (!g_type_parent (object_types[i]) && + (object_types[i] != G_TYPE_OBJECT) && + G_TYPE_IS_INSTANTIATABLE (object_types[i])) + { + output_interfaces (fp, object_types[i]); @@ -1425,10 +1467,12 @@ guint n_properties; gboolean child_prop; gboolean style_prop; + gboolean is_pointer; + const gchar *type_name; gchar *type_desc; gchar *default_value; - if (G_TYPE_IS_CLASSED (object_type)) + if (G_TYPE_IS_OBJECT (object_type)) { class = g_type_class_peek (object_type); if (!class) @@ -1493,8 +1537,9 @@ type_desc = describe_type (spec); default_value = describe_default (spec); - fprintf (fp, "<ARG>\\n<NAME>%s::%s</NAME>\\n<TYPE>%s</TYPE>\\n<RANGE>%s</RANGE>\\n<FLAGS>%s</FLAGS>\\n<NICK>%s</NICK>\\n<BLURB>%s%s</BLURB>\\n<DEFAULT>%s</DEFAULT>\\n</ARG>\\n\\n", - object_class_name, g_param_spec_get_name (spec), g_type_name (spec->value_type), type_desc, flags, nick ? nick : "(null)", blurb ? blurb : "(null)", dot, default_value); + type_name = get_type_name (spec->value_type, &is_pointer); + fprintf (fp, "<ARG>\\n<NAME>%s::%s</NAME>\\n<TYPE>%s%s</TYPE>\\n<RANGE>%s</RANGE>\\n<FLAGS>%s</FLAGS>\\n<NICK>%s</NICK>\\n<BLURB>%s%s</BLURB>\\n<DEFAULT>%s</DEFAULT>\\n</ARG>\\n\\n", + object_class_name, g_param_spec_get_name (spec), type_name, is_pointer ? "*" : "", type_desc, flags, nick ? nick : "(null)", blurb ? blurb : "(null)", dot, default_value); g_free (type_desc); g_free (default_value); @@ -1554,9 +1599,9 @@ unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan"; #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0); -#&UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0); -#&UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0); -#&UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0); +&UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0); +&UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0); +&UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0); #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0); |