caps: comment and whitespace cleanup
authorStefan Kost <ensonic@users.sf.net>
Fri, 14 May 2010 08:52:03 +0000 (11:52 +0300)
committerStefan Kost <ensonic@users.sf.net>
Fri, 14 May 2010 08:54:56 +0000 (11:54 +0300)
Make comment more specific, reposition it and add more of the kind.
Move one ifdef'ed function around.

gst/gstcaps.c

index 9c0c0e8..c82c6be 100644 (file)
@@ -512,6 +512,7 @@ no_string:
 }
 
 /* manipulation */
+
 static GstStructure *
 gst_caps_remove_and_get_structure (GstCaps * caps, guint idx)
 {
@@ -782,7 +783,6 @@ gst_caps_merge_structure (GstCaps * caps, GstStructure * structure)
   }
 }
 
-
 /**
  * gst_caps_get_size:
  * @caps: a #GstCaps
@@ -1171,6 +1171,8 @@ gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
   return gst_caps_is_subset (caps1, caps2) && gst_caps_is_subset (caps2, caps1);
 }
 
+/* intersect operation */
+
 typedef struct
 {
   GstStructure *dest;
@@ -1371,48 +1373,6 @@ gst_caps_can_intersect (const GstCaps * caps1, const GstCaps * caps2)
   return FALSE;
 }
 
-#if 0
-static GstStructure *
-gst_caps_structure_union (const GstStructure * struct1,
-    const GstStructure * struct2)
-{
-  int i;
-  GstStructure *dest;
-  const GstStructureField *field1;
-  const GstStructureField *field2;
-  int ret;
-
-  /* FIXME this doesn't actually work */
-
-  if (struct1->name != struct2->name)
-    return NULL;
-
-  dest = gst_structure_id_empty_new (struct1->name);
-
-  for (i = 0; i < struct1->fields->len; i++) {
-    GValue dest_value = { 0 };
-
-    field1 = GST_STRUCTURE_FIELD (struct1, i);
-    field2 = gst_structure_id_get_field (struct2, field1->name);
-
-    if (field2 == NULL) {
-      continue;
-    } else {
-      if (gst_value_union (&dest_value, &field1->value, &field2->value)) {
-        gst_structure_set_value (dest, g_quark_to_string (field1->name),
-            &dest_value);
-      } else {
-        ret = gst_value_compare (&field1->value, &field2->value);
-      }
-    }
-  }
-
-  return dest;
-}
-#endif
-
-/* operations */
-
 /**
  * gst_caps_intersect:
  * @caps1: a #GstCaps to intersect
@@ -1497,6 +1457,8 @@ gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2)
   return dest;
 }
 
+/* subtract operation */
+
 typedef struct
 {
   const GstStructure *subtract_from;
@@ -1504,7 +1466,6 @@ typedef struct
 }
 SubtractionEntry;
 
-
 static gboolean
 gst_caps_structure_subtract_field (GQuark field_id, const GValue * value,
     gpointer user_data)
@@ -1635,6 +1596,48 @@ gst_caps_subtract (const GstCaps * minuend, const GstCaps * subtrahend)
   return dest;
 }
 
+/* union operation */
+
+#if 0
+static GstStructure *
+gst_caps_structure_union (const GstStructure * struct1,
+    const GstStructure * struct2)
+{
+  int i;
+  GstStructure *dest;
+  const GstStructureField *field1;
+  const GstStructureField *field2;
+  int ret;
+
+  /* FIXME this doesn't actually work */
+
+  if (struct1->name != struct2->name)
+    return NULL;
+
+  dest = gst_structure_id_empty_new (struct1->name);
+
+  for (i = 0; i < struct1->fields->len; i++) {
+    GValue dest_value = { 0 };
+
+    field1 = GST_STRUCTURE_FIELD (struct1, i);
+    field2 = gst_structure_id_get_field (struct2, field1->name);
+
+    if (field2 == NULL) {
+      continue;
+    } else {
+      if (gst_value_union (&dest_value, &field1->value, &field2->value)) {
+        gst_structure_set_value (dest, g_quark_to_string (field1->name),
+            &dest_value);
+      } else {
+        ret = gst_value_compare (&field1->value, &field2->value);
+      }
+    }
+  }
+
+  return dest;
+}
+#endif
+
 /**
  * gst_caps_union:
  * @caps1: a #GstCaps to union
@@ -1672,6 +1675,8 @@ gst_caps_union (const GstCaps * caps1, const GstCaps * caps2)
   return dest1;
 }
 
+/* normalize/simplify operations */
+
 typedef struct _NormalizeForeach
 {
   GstCaps *caps;
@@ -1924,6 +1929,8 @@ gst_caps_do_simplify (GstCaps * caps)
   return TRUE;
 }
 
+/* persistence */
+
 #ifndef GST_DISABLE_LOADSAVE
 /**
  * gst_caps_save_thyself: