static void gst_validate_scenario_finalize (GObject * object);
static GRegex *clean_action_str;
-typedef struct _GstValidateActionType
-{
- GstValidateExecuteAction execute;
- gchar **mandatory_fields;
- gchar *description;
- gboolean is_config;
-} GstValidateActionType;
-
struct _GstValidateScenarioPrivate
{
GstValidateRunner *runner;
return action;
}
+/* GstValidateActionType implementation */
+GType _gst_validate_action_type_type;
+GST_DEFINE_MINI_OBJECT_TYPE (GstValidateActionType, gst_validate_action_type);
+static GstValidateActionType *gst_validate_action_type_new (void);
+
+static void
+_action_type_free (GstValidateActionType * type)
+{
+ g_strfreev (type->mandatory_fields);
+ g_free (type->description);
+}
+
+static void
+gst_validate_action_type_init (GstValidateActionType * type)
+{
+ gst_mini_object_init ((GstMiniObject *) type, 0,
+ _gst_validate_action_type_type, NULL, NULL,
+ (GstMiniObjectFreeFunction) _action_type_free);
+}
+
+GstValidateActionType *
+gst_validate_action_type_new (void)
+{
+ GstValidateActionType *type = g_slice_new0 (GstValidateActionType);
+
+ gst_validate_action_type_init (type);
+
+ return type;
+}
+
static gboolean
_set_variable_func (const gchar * name, double *value, gpointer user_data)
{
GstValidateExecuteAction function, const gchar * const *mandatory_fields,
const gchar * description, gboolean is_config)
{
- GstValidateActionType *type = g_slice_new0 (GstValidateActionType);
+ GstValidateActionType *type = gst_validate_action_type_new ();
if (action_types_table == NULL)
action_types_table = g_hash_table_new_full (g_str_hash, g_str_equal,
GST_DEBUG_FG_YELLOW, "Gst validate scenarios");
_gst_validate_action_type = gst_validate_action_get_type ();
+ _gst_validate_action_type_type = gst_validate_action_type_get_type ();
clean_action_str = g_regex_new ("\\\\\n|#.*\n", G_REGEX_CASELESS, 0, NULL);
gst_validate_add_action_type ("seek", _execute_seek, seek_mandatory_fields,
typedef struct _GstValidateScenarioClass GstValidateScenarioClass;
typedef struct _GstValidateScenarioPrivate GstValidateScenarioPrivate;
typedef struct _GstValidateAction GstValidateAction;
+typedef struct _GstValidateActionType GstValidateActionType;
typedef gboolean (*GstValidateExecuteAction) (GstValidateScenario * scenario, GstValidateAction * action);
GST_EXPORT GType _gst_validate_action_type;
+GST_EXPORT GType _gst_validate_action_type_type;
struct _GstValidateAction
{
gpointer _gst_reserved[GST_PADDING_LARGE];
};
+#define GST_TYPE_VALIDATE_ACTION (gst_validate_action_get_type ())
+#define GST_IS_VALIDATE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VALIDATE_ACTION))
+GType gst_validate_action_get_type (void);
+
+struct _GstValidateActionType
+{
+ GstMiniObject mini_object;
+
+ GstValidateExecuteAction execute;
+
+ gchar **mandatory_fields;
+ gchar **option_fields;
+
+ gchar *description;
+ gboolean is_config;
+
+ gpointer _gst_reserved[GST_PADDING_LARGE];
+};
+
+#define GST_TYPE_VALIDATE_ACTION_TYPE (gst_validate_action_type_get_type ())
+#define GST_IS_VALIDATE_ACTION_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VALIDATE_ACTION_TYPE))
+GType gst_validate_action_type_get_type (void);
+
+
struct _GstValidateScenarioClass
{
GObjectClass parent_class;