After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733070 - scenario: add set_property scenario action
scenario: add set_property scenario action
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
unspecified
Other All
: Normal normal
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-11 18:47 UTC by Thiago Sousa Santos
Modified: 2014-11-09 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scenario: add set_property scenario action (3.46 KB, patch)
2014-07-11 18:47 UTC, Thiago Sousa Santos
needs-work Details | Review

Description Thiago Sousa Santos 2014-07-11 18:47:01 UTC
Adds a way to make an element have a property set during a scenario
Comment 1 Thiago Sousa Santos 2014-07-11 18:47:05 UTC
Created attachment 280528 [details] [review]
scenario: add set_property scenario action

Allows setting element's properties during a scenario. Very useful
for testing that elements behave correctly when changing properties
during playing state
Comment 2 Thiago Sousa Santos 2014-07-11 18:49:36 UTC
description, duration=20.0
set-property, target-element-name=videotestsrc0, property-name=name, property-value="test", playback_time=10.0
eos, playback_time=20.0


Example scenario file
Comment 3 Thibault Saunier 2014-07-11 19:23:14 UTC
Review of attachment 280528 [details] [review]:

Just make "target-element-name" a mandatory field and push.

::: validate/gst/validate/gst-validate-scenario.c
@@ +868,3 @@
+  gboolean ret;
+
+  name = gst_structure_get_string (action->structure, "target-element-name");

Why not make it a mandatory field then?
Comment 4 Thiago Sousa Santos 2014-07-11 20:00:28 UTC
(In reply to comment #3)
> Review of attachment 280528 [details] [review]:
> 
> Just make "target-element-name" a mandatory field and push.
> 
> ::: validate/gst/validate/gst-validate-scenario.c
> @@ +868,3 @@
> +  gboolean ret;
> +
> +  name = gst_structure_get_string (action->structure, "target-element-name");
> 
> Why not make it a mandatory field then?

Forgot to ask if you see any use case for having 'target-element-type' to set the same property to all elements of the same type.

But I guess we can always add a set_property_to_type or something like this later if needed.

Will update and push.
Comment 5 Thibault Saunier 2014-07-11 21:41:15 UTC
I also thought about that, I do not see any use case right now, so I guess it is good to just make the property mandatory for now, and later on we could add a field like that yes :)
Comment 6 Thiago Sousa Santos 2014-07-11 23:02:49 UTC
Updated and pushed

commit db21883c0cdba30587c9822228fe7a71dc49776c
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Fri Jul 11 15:45:18 2014 -0300

    scenario: add set_property scenario action
    
    Allows setting element's properties during a scenario. Very useful
    for testing that elements behave correctly when changing properties
    during playing state
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733070
Comment 7 Thibault Saunier 2014-07-12 07:11:49 UTC
Great, thanks :)