validate:scenario: Pass into gst-indent
This commit is contained in:
parent
5e0e092112
commit
33aae792f6
@ -95,10 +95,10 @@ GType _gst_validate_action_type;
|
|||||||
static GType gst_validate_action_get_type (void);
|
static GType gst_validate_action_get_type (void);
|
||||||
|
|
||||||
GST_DEFINE_MINI_OBJECT_TYPE (GstValidateAction, gst_validate_action);
|
GST_DEFINE_MINI_OBJECT_TYPE (GstValidateAction, gst_validate_action);
|
||||||
static GstValidateAction * gst_validate_action_new (void);
|
static GstValidateAction *gst_validate_action_new (void);
|
||||||
|
|
||||||
static GstValidateAction *
|
static GstValidateAction *
|
||||||
_action_copy (GstValidateAction *act)
|
_action_copy (GstValidateAction * act)
|
||||||
{
|
{
|
||||||
GstValidateAction *copy = gst_validate_action_new ();
|
GstValidateAction *copy = gst_validate_action_new ();
|
||||||
|
|
||||||
@ -116,18 +116,17 @@ _action_copy (GstValidateAction *act)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_action_free (GstValidateAction *action)
|
_action_free (GstValidateAction * action)
|
||||||
{
|
{
|
||||||
if (action->structure)
|
if (action->structure)
|
||||||
gst_structure_free (action->structure);
|
gst_structure_free (action->structure);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_validate_action_init (GstValidateAction *action)
|
gst_validate_action_init (GstValidateAction * action)
|
||||||
{
|
{
|
||||||
gst_mini_object_init (((GstMiniObject*) action), 0, _gst_validate_action_type,
|
gst_mini_object_init (((GstMiniObject *) action), 0,
|
||||||
(GstMiniObjectCopyFunction) _action_copy,
|
_gst_validate_action_type, (GstMiniObjectCopyFunction) _action_copy, NULL,
|
||||||
NULL,
|
|
||||||
(GstMiniObjectFreeFunction) _action_free);
|
(GstMiniObjectFreeFunction) _action_free);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -234,11 +233,13 @@ _execute_seek (GstValidateScenario * scenario, GstValidateAction * action)
|
|||||||
|
|
||||||
if ((str_start_type =
|
if ((str_start_type =
|
||||||
gst_structure_get_string (action->structure, "start_type")))
|
gst_structure_get_string (action->structure, "start_type")))
|
||||||
gst_validate_utils_enum_from_str (GST_TYPE_SEEK_TYPE, str_start_type, &start_type);
|
gst_validate_utils_enum_from_str (GST_TYPE_SEEK_TYPE, str_start_type,
|
||||||
|
&start_type);
|
||||||
|
|
||||||
if ((str_stop_type =
|
if ((str_stop_type =
|
||||||
gst_structure_get_string (action->structure, "stop_type")))
|
gst_structure_get_string (action->structure, "stop_type")))
|
||||||
gst_validate_utils_enum_from_str (GST_TYPE_SEEK_TYPE, str_stop_type, &stop_type);
|
gst_validate_utils_enum_from_str (GST_TYPE_SEEK_TYPE, str_stop_type,
|
||||||
|
&stop_type);
|
||||||
|
|
||||||
if ((str_flags = gst_structure_get_string (action->structure, "flags")))
|
if ((str_flags = gst_structure_get_string (action->structure, "flags")))
|
||||||
flags = gst_validate_utils_flags_from_str (GST_TYPE_SEEK_FLAGS, str_flags);
|
flags = gst_validate_utils_flags_from_str (GST_TYPE_SEEK_FLAGS, str_flags);
|
||||||
@ -656,7 +657,7 @@ static void
|
|||||||
gst_validate_scenario_update_segment_from_seek (GstValidateScenario * scenario,
|
gst_validate_scenario_update_segment_from_seek (GstValidateScenario * scenario,
|
||||||
GstEvent * seek)
|
GstEvent * seek)
|
||||||
{
|
{
|
||||||
GstValidateScenarioPrivate *priv = scenario->priv;
|
GstValidateScenarioPrivate * priv = scenario->priv;
|
||||||
gint64 start, stop;
|
gint64 start, stop;
|
||||||
GstSeekType start_type, stop_type;
|
GstSeekType start_type, stop_type;
|
||||||
|
|
||||||
@ -771,8 +772,10 @@ _pipeline_freed_cb (GstValidateScenario * scenario,
|
|||||||
{
|
{
|
||||||
GstValidateScenarioPrivate *priv = scenario->priv;
|
GstValidateScenarioPrivate *priv = scenario->priv;
|
||||||
|
|
||||||
if (priv->get_pos_id)
|
if (priv->get_pos_id) {
|
||||||
g_source_remove (priv->get_pos_id);
|
g_source_remove (priv->get_pos_id);
|
||||||
|
priv->get_pos_id = 0;
|
||||||
|
}
|
||||||
scenario->pipeline = NULL;
|
scenario->pipeline = NULL;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (scenario, "pipeline was freed");
|
GST_DEBUG_OBJECT (scenario, "pipeline was freed");
|
||||||
@ -993,7 +996,8 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
|
|||||||
gchar *lfilename = NULL, *tldir = NULL;
|
gchar *lfilename = NULL, *tldir = NULL;
|
||||||
gboolean found_actions = FALSE, is_config, ret = TRUE;
|
gboolean found_actions = FALSE, is_config, ret = TRUE;
|
||||||
|
|
||||||
gchar ** env_scenariodir = g_strsplit (g_getenv ("GST_VALIDATE_SCENARIOS_PATH"), ":",
|
gchar **env_scenariodir =
|
||||||
|
g_strsplit (g_getenv ("GST_VALIDATE_SCENARIOS_PATH"), ":",
|
||||||
0);
|
0);
|
||||||
|
|
||||||
if (!scenario_name)
|
if (!scenario_name)
|
||||||
@ -1025,8 +1029,9 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
|
|||||||
|
|
||||||
/* Try from local profiles */
|
/* Try from local profiles */
|
||||||
tldir =
|
tldir =
|
||||||
g_build_filename (g_get_user_data_dir (), "gstreamer-" GST_API_VERSION,
|
g_build_filename (g_get_user_data_dir (),
|
||||||
GST_VALIDATE_SCENARIO_DIRECTORY, lfilename, NULL);
|
"gstreamer-" GST_API_VERSION, GST_VALIDATE_SCENARIO_DIRECTORY,
|
||||||
|
lfilename, NULL);
|
||||||
|
|
||||||
|
|
||||||
if (!(ret = _load_scenario_file (scenario, tldir, &is_config))) {
|
if (!(ret = _load_scenario_file (scenario, tldir, &is_config))) {
|
||||||
@ -1167,8 +1172,8 @@ gst_validate_scenario_finalize (GObject * object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GstValidateScenario *
|
GstValidateScenario *
|
||||||
gst_validate_scenario_factory_create (GstValidateRunner * runner,
|
gst_validate_scenario_factory_create (GstValidateRunner *
|
||||||
GstElement * pipeline, const gchar * scenario_name)
|
runner, GstElement * pipeline, const gchar * scenario_name)
|
||||||
{
|
{
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
GstValidateScenario *scenario =
|
GstValidateScenario *scenario =
|
||||||
@ -1204,8 +1209,8 @@ gst_validate_scenario_factory_create (GstValidateRunner * runner,
|
|||||||
static gboolean
|
static gboolean
|
||||||
_add_description (GQuark field_id, const GValue * value, KeyFileGroupName * kfg)
|
_add_description (GQuark field_id, const GValue * value, KeyFileGroupName * kfg)
|
||||||
{
|
{
|
||||||
g_key_file_set_string (kfg->kf, kfg->group_name, g_quark_to_string (field_id),
|
g_key_file_set_string (kfg->kf, kfg->group_name,
|
||||||
gst_value_serialize (value));
|
g_quark_to_string (field_id), gst_value_serialize (value));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1249,8 +1254,8 @@ _list_scenarios_in_dir (GFile * dir, GKeyFile * kf)
|
|||||||
kfg.group_name = name[0];
|
kfg.group_name = name[0];
|
||||||
kfg.kf = kf;
|
kfg.kf = kf;
|
||||||
|
|
||||||
gst_structure_foreach (desc, (GstStructureForeachFunc) _add_description,
|
gst_structure_foreach (desc,
|
||||||
&kfg);
|
(GstStructureForeachFunc) _add_description, &kfg);
|
||||||
} else {
|
} else {
|
||||||
g_key_file_set_string (kf, name[0], "noinfo", "nothing");
|
g_key_file_set_string (kf, name[0], "noinfo", "nothing");
|
||||||
}
|
}
|
||||||
@ -1268,7 +1273,8 @@ gst_validate_list_scenarios (gchar * output_file)
|
|||||||
gsize datalength;
|
gsize datalength;
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
GKeyFile *kf = NULL;
|
GKeyFile *kf = NULL;
|
||||||
gchar ** env_scenariodir = g_strsplit (g_getenv ("GST_VALIDATE_SCENARIOS_PATH"), ":",
|
gchar **env_scenariodir =
|
||||||
|
g_strsplit (g_getenv ("GST_VALIDATE_SCENARIOS_PATH"), ":",
|
||||||
0);
|
0);
|
||||||
gchar *tldir = g_build_filename (g_get_user_data_dir (),
|
gchar *tldir = g_build_filename (g_get_user_data_dir (),
|
||||||
"gstreamer-" GST_API_VERSION, GST_VALIDATE_SCENARIO_DIRECTORY,
|
"gstreamer-" GST_API_VERSION, GST_VALIDATE_SCENARIO_DIRECTORY,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user