X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstvalue.h;h=7eeaf393d153a0ff2862b8314a198ba1d3b4b0b4;hb=0c6f5b3e4c3dc55e684bca1e3fc9a2a9b74407b9;hp=3bf9222966b9b8641373c8c6b898f8a5b30c7658;hpb=c2c977602754ca2c471482839deb421925014025;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstvalue.h b/gst/gstvalue.h index 3bf9222..7eeaf39 100644 --- a/gst/gstvalue.h +++ b/gst/gstvalue.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GST_VALUE_H__ @@ -23,6 +23,7 @@ #include #include #include +#include G_BEGIN_DECLS @@ -35,13 +36,14 @@ G_BEGIN_DECLS * * 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)) +#define GST_MAKE_FOURCC(a,b,c,d) \ + ( (guint32)(a) | ((guint32) (b)) << 8 | ((guint32) (c)) << 16 | ((guint32) (d)) << 24 ) /** * GST_STR_FOURCC: @@ -51,57 +53,57 @@ G_BEGIN_DECLS * 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: + * GST_FOURCC_FORMAT: (skip): * * 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: + * GST_FOURCC_ARGS: (skip): * @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)) +#define __GST_PRINT_CHAR(c) \ + g_ascii_isprint(c) ? (c) : '.' +#define GST_FOURCC_ARGS(fourcc) \ + __GST_PRINT_CHAR((fourcc) & 0xff), \ + __GST_PRINT_CHAR(((fourcc) >> 8) & 0xff), \ + __GST_PRINT_CHAR(((fourcc) >> 16) & 0xff), \ + __GST_PRINT_CHAR(((fourcc) >> 24) & 0xff) /** * GST_VALUE_HOLDS_INT_RANGE: * @x: the #GValue to check * * Checks if the given #GValue contains a #GST_TYPE_INT_RANGE value. */ -#define GST_VALUE_HOLDS_INT_RANGE(x) (G_VALUE_HOLDS((x), gst_int_range_get_type ())) +#define GST_VALUE_HOLDS_INT_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_int_range_type) /** * GST_VALUE_HOLDS_INT64_RANGE: * @x: the #GValue to check * * Checks if the given #GValue contains a #GST_TYPE_INT64_RANGE value. - * - * Since: 0.10.31 */ -#define GST_VALUE_HOLDS_INT64_RANGE(x) (G_VALUE_HOLDS((x), gst_int64_range_get_type ())) +#define GST_VALUE_HOLDS_INT64_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_int64_range_type) /** * GST_VALUE_HOLDS_DOUBLE_RANGE: @@ -109,7 +111,7 @@ 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_double_range_get_type ())) +#define GST_VALUE_HOLDS_DOUBLE_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_double_range_type) /** * GST_VALUE_HOLDS_FRACTION_RANGE: @@ -117,7 +119,7 @@ G_BEGIN_DECLS * * Checks if the given #GValue contains a #GST_TYPE_FRACTION_RANGE value. */ -#define GST_VALUE_HOLDS_FRACTION_RANGE(x) (G_VALUE_HOLDS((x), gst_fraction_range_get_type ())) +#define GST_VALUE_HOLDS_FRACTION_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_range_type) /** * GST_VALUE_HOLDS_LIST: @@ -125,7 +127,7 @@ G_BEGIN_DECLS * * Checks if the given #GValue contains a #GST_TYPE_LIST value. */ -#define GST_VALUE_HOLDS_LIST(x) (G_VALUE_HOLDS((x), gst_value_list_get_type ())) +#define GST_VALUE_HOLDS_LIST(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_value_list_type) /** * GST_VALUE_HOLDS_ARRAY: @@ -133,7 +135,7 @@ G_BEGIN_DECLS * * Checks if the given #GValue contains a #GST_TYPE_ARRAY value. */ -#define GST_VALUE_HOLDS_ARRAY(x) (G_VALUE_HOLDS((x), gst_value_array_get_type ())) +#define GST_VALUE_HOLDS_ARRAY(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_value_array_type) /** * GST_VALUE_HOLDS_CAPS: @@ -141,17 +143,23 @@ G_BEGIN_DECLS * * Checks if the given #GValue contains a #GST_TYPE_CAPS value. */ -#define GST_VALUE_HOLDS_CAPS(x) (G_VALUE_HOLDS((x), GST_TYPE_CAPS)) +#define GST_VALUE_HOLDS_CAPS(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_caps_type) /** * GST_VALUE_HOLDS_STRUCTURE: * @x: the #GValue to check * * Checks if the given #GValue contains a #GST_TYPE_STRUCTURE value. + */ +#define GST_VALUE_HOLDS_STRUCTURE(x) (G_VALUE_HOLDS((x), _gst_structure_type)) + +/** + * GST_VALUE_HOLDS_CAPS_FEATURES: + * @x: the #GValue to check * - * Since: 0.10.15 + * Checks if the given #GValue contains a #GST_TYPE_CAPS_FEATURES value. */ -#define GST_VALUE_HOLDS_STRUCTURE(x) (G_VALUE_HOLDS((x), GST_TYPE_STRUCTURE)) +#define GST_VALUE_HOLDS_CAPS_FEATURES(x) (G_VALUE_HOLDS((x), _gst_caps_features_type)) /** * GST_VALUE_HOLDS_BUFFER: @@ -159,33 +167,62 @@ G_BEGIN_DECLS * * Checks if the given #GValue contains a #GST_TYPE_BUFFER value. */ -#define GST_VALUE_HOLDS_BUFFER(x) (G_VALUE_HOLDS((x), GST_TYPE_BUFFER)) +#define GST_VALUE_HOLDS_BUFFER(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_buffer_type) /** - * GST_VALUE_HOLDS_FRACTION: + * GST_VALUE_HOLDS_SAMPLE: * @x: the #GValue to check * - * Checks if the given #GValue contains a #GST_TYPE_FRACTION value. + * Checks if the given #GValue contains a #GST_TYPE_SAMPLE value. */ -#define GST_VALUE_HOLDS_FRACTION(x) (G_VALUE_HOLDS((x), gst_fraction_get_type ())) +#define GST_VALUE_HOLDS_SAMPLE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_sample_type) /** - * GST_VALUE_HOLDS_DATE: + * GST_VALUE_HOLDS_FRACTION: * @x: the #GValue to check * - * Checks if the given #GValue contains a #GST_TYPE_DATE value. + * Checks if the given #GValue contains a #GST_TYPE_FRACTION value. */ -#define GST_VALUE_HOLDS_DATE(x) (G_VALUE_HOLDS((x), gst_date_get_type ())) +#define GST_VALUE_HOLDS_FRACTION(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_type) /** * GST_VALUE_HOLDS_DATE_TIME: * @x: the #GValue to check * * Checks if the given #GValue contains a #GST_TYPE_DATE_TIME value. + */ +#define GST_VALUE_HOLDS_DATE_TIME(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_date_time_type) + +/** + * GST_VALUE_HOLDS_BITMASK: + * @x: the #GValue to check * - * Since: 0.10.31 + * Checks if the given #GValue contains a #GST_TYPE_BITMASK value. */ -#define GST_VALUE_HOLDS_DATE_TIME(x) (G_VALUE_HOLDS((x), gst_date_time_get_type ())) +#define GST_VALUE_HOLDS_BITMASK(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_bitmask_type) + +/** + * GST_VALUE_HOLDS_FLAG_SET: + * @x: the #GValue to check + * + * Checks if the given #GValue contains a #GST_TYPE_FLAG_SET value. + * + * Since: 1.6 + */ +#define GST_VALUE_HOLDS_FLAG_SET(x) (G_TYPE_CHECK_VALUE_TYPE ((x), GST_TYPE_FLAG_SET)) + +/** + * GST_FLAG_SET_MASK_EXACT: (value 4294967295) (type guint) + * + * A mask value with all bits set, for use as a + * GstFlagSet mask where all flag bits must match + * exactly + * + * Since: 1.6 + */ +#define GST_FLAG_SET_MASK_EXACT ((guint)(-1)) + +GST_API GType _gst_int_range_type; /** * GST_TYPE_INT_RANGE: @@ -194,7 +231,9 @@ G_BEGIN_DECLS * * Returns: the #GType of GstIntRange */ -#define GST_TYPE_INT_RANGE gst_int_range_get_type () +#define GST_TYPE_INT_RANGE (_gst_int_range_type) + +GST_API GType _gst_int64_range_type; /** * GST_TYPE_INT64_RANGE: @@ -202,19 +241,21 @@ G_BEGIN_DECLS * a #GValue type that represents an #gint64 range * * Returns: the #GType of GstInt64Range - * - * Since: 0.10.31 */ -#define GST_TYPE_INT64_RANGE gst_int64_range_get_type () +#define GST_TYPE_INT64_RANGE (_gst_int64_range_type) + +GST_API GType _gst_double_range_type; /** * GST_TYPE_DOUBLE_RANGE: * - * a #GValue type that represents a floating point range with double precission + * a #GValue type that represents a floating point range with double precision * * Returns: the #GType of GstIntRange */ -#define GST_TYPE_DOUBLE_RANGE gst_double_range_get_type () +#define GST_TYPE_DOUBLE_RANGE (_gst_double_range_type) + +GST_API GType _gst_fraction_range_type; /** * GST_TYPE_FRACTION_RANGE: @@ -223,7 +264,9 @@ G_BEGIN_DECLS * * Returns: the #GType of GstFractionRange */ -#define GST_TYPE_FRACTION_RANGE gst_fraction_range_get_type () +#define GST_TYPE_FRACTION_RANGE (_gst_fraction_range_type) + +GST_API GType _gst_value_list_type; /** * GST_TYPE_LIST: @@ -236,7 +279,9 @@ G_BEGIN_DECLS * * Returns: the #GType of GstValueList (which is not explicitly typed) */ -#define GST_TYPE_LIST gst_value_list_get_type () +#define GST_TYPE_LIST (_gst_value_list_type) + +GST_API GType _gst_value_array_type; /** * GST_TYPE_ARRAY: @@ -250,7 +295,9 @@ G_BEGIN_DECLS * * Returns: the #GType of GstArrayList (which is not explicitly typed) */ -#define GST_TYPE_ARRAY gst_value_array_get_type () +#define GST_TYPE_ARRAY (_gst_value_array_type) + +GST_API GType _gst_fraction_type; /** * GST_TYPE_FRACTION: @@ -261,28 +308,44 @@ G_BEGIN_DECLS * Returns: the #GType of GstFraction (which is not explicitly typed) */ -#define GST_TYPE_FRACTION gst_fraction_get_type () +#define GST_TYPE_FRACTION (_gst_fraction_type) + +GST_API GType _gst_bitmask_type; /** - * GST_TYPE_DATE: + * GST_TYPE_BITMASK: * - * a boxed #GValue type for #GDate that represents a date. + * a #GValue type that represents a 64-bit bitmask. * - * Returns: the #GType of GstDate + * Returns: the #GType of GstBitmask (which is not explicitly typed) */ -#define GST_TYPE_DATE gst_date_get_type () +#define GST_TYPE_BITMASK (_gst_bitmask_type) + +GST_API GType _gst_flagset_type; /** - * GST_TYPE_DATE_TIME: + * GST_TYPE_FLAG_SET: * - * a boxed #GValue type for #GstDateTime that represents a date and time. + * a #GValue type that represents a 32-bit flag bitfield, with 32-bit + * mask indicating which of the bits in the field are explicitly set. + * Useful for negotiation. * - * Returns: the #GType of GstDateTime - * Since: 0.10.31 + * Returns: the #GType of GstFlags (which is not explicitly typed) + * + * Since: 1.6 */ +#define GST_TYPE_FLAG_SET (_gst_flagset_type) -#define GST_TYPE_DATE_TIME gst_date_time_get_type () +/** + * GST_TYPE_G_THREAD: + * + * a boxed #GValue type for #GThread that represents a thread. + * + * Returns: the #GType of GstGThread + */ + +#define GST_TYPE_G_THREAD gst_g_thread_get_type () /** * GST_VALUE_LESS_THAN: @@ -327,7 +390,7 @@ G_BEGIN_DECLS * or GST_VALUE_UNORDERED */ typedef gint (* GstValueCompareFunc) (const GValue *value1, - const GValue *value2); + const GValue *value2); /** * GstValueSerializeFunc: @@ -351,55 +414,7 @@ typedef gchar * (* GstValueSerializeFunc) (const GValue *value1); * Returns: %TRUE for success */ 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); + const gchar *s); typedef struct _GstValueTable GstValueTable; /** @@ -418,154 +433,294 @@ struct _GstValueTable { GstValueDeserializeFunc deserialize; /*< private >*/ - void *_gst_reserved [GST_PADDING]; + gpointer _gst_reserved [GST_PADDING]; }; +GST_API GType gst_int_range_get_type (void); + +GST_API GType gst_int64_range_get_type (void); + +GST_API GType gst_double_range_get_type (void); + +GST_API GType gst_fraction_range_get_type (void); + +GST_API GType gst_fraction_get_type (void); + +GST_API GType gst_value_list_get_type (void); + +GST_API GType gst_value_array_get_type (void); -GType gst_date_get_type (void); -GType gst_date_time_get_type (void); +GST_API +GType gst_bitmask_get_type (void); -void gst_value_register (const GstValueTable *table); -void gst_value_init_and_copy (GValue *dest, - const GValue *src); +GST_API +GType gst_flagset_get_type (void); -gchar * gst_value_serialize (const GValue *value); -gboolean gst_value_deserialize (GValue *dest, - const gchar *src); +/* Hide this compatibility type from introspection */ +#ifndef __GI_SCANNER__ +GST_API +GType gst_g_thread_get_type (void); +#endif + +GST_API +void gst_value_register (const GstValueTable *table); + +GST_API +void gst_value_init_and_copy (GValue *dest, + const GValue *src); +GST_API +gchar * gst_value_serialize (const GValue *value) G_GNUC_MALLOC; + +GST_API +gboolean gst_value_deserialize (GValue *dest, + const gchar *src); /* list */ -void gst_value_list_append_value (GValue *value, - const GValue *append_value); -void gst_value_list_prepend_value (GValue *value, - const GValue *prepend_value); -void gst_value_list_concat (GValue *dest, - const GValue *value1, - const GValue *value2); -void gst_value_list_merge (GValue *dest, - const GValue *value1, - const GValue *value2); -guint gst_value_list_get_size (const GValue *value); -const GValue * gst_value_list_get_value (const GValue *value, - guint index); + +GST_API +void gst_value_list_append_value (GValue *value, + const GValue *append_value); +GST_API +void gst_value_list_append_and_take_value (GValue *value, + GValue *append_value); +GST_API +void gst_value_list_prepend_value (GValue *value, + const GValue *prepend_value); +GST_API +void gst_value_list_concat (GValue *dest, + const GValue *value1, + const GValue *value2); +GST_API +void gst_value_list_merge (GValue *dest, + const GValue *value1, + const GValue *value2); +GST_API +guint gst_value_list_get_size (const GValue *value); + +GST_API +const GValue * gst_value_list_get_value (const GValue *value, + guint index); /* array */ -void gst_value_array_append_value (GValue *value, - const GValue *append_value); -void gst_value_array_prepend_value (GValue *value, - const GValue *prepend_value); -guint gst_value_array_get_size (const GValue *value); -const GValue * gst_value_array_get_value (const GValue *value, - guint index); + +GST_API +void gst_value_array_append_value (GValue *value, + const GValue *append_value); +GST_API +void gst_value_array_append_and_take_value (GValue *value, + GValue *append_value); +GST_API +void gst_value_array_prepend_value (GValue *value, + const GValue *prepend_value); +GST_API +guint gst_value_array_get_size (const GValue *value); + +GST_API +const GValue * gst_value_array_get_value (const GValue *value, + guint index); /* int range */ -void gst_value_set_int_range (GValue *value, - gint start, - gint end); -gint gst_value_get_int_range_min (const GValue *value); -gint gst_value_get_int_range_max (const GValue *value); + +GST_API +void gst_value_set_int_range (GValue *value, + gint start, + gint end); +GST_API +void gst_value_set_int_range_step (GValue *value, + gint start, + gint end, + gint step); +GST_API +gint gst_value_get_int_range_min (const GValue *value); + +GST_API +gint gst_value_get_int_range_max (const GValue *value); + +GST_API +gint gst_value_get_int_range_step (const GValue *value); /* int64 range */ -void gst_value_set_int64_range (GValue *value, - gint64 start, - gint64 end); -gint64 gst_value_get_int64_range_min (const GValue *value); -gint64 gst_value_get_int64_range_max (const GValue *value); + +GST_API +void gst_value_set_int64_range (GValue *value, + gint64 start, + gint64 end); +GST_API +void gst_value_set_int64_range_step (GValue *value, + gint64 start, + gint64 end, + gint64 step); +GST_API +gint64 gst_value_get_int64_range_min (const GValue *value); + +GST_API +gint64 gst_value_get_int64_range_max (const GValue *value); + +GST_API +gint64 gst_value_get_int64_range_step (const GValue *value); /* double range */ -void gst_value_set_double_range (GValue *value, - gdouble start, - gdouble end); -gdouble gst_value_get_double_range_min (const GValue *value); -gdouble gst_value_get_double_range_max (const GValue *value); + +GST_API +void gst_value_set_double_range (GValue *value, + gdouble start, + gdouble end); +GST_API +gdouble gst_value_get_double_range_min (const GValue *value); + +GST_API +gdouble gst_value_get_double_range_max (const GValue *value); /* caps */ -const GstCaps * gst_value_get_caps (const GValue *value); -void gst_value_set_caps (GValue *value, - const GstCaps *caps); + +GST_API +const GstCaps * gst_value_get_caps (const GValue *value); + +GST_API +void gst_value_set_caps (GValue *value, + const GstCaps *caps); /* structure */ + +GST_API const GstStructure * - gst_value_get_structure (const GValue *value); -void gst_value_set_structure (GValue *value, - const GstStructure *structure); + gst_value_get_structure (const GValue *value); + +GST_API +void gst_value_set_structure (GValue *value, + const GstStructure *structure); + +/* caps features */ + +GST_API +const GstCapsFeatures * + gst_value_get_caps_features (const GValue *value); + +GST_API +void gst_value_set_caps_features (GValue *value, + const GstCapsFeatures *features); /* fraction */ -void gst_value_set_fraction (GValue *value, - gint numerator, - gint denominator); -gint gst_value_get_fraction_numerator (const GValue *value); -gint gst_value_get_fraction_denominator(const GValue *value); -gboolean gst_value_fraction_multiply (GValue *product, - const GValue *factor1, - const GValue *factor2); -gboolean gst_value_fraction_subtract (GValue * dest, - const GValue * minuend, - const GValue * subtrahend); + +GST_API +void gst_value_set_fraction (GValue *value, + gint numerator, + gint denominator); +GST_API +gint gst_value_get_fraction_numerator (const GValue *value); + +GST_API +gint gst_value_get_fraction_denominator (const GValue *value); + +GST_API +gboolean gst_value_fraction_multiply (GValue *product, + const GValue *factor1, + const GValue *factor2); +GST_API +gboolean gst_value_fraction_subtract (GValue * dest, + const GValue * minuend, + const GValue * subtrahend); /* fraction range */ -void gst_value_set_fraction_range (GValue *value, - const GValue *start, - const GValue *end); -void gst_value_set_fraction_range_full (GValue *value, - gint numerator_start, - gint denominator_start, - gint numerator_end, - gint denominator_end); -const GValue *gst_value_get_fraction_range_min (const GValue *value); -const GValue *gst_value_get_fraction_range_max (const GValue *value); - -/* date */ -const GDate * gst_value_get_date (const GValue *value); -void gst_value_set_date (GValue *value, - const GDate *date); + +GST_API +void gst_value_set_fraction_range (GValue *value, + const GValue *start, + const GValue *end); +GST_API +void gst_value_set_fraction_range_full (GValue *value, + gint numerator_start, + gint denominator_start, + gint numerator_end, + gint denominator_end); +GST_API +const GValue *gst_value_get_fraction_range_min (const GValue *value); + +GST_API +const GValue *gst_value_get_fraction_range_max (const GValue *value); + +/* bitmask */ + +GST_API +guint64 gst_value_get_bitmask (const GValue *value); + +GST_API +void gst_value_set_bitmask (GValue *value, + guint64 bitmask); +/* flagset */ + +GST_API +void gst_value_set_flagset (GValue * value, guint flags, guint mask); + +GST_API +guint gst_value_get_flagset_flags (const GValue * value); + +GST_API +guint gst_value_get_flagset_mask (const GValue * value); /* compare */ -gint gst_value_compare (const GValue *value1, - const GValue *value2); -gboolean gst_value_can_compare (const GValue *value1, - const GValue *value2); + +GST_API +gint gst_value_compare (const GValue *value1, + const GValue *value2); +GST_API +gboolean gst_value_can_compare (const GValue *value1, + const GValue *value2); +GST_API +gboolean gst_value_is_subset (const GValue *value1, + const GValue *value2); + /* union */ -gboolean gst_value_union (GValue *dest, - const GValue *value1, - 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); + +GST_API +gboolean gst_value_union (GValue *dest, + const GValue *value1, + const GValue *value2); +GST_API +gboolean gst_value_can_union (const GValue *value1, + const GValue *value2); /* intersection */ -gboolean gst_value_intersect (GValue *dest, - const GValue *value1, - 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); + +GST_API +gboolean gst_value_intersect (GValue *dest, + const GValue *value1, + const GValue *value2); +GST_API +gboolean gst_value_can_intersect (const GValue *value1, + const GValue *value2); /* subtraction */ -gboolean gst_value_subtract (GValue *dest, - const GValue *minuend, - 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); + +GST_API +gboolean gst_value_subtract (GValue *dest, + const GValue *minuend, + const GValue *subtrahend); +GST_API +gboolean gst_value_can_subtract (const GValue *minuend, + const GValue *subtrahend); /* fixation */ -gboolean gst_value_is_fixed (const GValue *value); + +GST_API +gboolean gst_value_is_fixed (const GValue *value); + +GST_API gboolean gst_value_fixate (GValue *dest, const GValue *src); +/* Flagset registration wrapper */ + +GST_API +GType gst_flagset_register (GType flags_type); + G_END_DECLS #endif