mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
data: Port remaning scenario files to new format
And add support to user declared timestamps -1.0 as GST_CLOCK_TIME_NONE
This commit is contained in:
parent
ea1f0a64f2
commit
8a9e9a7fd7
3 changed files with 19 additions and 102 deletions
|
@ -1,85 +1,8 @@
|
|||
<scenario name="Backward and forward seeking">
|
||||
<actions>
|
||||
<seek name='Forward seek with stop time'
|
||||
playback_time="0"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="5.0"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Backward seek'
|
||||
playback_time="10"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="0"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Backward seek'
|
||||
playback_time="5"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="25"
|
||||
stop_type="set"
|
||||
stop="-1" />
|
||||
|
||||
<seek name='Backward seek'
|
||||
playback_time="30"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="0.0"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Forward seek'
|
||||
playback_time="5.0"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="15.0"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Forward seek'
|
||||
playback_time="20.0"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="35"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Backward seek'
|
||||
playback_time="40"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="25"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
|
||||
<seek name='Last backward seek with stop time'
|
||||
playback_time="3.0"
|
||||
format="time"
|
||||
rate="1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="5.0"
|
||||
stop_type="set"
|
||||
stop="10.0" />
|
||||
|
||||
</actions>
|
||||
</scenario>
|
||||
|
||||
seek, name=Forward-seek, playback_time=0.0, rate=1.0, start=5.0
|
||||
seek, name=Backward-seek, playback_time=10.0, rate=1.0, start=0.0
|
||||
seek, name=Backward-seek, playback_time=5.0, rate=1.0, start=25.0, stop=-1
|
||||
seek, name=Backward-seek, playback_time=30.0, rate=1.0, start=0.0
|
||||
seek, name=Forward-seek, playback_time=5.0, rate=1.0, start=15.0
|
||||
seek, name=Forward-seek, playback_time=20.0, rate=1.0, start=35.0
|
||||
seek, name=Backward-seek, playback_time=40.0, rate=1.0, start=25.0
|
||||
seek, name=Last-backward-seek, playback_time=3.0, rate=1.0, start=5.0, stop=10.0
|
||||
|
|
|
@ -1,14 +1 @@
|
|||
<scenario name="Simple backward">
|
||||
<actions>
|
||||
<seek name='Backward seek'
|
||||
playback_time="0.0"
|
||||
format="time"
|
||||
rate="-1.0"
|
||||
flags="accurate+flush"
|
||||
start_type="set"
|
||||
start="0.0"
|
||||
stop_type="set"
|
||||
stop="-1.0" />
|
||||
</actions>
|
||||
</scenario>
|
||||
|
||||
seek, name=Backward-seek, playback_time=0.0, rate=-1.0, start=0.0, stop=30.0
|
||||
|
|
|
@ -132,7 +132,10 @@ _execute_seek (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
GST_WARNING_OBJECT (scenario, "Could not find start for a seek, FAILED");
|
||||
return FALSE;
|
||||
}
|
||||
start = dstart * GST_SECOND;
|
||||
if (dstart == -1.0)
|
||||
start = GST_CLOCK_TIME_NONE;
|
||||
else
|
||||
start = dstart * GST_SECOND;
|
||||
|
||||
gst_structure_get_double (action->structure, "rate", &rate);
|
||||
if ((str_format = gst_structure_get_string (action->structure, "format")))
|
||||
|
@ -149,8 +152,12 @@ _execute_seek (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
if ((str_flags = gst_structure_get_string (action->structure, "flags")))
|
||||
flags = get_flags_from_string (GST_TYPE_SEEK_FLAGS, str_flags);
|
||||
|
||||
if (gst_structure_get_double (action->structure, "stop", &dstop))
|
||||
stop = dstop * GST_SECOND;
|
||||
if (gst_structure_get_double (action->structure, "stop", &dstop)) {
|
||||
if (dstop == -1.0)
|
||||
stop = GST_CLOCK_TIME_NONE;
|
||||
else
|
||||
stop = dstop * GST_SECOND;
|
||||
}
|
||||
|
||||
g_print ("%s (num %u), seeking to: %" GST_TIME_FORMAT " stop: %"
|
||||
GST_TIME_FORMAT " Rate %lf\n", action->name,
|
||||
|
|
Loading…
Reference in a new issue