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 739854 - validate:scenario: Properly handle ASYNC action execution in the API
validate:scenario: Properly handle ASYNC action execution in the API
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
unspecified
Other All
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-09 18:23 UTC by Thibault Saunier
Modified: 2015-06-24 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
validate:scenario: Properly handle ASYNC action execution in the API (9.12 KB, patch)
2014-11-09 18:23 UTC, Thibault Saunier
none Details | Review
validate: Add a GstValidateActionTypeFlag flag (9.18 KB, patch)
2014-11-09 18:23 UTC, Thibault Saunier
committed Details | Review
validate:scenario: Properly handle ASYNC action execution in the API (9.15 KB, patch)
2014-11-11 20:15 UTC, Thibault Saunier
committed Details | Review

Description Thibault Saunier 2014-11-09 18:23:00 UTC
The ->execute function now return a GstValidateExecuteActionReturn
which can be set as ASYNC in order to tell the scenario that the action
will be executed asynchronously, when the action is done, the caller is
responsible for calling gst_validate_action_set_done(); so that the
scenario keeps going on.

In this commit we make sure that the old API keeps working as
GST_VALIDATE_EXECUTE_ACTION_ERROR == FALSE and
GST_VALIDATE_EXECUTE_ACTION_OK == TRUE

Morevover GstValidateExecuteActionReturn is just a define

API:
    + gst_validate_action_set_done
    + GstValidateExecuteActionReturn
Comment 1 Thibault Saunier 2014-11-09 18:23:03 UTC
Created attachment 290283 [details] [review]
validate:scenario: Properly handle ASYNC action execution in the API
Comment 2 Thibault Saunier 2014-11-09 18:23:39 UTC
Created attachment 290284 [details] [review]
validate: Add a GstValidateActionTypeFlag flag

Allowing us to define action types more in detail.
Keep backward compatibility, at least with the C API
Comment 3 Thibault Saunier 2014-11-11 20:15:33 UTC
Created attachment 290433 [details] [review]
validate:scenario: Properly handle ASYNC action execution in the API

The ->execute function now return a GstValidateExecuteActionReturn
which can be set as ASYNC in order to tell the scenario that the action
will be executed asynchronously, when the action is done, the caller is
responsible for calling gst_validate_action_set_done(); so that the
scenario keeps going on.

In this commit we make sure that the old API keeps working as
GST_VALIDATE_EXECUTE_ACTION_ERROR == FALSE and
GST_VALIDATE_EXECUTE_ACTION_OK == TRUE

Morevover GstValidateExecuteActionReturn is just a define

API:
    + gst_validate_action_set_done
    + GstValidateExecuteActionReturn
Comment 4 Mathieu Duponchelle 2014-11-25 18:35:01 UTC
Review of attachment 290284 [details] [review]:

All good except for that :)

::: validate/gst/validate/gst-validate-internal.h
@@ +34,3 @@
 typedef struct _GstValidateActionType      GstValidateActionType;
 
+#define IS_CONFIG_ACTION_TYPE(type) (((type) & GST_VALIDATE_ACTION_TYPE_CONFIG) || ((type) == TRUE))

A comment would be welcome here to explain why || ((type) == TRUE) is needed.
Comment 5 Mathieu Duponchelle 2014-11-25 18:36:27 UTC
Review of attachment 290433 [details] [review]:

OK
Comment 6 Thibault Saunier 2014-11-25 22:43:03 UTC
Attachment 290284 [details] pushed as 4cbcb97 - validate: Add a GstValidateActionTypeFlag flag
Attachment 290433 [details] pushed as cdfa1ee - validate:scenario: Properly handle ASYNC action execution in the API