Commit dda8e721 authored by Thibault Saunier's avatar Thibault Saunier 🌵 Committed by GStreamer Marge Bot

valiadate: Add a test for setting/checking (timed) properties

Part-of: <gstreamer/gst-devtools!207>
parent fc440c3a
......@@ -1186,7 +1186,7 @@ _set_timed_value (GQuark field_id, const GValue * gvalue,
if (G_VALUE_HOLDS_DOUBLE (gvalue))
value = g_value_get_double (gvalue);
else if (G_VALUE_HOLDS_INT (gvalue))
value = g_value_get_int (gvalue);
value = (gdouble) g_value_get_int (gvalue);
else {
GST_VALIDATE_REPORT (scenario, SCENARIO_ACTION_EXECUTION_ERROR,
"Invalid value type for property '%s': %s",
......
meta,
handles-states=true,
args = {
"videotestsrc pattern=blue ! compositor name=c ! video/x-raw,width=100,height=100,framerate=10/1 ! $(videosink) videotestsrc pattern=green ! c.",
}
# Start with the green stream on the top left corner and the blue on in the bottom right
set-timed-value-properties, timestamp=0.0, source-type=GstTriggerControlSource, binding-type=direct-absolute,
c.sink_0::xpos=50,
c.sink_0::ypos=50,
c.sink_0::width=50,
c.sink_0::height=50,
c.sink_1::xpos=0,
c.sink_1::ypos=0,
c.sink_1::width=50,
c.sink_1::height=50
# And invert it after 1 second of playback
set-timed-value-properties, timestamp=1.0, source-type=GstTriggerControlSource, binding-type=direct-absolute,
c.sink_0::xpos=0,
c.sink_0::ypos=0,
c.sink_1::xpos=50,
c.sink_1::ypos=50
play
crank-clock, expected-time=0.0
check-properties,
c.sink_0::xpos=50,
c.sink_0::ypos=50,
c.sink_1::xpos=0,
c.sink_1::ypos=0
crank-clock, repeat=5
check-position, expected-position=0.5
check-properties,
c.sink_0::xpos=50,
c.sink_0::ypos=50,
c.sink_1::xpos=0,
c.sink_1::ypos=0
crank-clock, repeat=5
check-position, expected-position=1.0
check-properties,
c.sink_0::xpos=0,
c.sink_0::ypos=0,
c.sink_1::xpos=50,
c.sink_1::ypos=50
set-properties, c.sink_0::xpos=50, c.sink_0::ypos=50, c.sink_1::xpos=0, c.sink_1::ypos=0
check-properties, c.sink_0::xpos=50, c.sink_0::ypos=50, c.sink_1::xpos=0, c.sink_1::ypos=0
set-properties, c::latency=50.0
check-properties, c::latency=50.0
stop
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment