mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
scenario: Start monitoring the position only when the pipeline starts playing
Otherwize seeking with a playback_time=0 won't work properly
This commit is contained in:
parent
f9ddb6f59e
commit
161e0cee12
1 changed files with 8 additions and 2 deletions
|
@ -111,6 +111,8 @@ struct _GstValidateScenarioPrivate
|
||||||
/* markup parser context */
|
/* markup parser context */
|
||||||
gboolean in_scenario;
|
gboolean in_scenario;
|
||||||
gboolean in_actions;
|
gboolean in_actions;
|
||||||
|
|
||||||
|
guint get_pos_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Some helper method that are missing iin Json itscenario */
|
/* Some helper method that are missing iin Json itscenario */
|
||||||
|
@ -517,6 +519,12 @@ async_done_cb (GstBus * bus, GstMessage * message,
|
||||||
priv->seeked_position = GST_CLOCK_TIME_NONE;
|
priv->seeked_position = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->get_pos_id == 0) {
|
||||||
|
get_position (scenario);
|
||||||
|
priv->get_pos_id = g_timeout_add (50, (GSourceFunc) get_position, scenario);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,8 +753,6 @@ gst_validate_scenario_factory_create (GstValidateRunner * runner,
|
||||||
scenario);
|
scenario);
|
||||||
gst_object_unref (bus);
|
gst_object_unref (bus);
|
||||||
|
|
||||||
g_timeout_add (50, (GSourceFunc) get_position, scenario);
|
|
||||||
|
|
||||||
g_print ("\n=========================================\n"
|
g_print ("\n=========================================\n"
|
||||||
"Running scenario %s on pipeline %s"
|
"Running scenario %s on pipeline %s"
|
||||||
"\n=========================================\n", scenario_name,
|
"\n=========================================\n", scenario_name,
|
||||||
|
|
Loading…
Reference in a new issue