From: Thomas Vander Stichele Date: Sun, 11 Sep 2005 12:01:12 +0000 (+0000) Subject: docs/gst/: rearrange gstvalue section X-Git-Tag: RELEASE-0_9_3~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff783ad5fa4f5082b9e38366e8b8090e4646719f;p=platform%2Fupstream%2Fgstreamer.git docs/gst/: rearrange gstvalue section Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * docs/gst/tmpl/gstvalue.sgml: rearrange gstvalue section * gst/gstutils.c: (gst_element_state_get_name): NONE -> VOID * gst/gstvalue.c: (_gst_value_initialize): * gst/gstvalue.h: doc updates --- diff --git a/ChangeLog b/ChangeLog index 9c91472..e8d388a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-09-11 Thomas Vander Stichele + + * docs/gst/gstreamer-sections.txt: + * docs/gst/tmpl/gstvalue.sgml: + rearrange gstvalue section + * gst/gstutils.c: (gst_element_state_get_name): + NONE -> VOID + * gst/gstvalue.c: (_gst_value_initialize): + * gst/gstvalue.h: + doc updates + 2005-09-10 Jan Schmidt * check/gst-libs/controller.c: diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 43b5485..45a9443 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -2059,19 +2059,65 @@ GST_HAVE_UNALIGNED_ACCESS
gstvalue -GstValue +GStreamer GValue types + + +GST_VALUE_HOLDS_FOURCC GST_MAKE_FOURCC GST_STR_FOURCC GST_FOURCC_FORMAT GST_FOURCC_ARGS -GST_VALUE_HOLDS_FOURCC +GST_TYPE_FOURCC +gst_value_set_fourcc +gst_value_get_fourcc + + GST_VALUE_HOLDS_INT_RANGE +GST_TYPE_INT_RANGE +gst_value_set_int_range +gst_value_get_int_range_min +gst_value_get_int_range_max + + GST_VALUE_HOLDS_DOUBLE_RANGE +GST_TYPE_DOUBLE_RANGE +gst_value_set_double_range +gst_value_get_double_range_min +gst_value_get_double_range_max + + GST_VALUE_HOLDS_LIST -GST_VALUE_HOLDS_CAPS -GST_VALUE_HOLDS_FRACTION +GST_TYPE_LIST GST_VALUE_HOLDS_ARRAY +GST_TYPE_ARRAY +gst_value_list_append_value +gst_value_list_prepend_value +gst_value_list_concat +gst_value_list_get_size +gst_value_list_get_value + + +GST_VALUE_HOLDS_FRACTION +GST_TYPE_FRACTION +gst_value_set_fraction +gst_value_get_fraction_numerator +gst_value_get_fraction_denominator +gst_value_fraction_multiply + + +GST_VALUE_HOLDS_CAPS +gst_value_set_caps +gst_value_get_caps + + GST_VALUE_HOLDS_MINI_OBJECT + +GST_VALUE_HOLDS_BUFFER +gst_value_get_buffer +gst_value_set_buffer +gst_value_take_buffer + + GST_VALUE_LESS_THAN GST_VALUE_EQUAL GST_VALUE_GREATER_THAN @@ -2090,28 +2136,6 @@ gst_value_register gst_value_init_and_copy gst_value_serialize gst_value_deserialize -gst_value_list_append_value -gst_value_list_prepend_value -gst_value_list_concat -gst_value_list_get_size -gst_value_list_get_value -gst_value_set_fourcc -gst_value_get_fourcc -gst_value_set_int_range -gst_value_get_int_range_min -gst_value_get_int_range_max -gst_value_set_double_range -gst_value_get_double_range_min -gst_value_get_double_range_max -gst_value_get_caps -gst_value_set_caps -gst_value_get_fraction_numerator -gst_value_get_fraction_denominator -gst_value_set_fraction -gst_value_get_buffer -gst_value_set_buffer -gst_value_take_buffer -gst_value_fraction_multiply gst_value_compare gst_value_can_compare gst_value_union @@ -2124,15 +2148,8 @@ gst_value_intersect gst_value_can_intersect gst_value_register_intersect_func -GST_TYPE_FOURCC -GST_TYPE_INT_RANGE -GST_TYPE_DOUBLE_RANGE -GST_TYPE_LIST -GST_TYPE_FRACTION -GST_TYPE_ARRAY
-
gstversion GstVersion diff --git a/docs/gst/tmpl/gstvalue.sgml b/docs/gst/tmpl/gstvalue.sgml index 46b27b3..299cf49 100644 --- a/docs/gst/tmpl/gstvalue.sgml +++ b/docs/gst/tmpl/gstvalue.sgml @@ -17,190 +17,194 @@ GValue implementations specific to GStreamer + + + +@x: + + - -will transform four characters into a host-endiannness guint32 fourcc: - - -guint32 fourcc = GST_MAKE_FOURCC ('M','J','P','G'); - - - -@a: the first component -@b: the second component -@c: the third component -@d: the fourth component + +@a: +@b: +@c: +@d: - -Creates a fourcc from an input string. The input string should consisnt -of at least four characters (this is not checked for!). - - -guint32 fourcc = GST_STR_FOURCC("MJPG"); - - - -@f: a string with four characters + +@f: + + + + + + + +@fourcc: + + + -Can be used to properly output a fourcc (a guint32) value in a -printf()-style text message. - - -printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); - - + - + -Can be used to properly output a fourcc (a guint32) value in a -printf()-style text message. - - -printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); - - + -@fourcc: the fourcc value to print +@value: +@fourcc: - + -Checks if the give GValue contains a FOURCC value. + -@x: the #GValue to check +@value: +@Returns: + + +@x: + + + -Checks if the give GValue contains a INT_RANGE value. + -@x: the #GValue to check - + -Checks if the give GValue contains a DOUBLE_RANGE value. + -@x: the #GValue to check +@value: +@start: +@end: - + -Checks if the give GValue contains a LIST value. + -@x: the #GValue to check +@value: +@Returns: - + -Checks if the give GValue contains a CAPS value. + -@x: the #GValue to check +@value: +@Returns: - + + + +@x: + + + -Checks if the give GValue contains a FRACTION value. + -@x: the #GValue to check - + -@x: +@value: +@start: +@end: - + @value: +@Returns: - + -Indicates that the first value provided to a comparison function -(gst_value_compare()) is lesser than the second one. + +@value: +@Returns: - + -Indicates that the first value provided to a comparison function -(gst_value_compare()) is equal to the second one. +Checks if the give GValue contains a LIST value. +@x: the #GValue to check - + -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. + +@x: - + -@value1: -@value2: -@Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, -GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED - + -@value1: -@Returns: +@value: +@append_value: - + -@dest: -@s: -@Returns: +@value: +@prepend_value: - + @@ -208,68 +212,62 @@ GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED @dest: @value1: @value2: -@Returns: - + -@dest: -@value1: -@value2: +@value: @Returns: - + -@dest: -@minuend: -@subtrahend: +@value: +@index: @Returns: - + - +Checks if the give GValue contains a FRACTION value. -@type: -@compare: -@serialize: -@deserialize: +@x: the #GValue to check - + + -@value: -@Returns: - + -@table: +@value: +@numerator: +@denominator: - + -@dest: -@src: +@value: +@Returns: - + @@ -278,219 +276,234 @@ GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED @Returns: - + -@dest: -@src: +@product: +@factor1: +@factor2: @Returns: - + - +Checks if the give GValue contains a CAPS value. -@value: -@append_value: +@x: the #GValue to check - + @value: -@prepend_value: +@caps: + +@calue: - + -@dest: -@value1: -@value2: +@value: +@Returns: - + @value: -@Returns: - + -@value: -@index: -@Returns: +@x: - + -@value: -@fourcc: +@v: - + -@value: -@Returns: +@v: +@b: - + -@value: -@start: -@end: +@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. -@value: -@Returns: - + +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. -@value: -@Returns: - + -@value: -@start: -@end: +@value1: +@value2: +@Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, +GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED - + -@value: +@value1: @Returns: - + -@value: +@dest: +@s: @Returns: - + -@value: +@dest: +@value1: +@value2: @Returns: - + -@value: -@caps: - -@calue: +@dest: +@value1: +@value2: +@Returns: - + -@value: +@dest: +@minuend: +@subtrahend: @Returns: - + -@value: -@Returns: - +@type: +@compare: +@serialize: +@deserialize: - + @value: -@numerator: -@denominator: +@Returns: - + -@v: +@table: - + -@v: -@b: +@dest: +@src: - + -@v: -@b: +@value: +@Returns: - + -@product: -@factor1: -@factor2: +@dest: +@src: @Returns: diff --git a/gst/gstutils.c b/gst/gstutils.c index 447bf9a..a43efaa 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -715,7 +715,7 @@ gst_element_state_get_name (GstState state) switch (state) { #ifdef GST_DEBUG_COLOR case GST_STATE_VOID_PENDING: - return "NONE_PENDING"; + return "VOID_PENDING"; break; case GST_STATE_NULL: return "\033[01;34mNULL\033[00m"; @@ -734,7 +734,7 @@ gst_element_state_get_name (GstState state) return g_strdup_printf ("\033[01;35;41mUNKNOWN!\033[00m(%d)", state); #else case GST_STATE_VOID_PENDING: - return "NONE_PENDING"; + return "VOID_PENDING"; break; case GST_STATE_NULL: return "NULL"; diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 3c01829..43bf8e1 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -274,7 +274,7 @@ gst_value_list_append_value (GValue * value, const GValue * append_value) /** * gst_value_list_get_size: - * @value: a GstValueList + * @value: a #GValue of type #GST_LIST_TYPE or #GST_ARRAY_TYPE * * Gets the number of values contained in @value. * @@ -291,7 +291,7 @@ gst_value_list_get_size (const GValue * value) /** * gst_value_list_get_value: - * @value: a GstValueList + * @value: a #GValue of type #GST_LIST_TYPE or #GST_ARRAY_TYPE * @index: index of value to get from the list * * Gets the value that is a member of the list contained in @value and @@ -466,8 +466,8 @@ gst_value_lcopy_fourcc (const GValue * value, guint n_collect_values, /** * gst_value_set_fourcc: - * @value: a GValue initialized to GST_TYPE_FOURCC - * @fourcc: the fourcc to set + * @value: a GValue initialized to #GST_TYPE_FOURCC + * @fourcc: the #guint32 fourcc to set * * Sets @value to @fourcc. */ @@ -481,11 +481,11 @@ gst_value_set_fourcc (GValue * value, guint32 fourcc) /** * gst_value_get_fourcc: - * @value: a GValue initialized to GST_TYPE_FOURCC + * @value: a GValue initialized to #GST_TYPE_FOURCC * - * Gets the fourcc contained in @value. + * Gets the #guint32 fourcc contained in @value. * - * Returns: the fourcc contained in @value. + * Returns: the #guint32 fourcc contained in @value. */ guint32 gst_value_get_fourcc (const GValue * value) @@ -2685,7 +2685,7 @@ gst_value_lcopy_fraction (const GValue * value, guint n_collect_values, /** * gst_value_set_fraction: - * @value: a GValue initialized to GST_TYPE_FRACTION + * @value: a GValue initialized to #GST_TYPE_FRACTION * @numerator: the numerator of the fraction * @denominator: the denominator of the fraction * @@ -2721,7 +2721,7 @@ gst_value_set_fraction (GValue * value, gint numerator, gint denominator) /** * gst_value_get_fraction_numerator: - * @value: a GValue initialized to GST_TYPE_FRACTION + * @value: a GValue initialized to #GST_TYPE_FRACTION * * Gets the numerator of the fraction specified by @value. * @@ -2737,7 +2737,7 @@ gst_value_get_fraction_numerator (const GValue * value) /** * gst_value_get_fraction_denominator: - * @value: a GValue initialized to GST_TYPE_FRACTION + * @value: a GValue initialized to #GST_TYPE_FRACTION * * Gets the denominator of the fraction specified by @value. * @@ -2753,9 +2753,9 @@ gst_value_get_fraction_denominator (const GValue * value) /** * gst_value_fraction_multiply: - * @product: a GValue initialized to GST_TYPE_FRACTION - * @factor1: a GValue initialized to GST_TYPE_FRACTION - * @factor2: a GValue initialized to GST_TYPE_FRACTION + * @product: a GValue initialized to #GST_TYPE_FRACTION + * @factor1: a GValue initialized to #GST_TYPE_FRACTION + * @factor2: a GValue initialized to #GST_TYPE_FRACTION * * Multiplies the two GValues containing a GstFraction and sets @product * to the product of the two fractions. @@ -3142,11 +3142,6 @@ _gst_value_initialize (void) gst_value_deserialize_buffer, }; -#if 0 - info.value_table = &value_table; - gst_type_fourcc = - g_type_register_static (G_TYPE_BOXED, "GstFourcc", &info, 0); -#endif gst_value.type = GST_TYPE_BUFFER; gst_value_register (&gst_value); } diff --git a/gst/gstvalue.h b/gst/gstvalue.h index ccdb6d9..137b51a 100644 --- a/gst/gstvalue.h +++ b/gst/gstvalue.h @@ -25,29 +25,129 @@ G_BEGIN_DECLS +/** + * GST_MAKE_FOURCC: + * @a: the first character + * @b: the second character + * @c: the third character + * @d: the fourth character + * + * Transform four characters into a #guint32 fourcc value with host + * endianness. + * + * + * guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G'); + * + * + */ #define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24) + +/** + * GST_STR_FOURCC: + * @f: a string with at least four characters + * + * Transform an input string into a #guint32 fourcc value with host + * endianness. + * Caller is responsible for ensuring the input string consists of at least + * four characters. + * + * + * guint32 fourcc = GST_STR_FOURCC ("MJPG"); + * + * + */ #define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24)) +/** + * GST_FOURCC_FORMAT: + * + * Can be used together with #GST_FOURCC_ARGS to properly output a + * #guint32 fourcc value in a printf()-style text message. + * + * + * printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); + * + * + */ #define GST_FOURCC_FORMAT "%c%c%c%c" + +/** + * GST_FOURCC_ARGS: + * @fourcc: a #guint32 fourcc value to output + * + * Can be used together with #GST_FOURCC_FORMAT to properly output a + * #guint32 fourcc value in a printf()-style text message. + */ #define GST_FOURCC_ARGS(fourcc) \ ((gchar) ((fourcc) &0xff)), \ ((gchar) (((fourcc)>>8 )&0xff)), \ ((gchar) (((fourcc)>>16)&0xff)), \ ((gchar) (((fourcc)>>24)&0xff)) +/** + * GST_VALUE_HOLDS_FOURCC: + * + * Checks if the given #GValue contains a #GST_TYPE_FOURCC value. + * + * @x: the #GValue to check + */ #define GST_VALUE_HOLDS_FOURCC(x) (G_VALUE_HOLDS(x, gst_type_fourcc)) + +/** + * GST_VALUE_HOLDS_INT_RANGE: + * + * Checks if the given #GValue contains a #GST_TYPE_INT_RANGE value. + * + * @x: the #GValue to check + */ #define GST_VALUE_HOLDS_INT_RANGE(x) (G_VALUE_HOLDS(x, gst_type_int_range)) + +/** + * GST_VALUE_HOLDS_DOUBLE_RANGE: + * + * Checks if the given #GValue contains a #GST_TYPE_DOUBLE_RANGE value. + * + * @x: the #GValue to check + */ #define GST_VALUE_HOLDS_DOUBLE_RANGE(x) (G_VALUE_HOLDS(x, gst_type_double_range)) #define GST_VALUE_HOLDS_LIST(x) (G_VALUE_HOLDS(x, gst_type_list)) #define GST_VALUE_HOLDS_ARRAY(x) (G_VALUE_HOLDS(x, gst_type_array)) #define GST_VALUE_HOLDS_CAPS(x) (G_VALUE_HOLDS(x, GST_TYPE_CAPS)) +#define GST_VALUE_HOLDS_BUFFER(x) (G_VALUE_HOLDS(x, GST_TYPE_BUFFER)) + #define GST_VALUE_HOLDS_FRACTION(x) (G_VALUE_HOLDS(x, gst_type_fraction)) #define GST_TYPE_FOURCC gst_type_fourcc #define GST_TYPE_INT_RANGE gst_type_int_range #define GST_TYPE_DOUBLE_RANGE gst_type_double_range +/** + * GST_TYPE_LIST: + * + * a #GValue type that represents an unordered list of #GValue values + * + * Returns: the #GType of GstValueList (which is not explicitly typed) + */ + #define GST_TYPE_LIST gst_type_list + +/** + * GST_TYPE_ARRAY: + * + * a #GValue type that represents an ordered list of #GValue values + * + * Returns: the #GType of GstArrayList (which is not explicitly typed) + */ #define GST_TYPE_ARRAY gst_type_array + +/** + * GST_TYPE_FRACTION: + * + * a #GValue type that represents a fraction of an integer numerator over + * an integer denominator + * + * Returns: the #GType of GstFraction (which is not explicitly typed) + */ + #define GST_TYPE_FRACTION gst_type_fraction #define GST_VALUE_LESS_THAN (-1)