mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
validate: fix pause duration handling
Commit 394242c224
("validate:scenario: Enhance variable
implementation") caused the duration parameter to be stored
as a double instead of GstClockTime, which the _execute_pause
implementation expects. Fix the parameter type and use
gst_validate_action_get_clocktime to handle duration correctly.
https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/73
This commit is contained in:
parent
4262c23a9c
commit
99eaad17e2
1 changed files with 2 additions and 3 deletions
|
@ -847,8 +847,7 @@ _execute_pause (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
GstClockTime duration = 0;
|
GstClockTime duration = 0;
|
||||||
GstValidateExecuteActionReturn ret;
|
GstValidateExecuteActionReturn ret;
|
||||||
|
|
||||||
gst_structure_get (action->structure, "duration", G_TYPE_UINT64, &duration,
|
gst_validate_action_get_clocktime (scenario, action, "duration", &duration);
|
||||||
NULL);
|
|
||||||
gst_structure_set (action->structure, "state", G_TYPE_STRING, "paused", NULL);
|
gst_structure_set (action->structure, "state", G_TYPE_STRING, "paused", NULL);
|
||||||
|
|
||||||
GST_INFO_OBJECT (scenario, "Pausing for %" GST_TIME_FORMAT,
|
GST_INFO_OBJECT (scenario, "Pausing for %" GST_TIME_FORMAT,
|
||||||
|
@ -4806,7 +4805,7 @@ init_scenarios (void)
|
||||||
.name = "duration",
|
.name = "duration",
|
||||||
.description = "The duration during which the stream will be paused",
|
.description = "The duration during which the stream will be paused",
|
||||||
.mandatory = FALSE,
|
.mandatory = FALSE,
|
||||||
.types = "double",
|
.types = "double or string (GstClockTime)",
|
||||||
.possible_variables = NULL,
|
.possible_variables = NULL,
|
||||||
.def = "0.0",
|
.def = "0.0",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue