gst/gstvalue.c: Add some documentation

Original commit message from CVS:
* gst/gstvalue.c: Add some documentation
This commit is contained in:
David Schleef 2005-01-05 23:21:18 +00:00
parent 35441095b2
commit b7f6134053
2 changed files with 55 additions and 8 deletions

View file

@ -1,3 +1,7 @@
2005-01-05 David Schleef <ds@schleef.org>
* gst/gstvalue.c: Add some documentation
2005-01-05 Stefan Kost <ensonic@users.sf.net>
* docs/README:

View file

@ -2029,8 +2029,13 @@ gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func)
/**
* gst_value_can_intersect:
* @value1:
* @value2:
* @value1: a value to intersect
* @value2: another value to intersect
*
* Determines if intersecting two values will produce a valid result.
* Two values will produce a valid intersection if they have the same
* type, or if there is a method (registered by
* #gst_value_register_intersection_func) to calculate the intersection.
*
* Returns:
*/
@ -2059,11 +2064,15 @@ gst_value_can_intersect (const GValue * value1, const GValue * value2)
/**
* gst_value_intersect:
* @dest: the destination value for intersection
* @dest: a uninitialized #GValue that will hold the calculated
* intersection value
* @value1: a value to intersect
* @value2: another value to intersect
*
* Calculates the intersection of the two values.
* Calculates the intersection of two values. If the values have
* a non-empty intersection, the value representing the intersection
* is placed in @dest. If the intersection is non-empty, @dest is
* not modified.
*
* Returns: TRUE if the intersection is non-empty
*/
@ -2106,10 +2115,26 @@ gst_value_intersect (GValue * dest, const GValue * value1,
/**
* gst_value_register_intersection_func:
* @type1:
* @type2:
* @func:
* @type1: the first type to intersect
* @type2: the second type to intersect
* @func: the intersection function
*
* Registers a function that is called to calculate the intersection
* of the values having the types @type1 and @type2.
*/
/**
* GstValueIntersectFunc:
* @dest: a uninitialized #GValue that will hold the calculated
* intersection value
* @value1: a value to intersect
* @value2: another value to intersect
*
* Functions having this type calculate the intersection of @value1
* and @value2. 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.
*
* Returns: TRUE if the intersection is non-empty, FALSE otherwise
*/
void
gst_value_register_intersect_func (GType type1, GType type2,
@ -2238,8 +2263,26 @@ gst_value_register_subtract_func (GType minuend_type, GType subtrahend_type,
/**
* gst_value_register:
* @table:
* @table: structure containing functions to register
*
* Registers functions to perform calculations on #GValues of a given
* type.
*/
/**
* GstValueTable:
*
* type - GType that the functions operate on.
*
* compare - A function that compares two values of this type.
*
* serialize - A function that transforms a value of this type to a
* string. Strings created by this function must be unique and should
* be human readable.
*
* deserialize - A function that transforms a string to a value of
* this type. This function must transform strings created by the
* serialize function back to the original value. This function may
* optionally transform other strings into values.
*/
void
gst_value_register (const GstValueTable * table)