validate: Rename action type playback_time to playback-time

Keeping backward compatiblity with the old naming
This commit is contained in:
Thibault Saunier 2014-10-12 20:19:42 +02:00
parent 02ab99fcbb
commit 99045f7dbb
27 changed files with 101 additions and 98 deletions

View file

@ -1,5 +1,5 @@
description, duration=15.0
set-restriction, playback_time=5.0, restriction-caps="video/x-raw,framerate=(fraction)5/1"
set-restriction, playback_time=10.0, restriction-caps="video/x-raw,framerate=(fraction)30/1"
eos, playback_time=15.0
stop, playback_time=15.0
set-restriction, playback-time=5.0, restriction-caps="video/x-raw,framerate=(fraction)5/1"
set-restriction, playback-time=10.0, restriction-caps="video/x-raw,framerate=(fraction)30/1"
eos, playback-time=15.0
stop, playback-time=15.0

View file

@ -1,7 +1,7 @@
description, duration=25.0
set-restriction, playback_time=5.0, restriction-caps="video/x-raw,framerate=(fraction)5/1"
set-restriction, playback_time=10.0, restriction-caps="video/x-raw,height=20,width=20,framerate=(fraction)5/1"
set-restriction, playback_time=15.0, restriction-caps="video/x-raw,height=20,width=20,framerate=(fraction)30/1"
set-restriction, playback_time=20.0, restriction-caps="video/x-raw,height=720,width=1280,framerate=(fraction)30/1"
eos, playback_time=25.0
stop, playback_time=25.0
set-restriction, playback-time=5.0, restriction-caps="video/x-raw,framerate=(fraction)5/1"
set-restriction, playback-time=10.0, restriction-caps="video/x-raw,height=20,width=20,framerate=(fraction)5/1"
set-restriction, playback-time=15.0, restriction-caps="video/x-raw,height=20,width=20,framerate=(fraction)30/1"
set-restriction, playback-time=20.0, restriction-caps="video/x-raw,height=720,width=1280,framerate=(fraction)30/1"
eos, playback-time=25.0
stop, playback-time=25.0

View file

@ -1,5 +1,5 @@
description, duration=15.0
set-restriction, playback_time=5.0, restriction-caps="video/x-raw,height=480,width=854"
set-restriction, playback_time=10.0, restriction-caps="video/x-raw,height=720,width=1280"
eos, playback_time=15.0
stop, playback_time=15.0
set-restriction, playback-time=5.0, restriction-caps="video/x-raw,height=480,width=854"
set-restriction, playback-time=10.0, restriction-caps="video/x-raw,height=720,width=1280"
eos, playback-time=15.0
stop, playback-time=15.0

View file

@ -1,13 +1,13 @@
description, duration=55.0, min-media-duration=470.0, seek=true, reverse-playback=true
seek, name=backward-seek, playback_time=0.0, rate=-1.0, start=0.0, stop=310.0, flags=accurate+flush
seek, name=forward-seek, playback_time=305.0, rate=1.0, start=305.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time=310.0, rate=2.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=320.0, rate=-2.0, start=0.0, stop=320.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time=310.0, rate=4.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=330.0, rate=-4.0, start=0.0, stop=330.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time=310.0, rate=8.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=350.0, rate=-8.0, start=0.0, stop=350.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time=310.0, rate=16.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=390.0, rate=-16.0, start=0.0, stop=390.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time=310.0, rate=32.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=470.0, rate=-32.0, start=310.0, stop=470.0, flags=accurate+flush
seek, name=backward-seek, playback-time=0.0, rate=-1.0, start=0.0, stop=310.0, flags=accurate+flush
seek, name=forward-seek, playback-time=305.0, rate=1.0, start=305.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time=310.0, rate=2.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=320.0, rate=-2.0, start=0.0, stop=320.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time=310.0, rate=4.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=330.0, rate=-4.0, start=0.0, stop=330.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time=310.0, rate=8.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=350.0, rate=-8.0, start=0.0, stop=350.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time=310.0, rate=16.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=390.0, rate=-16.0, start=0.0, stop=390.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time=310.0, rate=32.0, start=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=470.0, rate=-32.0, start=310.0, stop=470.0, flags=accurate+flush

View file

@ -1,4 +1,4 @@
description, duration=20.0
emit-signal, target-element-name=camerabin0, signal-name=start-capture, playback_time=10.0
eos, playback_time=20.0
emit-signal, target-element-name=camerabin0, signal-name=start-capture, playback-time=10.0
eos, playback-time=20.0

View file

@ -3,4 +3,4 @@ pause;
switch-track, name="Disable subtitle", type=text, disable=true
wait, duration=0.5
play;
stop, playback_time=2.0
stop, playback-time=2.0

View file

@ -1,6 +1,6 @@
description, duration=30.0, minfo-media-duration=310.0, seek=true, reverse-playback=true, need-clock-sync=true, min-media-duration=310.0
seek, name=Fast-backward-seek, playback_time=0.0, rate=-2.0, start=0.0, stop=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=300.0, rate=-4.0, start=0.0, stop=300.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=280.0, rate=-8.0, start=0.0, stop=280.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=240.0, rate=-16.0, start=0.0, stop=240.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback_time=160.0, rate=-32.0, start=0.0, stop=160.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=0.0, rate=-2.0, start=0.0, stop=310.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=300.0, rate=-4.0, start=0.0, stop=300.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=280.0, rate=-8.0, start=0.0, stop=280.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=240.0, rate=-16.0, start=0.0, stop=240.0, flags=accurate+flush
seek, name=Fast-backward-seek, playback-time=160.0, rate=-32.0, start=0.0, stop=160.0, flags=accurate+flush

View file

@ -1,7 +1,7 @@
description, duration=35.0, seek=true, need-clock-sync=true, min-media-duration=5.0
seek, name=Fast-forward-seek, playback_time=0.0, rate=2.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time="min(10.0, duration*0.25)", rate=4.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time="min(20.0, duration*0.50)", rate=8.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time="min(40.0, duration*0.75)", rate=16.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback_time="min(50.0, duration*0.75)", rate=32.0, start=0.0, flags=accurate+flush
stop, playback_time="min(duration - 0.3, 60.0)"
seek, name=Fast-forward-seek, playback-time=0.0, rate=2.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time="min(10.0, duration*0.25)", rate=4.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time="min(20.0, duration*0.50)", rate=8.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time="min(40.0, duration*0.75)", rate=16.0, start=0.0, flags=accurate+flush
seek, name=Fast-forward-seek, playback-time="min(50.0, duration*0.75)", rate=32.0, start=0.0, flags=accurate+flush
stop, playback-time="min(duration - 0.3, 60.0)"

View file

@ -1,4 +1,4 @@
description, duration=2.0
video-request-key-unit, playback_time=1.0, direction=upstream, running_time=-1.0, all-header=true, count=1
eos, playback_time=2.0
stop, playback_time=2.0
video-request-key-unit, playback-time=1.0, direction=upstream, running_time=-1.0, all-header=true, count=1
eos, playback-time=2.0
stop, playback-time=2.0

View file

@ -1,6 +1,6 @@
description, duration=14.0, min-media-duration=7.0
pause, name=First-pause, playback_time=1.0, duration=1.0
pause, name=Second-pause, playback_time=3.0, duration=5.0
pause, name=Third-pause, playback_time=5.0, duration=1.0
eos, name=Done-testing, playback_time=7.0
stop, playback_time=7.0
pause, name=First-pause, playback-time=1.0, duration=1.0
pause, name=Second-pause, playback-time=3.0, duration=5.0
pause, name=Third-pause, playback-time=5.0, duration=1.0
eos, name=Done-testing, playback-time=7.0
stop, playback-time=7.0

View file

@ -1,3 +1,3 @@
description, duration=15.0
eos, playback_time=15.0
stop, playback_time=15.0
eos, playback-time=15.0
stop, playback-time=15.0

View file

@ -1,2 +1,2 @@
description, seek=true, reverse-playback=true
seek, name=Revserse-seek, playback_time=0.0, rate=-1.0, start=0.0, stop=duration, flags=accurate+flush
seek, name=Revserse-seek, playback-time=0.0, rate=-1.0, start=0.0, stop=duration, flags=accurate+flush

View file

@ -1,7 +1,7 @@
description, seek=true
pause, playback_time=0.0
seek, playback_time=0.0, start="duration - 0.5", flags=accurate+flush
seek, playback_time=0.0, start=position-0.1, repeat="min(10, (duration - 0.6))/0.1", flags=accurate+flush
play, playback_time=0.0
stop, playback_time=1.0
pause, playback-time=0.0
seek, playback-time=0.0, start="duration - 0.5", flags=accurate+flush
seek, playback-time=0.0, start=position-0.1, repeat="min(10, (duration - 0.6))/0.1", flags=accurate+flush
play, playback-time=0.0
stop, playback-time=1.0

View file

@ -1,5 +1,5 @@
description, seek=true, handles-states=true
pause, playback_time=0.0
seek, playback_time=0.0, start=position+0.1, repeat="min(10, (duration - 0.5))/0.1", flags=accurate+flush
play, playback_time=0.0
stop, playback_time=1.0
pause, playback-time=0.0
seek, playback-time=0.0, start=position+0.1, repeat="min(10, (duration - 0.5))/0.1", flags=accurate+flush
play, playback-time=0.0
stop, playback-time=1.0

View file

@ -1,5 +1,5 @@
description, seek=true, duration=30, need-clock-sync=true
seek, name=Backward-seek, playback_time="min(5.0, (duration/4))", rate=1.0, start=0.0, flags=accurate+flush
seek, name=Backward-seek, playback_time="min(10.0, 2*(duration/4))", rate=1.0, start="min(5.0, duration/4)", flags=accurate+flush
seek, name=Backward-seek, playback_time="min(15.0, 3*(duration/4))", rate=1.0, start="min(10.0, 2*(duration/4))", flags=accurate+flush
stop, playback_time="min(15.0, 3*(duration/4))"
seek, name=Backward-seek, playback-time="min(5.0, (duration/4))", rate=1.0, start=0.0, flags=accurate+flush
seek, name=Backward-seek, playback-time="min(10.0, 2*(duration/4))", rate=1.0, start="min(5.0, duration/4)", flags=accurate+flush
seek, name=Backward-seek, playback-time="min(15.0, 3*(duration/4))", rate=1.0, start="min(10.0, 2*(duration/4))", flags=accurate+flush
stop, playback-time="min(15.0, 3*(duration/4))"

View file

@ -1,5 +1,5 @@
description, seek=true, duration=20, need-clock-sync=true
seek, name=First-forward-seek, playback_time="min(5.0, (duration/8))", start="min(10, 2*(duration/8))", flags=accurate+flush
seek, name=Second-forward-seek, playback_time="min(15.0, 3*(duration/8))", start="min(20, 4*(duration/8))", flags=accurate+flush
seek, name=Third-forward-seek, playback_time="min(25, 5*(duration/8))", start="min(30.0, 6*(duration/8))", flags=accurate+flush
stop, playback_time=35.0
seek, name=First-forward-seek, playback-time="min(5.0, (duration/8))", start="min(10, 2*(duration/8))", flags=accurate+flush
seek, name=Second-forward-seek, playback-time="min(15.0, 3*(duration/8))", start="min(20, 4*(duration/8))", flags=accurate+flush
seek, name=Third-forward-seek, playback-time="min(25, 5*(duration/8))", start="min(30.0, 6*(duration/8))", flags=accurate+flush
stop, playback-time=35.0

View file

@ -1,9 +1,9 @@
description, seek=true, duration=40
seek, name=Forward-seek, playback_time=0.0, rate=1.0, start=5.0, flags=accurate+flush
seek, name=Backward-seek, playback_time=10.0, rate=1.0, start=0.0, flags=accurate+flush
seek, name=Backward-seek, playback_time=5.0, rate=1.0, start=25.0, stop=-1, flags=accurate+flush
seek, name=Backward-seek, playback_time=30.0, rate=1.0, start=0.0, flags=accurate+flush
seek, name=Forward-seek, playback_time=5.0, rate=1.0, start=15.0, flags=accurate+flush
seek, name=Forward-seek, playback_time=20.0, rate=1.0, start=35.0, flags=accurate+flush
seek, name=Backward-seek, playback_time=40.0, rate=1.0, start=25.0, flags=accurate+flush
seek, name=Last-backward-seek, playback_time=30.0, rate=1.0, start=5.0, stop=10.0, flags=accurate+flush
seek, name=Forward-seek, playback-time=0.0, rate=1.0, start=5.0, flags=accurate+flush
seek, name=Backward-seek, playback-time=10.0, rate=1.0, start=0.0, flags=accurate+flush
seek, name=Backward-seek, playback-time=5.0, rate=1.0, start=25.0, stop=-1, flags=accurate+flush
seek, name=Backward-seek, playback-time=30.0, rate=1.0, start=0.0, flags=accurate+flush
seek, name=Forward-seek, playback-time=5.0, rate=1.0, start=15.0, flags=accurate+flush
seek, name=Forward-seek, playback-time=20.0, rate=1.0, start=35.0, flags=accurate+flush
seek, name=Backward-seek, playback-time=40.0, rate=1.0, start=25.0, flags=accurate+flush
seek, name=Last-backward-seek, playback-time=30.0, rate=1.0, start=5.0, stop=10.0, flags=accurate+flush

View file

@ -1,2 +1,2 @@
description, seek=true, duration=5.0
seek, playback_time=1.0, start=0.0, stop="min(5.0, duration-1.0)", flags=accurate+flush
seek, playback-time=1.0, start=0.0, stop="min(5.0, duration-1.0)", flags=accurate+flush

View file

@ -1,4 +1,4 @@
description, seek=true, duration=5.0
seek, playback_time=1.0, rate=1.0, start=2.0, flags=accurate+flush
seek, playback_time=3.0, rate=1.0, start=0.0, flags=accurate+flush
seek, playback_time=1.0, rate=1.0, start=2.0, stop=3.0, flags=accurate+flush
seek, playback-time=1.0, rate=1.0, start=2.0, flags=accurate+flush
seek, playback-time=3.0, rate=1.0, start=0.0, flags=accurate+flush
seek, playback-time=1.0, rate=1.0, start=2.0, stop=3.0, flags=accurate+flush

View file

@ -1,3 +1,3 @@
description, summary="Change audio track at 5 second to the second audio track", min-audio-track=2, duration=10.0
switch-track, name=Next-audio-track, playback_time=5.0, type=audio, index=(string)+1
stop, playback_time=10.0
switch-track, name=Next-audio-track, playback-time=5.0, type=audio, index=(string)+1
stop, playback-time=10.0

View file

@ -1,5 +1,5 @@
description, summary="Change audio track while pipeline is paused", min-audio-track=2, duration=6.0, need-clock-sync=true
pause, playback_time=1.0;
pause, playback-time=1.0;
# Wait so that humans can see the pipeline is paused
wait, duration=0.5
@ -8,4 +8,4 @@ switch-track, name=Next-audio-track, type=audio, index=(string)+1
# Wait so that humans can see the pipeline is paused
wait, duration=0.5
play;
stop, playback_time=5.0
stop, playback-time=5.0

View file

@ -1,3 +1,3 @@
description, summary="Change subtitle track at 1 second while playing back", min-subtitle-track=2, duration=5.0
switch-track, playback_time=1.0, type=text, index=(string)+1
stop, playback_time=5.0
switch-track, playback-time=1.0, type=text, index=(string)+1
stop, playback-time=5.0

View file

@ -4,4 +4,4 @@ wait, duration=0.5
switch-track, type=text, index=(string)+1
wait, duration=0.5
play;
stop, playback_time=5.0
stop, playback-time=5.0

View file

@ -1,2 +1,2 @@
description, summary="Use the set seek type to seek at 5 seconds after 2 seconds", seek=true
seek, playback_time=2.0, rate=1.0, start_type=set, start=5.0, stop_type=none, stop=0.0, flags=accurate+flush
seek, playback-time=2.0, rate=1.0, start_type=set, start=5.0, stop_type=none, stop=0.0, flags=accurate+flush

View file

@ -1,3 +1,3 @@
description, summary="Use the set seek type to seek at 0 secs stop 10secs after 5 secs", seek=true
description, duration=15.0, seeks=true
seek, playback_time=5.0, rate=1.0, start_type=none, start=0.0, stop_type=set, stop=10.0, flags=accurate+flush
seek, playback-time=5.0, rate=1.0, start_type=none, start=0.0, stop_type=set, stop=10.0, flags=accurate+flush

View file

@ -39,7 +39,7 @@
<para>
<informalexample>
<programlisting>
seek, playback_time=10.0, start=0.0, flags=accurate+flush
seek, playback-time=10.0, start=0.0, flags=accurate+flush
</programlisting>
</informalexample>
</para>
@ -74,9 +74,9 @@
3.0 to 0.0 and then seeks at \
1.0 to 2.0 for 1.0 second (between 2.0 and 3.0).", \
seek=true, duration=5.0, min-media-duration=4.0
seek, playback_time=1.0, rate=1.0, start=2.0, flags=accurate+flush
seek, playback_time=3.0, rate=1.0, start=0.0, flags=accurate+flush
seek, playback_time=1.0, rate=1.0, start=2.0, stop=3.0, flags=accurate+flush
seek, playback-time=1.0, rate=1.0, start=2.0, flags=accurate+flush
seek, playback-time=3.0, rate=1.0, start=0.0, flags=accurate+flush
seek, playback-time=1.0, rate=1.0, start=2.0, stop=3.0, flags=accurate+flush
</programlisting>
</informalexample>
</para>

View file

@ -1148,10 +1148,10 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
GstValidateAction *action = tmp->data;
if (!gst_validate_action_get_clocktime (scenario, action,
"playback_time", &action->playback_time)) {
"playback-time", &action->playback_time)) {
gchar *str = gst_structure_to_string (action->structure);
g_error ("Could not parse playback_time on structure: %s", str);
g_error ("Could not parse playback-time on structure: %s", str);
g_free (str);
return FALSE;
@ -1436,9 +1436,12 @@ _load_scenario_file (GstValidateScenario * scenario,
action = gst_validate_action_new ();
action->type = type;
action->repeat = -1;
if (gst_structure_get_double (structure, "playback_time", &playback_time)) {
if (gst_structure_get_double (structure, "playback-time", &playback_time) ||
gst_structure_get_double (structure, "playback_time", &playback_time)) {
action->playback_time = playback_time * GST_SECOND;
} else if ((str_playback_time =
gst_structure_get_string (structure, "playback-time")) ||
(str_playback_time =
gst_structure_get_string (structure, "playback_time"))) {
priv->needs_parsing = g_list_append (priv->needs_parsing, action);
} else
@ -1941,7 +1944,7 @@ gst_validate_register_action_type (const gchar * type_name,
}
if (!is_config) {
type->parameters[n_params - 1].name = "playback_time";
type->parameters[n_params - 1].name = "playback-time";
type->parameters[n_params - 1].description =
"The playback time at which the action " "will be executed";
type->parameters[n_params - 1].mandatory = FALSE;
@ -2185,7 +2188,7 @@ init_scenarios (void)
}),
"Seeks into the stream, example of a seek happening when the stream reaches 5 seconds\n"
"or 1 eighth of its duration and seeks at 10sec or 2 eighth of its duration:\n"
" seek, playback_time=\"min(5.0, (duration/8))\", start=\"min(10, 2*(duration/8))\", flags=accurate+flush",
" seek, playback-time=\"min(5.0, (duration/8))\", start=\"min(10, 2*(duration/8))\", flags=accurate+flush",
FALSE
);