Top | ![]() |
![]() |
![]() |
![]() |
GstValidateScenarioGstValidateScenario — A GstValidateScenario represents a set of actions to be executed on a pipeline. |
GstValidateExecuteActionReturn | (*GstValidateExecuteAction) () |
gboolean | gst_validate_print_action_types () |
gboolean | gst_validate_action_get_clocktime () |
void | gst_validate_action_set_done () |
GstValidateScenario * | gst_validate_action_get_scenario () |
gboolean | execute-on-idle | Read / Write |
gboolean | handles-states | Read |
GstValidateRunner * | validate-runner | Read / Write / Construct Only |
GBoxed ├── GstValidateAction ╰── GstValidateActionType GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstValidateScenario
A GstValidateScenario represents the scenario that will be executed on a GstPipeline. It is basically an ordered list of GstValidateAction that will be executed during the execution of the pipeline.
Possible configurations (see GST_VALIDATE_CONFIG):
scenario-action-execution-interval: Sets the interval in milliseconds (1/1000ths of a second), between which actions will be executed, setting it to 0 means "execute in idle". The default value is 10ms.
GstValidateExecuteActionReturn (*GstValidateExecuteAction) (GstValidateScenario *scenario
,GstValidateAction *action
);
A function that executes a GstValidateAction
scenario |
The GstValidateScenario from which the |
|
action |
The GstValidateAction being executed |
gboolean gst_validate_print_action_types (const gchar **wanted_types
,gint num_wanted_types
);
Prints the action types details wanted in wanted_types
gboolean gst_validate_action_get_clocktime (GstValidateScenario *scenario
,GstValidateAction *action
,const gchar *name
,GstClockTime *retval
);
Get a time value for the name
parameter of an action. This
method should be called to retrieve and compute a timed value of a given
action. It will first try to retrieve the value as a double,
then get it as a string and execute any formula taking into account
the 'position' and 'duration' variables. And it will always convert that
value to a GstClockTime.
scenario |
The GstValidateScenario from which to get a time for a parameter of an action |
|
action |
The action from which to retrieve the time for |
|
name |
The name of the parameter for which to retrieve a time |
|
retval |
The return value for the wanted time. |
[out] |
GstValidateScenario *
gst_validate_action_get_scenario (GstValidateAction *action
);
Retrieve the scenario from which action
is executed.
typedef struct { GstMiniObject mini_object; const gchar *type; const gchar *name; GstStructure *structure; } GstValidateAction;
The GstValidateAction defined to be executed as part of a scenario
Only access it from the default main context.
The type of the GstValidateAction, which is the name of the GstValidateActionType registered with gst_validate_register_action_type |
||
The name of the action, set from the user in the scenario |
||
the GstStructure defining the action |
struct GstValidateActionParameter { const gchar *name; const gchar *description; gboolean mandatory; const gchar *types; const gchar *possible_variables; const gchar *def; };
The name of the parameter |
||
The description of the parameter |
||
Whether the parameter is mandatory for a specific action type |
||
The types the parameter can take described as a
string. It can be precisely describing how the typing works
using '\n' between the various acceptable types.
NOTE: The types should end with |
||
The name of the variables that can be used to compute the value of the parameter. For example for the start value of a seek action, we will accept to take 'duration' which will be replace by the total duration of the stream on which the action is executed. |
||
The default value of a parameter as a string, should be |
typedef struct { GstMiniObject mini_object; gchar *name; gchar *implementer_namespace; GstValidatePrepareAction prepare; GstValidateExecuteAction execute; GstValidateActionParameter *parameters; gchar *description; GstValidateActionTypeFlags flags; GstRank rank; GstValidateActionType *overriden_type; } GstValidateActionType;
The name of the new action type to add |
||
The namespace of the implementer of the action type |
||
GstValidateExecuteAction |
The function to be called to execute the action |
|
GstValidateActionParameter * |
The GstValidateActionParameter usable as parameter of the type. |
[allow-none][array zero-terminated=1][element-type GstValidateActionParameter] |
A description of the new type |
||
The flags of the action type |
||
GstValidateActionType * |
“execute-on-idle”
property “execute-on-idle” gboolean
Always execute actions on idle and do not chain them to execute as fast as possible. Setting this property is useful if action execution can lead to the addition of new sources on the same main loop as it provides these new GSource a chance to be dispatched between actions.
Flags: Read / Write
Default value: FALSE
“handles-states”
property “handles-states” gboolean
True if the application should not handle the first state change. False if it is application responsibility.
Flags: Read
Default value: FALSE
“validate-runner”
property“validate-runner” GstValidateRunner *
The Validate runner to report errors to.
Flags: Read / Write / Construct Only
“done”
signalvoid user_function (GstValidateScenario *scenario, gpointer user_data)
Emitted once all actions have been executed
scenario |
The scenario runing |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last