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
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2003-11-03 09:10:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_VALUE_H__
|
|
|
|
#define __GST_VALUE_H__
|
|
|
|
|
|
|
|
#include <gst/gstconfig.h>
|
2003-12-22 01:58:20 +00:00
|
|
|
#include <gst/gstcaps.h>
|
2007-10-22 08:53:26 +00:00
|
|
|
#include <gst/gststructure.h>
|
2013-03-30 14:35:19 +00:00
|
|
|
#include <gst/gstcapsfeatures.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.
|
2017-01-16 14:26:16 +00:00
|
|
|
*
|
|
|
|
* |[
|
2005-09-11 12:01:12 +00:00
|
|
|
* guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G');
|
2017-01-16 14:26:16 +00:00
|
|
|
* ]|
|
|
|
|
*
|
2005-09-11 12:01:12 +00:00
|
|
|
*/
|
2017-10-31 10:39:23 +00:00
|
|
|
#define GST_MAKE_FOURCC(a,b,c,d) \
|
|
|
|
( (guint32)(a) | ((guint32) (b)) << 8 | ((guint32) (c)) << 16 | ((guint32) (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.
|
2017-01-16 14:26:16 +00:00
|
|
|
*
|
|
|
|
* |[
|
2005-09-11 12:01:12 +00:00
|
|
|
* guint32 fourcc = GST_STR_FOURCC ("MJPG");
|
2017-01-16 14:26:16 +00:00
|
|
|
* ]|
|
|
|
|
*
|
2005-09-11 12:01:12 +00:00
|
|
|
*/
|
2009-05-15 18:24:40 +00:00
|
|
|
#define GST_STR_FOURCC(f) ((guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24)))
|
2003-11-24 02:09:23 +00:00
|
|
|
|
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.
|
2017-01-16 14:26:16 +00:00
|
|
|
*
|
|
|
|
* |[
|
2005-09-11 12:01:12 +00:00
|
|
|
* printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc));
|
2017-01-16 14:26:16 +00:00
|
|
|
* ]|
|
|
|
|
*
|
2005-09-11 12:01:12 +00:00
|
|
|
*/
|
2005-11-21 13:26:40 +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-03 09:10:07 +00:00
|
|
|
|
2015-02-25 07:26:19 +00:00
|
|
|
#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)
|
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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_INT_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_int_range_type)
|
2005-09-11 12:01:12 +00:00
|
|
|
|
2010-08-24 10:27:30 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_INT64_RANGE:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_INT64_RANGE value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_INT64_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_int64_range_type)
|
2010-08-24 10:27:30 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_DOUBLE_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_double_range_type)
|
2005-09-21 09:48:40 +00:00
|
|
|
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_FRACTION_RANGE:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_FRACTION_RANGE value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_FRACTION_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_range_type)
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_LIST(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_value_list_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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_ARRAY(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_value_array_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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_CAPS(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_caps_type)
|
2005-09-21 09:48:40 +00:00
|
|
|
|
2007-10-22 08:53:26 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_STRUCTURE:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_STRUCTURE value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_STRUCTURE(x) (G_VALUE_HOLDS((x), _gst_structure_type))
|
2007-10-22 08:53:26 +00:00
|
|
|
|
2013-03-30 14:35:19 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_CAPS_FEATURES:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_CAPS_FEATURES value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_CAPS_FEATURES(x) (G_VALUE_HOLDS((x), _gst_caps_features_type))
|
2013-03-30 14:35:19 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_BUFFER(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_buffer_type)
|
2005-09-11 12:01:12 +00:00
|
|
|
|
2012-01-03 09:42:31 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_SAMPLE:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_SAMPLE value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_SAMPLE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_sample_type)
|
2012-01-03 09:42:31 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_FRACTION(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_type)
|
2003-11-29 06:31:10 +00:00
|
|
|
|
2010-07-22 01:04:23 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_DATE_TIME:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_DATE_TIME value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_DATE_TIME(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_date_time_type)
|
2010-07-22 01:04:23 +00:00
|
|
|
|
2011-12-16 11:32:26 +00:00
|
|
|
/**
|
|
|
|
* GST_VALUE_HOLDS_BITMASK:
|
|
|
|
* @x: the #GValue to check
|
|
|
|
*
|
|
|
|
* Checks if the given #GValue contains a #GST_TYPE_BITMASK value.
|
|
|
|
*/
|
2014-06-17 21:45:57 +00:00
|
|
|
#define GST_VALUE_HOLDS_BITMASK(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_bitmask_type)
|
2011-12-16 11:32:26 +00:00
|
|
|
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
/**
|
|
|
|
* 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))
|
|
|
|
|
2017-04-05 11:26:33 +00:00
|
|
|
/**
|
|
|
|
* GST_FLAG_SET_MASK_EXACT: (value 4294967295) (type guint)
|
|
|
|
*
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
* A mask value with all bits set, for use as a
|
2017-12-07 12:05:23 +00:00
|
|
|
* GstFlagSet mask where all flag bits must match
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
* exactly
|
|
|
|
*
|
|
|
|
* Since: 1.6
|
|
|
|
*/
|
|
|
|
#define GST_FLAG_SET_MASK_EXACT ((guint)(-1))
|
|
|
|
|
2014-06-19 06:04:01 +00:00
|
|
|
GST_EXPORT GType _gst_int_range_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
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_INT_RANGE (_gst_int_range_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_int64_range_type;
|
2005-09-21 09:48:40 +00:00
|
|
|
|
2010-08-24 10:27:30 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_INT64_RANGE:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents an #gint64 range
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstInt64Range
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_INT64_RANGE (_gst_int64_range_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_double_range_type;
|
2010-08-24 10:27:30 +00:00
|
|
|
|
2005-09-21 09:48:40 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_DOUBLE_RANGE:
|
|
|
|
*
|
2013-12-07 14:38:19 +00:00
|
|
|
* a #GValue type that represents a floating point range with double precision
|
2005-09-21 09:48:40 +00:00
|
|
|
*
|
|
|
|
* Returns: the #GType of GstIntRange
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_DOUBLE_RANGE (_gst_double_range_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_fraction_range_type;
|
2005-09-21 09:48:40 +00:00
|
|
|
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_FRACTION_RANGE:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents a GstFraction range
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstFractionRange
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_FRACTION_RANGE (_gst_fraction_range_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_value_list_type;
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
|
2005-09-11 12:01:12 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_LIST:
|
|
|
|
*
|
2006-08-14 12:35:06 +00:00
|
|
|
* a #GValue type that represents an unordered list of #GValue values. This
|
|
|
|
* is used for example to express a list of possible values for a field in
|
|
|
|
* a caps structure, like a list of possible sample rates, of which only one
|
|
|
|
* will be chosen in the end. This means that all values in the list are
|
|
|
|
* meaningful on their own.
|
2005-09-11 12:01:12 +00:00
|
|
|
*
|
|
|
|
* Returns: the #GType of GstValueList (which is not explicitly typed)
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_LIST (_gst_value_list_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_value_array_type;
|
2005-09-11 12:01:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_TYPE_ARRAY:
|
|
|
|
*
|
2006-08-14 12:35:06 +00:00
|
|
|
* a #GValue type that represents an ordered list of #GValue values. This is
|
|
|
|
* used to express a set of values that is meaningful only in their specific
|
|
|
|
* combination and order of values. Each value on its own is not particularly
|
|
|
|
* meaningful, only the ordered array in its entirety is meaningful. This is
|
|
|
|
* used for example to express channel layouts for multichannel audio where
|
|
|
|
* each channel needs to be mapped to a position in the room.
|
2005-09-11 12:01:12 +00:00
|
|
|
*
|
|
|
|
* Returns: the #GType of GstArrayList (which is not explicitly typed)
|
|
|
|
*/
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_ARRAY (_gst_value_array_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_fraction_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)
|
|
|
|
*/
|
|
|
|
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_FRACTION (_gst_fraction_type)
|
|
|
|
|
|
|
|
GST_EXPORT GType _gst_bitmask_type;
|
2004-03-22 15:35:06 +00:00
|
|
|
|
2011-12-16 11:32:26 +00:00
|
|
|
/**
|
|
|
|
* GST_TYPE_BITMASK:
|
|
|
|
*
|
|
|
|
* a #GValue type that represents a 64-bit bitmask.
|
|
|
|
*
|
|
|
|
* Returns: the #GType of GstBitmask (which is not explicitly typed)
|
|
|
|
*/
|
|
|
|
|
2014-06-19 06:04:01 +00:00
|
|
|
#define GST_TYPE_BITMASK (_gst_bitmask_type)
|
2011-12-16 11:32:26 +00:00
|
|
|
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
GST_EXPORT GType _gst_flagset_type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_TYPE_FLAG_SET:
|
|
|
|
*
|
|
|
|
* 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 GstFlags (which is not explicitly typed)
|
|
|
|
*
|
|
|
|
* Since: 1.6
|
|
|
|
*/
|
|
|
|
#define GST_TYPE_FLAG_SET (_gst_flagset_type)
|
|
|
|
|
2012-11-12 10:40:59 +00:00
|
|
|
/**
|
|
|
|
* 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 ()
|
|
|
|
|
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:
|
2009-11-05 18:36:38 +00:00
|
|
|
* @value1: first value for comparison
|
|
|
|
* @value2: second value for comparison
|
2005-09-21 09:48:40 +00:00
|
|
|
*
|
2009-11-25 14:44:05 +00:00
|
|
|
* Used together with gst_value_compare() to compare #GValue items.
|
2005-09-21 09:48:40 +00:00
|
|
|
*
|
|
|
|
* Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN
|
|
|
|
* or GST_VALUE_UNORDERED
|
|
|
|
*/
|
gst/gstvalue.*: Use gint, gdouble and gchar in our API instead of int, double and char (and make usage in gstvalue.c ...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_any_list),
(gst_value_transform_any_list_string),
(gst_value_deserialize_list), (gst_value_deserialize_array),
(gst_value_set_int_range), (gst_value_deserialize_int_range),
(gst_value_set_double_range), (gst_value_deserialize_double_range),
(gst_value_set_fraction_range_full),
(gst_value_deserialize_fraction_range),
(gst_value_deserialize_caps), (gst_value_deserialize_buffer),
(gst_value_deserialize_boolean),
(gst_value_deserialize_int_helper), (gst_value_deserialize_double),
(gst_value_serialize_float), (gst_value_deserialize_float),
(gst_string_wrap), (gst_value_deserialize_string),
(gst_value_deserialize_enum), (gst_value_deserialize_flags),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_range_double_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_range),
(gst_value_deserialize_fraction):
* gst/gstvalue.h:
Use gint, gdouble and gchar in our API instead of int, double and
char (and make usage in gstvalue.c more consistent).
2005-11-27 18:11:02 +00:00
|
|
|
typedef gint (* GstValueCompareFunc) (const GValue *value1,
|
2011-11-11 15:52:41 +00:00
|
|
|
const GValue *value2);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2005-11-18 16:04:28 +00:00
|
|
|
/**
|
|
|
|
* GstValueSerializeFunc:
|
|
|
|
* @value1: a #GValue
|
|
|
|
*
|
|
|
|
* Used by gst_value_serialize() to obtain a non-binary form of the #GValue.
|
|
|
|
*
|
2010-12-07 18:35:04 +00:00
|
|
|
* Free-function: g_free
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): the string representation of the value
|
2005-11-18 16:04:28 +00:00
|
|
|
*/
|
gst/gstvalue.*: Use gint, gdouble and gchar in our API instead of int, double and char (and make usage in gstvalue.c ...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_any_list),
(gst_value_transform_any_list_string),
(gst_value_deserialize_list), (gst_value_deserialize_array),
(gst_value_set_int_range), (gst_value_deserialize_int_range),
(gst_value_set_double_range), (gst_value_deserialize_double_range),
(gst_value_set_fraction_range_full),
(gst_value_deserialize_fraction_range),
(gst_value_deserialize_caps), (gst_value_deserialize_buffer),
(gst_value_deserialize_boolean),
(gst_value_deserialize_int_helper), (gst_value_deserialize_double),
(gst_value_serialize_float), (gst_value_deserialize_float),
(gst_string_wrap), (gst_value_deserialize_string),
(gst_value_deserialize_enum), (gst_value_deserialize_flags),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_range_double_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_range),
(gst_value_deserialize_fraction):
* gst/gstvalue.h:
Use gint, gdouble and gchar in our API instead of int, double and
char (and make usage in gstvalue.c more consistent).
2005-11-27 18:11:02 +00:00
|
|
|
typedef gchar * (* GstValueSerializeFunc) (const GValue *value1);
|
2005-09-21 09:48:40 +00:00
|
|
|
|
2005-11-18 16:04:28 +00:00
|
|
|
/**
|
|
|
|
* GstValueDeserializeFunc:
|
|
|
|
* @dest: a #GValue
|
|
|
|
* @s: a string
|
|
|
|
*
|
|
|
|
* Used by gst_value_deserialize() to parse a non-binary form into the #GValue.
|
|
|
|
*
|
|
|
|
* Returns: %TRUE for success
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef gboolean (* GstValueDeserializeFunc) (GValue *dest,
|
2011-11-11 15:52:41 +00:00
|
|
|
const gchar *s);
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2004-03-22 15:35:06 +00:00
|
|
|
typedef struct _GstValueTable GstValueTable;
|
2005-11-18 16:04:28 +00:00
|
|
|
/**
|
|
|
|
* GstValueTable:
|
|
|
|
* @type: a #GType
|
|
|
|
* @compare: a #GstValueCompareFunc
|
|
|
|
* @serialize: a #GstValueSerializeFunc
|
|
|
|
* @deserialize: a #GstValueDeserializeFunc
|
|
|
|
*
|
|
|
|
* VTable for the #GValue @type.
|
|
|
|
*/
|
2004-03-22 15:35:06 +00:00
|
|
|
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 >*/
|
2011-11-11 15:52:41 +00:00
|
|
|
gpointer _gst_reserved [GST_PADDING];
|
2004-03-22 15:35:06 +00:00
|
|
|
};
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2005-10-17 09:28:35 +00:00
|
|
|
GType gst_int_range_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2010-08-24 10:27:30 +00:00
|
|
|
GType gst_int64_range_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2005-10-17 09:28:35 +00:00
|
|
|
GType gst_double_range_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
GType gst_fraction_range_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2005-10-17 09:28:35 +00:00
|
|
|
GType gst_fraction_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2005-10-17 09:28:35 +00:00
|
|
|
GType gst_value_list_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2005-10-17 09:28:35 +00:00
|
|
|
GType gst_value_array_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-12-16 11:32:26 +00:00
|
|
|
GType gst_bitmask_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
GType gst_flagset_get_type (void);
|
2012-11-20 14:37:11 +00:00
|
|
|
|
|
|
|
/* Hide this compatibility type from introspection */
|
|
|
|
#ifndef __GI_SCANNER__
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2012-11-12 10:40:59 +00:00
|
|
|
GType gst_g_thread_get_type (void);
|
2012-11-20 14:37:11 +00:00
|
|
|
#endif
|
2005-10-17 09:28:35 +00:00
|
|
|
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_register (const GstValueTable *table);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_init_and_copy (GValue *dest,
|
|
|
|
const GValue *src);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-26 19:44:23 +00:00
|
|
|
gchar * gst_value_serialize (const GValue *value) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_list_append_value (GValue *value,
|
|
|
|
const GValue *append_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2013-06-05 09:02:50 +00:00
|
|
|
void gst_value_list_append_and_take_value (GValue *value,
|
|
|
|
GValue *append_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_list_prepend_value (GValue *value,
|
|
|
|
const GValue *prepend_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_list_concat (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_list_merge (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
guint gst_value_list_get_size (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
const GValue * gst_value_list_get_value (const GValue *value,
|
|
|
|
guint index);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
2005-11-19 16:46:30 +00:00
|
|
|
/* array */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_array_append_value (GValue *value,
|
|
|
|
const GValue *append_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2013-06-05 09:02:50 +00:00
|
|
|
void gst_value_array_append_and_take_value (GValue *value,
|
|
|
|
GValue *append_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_array_prepend_value (GValue *value,
|
|
|
|
const GValue *prepend_value);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
guint gst_value_array_get_size (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
const GValue * gst_value_array_get_value (const GValue *value,
|
|
|
|
guint index);
|
2005-11-19 16:46:30 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* int range */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_int_range (GValue *value,
|
|
|
|
gint start,
|
|
|
|
gint end);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-30 14:45:12 +00:00
|
|
|
void gst_value_set_int_range_step (GValue *value,
|
|
|
|
gint start,
|
|
|
|
gint end,
|
|
|
|
gint step);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint gst_value_get_int_range_min (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint gst_value_get_int_range_max (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-30 14:45:12 +00:00
|
|
|
gint gst_value_get_int_range_step (const GValue *value);
|
2003-11-03 09:10:07 +00:00
|
|
|
|
2010-08-24 10:27:30 +00:00
|
|
|
/* int64 range */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_int64_range (GValue *value,
|
|
|
|
gint64 start,
|
|
|
|
gint64 end);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-30 14:45:12 +00:00
|
|
|
void gst_value_set_int64_range_step (GValue *value,
|
|
|
|
gint64 start,
|
|
|
|
gint64 end,
|
|
|
|
gint64 step);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint64 gst_value_get_int64_range_min (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint64 gst_value_get_int64_range_max (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-30 14:45:12 +00:00
|
|
|
gint64 gst_value_get_int64_range_step (const GValue *value);
|
2010-08-24 10:27:30 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* double range */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_double_range (GValue *value,
|
|
|
|
gdouble start,
|
|
|
|
gdouble end);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gdouble gst_value_get_double_range_min (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gdouble 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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
const GstCaps * gst_value_get_caps (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_caps (GValue *value,
|
|
|
|
const GstCaps *caps);
|
2003-11-29 06:31:10 +00:00
|
|
|
|
2007-10-22 08:53:26 +00:00
|
|
|
/* structure */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-06-09 16:13:35 +00:00
|
|
|
const GstStructure *
|
2011-11-11 15:52:41 +00:00
|
|
|
gst_value_get_structure (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_structure (GValue *value,
|
|
|
|
const GstStructure *structure);
|
2007-10-22 08:53:26 +00:00
|
|
|
|
2013-03-30 14:35:19 +00:00
|
|
|
/* caps features */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2013-03-30 14:35:19 +00:00
|
|
|
const GstCapsFeatures *
|
|
|
|
gst_value_get_caps_features (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2013-03-30 14:35:19 +00:00
|
|
|
void gst_value_set_caps_features (GValue *value,
|
|
|
|
const GstCapsFeatures *features);
|
|
|
|
|
2004-07-15 20:27:20 +00:00
|
|
|
/* fraction */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_fraction (GValue *value,
|
|
|
|
gint numerator,
|
|
|
|
gint denominator);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint gst_value_get_fraction_numerator (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint gst_value_get_fraction_denominator (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_fraction_multiply (GValue *product,
|
|
|
|
const GValue *factor1,
|
|
|
|
const GValue *factor2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_fraction_subtract (GValue * dest,
|
|
|
|
const GValue * minuend,
|
|
|
|
const GValue * subtrahend);
|
Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
|
|
|
|
|
|
|
/* fraction range */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_fraction_range (GValue *value,
|
|
|
|
const GValue *start,
|
|
|
|
const GValue *end);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_value_set_fraction_range_full (GValue *value,
|
|
|
|
gint numerator_start,
|
|
|
|
gint denominator_start,
|
|
|
|
gint numerator_end,
|
|
|
|
gint denominator_end);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
const GValue *gst_value_get_fraction_range_min (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
const GValue *gst_value_get_fraction_range_max (const GValue *value);
|
2004-07-15 20:27:20 +00:00
|
|
|
|
2011-12-16 11:32:26 +00:00
|
|
|
/* bitmask */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-12-16 11:32:26 +00:00
|
|
|
guint64 gst_value_get_bitmask (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-12-16 11:32:26 +00:00
|
|
|
void gst_value_set_bitmask (GValue *value,
|
|
|
|
guint64 bitmask);
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
/* flagset */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
void gst_value_set_flagset (GValue * value, guint flags, guint mask);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
guint gst_value_get_flagset_flags (const GValue * value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
guint gst_value_get_flagset_mask (const GValue * value);
|
2011-12-16 11:32:26 +00:00
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* compare */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gint gst_value_compare (const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_can_compare (const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-30 14:45:12 +00:00
|
|
|
gboolean gst_value_is_subset (const GValue *value1,
|
|
|
|
const GValue *value2);
|
|
|
|
|
2003-12-23 20:58:05 +00:00
|
|
|
/* union */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_union (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_can_union (const GValue *value1,
|
|
|
|
const GValue *value2);
|
2003-12-23 20:58:05 +00:00
|
|
|
|
|
|
|
/* intersection */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_intersect (GValue *dest,
|
|
|
|
const GValue *value1,
|
|
|
|
const GValue *value2);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_can_intersect (const GValue *value1,
|
|
|
|
const GValue *value2);
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_subtract (GValue *dest,
|
|
|
|
const GValue *minuend,
|
|
|
|
const GValue *subtrahend);
|
2017-05-10 09:56:16 +00:00
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_can_subtract (const GValue *minuend,
|
|
|
|
const GValue *subtrahend);
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-11-11 15:52:41 +00:00
|
|
|
gboolean gst_value_is_fixed (const GValue *value);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
2011-06-02 11:21:55 +00:00
|
|
|
gboolean gst_value_fixate (GValue *dest,
|
|
|
|
const GValue *src);
|
2004-04-17 02:21:54 +00:00
|
|
|
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
/* Flagset registration wrapper */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
|
|
|
GST_EXPORT
|
gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 06:23:33 +00:00
|
|
|
GType gst_flagset_register (GType flags_type);
|
|
|
|
|
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
|
|
|
|
|
|
|
|