diff --git a/ChangeLog b/ChangeLog index 49febfc10c..094fff19c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-09-21 Stefan Kost + + * docs/gst/tmpl/.cvsignore: + * docs/gst/tmpl/gstvalue.sgml: + * gst/gstvalue.c: + * gst/gstvalue.h: + inlied another one and added some obvious docs + 2005-09-21 Wim Taymans * gst/elements/gstfdsrc.c: (gst_fdsrc_class_init), diff --git a/docs/gst/tmpl/.gitignore b/docs/gst/tmpl/.gitignore index 5af4c5b013..158e81ec4d 100644 --- a/docs/gst/tmpl/.gitignore +++ b/docs/gst/tmpl/.gitignore @@ -56,6 +56,7 @@ gsttypes.sgml gsturihandler.sgml gsturitype.sgml gstutils.sgml +gstvalue.sgml gstversion.sgml gstxml.sgml gstxmlregistry.sgml diff --git a/docs/gst/tmpl/gstvalue.sgml b/docs/gst/tmpl/gstvalue.sgml deleted file mode 100644 index 299cf49375..0000000000 --- a/docs/gst/tmpl/gstvalue.sgml +++ /dev/null @@ -1,622 +0,0 @@ - -GstValue - - -GValue implementations specific to GStreamer - - - - - - - - - - - - - - - - - -@x: - - - - - -@a: -@b: -@c: -@d: - - - - - -@f: - - - - - - - - - - -@fourcc: - - - - - - - - - - - - - - -@value: -@fourcc: - - - - - - - -@value: -@Returns: - - - - - -@x: - - - - - - - - - - - - - - -@value: -@start: -@end: - - - - - - - -@value: -@Returns: - - - - - - - -@value: -@Returns: - - - - - -@x: - - - - - - - - - - - - - - -@value: -@start: -@end: - - - - - - - -@value: -@Returns: - - - - - - - -@value: -@Returns: - - - - -Checks if the give GValue contains a LIST value. - - -@x: the #GValue to check - - - - - - - - - - - - - - -@x: - - - - - - - - - - - - - - -@value: -@append_value: - - - - - - - -@value: -@prepend_value: - - - - - - - -@dest: -@value1: -@value2: - - - - - - - -@value: -@Returns: - - - - - - - -@value: -@index: -@Returns: - - - - -Checks if the give GValue contains a FRACTION value. - - -@x: the #GValue to check - - - - - - - - - - - - - - -@value: -@numerator: -@denominator: - - - - - - - -@value: -@Returns: - - - - - - - -@value: -@Returns: - - - - - - - -@product: -@factor1: -@factor2: -@Returns: - - - - -Checks if the give GValue contains a CAPS value. - - -@x: the #GValue to check - - - - - - - -@value: -@caps: - -@calue: - - - - - - - -@value: -@Returns: - - - - - - - -@value: - - - - - - - -@x: - - - - - - - -@v: - - - - - - - -@v: -@b: - - - - - - - -@v: -@b: - - - - -Indicates that the first value provided to a comparison function -(gst_value_compare()) is lesser than the second one. - - - - - - -Indicates that the first value provided to a comparison function -(gst_value_compare()) is equal to the second one. - - - - - - -Indicates that the first value provided to a comparison function -(gst_value_compare()) is greater than the second one. - - - - - - -Indicates that the comparison function (gst_value_compare()) can not -determine a order for the two provided values. - - - - - - - - - -@value1: -@value2: -@Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, -GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED - - - - - - - -@value1: -@Returns: - - - - - - - -@dest: -@s: -@Returns: - - - - - - - -@dest: -@value1: -@value2: -@Returns: - - - - - - - -@dest: -@value1: -@value2: -@Returns: - - - - - - - -@dest: -@minuend: -@subtrahend: -@Returns: - - - - - - - -@type: -@compare: -@serialize: -@deserialize: - - - - - - -@value: -@Returns: - - - - - - - -@table: - - - - - - - -@dest: -@src: - - - - - - - -@value: -@Returns: - - - - - - - -@dest: -@src: -@Returns: - - - - - - - -@value1: -@value2: -@Returns: - - - - - - - -@value1: -@value2: -@Returns: - - - - - - - -@dest: -@value1: -@value2: -@Returns: - - - - - - - -@value1: -@value2: -@Returns: - - - - - - - -@type1: -@type2: -@func: - - - - - - - -@dest: -@minuend: -@subtrahend: -@Returns: - - - - - - - -@minuend: -@subtrahend: -@Returns: - - - - - - - -@minuend_type: -@subtrahend_type: -@func: - - - - - - - -@dest: -@value1: -@value2: -@Returns: - - - - - - - -@value1: -@value2: -@Returns: - - - - - - - -@type1: -@type2: -@func: - - diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 43bf8e1a5e..135851b335 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -16,6 +16,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:gstvalue + * @short_description: GValue implementations specific to GStreamer + * + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/gstvalue.h b/gst/gstvalue.h index 45d86d853a..a4ba95b178 100644 --- a/gst/gstvalue.h +++ b/gst/gstvalue.h @@ -107,16 +107,74 @@ G_BEGIN_DECLS * Checks if the given #GValue contains a #GST_TYPE_DOUBLE_RANGE value. */ #define GST_VALUE_HOLDS_DOUBLE_RANGE(x) (G_VALUE_HOLDS(x, gst_type_double_range)) + +/** + * GST_VALUE_HOLDS_LIST: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_LIST value. + */ #define GST_VALUE_HOLDS_LIST(x) (G_VALUE_HOLDS(x, gst_type_list)) + +/** + * GST_VALUE_HOLDS_ARRAY: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_ARRAY value. + */ #define GST_VALUE_HOLDS_ARRAY(x) (G_VALUE_HOLDS(x, gst_type_array)) + +/** + * GST_VALUE_HOLDS_CAPS: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_CAPS value. + */ #define GST_VALUE_HOLDS_CAPS(x) (G_VALUE_HOLDS(x, GST_TYPE_CAPS)) + +/** + * GST_VALUE_HOLDS_BUFFER: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_BUFFER value. + */ #define GST_VALUE_HOLDS_BUFFER(x) (G_VALUE_HOLDS(x, GST_TYPE_BUFFER)) +/** + * GST_VALUE_HOLDS_FRACTION: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_FRACTION value. + */ #define GST_VALUE_HOLDS_FRACTION(x) (G_VALUE_HOLDS(x, gst_type_fraction)) +/** + * GST_TYPE_FOURCC: + * + * a #GValue type that represents 4 byte identifier (e.g. used for codecs) + * + * Returns: the #GType of GstFourcc + */ #define GST_TYPE_FOURCC gst_type_fourcc + +/** + * GST_TYPE_INT_RANGE: + * + * a #GValue type that represents an integer range + * + * Returns: the #GType of GstIntRange + */ #define GST_TYPE_INT_RANGE gst_type_int_range + +/** + * GST_TYPE_DOUBLE_RANGE: + * + * a #GValue type that represents a floating point range with double precission + * + * Returns: the #GType of GstIntRange + */ #define GST_TYPE_DOUBLE_RANGE gst_type_double_range + /** * GST_TYPE_LIST: * @@ -124,7 +182,6 @@ G_BEGIN_DECLS * * Returns: the #GType of GstValueList (which is not explicitly typed) */ - #define GST_TYPE_LIST gst_type_list /** @@ -147,22 +204,65 @@ G_BEGIN_DECLS #define GST_TYPE_FRACTION gst_type_fraction + +/** + * GST_VALUE_LESS_THAN: + * + * Indicates that the first value provided to a comparison function + * (gst_value_compare()) is lesser than the second one. + */ #define GST_VALUE_LESS_THAN (-1) + +/** + * GST_VALUE_EQUAL: + * + * Indicates that the first value provided to a comparison function + * (gst_value_compare()) is equal to the second one. + */ #define GST_VALUE_EQUAL 0 + +/** + * GST_VALUE_GREATER_THAN: + * + * Indicates that the first value provided to a comparison function + * (gst_value_compare()) is greater than the second one. + */ #define GST_VALUE_GREATER_THAN 1 + +/** + * GST_VALUE_UNORDERED: + * + * Indicates that the comparison function (gst_value_compare()) can not + * determine a order for the two provided values. + */ #define GST_VALUE_UNORDERED 2 +/** + * GstValueCompareFunc: + * @value1: first value for comparission + * @value2: second value for comparission + * + * Used together with gst_value_compare() to compare #GValues. + * + * Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN + * or GST_VALUE_UNORDERED + */ typedef int (* GstValueCompareFunc) (const GValue *value1, const GValue *value2); + typedef char * (* GstValueSerializeFunc) (const GValue *value1); + typedef gboolean (* GstValueDeserializeFunc) (GValue *dest, const char *s); + typedef int (* GstValueUnionFunc) (GValue *dest, const GValue *value1, const GValue *value2); + typedef int (* GstValueIntersectFunc) (GValue *dest, const GValue *value1, const GValue *value2); + typedef int (* GstValueSubtractFunc) (GValue *dest, const GValue *minuend, const GValue *subtrahend);