mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
validate: Use plugin name as implementer_namespace when registering action type
And document it as a good practice as it will allow us to map plugins and action types https://bugzilla.gnome.org/show_bug.cgi?id=743994
This commit is contained in:
parent
cdc6565605
commit
dae4051ed6
2 changed files with 7 additions and 2 deletions
|
@ -336,7 +336,8 @@ _execute_corrupt_socket_recv (GstValidateScenario * scenario,
|
|||
static gboolean
|
||||
socket_interposer_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_validate_register_action_type ("corrupt-socket-recv", "fault-injector",
|
||||
/* *INDENT-OFF* */
|
||||
gst_validate_register_action_type ("corrupt-socket-recv", gst_plugin_get_name (plugin),
|
||||
_execute_corrupt_socket_recv, ((GstValidateActionParameter[]) {
|
||||
{
|
||||
.name = "port",.description =
|
||||
|
@ -351,6 +352,7 @@ socket_interposer_init (GstPlugin * plugin)
|
|||
NULL}
|
||||
}),
|
||||
"corrupt the next socket receive", GST_VALIDATE_ACTION_TYPE_ASYNC);
|
||||
/* *INDENT-ON* */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -2160,7 +2160,10 @@ gst_validate_action_set_done (GstValidateAction * action)
|
|||
/**
|
||||
* gst_validate_register_action_type:
|
||||
* @type_name: The name of the new action type to add
|
||||
* @implementer_namespace: The namespace of the implementer of the action type
|
||||
* @implementer_namespace: The namespace of the implementer of the action type.
|
||||
* That should always be the name of the GstPlugin as
|
||||
* retrived with #gst_plugin_get_name when the action type
|
||||
* is register inside a plugin.
|
||||
* @function: (scope notified): The function to be called to execute the action
|
||||
* @parameters: (allow-none) (array zero-terminated=1) (element-type GstValidate.ActionParameter): The #GstValidateActionParameter usable as parameter of the type
|
||||
* @description: A description of the new type
|
||||
|
|
Loading…
Reference in a new issue