mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
Revert "validate:scenario: Add a way to specify action structure size"
This reverts commit b976319ef7f977b8ce910c4b8aa1a843da3b264f. Now that the exact same structure can be used to represent different action types, we can not rely on the structure size to stuff informations into the action. Users should just make use of GstMiniObject.qdata.
This commit is contained in:
parent
a5dab4b378
commit
135cb2d2e4
2 changed files with 3 additions and 18 deletions
|
@ -198,7 +198,7 @@ _action_free (GstValidateAction * action)
|
||||||
if (action->main_structure)
|
if (action->main_structure)
|
||||||
gst_structure_free (action->main_structure);
|
gst_structure_free (action->main_structure);
|
||||||
|
|
||||||
g_slice_free1 (_find_action_type (action->type)->action_struct_size, action);
|
g_slice_free (GstValidateAction, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -219,7 +219,7 @@ static GstValidateAction *
|
||||||
gst_validate_action_new (GstValidateScenario * scenario,
|
gst_validate_action_new (GstValidateScenario * scenario,
|
||||||
GstValidateActionType * action_type)
|
GstValidateActionType * action_type)
|
||||||
{
|
{
|
||||||
GstValidateAction *action = g_slice_alloc0 (action_type->action_struct_size);
|
GstValidateAction *action = g_slice_new0 (GstValidateAction);
|
||||||
|
|
||||||
gst_validate_action_init (action);
|
gst_validate_action_init (action);
|
||||||
action->playback_time = GST_CLOCK_TIME_NONE;
|
action->playback_time = GST_CLOCK_TIME_NONE;
|
||||||
|
@ -2372,7 +2372,6 @@ gst_validate_register_action_type_dynamic (GstPlugin * plugin,
|
||||||
|
|
||||||
type->description = g_strdup (description);
|
type->description = g_strdup (description);
|
||||||
type->flags = flags;
|
type->flags = flags;
|
||||||
type->action_struct_size = sizeof (GstValidateActionType);
|
|
||||||
type->rank = rank;
|
type->rank = rank;
|
||||||
|
|
||||||
if ((tmptype = _find_action_type (type_name))) {
|
if ((tmptype = _find_action_type (type_name))) {
|
||||||
|
@ -2403,15 +2402,6 @@ gst_validate_register_action_type_dynamic (GstPlugin * plugin,
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gst_validate_action_type_set_action_struct_size (GstValidateActionType * type,
|
|
||||||
gsize action_struct_size)
|
|
||||||
{
|
|
||||||
g_return_if_fail (action_struct_size >= sizeof (GstValidateAction));
|
|
||||||
|
|
||||||
type->action_struct_size = sizeof (GstValidateActionType);
|
|
||||||
}
|
|
||||||
|
|
||||||
GstValidateActionType *
|
GstValidateActionType *
|
||||||
gst_validate_get_action_type (const gchar * type_name)
|
gst_validate_get_action_type (const gchar * type_name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,11 +155,10 @@ struct _GstValidateActionType
|
||||||
gchar *description;
|
gchar *description;
|
||||||
GstValidateActionTypeFlags flags;
|
GstValidateActionTypeFlags flags;
|
||||||
|
|
||||||
gsize action_struct_size;
|
|
||||||
GstRank rank;
|
GstRank rank;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer _gst_reserved[GST_PADDING_LARGE - sizeof(gsize) - sizeof (GstRank)];
|
gpointer _gst_reserved[GST_PADDING_LARGE - sizeof (GstRank)];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_TYPE_VALIDATE_ACTION_TYPE (gst_validate_action_type_get_type ())
|
#define GST_TYPE_VALIDATE_ACTION_TYPE (gst_validate_action_type_get_type ())
|
||||||
|
@ -257,10 +256,6 @@ gst_validate_register_action_type_dynamic (GstPlugin *plugin,
|
||||||
GstValidateActionTypeFlags flags);
|
GstValidateActionTypeFlags flags);
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_validate_action_type_set_action_struct_size (GstValidateActionType *type,
|
|
||||||
gsize action_struct_size);
|
|
||||||
|
|
||||||
gboolean gst_validate_action_get_clocktime (GstValidateScenario * scenario,
|
gboolean gst_validate_action_get_clocktime (GstValidateScenario * scenario,
|
||||||
GstValidateAction *action,
|
GstValidateAction *action,
|
||||||
const gchar * name,
|
const gchar * name,
|
||||||
|
|
Loading…
Reference in a new issue