value: remove gst_value_register_{subtract,union,intersect}_func() API
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 26 Dec 2011 00:18:29 +0000 (00:18 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 8 Mar 2012 11:21:37 +0000 (11:21 +0000)
There isn't really any need to provide public API for that. It's not
used anywhere in practice, and we aim to provide an API that works
for GstCaps, not some kind of generic set manipulation API based on
GValue. Making this private also makes it easier to optimise this
later. We can always put it back if someone actually needs it.

docs/gst/gstreamer-sections.txt
gst/gstvalue.c
gst/gstvalue.h
win32/common/libgstreamer.def

index 575bd39..6bdd18e 100644 (file)
@@ -2848,9 +2848,6 @@ GST_VALUE_UNORDERED
 GstValueCompareFunc
 GstValueSerializeFunc
 GstValueDeserializeFunc
-GstValueUnionFunc
-GstValueIntersectFunc
-GstValueSubtractFunc
 GstValueTable
 
 gst_value_is_fixed
@@ -2862,13 +2859,10 @@ gst_value_compare
 gst_value_can_compare
 gst_value_union
 gst_value_can_union
-gst_value_register_union_func
 gst_value_subtract
 gst_value_can_subtract
-gst_value_register_subtract_func
 gst_value_intersect
 gst_value_can_intersect
-gst_value_register_intersect_func
 gst_value_array_append_value
 gst_value_array_get_size
 gst_value_array_get_value
index 67f6090..76acc9d 100644 (file)
 #include <gobject/gvaluecollector.h>
 #include "gstutils.h"
 
+/* GstValueUnionFunc:
+ * @dest: a #GValue for the result
+ * @value1: a #GValue operand
+ * @value2: a #GValue operand
+ *
+ * Used by gst_value_union() to perform unification for a specific #GValue
+ * type. Register a new implementation with gst_value_register_union_func().
+ *
+ * Returns: %TRUE if a union was successful
+ */
+typedef gboolean (*GstValueUnionFunc) (GValue * dest,
+    const GValue * value1, const GValue * value2);
+
+/* GstValueIntersectFunc:
+ * @dest: (out caller-allocates): a #GValue for the result
+ * @value1: a #GValue operand
+ * @value2: a #GValue operand
+ *
+ * Used by gst_value_intersect() to perform intersection for a specific #GValue
+ * type. If the intersection is non-empty, the result is
+ * placed in @dest and TRUE is returned.  If the intersection is
+ * empty, @dest is unmodified and FALSE is returned.
+ * Register a new implementation with gst_value_register_intersect_func().
+ *
+ * Returns: %TRUE if the values can intersect
+ */
+typedef gboolean (*GstValueIntersectFunc) (GValue * dest,
+    const GValue * value1, const GValue * value2);
+
+/* GstValueSubtractFunc:
+ * @dest: (out caller-allocates): a #GValue for the result
+ * @minuend: a #GValue operand
+ * @subtrahend: a #GValue operand
+ *
+ * Used by gst_value_subtract() to perform subtraction for a specific #GValue
+ * type. Register a new implementation with gst_value_register_subtract_func().
+ *
+ * Returns: %TRUE if the subtraction is not empty
+ */
+typedef gboolean (*GstValueSubtractFunc) (GValue * dest,
+    const GValue * minuend, const GValue * subtrahend);
+
+static void gst_value_register_union_func (GType type1,
+    GType type2, GstValueUnionFunc func);
+static void gst_value_register_intersect_func (GType type1,
+    GType type2, GstValueIntersectFunc func);
+static void gst_value_register_subtract_func (GType minuend_type,
+    GType subtrahend_type, GstValueSubtractFunc func);
+
 typedef struct _GstValueUnionInfo GstValueUnionInfo;
 struct _GstValueUnionInfo
 {
@@ -4119,8 +4168,7 @@ gst_value_union (GValue * dest, const GValue * value1, const GValue * value2)
   return TRUE;
 }
 
-/**
- * gst_value_register_union_func: (skip)
+/* gst_value_register_union_func: (skip)
  * @type1: a type to union
  * @type2: another type to union
  * @func: a function that implements creating a union between the two types
@@ -4132,7 +4180,7 @@ gst_value_union (GValue * dest, const GValue * value1, const GValue * value2)
  * started, as gst_value_register_union_func() is not thread-safe and cannot
  * be used at the same time as gst_value_union() or gst_value_can_union().
  */
-void
+static void
 gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func)
 {
   GstValueUnionInfo union_info;
@@ -4253,8 +4301,7 @@ gst_value_intersect (GValue * dest, const GValue * value1,
 
 
 
-/**
- * gst_value_register_intersect_func: (skip)
+/* gst_value_register_intersect_func: (skip)
  * @type1: the first type to intersect
  * @type2: the second type to intersect
  * @func: the intersection function
@@ -4267,7 +4314,7 @@ gst_value_intersect (GValue * dest, const GValue * value1,
  * cannot be used at the same time as gst_value_intersect() or
  * gst_value_can_intersect().
  */
-void
+static void
 gst_value_register_intersect_func (GType type1, GType type2,
     GstValueIntersectFunc func)
 {
@@ -4387,8 +4434,7 @@ gst_value_can_subtract (const GValue * minuend, const GValue * subtrahend)
   return gst_value_can_compare (minuend, subtrahend);
 }
 
-/**
- * gst_value_register_subtract_func: (skip)
+/* gst_value_register_subtract_func: (skip)
  * @minuend_type: type of the minuend
  * @subtrahend_type: type of the subtrahend
  * @func: function to use
@@ -4400,7 +4446,7 @@ gst_value_can_subtract (const GValue * minuend, const GValue * subtrahend)
  * started, as gst_value_register_subtract_func() is not thread-safe and
  * cannot be used at the same time as gst_value_subtract().
  */
-void
+static void
 gst_value_register_subtract_func (GType minuend_type, GType subtrahend_type,
     GstValueSubtractFunc func)
 {
index 1fe64c4..38413b9 100644 (file)
@@ -361,54 +361,6 @@ typedef gchar *  (* GstValueSerializeFunc)   (const GValue *value1);
 typedef gboolean (* GstValueDeserializeFunc) (GValue       *dest,
                                               const gchar  *s);
 
-/**
- * GstValueUnionFunc:
- * @dest: a #GValue for the result
- * @value1: a #GValue operand
- * @value2: a #GValue operand
- *
- * Used by gst_value_union() to perform unification for a specific #GValue
- * type. Register a new implementation with gst_value_register_union_func().
- *
- * Returns: %TRUE if a union was successful
- */
-typedef gboolean (* GstValueUnionFunc)       (GValue       *dest,
-                                              const GValue *value1,
-                                              const GValue *value2);
-
-/**
- * GstValueIntersectFunc:
- * @dest: (out caller-allocates): a #GValue for the result
- * @value1: a #GValue operand
- * @value2: a #GValue operand
- *
- * Used by gst_value_intersect() to perform intersection for a specific #GValue
- * type. If the intersection is non-empty, the result is
- * placed in @dest and TRUE is returned.  If the intersection is
- * empty, @dest is unmodified and FALSE is returned.
- * Register a new implementation with gst_value_register_intersect_func().
- *
- * Returns: %TRUE if the values can intersect
- */
-typedef gboolean (* GstValueIntersectFunc)   (GValue       *dest,
-                                              const GValue *value1,
-                                              const GValue *value2);
-
-/**
- * GstValueSubtractFunc:
- * @dest: (out caller-allocates): a #GValue for the result
- * @minuend: a #GValue operand
- * @subtrahend: a #GValue operand
- *
- * Used by gst_value_subtract() to perform subtraction for a specific #GValue
- * type. Register a new implementation with gst_value_register_subtract_func().
- *
- * Returns: %TRUE if the subtraction is not empty
- */
-typedef gboolean (* GstValueSubtractFunc)    (GValue       *dest,
-                                              const GValue *minuend,
-                                              const GValue *subtrahend);
-
 typedef struct _GstValueTable GstValueTable;
 /**
  * GstValueTable:
@@ -558,9 +510,6 @@ gboolean        gst_value_union                 (GValue         *dest,
                                                  const GValue   *value2);
 gboolean        gst_value_can_union             (const GValue   *value1,
                                                  const GValue   *value2);
-void            gst_value_register_union_func   (GType          type1,
-                                                 GType          type2,
-                                                 GstValueUnionFunc func);
 
 /* intersection */
 gboolean        gst_value_intersect             (GValue         *dest,
@@ -568,9 +517,6 @@ gboolean        gst_value_intersect             (GValue         *dest,
                                                  const GValue   *value2);
 gboolean        gst_value_can_intersect         (const GValue   *value1,
                                                  const GValue   *value2);
-void            gst_value_register_intersect_func (GType        type1,
-                                                GType           type2,
-                                                GstValueIntersectFunc func);
 
 /* subtraction */
 gboolean        gst_value_subtract              (GValue         *dest,
@@ -578,9 +524,6 @@ gboolean        gst_value_subtract              (GValue         *dest,
                                                  const GValue   *subtrahend);
 gboolean        gst_value_can_subtract          (const GValue   *minuend,
                                                  const GValue   *subtrahend);
-void            gst_value_register_subtract_func (GType         minuend_type,
-                                                GType           subtrahend_type,
-                                                GstValueSubtractFunc func);
 
 /* fixation */
 gboolean        gst_value_is_fixed              (const GValue   *value);
index 910da04..40a0968 100644 (file)
@@ -1195,9 +1195,6 @@ EXPORTS
        gst_value_list_merge
        gst_value_list_prepend_value
        gst_value_register
-       gst_value_register_intersect_func
-       gst_value_register_subtract_func
-       gst_value_register_union_func
        gst_value_serialize
        gst_value_set_bitmask
        gst_value_set_caps