mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
gst/gstvalue.h: Clean up a little bit.
Original commit message from CVS: * gst/gstvalue.h: Clean up a little bit.
This commit is contained in:
parent
c903ce8a27
commit
f9f0df62e8
2 changed files with 90 additions and 67 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-03-22 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/gstvalue.h: Clean up a little bit.
|
||||||
|
|
||||||
2004-03-21 Tim-Philipp Müller <t.i.m@zen.co.uk>
|
2004-03-21 Tim-Philipp Müller <t.i.m@zen.co.uk>
|
||||||
|
|
||||||
reviewed by Benjamin Otte <otte@gnome.org>
|
reviewed by Benjamin Otte <otte@gnome.org>
|
||||||
|
|
121
gst/gstvalue.h
121
gst/gstvalue.h
|
@ -25,26 +25,6 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef int (* GstValueCompareFunc) (const GValue *value1,
|
|
||||||
const GValue *value2);
|
|
||||||
typedef char * (* GstValueSerializeFunc) (const GValue *value1);
|
|
||||||
typedef gboolean (* GstValueDeserializeFunc) (GValue *dest, const char *s);
|
|
||||||
typedef int (* GstValueUnionFunc) (GValue *dest, const GValue *value1,
|
|
||||||
const GValue *value2);
|
|
||||||
typedef int (* GstValueIntersectFunc) (GValue *dest, const GValue *value1,
|
|
||||||
const GValue *value2);
|
|
||||||
|
|
||||||
typedef struct _GstValueTable GstValueTable;
|
|
||||||
struct _GstValueTable {
|
|
||||||
GType type;
|
|
||||||
GstValueCompareFunc compare;
|
|
||||||
GstValueSerializeFunc serialize;
|
|
||||||
GstValueDeserializeFunc deserialize;
|
|
||||||
|
|
||||||
void *_gst_reserved [GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#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)|(b)<<8|(c)<<16|(d)<<24)
|
||||||
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
|
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
|
||||||
|
|
||||||
|
@ -71,67 +51,106 @@ struct _GstValueTable {
|
||||||
#define GST_VALUE_GREATER_THAN 1
|
#define GST_VALUE_GREATER_THAN 1
|
||||||
#define GST_VALUE_UNORDERED 2
|
#define GST_VALUE_UNORDERED 2
|
||||||
|
|
||||||
|
typedef int (* GstValueCompareFunc) (const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
typedef char * (* GstValueSerializeFunc) (const GValue *value1);
|
||||||
|
typedef gboolean (* GstValueDeserializeFunc) (GValue *dest,
|
||||||
|
const char *s);
|
||||||
|
typedef int (* GstValueUnionFunc) (GValue *dest,
|
||||||
|
const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
typedef int (* GstValueIntersectFunc) (GValue *dest,
|
||||||
|
const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
|
||||||
|
typedef struct _GstValueTable GstValueTable;
|
||||||
|
struct _GstValueTable {
|
||||||
|
GType type;
|
||||||
|
GstValueCompareFunc compare;
|
||||||
|
GstValueSerializeFunc serialize;
|
||||||
|
GstValueDeserializeFunc deserialize;
|
||||||
|
|
||||||
|
void *_gst_reserved [GST_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
extern GType gst_type_fourcc;
|
extern GType gst_type_fourcc;
|
||||||
extern GType gst_type_int_range;
|
extern GType gst_type_int_range;
|
||||||
extern GType gst_type_double_range;
|
extern GType gst_type_double_range;
|
||||||
extern GType gst_type_list;
|
extern GType gst_type_list;
|
||||||
|
|
||||||
/* list */
|
void gst_value_register (const GstValueTable *table);
|
||||||
|
void gst_value_init_and_copy (GValue *dest,
|
||||||
|
const GValue *src);
|
||||||
|
|
||||||
void gst_value_list_prepend_value (GValue *value, const GValue *prepend_value);
|
gchar * gst_value_serialize (const GValue *value);
|
||||||
void gst_value_list_append_value (GValue *value, const GValue *append_value);
|
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);
|
||||||
guint gst_value_list_get_size (const GValue *value);
|
guint gst_value_list_get_size (const GValue *value);
|
||||||
G_CONST_RETURN GValue *gst_value_list_get_value (const GValue *value, guint index);
|
G_CONST_RETURN GValue * gst_value_list_get_value (const GValue *value,
|
||||||
void gst_value_list_concat (GValue *dest, const GValue *value1, const GValue *value2);
|
guint index);
|
||||||
|
|
||||||
/* fourcc */
|
/* fourcc */
|
||||||
|
void gst_value_set_fourcc (GValue *value,
|
||||||
void gst_value_set_fourcc (GValue *value, guint32 fourcc);
|
guint32 fourcc);
|
||||||
guint32 gst_value_get_fourcc (const GValue *value);
|
guint32 gst_value_get_fourcc (const GValue *value);
|
||||||
|
|
||||||
/* int range */
|
/* int range */
|
||||||
|
void gst_value_set_int_range (GValue *value,
|
||||||
void gst_value_set_int_range (GValue *value, int start, int end);
|
int start,
|
||||||
|
int end);
|
||||||
int gst_value_get_int_range_min (const GValue *value);
|
int gst_value_get_int_range_min (const GValue *value);
|
||||||
int gst_value_get_int_range_max (const GValue *value);
|
int gst_value_get_int_range_max (const GValue *value);
|
||||||
|
|
||||||
/* double range */
|
/* double range */
|
||||||
|
void gst_value_set_double_range (GValue *value,
|
||||||
void gst_value_set_double_range (GValue *value, double start, double end);
|
double start,
|
||||||
|
double end);
|
||||||
double gst_value_get_double_range_min (const GValue *value);
|
double gst_value_get_double_range_min (const GValue *value);
|
||||||
double gst_value_get_double_range_max (const GValue *value);
|
double gst_value_get_double_range_max (const GValue *value);
|
||||||
|
|
||||||
/* caps */
|
/* caps */
|
||||||
G_CONST_RETURN GstCaps * gst_value_get_caps (const GValue *value);
|
G_CONST_RETURN GstCaps * gst_value_get_caps (const GValue *value);
|
||||||
void gst_value_set_caps (GValue *value, const GstCaps *caps);
|
void gst_value_set_caps (GValue *value,
|
||||||
|
const GstCaps *caps);
|
||||||
|
|
||||||
/* compare */
|
/* compare */
|
||||||
|
int gst_value_compare (const GValue *value1,
|
||||||
gboolean gst_value_can_compare (const GValue *value1, const GValue *value2);
|
const GValue *value2);
|
||||||
int gst_value_compare (const GValue *value1, const GValue *value2);
|
gboolean gst_value_can_compare (const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
|
||||||
/* union */
|
/* union */
|
||||||
|
gboolean gst_value_union (GValue *dest,
|
||||||
gboolean gst_value_can_union (const GValue *value1, const GValue *value2);
|
const GValue *value1,
|
||||||
gboolean gst_value_union (GValue *dest, const GValue *value1, const GValue *value2);
|
const GValue *value2);
|
||||||
void gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func);
|
gboolean gst_value_can_union (const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
void gst_value_register_union_func (GType type1,
|
||||||
|
GType type2,
|
||||||
|
GstValueUnionFunc func);
|
||||||
|
|
||||||
/* intersection */
|
/* 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);
|
||||||
|
|
||||||
gboolean gst_value_can_intersect (const GValue *value1, const GValue *value2);
|
/* private */
|
||||||
gboolean gst_value_intersect (GValue *dest, const GValue *value1, const GValue *value2);
|
|
||||||
void gst_value_register_intersect_func (GType type1, GType type2, GstValueIntersectFunc func);
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
void gst_value_register (const GstValueTable *table);
|
|
||||||
void gst_value_init_and_copy (GValue *dest, const GValue *src);
|
|
||||||
void _gst_value_initialize (void);
|
void _gst_value_initialize (void);
|
||||||
|
|
||||||
gchar * gst_value_serialize (const GValue *value);
|
|
||||||
gboolean gst_value_deserialize (GValue *dest, const gchar *src);
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue