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:
Thibault Saunier 2013-09-13 11:43:33 -03:00
parent ea1f0a64f2
commit 8a9e9a7fd7
3 changed files with 19 additions and 102 deletions

View file

@ -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

View file

@ -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

View file

@ -132,6 +132,9 @@ _execute_seek (GstValidateScenario * scenario, GstValidateAction * action)
GST_WARNING_OBJECT (scenario, "Could not find start for a seek, FAILED");
return FALSE;
}
if (dstart == -1.0)
start = GST_CLOCK_TIME_NONE;
else
start = dstart * GST_SECOND;
gst_structure_get_double (action->structure, "rate", &rate);
@ -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))
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,