![]() | ![]() | ![]() | GStreamer 0.8 Core API Reference (0.8.1) | ![]() |
---|
GstValue — GValue implementations specific to GStreamer
#define GST_MAKE_FOURCC (a,b,c,d) #define GST_STR_FOURCC (f) #define GST_FOURCC_FORMAT #define GST_FOURCC_ARGS (fourcc) #define GST_VALUE_HOLDS_FOURCC (x) #define GST_VALUE_HOLDS_INT_RANGE (x) #define GST_VALUE_HOLDS_DOUBLE_RANGE (x) #define GST_VALUE_HOLDS_LIST (x) #define GST_VALUE_HOLDS_CAPS (x) #define GST_TYPE_FOURCC #define GST_TYPE_INT_RANGE #define GST_TYPE_DOUBLE_RANGE #define GST_TYPE_LIST #define GST_VALUE_LESS_THAN #define GST_VALUE_EQUAL #define GST_VALUE_GREATER_THAN #define GST_VALUE_UNORDERED int (*GstValueCompareFunc) (const GValue *value1, const GValue *value2); char* (*GstValueSerializeFunc) (const GValue *value1); gboolean (*GstValueDeserializeFunc) (GValue *dest, const char *s); int (*GstValueUnionFunc) (GValue *dest, const GValue *value1, const GValue *value2); int (*GstValueIntersectFunc) (GValue *dest, const GValue *value1, const GValue *value2); struct GstValueTable; extern GType gst_type_fourcc; extern GType gst_type_int_range; extern GType gst_type_double_range; extern GType gst_type_list; void gst_value_register (const GstValueTable *table); void gst_value_init_and_copy (GValue *dest, const GValue *src); gchar* gst_value_serialize (const GValue *value); gboolean gst_value_deserialize (GValue *dest, const gchar *src); 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); void gst_value_set_fourcc (GValue *value, guint32 fourcc); guint32 gst_value_get_fourcc (const GValue *value); 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); 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); G_CONST_RETURN GstCaps* gst_value_get_caps (const GValue *value); void gst_value_set_caps (GValue *value, const GstCaps *caps); int gst_value_compare (const GValue *value1, const GValue *value2); gboolean gst_value_can_compare (const GValue *value1, const GValue *value2); 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); 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);
#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
a : | |
b : | |
c : | |
d : |
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
f : |
#define GST_VALUE_HOLDS_INT_RANGE(x) (G_VALUE_HOLDS(x, gst_type_int_range))
x : |
#define GST_VALUE_HOLDS_DOUBLE_RANGE(x) (G_VALUE_HOLDS(x, gst_type_double_range))
x : |
int (*GstValueCompareFunc) (const GValue *value1, const GValue *value2);
value1 : | |
value2 : | |
Returns : |
gboolean (*GstValueDeserializeFunc) (GValue *dest, const char *s);
dest : | |
s : | |
Returns : |
int (*GstValueUnionFunc) (GValue *dest, const GValue *value1, const GValue *value2);
dest : | |
value1 : | |
value2 : | |
Returns : |
int (*GstValueIntersectFunc) (GValue *dest, const GValue *value1, const GValue *value2);
dest : | |
value1 : | |
value2 : | |
Returns : |
struct GstValueTable { GType type; GstValueCompareFunc compare; GstValueSerializeFunc serialize; GstValueDeserializeFunc deserialize; void *_gst_reserved [GST_PADDING]; };
void gst_value_init_and_copy (GValue *dest, const GValue *src);
dest : | |
src : |
gboolean gst_value_deserialize (GValue *dest, const gchar *src);
dest : | |
src : | |
Returns : |
void gst_value_list_append_value (GValue *value, const GValue *append_value);
Appends append_value to the GstValueList in value.
value : | a GstValueList to append a value to |
append_value : | the value to append |
void gst_value_list_prepend_value (GValue *value, const GValue *prepend_value);
Prepends prepend_value to the GstValueList in value.
value : | a GstValueList to prepend a value to |
prepend_value : | the value to prepend |
void gst_value_list_concat (GValue *dest, const GValue *value1, const GValue *value2);
Concatenates copies of value1 and value2 into a list. The value dest is initialized to the type GST_TYPE_LIST.
dest : | an uninitialized GValue to take the result |
value1 : | first value to put into the union |
value2 : | second value to put into the union |
guint gst_value_list_get_size (const GValue *value);
Gets the number of values contained in value.
value : | a GstValueList |
Returns : | the number of values |
G_CONST_RETURN GValue* gst_value_list_get_value (const GValue *value, guint index);
Gets the value that is a member of the list contained in value and has the index index.
value : | a GstValueList |
index : | index of value to get from the list |
Returns : | the value at the given index |
void gst_value_set_fourcc (GValue *value, guint32 fourcc);
Sets value to fourcc.
value : | a GValue initialized to GST_TYPE_FOURCC |
fourcc : | the fourcc to set |
guint32 gst_value_get_fourcc (const GValue *value);
Gets the fourcc contained in value.
value : | a GValue initialized to GST_TYPE_FOURCC |
Returns : | the fourcc contained in value. |
void gst_value_set_int_range (GValue *value, int start, int end);
Sets value to the range specified by start and end.
value : | a GValue initialized to GST_TYPE_INT_RANGE |
start : | the start of the range |
end : | the end of the range |
int gst_value_get_int_range_min (const GValue *value);
Gets the minimum of the range specified by value.
value : | a GValue initialized to GST_TYPE_INT_RANGE |
Returns : | the minumum of the range |
int gst_value_get_int_range_max (const GValue *value);
Gets the maximum of the range specified by value.
value : | a GValue initialized to GST_TYPE_INT_RANGE |
Returns : | the maxumum of the range |
void gst_value_set_double_range (GValue *value, double start, double end);
Sets value to the range specified by start and end.
value : | a GValue initialized to GST_TYPE_DOUBLE_RANGE |
start : | the start of the range |
end : | the end of the range |
double gst_value_get_double_range_min (const GValue *value);
Gets the minimum of the range specified by value.
value : | a GValue initialized to GST_TYPE_DOUBLE_RANGE |
Returns : | the minumum of the range |
double gst_value_get_double_range_max (const GValue *value);
Gets the maximum of the range specified by value.
value : | a GValue initialized to GST_TYPE_DOUBLE_RANGE |
Returns : | the maxumum of the range |
G_CONST_RETURN GstCaps* gst_value_get_caps (const GValue *value);
Gets the contents of value.
value : | a GValue initialized to GST_TYPE_CAPS |
Returns : | the contents of value |
void gst_value_set_caps (GValue *value, const GstCaps *caps);
Sets the contents of value to coorespond to caps. The actual GstCaps structure is copied before it is used.
value : | a GValue initialized to GST_TYPE_CAPS |
caps : | the caps to set the value to |
int gst_value_compare (const GValue *value1, const GValue *value2);
Compares value1 and value2. If value1 and value2 cannot be compared, the function returns GST_VALUE_UNORDERED. Otherwise, if value1 is greater than value2, GST_VALUE_GREATER is returned. If value1 is less than value2, GST_VALUE_LESSER is returned. If the values are equal, GST_VALUE_EQUAL is returned.
value1 : | a value to compare |
value2 : | another value to compare |
Returns : | A GstValueCompareType value |
gboolean gst_value_can_compare (const GValue *value1, const GValue *value2);
Determines if value1 and value2 can be compared.
value1 : | a value to compare |
value2 : | another value to compare |
Returns : | TRUE if the values can be compared |
gboolean gst_value_union (GValue *dest, const GValue *value1, const GValue *value2);
Creates a GValue cooresponding to the union of value1 and value2.
dest : | the destination value |
value1 : | a value to union |
value2 : | another value to union |
Returns : | TRUE if the values could be unioned |
gboolean gst_value_can_union (const GValue *value1, const GValue *value2);
Determines if value1 and value2 can be non-trivially unioned. Any two values can be trivially unioned by adding both of them to a GstValueList. However, certain types have the possibility to be unioned in a simpler way. For example, an integer range and an integer can be unioned if the integer is a subset of the integer range. If there is the possibility that two values can be unioned, this function returns TRUE.
value1 : | a value to union |
value2 : | another value to union |
Returns : | TRUE if there is a function allowing the two values to be unioned. |
void gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func);
Registers a union function that can create a union between GValues of the type type1 and type2.
type1 : | a type to union |
type2 : | another type to union |
func : | a function that implments creating a union between the two types |
gboolean gst_value_intersect (GValue *dest, const GValue *value1, const GValue *value2);
Calculates the intersection of the two values.
dest : | the destination value for intersection |
value1 : | a value to intersect |
value2 : | another value to intersect |
Returns : | TRUE if the intersection is non-empty |
gboolean gst_value_can_intersect (const GValue *value1, const GValue *value2);
value1 : | |
value2 : | |
Returns : |
void gst_value_register_intersect_func (GType type1, GType type2, GstValueIntersectFunc func);
type1 : | |
type2 : | |
func : |
<< gstutils | GstXML >> |