gst/gststructure.c: add some comments rename a method so that it actually says what...
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 10 May 2006 14:12:14 +0000 (14:12 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 10 May 2006 14:12:14 +0000 (14:12 +0000)
Original commit message from CVS:

* gst/gststructure.c: (gst_structure_gtype_from_abbr),
(gst_structure_parse_value):
add some comments
rename a method so that it actually says what it does better

ChangeLog
gst/gststructure.c

index 9dcdf81..f312d3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-05-10  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/gststructure.c: (gst_structure_gtype_from_abbr),
+       (gst_structure_parse_value):
+         add some comments
+         rename a method so that it actually says what it does better
+
+2006-05-10  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * gst/gstevent.c: (_gst_event_initialize):
        * gst/gstformat.c: (_gst_format_initialize):
          make sure some essential types used by events are registered
index 8317e51..9ae5f01 100644 (file)
@@ -1227,6 +1227,8 @@ typedef struct _GstStructureAbbreviation
 }
 GstStructureAbbreviation;
 
+/* return a copy of an array of GstStructureAbbreviation containing all the
+ * known type_string, GType maps, including abbreviations for common types */
 static GstStructureAbbreviation *
 gst_structure_get_abbrs (gint * n_abbrs)
 {
@@ -1278,8 +1280,10 @@ gst_structure_get_abbrs (gint * n_abbrs)
   return abbrs;
 }
 
+/* given a type_name that could be a type abbreviation or a registered GType,
+ * return a matching GType */
 static GType
-gst_structure_from_abbr (const char *type_name)
+gst_structure_gtype_from_abbr (const char *type_name)
 {
   int i;
   GstStructureAbbreviation *abbrs;
@@ -1640,6 +1644,7 @@ gst_structure_parse_value (gchar * str,
   while (g_ascii_isspace (*s))
     s++;
 
+  /* check if there's a (type_name) 'cast' */
   type_name = NULL;
   if (*s == '(') {
     type = G_TYPE_INVALID;
@@ -1661,7 +1666,7 @@ gst_structure_parse_value (gchar * str,
 
     c = *type_end;
     *type_end = 0;
-    type = gst_structure_from_abbr (type_name);
+    type = gst_structure_gtype_from_abbr (type_name);
     *type_end = c;
 
     if (type == G_TYPE_INVALID)