mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
validate:scenario: Fix 'duration' property of the pause action
We preparse it into and set it as GstClockTime in the structures so make sure to use them as such.
This commit is contained in:
parent
753ba408dd
commit
9bba59d9ba
1 changed files with 5 additions and 5 deletions
|
@ -594,19 +594,19 @@ _execute_set_state (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
static gboolean
|
||||
_execute_pause (GstValidateScenario * scenario, GstValidateAction * action)
|
||||
{
|
||||
gdouble duration = 0;
|
||||
GstClockTime duration = 0;
|
||||
GstStateChangeReturn ret;
|
||||
|
||||
gst_structure_get_double (action->structure, "duration", &duration);
|
||||
gst_structure_get_uint64 (action->structure, "duration", &duration);
|
||||
gst_structure_set (action->structure, "state", G_TYPE_STRING, "paused", NULL);
|
||||
|
||||
GST_DEBUG ("Pausing for %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (duration * GST_SECOND));
|
||||
GST_INFO_OBJECT (scenario, "Pausing for %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (duration));
|
||||
|
||||
ret = _execute_set_state (scenario, action);
|
||||
|
||||
if (ret && duration)
|
||||
g_timeout_add (duration * 1000,
|
||||
g_timeout_add (GST_TIME_AS_MSECONDS (duration),
|
||||
(GSourceFunc) _pause_action_restore_playing, scenario);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue