mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
valiadate: Add a test for setting/checking (timed) properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
This commit is contained in:
parent
fc440c3ab3
commit
dda8e7217c
2 changed files with 55 additions and 1 deletions
|
@ -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",
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
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
|
Loading…
Reference in a new issue