typedef struct
{
GstQuery query;
- gsize slice_size;
GstStructure *structure;
} GstQueryImpl;
-#define GST_QUERY_SLICE_SIZE(q) (((GstQueryImpl *)(q))->slice_size)
#define GST_QUERY_STRUCTURE(q) (((GstQueryImpl *)(q))->structure)
gst_structure_free (s);
}
- g_slice_free1 (GST_QUERY_SLICE_SIZE (query), query);
+ g_slice_free1 (sizeof (GstQueryImpl), query);
}
static GstQuery *
}
static void
-gst_query_init (GstQueryImpl * query, gsize size, GstQueryType type)
+gst_query_init (GstQueryImpl * query, GstQueryType type)
{
gst_mini_object_init (GST_MINI_OBJECT_CAST (query), _gst_query_type);
query->query.mini_object.copy = (GstMiniObjectCopyFunction) _gst_query_copy;
query->query.mini_object.free = (GstMiniObjectFreeFunction) _gst_query_free;
- GST_QUERY_SLICE_SIZE (query) = size;
GST_QUERY_TYPE (query) = type;
}
&query->query.mini_object.refcount))
goto had_parent;
}
- gst_query_init (query, sizeof (GstQueryImpl), type);
+ gst_query_init (query, type);
GST_QUERY_STRUCTURE (query) = structure;
/* ERRORS */
had_parent:
{
- g_slice_free1 (GST_QUERY_SLICE_SIZE (query), query);
+ g_slice_free1 (sizeof (GstQueryImpl), query);
g_warning ("structure is already owned by another object");
return NULL;
}