mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
gst/: (_gst_value_initialize): Create a new function gst_type_is_fixed() to indicate types that are fixed wrt caps or...
Original commit message from CVS: * gst/gstcaps.c: (gst_caps_is_fixed_foreach): * gst/gstpad.c: (_gst_pad_default_fixate_foreach): * gst/gstvalue.c: (gst_value_serialize_buffer), (gst_value_deserialize_buffer), (gst_type_is_fixed), (_gst_value_initialize): Create a new function gst_type_is_fixed() to indicate types that are fixed wrt caps or not. Switching to this function fixes (bug #140298). * gst/gstvalue.h:
This commit is contained in:
parent
8e4a4d41ca
commit
ac0fd9c5bf
6 changed files with 37 additions and 16 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-04-16 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstcaps.c: (gst_caps_is_fixed_foreach):
|
||||
* gst/gstpad.c: (_gst_pad_default_fixate_foreach):
|
||||
* gst/gstvalue.c: (gst_value_serialize_buffer),
|
||||
(gst_value_deserialize_buffer), (gst_type_is_fixed),
|
||||
(_gst_value_initialize): Create a new function gst_type_is_fixed()
|
||||
to indicate types that are fixed wrt caps or not. Switching to
|
||||
this function fixes (bug #140298).
|
||||
* gst/gstvalue.h:
|
||||
|
||||
2004-04-16 David Schleef <ds@schleef.org>
|
||||
|
||||
* common/m4/gst-arch.m4: Implmenent a whitelist and blacklist
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 5252791a08494c87ec84fadc385ec5b7c44f96b6
|
||||
Subproject commit e55182f6eece70ff99e33b9800b27a926670dbdd
|
|
@ -527,13 +527,7 @@ gst_caps_is_fixed_foreach (GQuark field_id, GValue * value, gpointer unused)
|
|||
{
|
||||
GType type = G_VALUE_TYPE (value);
|
||||
|
||||
if (G_TYPE_IS_FUNDAMENTAL (type))
|
||||
return TRUE;
|
||||
if (type == GST_TYPE_FOURCC)
|
||||
return TRUE;
|
||||
if (type == GST_TYPE_BUFFER)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return gst_type_is_fixed (type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2015,8 +2015,7 @@ _gst_pad_default_fixate_foreach (GQuark field_id, GValue * value, gpointer s)
|
|||
GstStructure *structure = (GstStructure *) s;
|
||||
GType type = G_VALUE_TYPE (value);
|
||||
|
||||
if (G_TYPE_IS_FUNDAMENTAL (type) || type == GST_TYPE_FOURCC ||
|
||||
type == GST_TYPE_BUFFER)
|
||||
if (gst_type_is_fixed (type))
|
||||
return TRUE;
|
||||
|
||||
if (type == GST_TYPE_INT_RANGE) {
|
||||
|
|
|
@ -1569,13 +1569,28 @@ gst_value_deserialize (GValue * dest, const gchar * src)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
enum
|
||||
/*
|
||||
* gst_type_is_fixed:
|
||||
* @type:
|
||||
*
|
||||
* Returns:
|
||||
*/
|
||||
gboolean
|
||||
gst_type_is_fixed (GType type)
|
||||
{
|
||||
_GST_TYPE_FOURCC = G_TYPE_RESERVED_USER_FIRST,
|
||||
_GST_TYPE_INT_RANGE,
|
||||
_GST_TYPE_DOUBLE_RANGE,
|
||||
_GST_TYPE_VALUE_LIST
|
||||
};
|
||||
if (type == GST_TYPE_INT_RANGE || type == GST_TYPE_DOUBLE_RANGE ||
|
||||
type == GST_TYPE_LIST) {
|
||||
return FALSE;
|
||||
}
|
||||
if (G_TYPE_IS_FUNDAMENTAL (type) &&
|
||||
type < G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_GLIB_LAST)) {
|
||||
return TRUE;
|
||||
}
|
||||
if (type == GST_TYPE_BUFFER || type == GST_TYPE_FOURCC) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
_gst_value_initialize (void)
|
||||
|
|
|
@ -148,6 +148,8 @@ void gst_value_register_intersect_func (GType
|
|||
GType type2,
|
||||
GstValueIntersectFunc func);
|
||||
|
||||
gboolean gst_type_is_fixed (GType type);
|
||||
|
||||
/* private */
|
||||
void _gst_value_initialize (void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue