2003-11-03 09:10:07 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_VALUE_H__
|
|
|
|
#define __GST_VALUE_H__
|
|
|
|
|
|
|
|
#include <gst/gstconfig.h>
|
2003-12-22 01:58:20 +00:00
|
|
|
#include <gst/gstcaps.h>
|
2003-11-03 09:10:07 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2005-09-11 12:01:12 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
* <informalexample>
|
|
|
|
* <programlisting>
|
|
|
|
* guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G');
|
|
|
|
* </programlisting>
|
|
|
|
* </informalexample>
|
|
|
|
*/
|
2003-11-24 02:09:23 +00:00
|
|
|
#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
* <informalexample>
|
|
|
|
* <programlisting>
|
|
|
|
* guint32 fourcc = GST_STR_FOURCC ("MJPG");
|
|
|
|
* </programlisting>
|
|
|
|
* </informalexample>
|
|
|
|
*/
|
2003-11-24 02:09:23 +00:00
|
|
|
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
|
|
|
|
|
2005-09-11 12:01:12 +00:00
|
|
|
/**
|
|
|
|
* GST_FOURCC_FORMAT:
|
|
|
|
*
|
|
|
|
* Can be used together with #GST_FOURCC_ARGS to properly output a
|
|
|
|
* #guint32 fourcc value in a printf()-style text message.
|
|
|
|
* <informalexample>
|
|
|
|
* <programlisting>
|
|
|
|
* printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc));
|
|
|
|
* </programlisting>
|
|
|
|
* </informalexample>
|
|
|
|
*/
|
2003-11-24 02:09:23 +00:00
|
|
|
#define GST_FOURCC_FORMAT "%c%c%c%c"
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2003-11-24 02:09:23 +00:00
|
|
|
#define GST_FOURCC_ARGS(fourcc) \
|
|
|
|
((gchar) ((fourcc) &0xff)), \
|
|
|
|
((gchar) (((fourcc)>>8 )&0xff)), \
|
|
|
|
((gchar) (((fourcc)>>16)&0xff)), \
|
|
|
|
((gchar) (((fourcc)>>24)&0xff))
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2005-09-11 12:01:12 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_FOURCC:
|
2005-09-11 13:07:25 +00:00
|
|
|
* @x: the #GValue to check
|
2005-09-11 12:01:12 +00:00
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_FOURCC value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_FOURCC(x) (G_VALUE_HOLDS(x, gst_fourcc_get_type ()))
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_INT_RANGE:
|
2005-09-11 13:07:25 +00:00
|
|
|
* @x: the #GValue to check
|
2005-09-11 12:01:12 +00:00
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_INT_RANGE value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_INT_RANGE(x) (G_VALUE_HOLDS(x, gst_int_range_get_type ()))
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_DOUBLE_RANGE:
|
2005-09-11 13:07:25 +00:00
|
|
|
* @x: the #GValue to check
|
2005-09-11 12:01:12 +00:00
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_DOUBLE_RANGE value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_DOUBLE_RANGE(x) (G_VALUE_HOLDS(x, gst_double_range_get_type ()))
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_LIST:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_LIST value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_LIST(x) (G_VALUE_HOLDS(x, gst_value_list_get_type ()))
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_ARRAY:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_ARRAY value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_ARRAY(x) (G_VALUE_HOLDS(x, gst_value_array_get_type ()))
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_CAPS:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_CAPS value.
|
|
|
|
*/
|
2004-02-20 00:38:24 +00:00
|
|
|
#define GST_VALUE_HOLDS_CAPS(x) (G_VALUE_HOLDS(x, GST_TYPE_CAPS))
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_BUFFER:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_BUFFER value.
|
|
|
|
*/
|
2005-09-11 12:01:12 +00:00
|
|
|
#define GST_VALUE_HOLDS_BUFFER(x) (G_VALUE_HOLDS(x, GST_TYPE_BUFFER))
|
|
|
|
|
2005-09-21 09:48:40 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_FRACTION:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_FRACTION value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_FRACTION(x) (G_VALUE_HOLDS(x, gst_fraction_get_type ()))
|
2003-11-29 06:31:10 +00:00
|
|
|
|
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual bunch of utility functions along with a hack that che...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_get_date):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_set_date), (gst_value_get_date),
(gst_date_copy), (gst_value_compare_date),
(gst_value_serialize_date), (gst_value_deserialize_date),
(gst_value_transform_date_string),
(gst_value_transform_string_date), (_gst_value_initialize):
* gst/gstvalue.h:
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual
bunch of utility functions along with a hack that checks that
developers don't accidentally use G_TYPE_DATE where GST_TYPE_DATE
is required. Part of the grand scheme in #170777.
2005-09-22 15:08:02 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_DATE:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_DATE value.
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_VALUE_HOLDS_DATE(x) (G_VALUE_HOLDS(x, gst_date_get_type ()))
|
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual bunch of utility functions along with a hack that che...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_get_date):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_set_date), (gst_value_get_date),
(gst_date_copy), (gst_value_compare_date),
(gst_value_serialize_date), (gst_value_deserialize_date),
(gst_value_transform_date_string),
(gst_value_transform_string_date), (_gst_value_initialize):
* gst/gstvalue.h:
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual
bunch of utility functions along with a hack that checks that
developers don't accidentally use G_TYPE_DATE where GST_TYPE_DATE
is required. Part of the grand scheme in #170777.
2005-09-22 15:08:02 +00:00
|
|
|
|
2005-09-21 09:48:40 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_FOURCC:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents 4 byte identifier (e.g. used for codecs)
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstFourcc
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_FOURCC gst_fourcc_get_type ()
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_TYPE_INT_RANGE:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents an integer range
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstIntRange
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_INT_RANGE gst_int_range_get_type ()
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_TYPE_DOUBLE_RANGE:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents a floating point range with double precission
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstIntRange
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_DOUBLE_RANGE gst_double_range_get_type ()
|
2005-09-21 09:48:40 +00:00
|
|
|
|
2005-09-11 12:01:12 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_LIST:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents an unordered list of #GValue values
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstValueList (which is not explicitly typed)
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_LIST gst_value_list_get_type ()
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_TYPE_ARRAY:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents an ordered list of #GValue values
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstArrayList (which is not explicitly typed)
|
|
|
|
*/
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_ARRAY gst_value_array_get_type ()
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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)
|
|
|
|
*/
|
|
|
|
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_FRACTION gst_fraction_get_type ()
|
2004-03-22 15:35:06 +00:00
|
|
|
|
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual bunch of utility functions along with a hack that che...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_get_date):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_set_date), (gst_value_get_date),
(gst_date_copy), (gst_value_compare_date),
(gst_value_serialize_date), (gst_value_deserialize_date),
(gst_value_transform_date_string),
(gst_value_transform_string_date), (_gst_value_initialize):
* gst/gstvalue.h:
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual
bunch of utility functions along with a hack that checks that
developers don't accidentally use G_TYPE_DATE where GST_TYPE_DATE
is required. Part of the grand scheme in #170777.
2005-09-22 15:08:02 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_DATE:
|
|
|
|
*
|
|
|
|
* a boxed #GValue type for #GDate that represents a date.
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstDate
|
|
|
|
*/
|
|
|
|
|
2005-10-15 17:59:07 +00:00
|
|
|
#define GST_TYPE_DATE gst_date_get_type ()
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_LESS_THAN:
|
|
|
|
*
|
|
|
|
* Indicates that the first value provided to a comparison function
|
|
|
|
* (gst_value_compare()) is lesser than the second one.
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
#define GST_VALUE_LESS_THAN (-1)
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_EQUAL:
|
|
|
|
*
|
|
|
|
* Indicates that the first value provided to a comparison function
|
|
|
|
* (gst_value_compare()) is equal to the second one.
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
#define GST_VALUE_EQUAL 0
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_GREATER_THAN:
|
|
|
|
*
|
|
|
|
* Indicates that the first value provided to a comparison function
|
|
|
|
* (gst_value_compare()) is greater than the second one.
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
#define GST_VALUE_GREATER_THAN 1
|
2005-09-21 09:48:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VALUE_UNORDERED:
|
|
|
|
*
|
|
|
|
* Indicates that the comparison function (gst_value_compare()) can not
|
|
|
|
* determine a order for the two provided values.
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
#define GST_VALUE_UNORDERED 2
|
|
|
|
|
2005-09-21 09:48:40 +00:00
|
|
|
/**
|
|
|
|
* GstValueCompareFunc:
|
|
|
|
* @value1: first value for comparission
|
2005-10-15 15:30:24 +00:00
|
|
|
* @value2: second value for comparission
|
2005-09-21 09:48:40 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef int (* GstValueCompareFunc) (const GValue *value1,
|
|
|
|
const GValue *value2);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef char * (* GstValueSerializeFunc) (const GValue *value1);
|
2005-09-21 09:48:40 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef gboolean (* GstValueDeserializeFunc) (GValue *dest,
|
|
|
|
const char *s);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef int (* GstValueUnionFunc) (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef int (* GstValueIntersectFunc) (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
typedef int (* GstValueSubtractFunc) (GValue *dest,
|
|
|
|
const GValue *minuend,
|
|
|
|
const GValue *subtrahend);
|
2004-03-22 15:35:06 +00:00
|
|
|
|
|
|
|
typedef struct _GstValueTable GstValueTable;
|
|
|
|
struct _GstValueTable {
|
|
|
|
GType type;
|
|
|
|
GstValueCompareFunc compare;
|
|
|
|
GstValueSerializeFunc serialize;
|
|
|
|
GstValueDeserializeFunc deserialize;
|
2003-11-24 02:09:23 +00:00
|
|
|
|
2005-01-06 01:08:23 +00:00
|
|
|
/*< private >*/
|
2004-03-22 15:35:06 +00:00
|
|
|
void *_gst_reserved [GST_PADDING];
|
|
|
|
};
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2005-10-15 17:59:07 +00:00
|
|
|
GType gst_int_range_get_type ();
|
|
|
|
GType gst_double_range_get_type ();
|
|
|
|
GType gst_fourcc_get_type ();
|
|
|
|
GType gst_fraction_get_type ();
|
|
|
|
GType gst_value_list_get_type ();
|
|
|
|
GType gst_value_array_get_type ();
|
|
|
|
|
|
|
|
GType gst_date_get_type ();
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2004-07-15 16:20:50 +00:00
|
|
|
void gst_value_register (const GstValueTable *table);
|
|
|
|
void gst_value_init_and_copy (GValue *dest,
|
|
|
|
const GValue *src);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
2004-07-15 16:20:50 +00:00
|
|
|
gchar * gst_value_serialize (const GValue *value);
|
|
|
|
gboolean gst_value_deserialize (GValue *dest,
|
|
|
|
const gchar *src);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
/* list */
|
2004-07-15 16:20:50 +00:00
|
|
|
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);
|
|
|
|
guint gst_value_list_get_size (const GValue *value);
|
|
|
|
G_CONST_RETURN GValue *
|
|
|
|
gst_value_list_get_value (const GValue *value,
|
|
|
|
guint index);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
/* fourcc */
|
2004-07-15 16:20:50 +00:00
|
|
|
void gst_value_set_fourcc (GValue *value,
|
|
|
|
guint32 fourcc);
|
|
|
|
guint32 gst_value_get_fourcc (const GValue *value);
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* int range */
|
2004-07-15 16:20:50 +00:00
|
|
|
void gst_value_set_int_range (GValue *value,
|
|
|
|
int start,
|
|
|
|
int end);
|
|
|
|
int gst_value_get_int_range_min (const GValue *value);
|
|
|
|
int gst_value_get_int_range_max (const GValue *value);
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* double range */
|
2004-07-15 16:20:50 +00:00
|
|
|
void gst_value_set_double_range (GValue *value,
|
|
|
|
double start,
|
|
|
|
double end);
|
|
|
|
double gst_value_get_double_range_min (const GValue *value);
|
|
|
|
double gst_value_get_double_range_max (const GValue *value);
|
2003-11-24 02:09:23 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* caps */
|
2004-07-15 16:20:50 +00:00
|
|
|
G_CONST_RETURN GstCaps *
|
|
|
|
gst_value_get_caps (const GValue *value);
|
|
|
|
void gst_value_set_caps (GValue *value,
|
|
|
|
const GstCaps *caps);
|
2003-11-29 06:31:10 +00:00
|
|
|
|
2004-07-15 20:27:20 +00:00
|
|
|
/* fraction */
|
|
|
|
void gst_value_set_fraction (GValue *value,
|
|
|
|
int numerator,
|
|
|
|
int denominator);
|
|
|
|
int gst_value_get_fraction_numerator (const GValue *value);
|
|
|
|
int gst_value_get_fraction_denominator(const GValue *value);
|
|
|
|
gboolean gst_value_fraction_multiply (GValue *product,
|
|
|
|
const GValue *factor1,
|
|
|
|
const GValue *factor2);
|
|
|
|
|
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual bunch of utility functions along with a hack that che...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_get_date):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_set_date), (gst_value_get_date),
(gst_date_copy), (gst_value_compare_date),
(gst_value_serialize_date), (gst_value_deserialize_date),
(gst_value_transform_date_string),
(gst_value_transform_string_date), (_gst_value_initialize):
* gst/gstvalue.h:
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual
bunch of utility functions along with a hack that checks that
developers don't accidentally use G_TYPE_DATE where GST_TYPE_DATE
is required. Part of the grand scheme in #170777.
2005-09-22 15:08:02 +00:00
|
|
|
/* date */
|
|
|
|
G_CONST_RETURN GDate *
|
|
|
|
gst_value_get_date (const GValue *value);
|
|
|
|
void gst_value_set_date (GValue *value,
|
|
|
|
const GDate *date);
|
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* compare */
|
2004-07-15 16:20:50 +00:00
|
|
|
int gst_value_compare (const GValue *value1,
|
|
|
|
const GValue *value2);
|
|
|
|
gboolean gst_value_can_compare (const GValue *value1,
|
|
|
|
const GValue *value2);
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* union */
|
2004-07-15 16:20:50 +00:00
|
|
|
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);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
|
|
|
/* intersection */
|
2004-07-15 16:20:50 +00:00
|
|
|
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);
|
2004-03-22 15:35:06 +00:00
|
|
|
|
gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
/* subtraction */
|
2004-07-15 16:20:50 +00:00
|
|
|
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/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
|
|
|
|
/* fixation */
|
2004-11-29 17:02:09 +00:00
|
|
|
gboolean gst_value_is_fixed (const GValue *value);
|
2004-04-17 02:21:54 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
/* private */
|
2004-07-15 16:20:50 +00:00
|
|
|
void _gst_value_initialize (void);
|
gst/gststructure.c: Convert function to use gst_value_serialize().
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_to_string):
Convert function to use gst_value_serialize().
* gst/gstvalue.c: (gst_value_serialize_list),
(gst_value_serialize_fourcc), (gst_value_serialize_int_range),
(gst_value_serialize_double_range), (gst_value_serialize_boolean),
(gst_value_serialize_int), (gst_value_serialize_double),
(gst_string_wrap), (gst_value_serialize_string),
(gst_value_serialize), (gst_value_deserialize):
* gst/gstvalue.h:
Add implementations for serialize.
2004-01-20 09:14:25 +00:00
|
|
|
|
2003-11-03 09:10:07 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2003-11-03 09:10:07 +00:00
|
|
|
#endif
|
2004-03-15 14:43:35 +00:00
|
|
|
|
|
|
|
|