validate: Rename gst_validate_add_action_type to gst_validate_register_action_type

The _register naming corresponds much better to what the method does
and makes it more similar to how we refer to this kind of action in
GStreamer.

It is a last minute API change, but that API should not change anymore
after 1.4 is released.
This commit is contained in:
Thibault Saunier 2014-10-12 20:07:58 +02:00
parent 9158bb36e3
commit 02ab99fcbb
5 changed files with 29 additions and 29 deletions

View File

@ -43,7 +43,7 @@ GstValidateScenario
GstValidateScenarioClass GstValidateScenarioClass
gst_validate_print_action_types gst_validate_print_action_types
gst_validate_list_scenarios gst_validate_list_scenarios
gst_validate_add_action_type gst_validate_register_action_type
gst_validate_action_get_clocktime gst_validate_action_get_clocktime
gst_validate_scenario_execute_seek gst_validate_scenario_execute_seek
GstValidateActionType GstValidateActionType

View File

@ -58,8 +58,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_validate_scenario_debug);
#undef GST_CAT_DEFAULT #undef GST_CAT_DEFAULT
#define GST_CAT_DEFAULT gst_validate_scenario_debug #define GST_CAT_DEFAULT gst_validate_scenario_debug
#define ADD_ACTION_TYPE(_tname, _function, _params, _desc, _is_config) G_STMT_START { \ #define REGISTER_ACTION_TYPE(_tname, _function, _params, _desc, _is_config) G_STMT_START { \
gst_validate_add_action_type ((_tname), "core", (_function), (_params), (_desc), (_is_config)); \ gst_validate_register_action_type ((_tname), "core", (_function), (_params), (_desc), (_is_config)); \
} G_STMT_END } G_STMT_END
enum enum
@ -1901,7 +1901,7 @@ done:
} }
/** /**
* gst_validate_add_action_type: * gst_validate_register_action_type:
* @type_name: The name of the new action type to add * @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
* @function: (scope notified): The function to be called to execute the action * @function: (scope notified): The function to be called to execute the action
@ -1914,7 +1914,7 @@ done:
* exists, it will be overriden by that new definition * exists, it will be overriden by that new definition
*/ */
void void
gst_validate_add_action_type (const gchar * type_name, gst_validate_register_action_type (const gchar * type_name,
const gchar * implementer_namespace, const gchar * implementer_namespace,
GstValidateExecuteAction function, GstValidateExecuteAction function,
GstValidateActionParameter * parameters, GstValidateActionParameter * parameters,
@ -2041,7 +2041,7 @@ init_scenarios (void)
clean_action_str = g_regex_new ("\\\\\n|#.*\n", G_REGEX_CASELESS, 0, NULL); clean_action_str = g_regex_new ("\\\\\n|#.*\n", G_REGEX_CASELESS, 0, NULL);
/* *INDENT-OFF* */ /* *INDENT-OFF* */
ADD_ACTION_TYPE ("description", NULL, REGISTER_ACTION_TYPE ("description", NULL,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "summary", .name = "summary",
@ -2132,7 +2132,7 @@ init_scenarios (void)
"Allows to describe the scenario in various ways", "Allows to describe the scenario in various ways",
TRUE); TRUE);
ADD_ACTION_TYPE ("seek", _execute_seek, REGISTER_ACTION_TYPE ("seek", _execute_seek,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "start", .name = "start",
@ -2189,7 +2189,7 @@ init_scenarios (void)
FALSE FALSE
); );
ADD_ACTION_TYPE ("pause", _execute_pause, REGISTER_ACTION_TYPE ("pause", _execute_pause,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "duration", .name = "duration",
@ -2205,16 +2205,16 @@ init_scenarios (void)
"parametter so the pipeline goes back to playing after that duration\n" "parametter so the pipeline goes back to playing after that duration\n"
"(in second)", FALSE); "(in second)", FALSE);
ADD_ACTION_TYPE ("play", _execute_play, NULL, REGISTER_ACTION_TYPE ("play", _execute_play, NULL,
"Sets the pipeline state to PLAYING", FALSE); "Sets the pipeline state to PLAYING", FALSE);
ADD_ACTION_TYPE ("stop", _execute_stop, NULL, REGISTER_ACTION_TYPE ("stop", _execute_stop, NULL,
"Sets the pipeline state to NULL", FALSE); "Sets the pipeline state to NULL", FALSE);
ADD_ACTION_TYPE ("eos", _execute_eos, NULL, REGISTER_ACTION_TYPE ("eos", _execute_eos, NULL,
"Sends an EOS event to the pipeline", FALSE); "Sends an EOS event to the pipeline", FALSE);
ADD_ACTION_TYPE ("switch-track", _execute_switch_track, REGISTER_ACTION_TYPE ("switch-track", _execute_switch_track,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "type", .name = "type",
@ -2242,7 +2242,7 @@ init_scenarios (void)
"The 'switch-track' command can be used to switch tracks.\n" "The 'switch-track' command can be used to switch tracks.\n"
, FALSE); , FALSE);
ADD_ACTION_TYPE ("wait", _execute_wait, REGISTER_ACTION_TYPE ("wait", _execute_wait,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "duration", .name = "duration",
@ -2253,13 +2253,13 @@ init_scenarios (void)
}), }),
"Waits during 'duration' seconds", FALSE); "Waits during 'duration' seconds", FALSE);
ADD_ACTION_TYPE ("dot-pipeline", _execute_dot_pipeline, NULL, REGISTER_ACTION_TYPE ("dot-pipeline", _execute_dot_pipeline, NULL,
"Dots the pipeline (the 'name' property will be used in the dot filename).\n" "Dots the pipeline (the 'name' property will be used in the dot filename).\n"
"For more information have a look at the GST_DEBUG_BIN_TO_DOT_FILE documentation.\n" "For more information have a look at the GST_DEBUG_BIN_TO_DOT_FILE documentation.\n"
"Note that the GST_DEBUG_DUMP_DOT_DIR env variable needs to be set\n", "Note that the GST_DEBUG_DUMP_DOT_DIR env variable needs to be set\n",
FALSE); FALSE);
ADD_ACTION_TYPE ("set-feature-rank", _set_rank, REGISTER_ACTION_TYPE ("set-feature-rank", _set_rank,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "feature-name", .name = "feature-name",
@ -2277,7 +2277,7 @@ init_scenarios (void)
}), }),
"Changes the ranking of a particular plugin feature", TRUE); "Changes the ranking of a particular plugin feature", TRUE);
ADD_ACTION_TYPE ("set-state", _execute_set_state, REGISTER_ACTION_TYPE ("set-state", _execute_set_state,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "state", .name = "state",
@ -2290,7 +2290,7 @@ init_scenarios (void)
}), }),
"Changes the state of the pipeline to any GstState", FALSE); "Changes the state of the pipeline to any GstState", FALSE);
ADD_ACTION_TYPE ("set-property", _execute_set_property, REGISTER_ACTION_TYPE ("set-property", _execute_set_property,
((GstValidateActionParameter []) { ((GstValidateActionParameter []) {
{ {
.name = "target-element-name", .name = "target-element-name",
@ -2316,7 +2316,7 @@ init_scenarios (void)
}), }),
"Sets a property of any element in the pipeline", FALSE); "Sets a property of any element in the pipeline", FALSE);
ADD_ACTION_TYPE ("set-debug-threshold", REGISTER_ACTION_TYPE ("set-debug-threshold",
_execute_set_debug_threshold, _execute_set_debug_threshold,
((GstValidateActionParameter []) ((GstValidateActionParameter [])
{ {
@ -2331,7 +2331,7 @@ init_scenarios (void)
"Sets the debug level to be used, same format as\n" "Sets the debug level to be used, same format as\n"
"setting the GST_DEBUG env variable", FALSE); "setting the GST_DEBUG env variable", FALSE);
ADD_ACTION_TYPE ("emit-signal", _execute_emit_signal, REGISTER_ACTION_TYPE ("emit-signal", _execute_emit_signal,
((GstValidateActionParameter []) ((GstValidateActionParameter [])
{ {
{ {

View File

@ -61,7 +61,7 @@ typedef gboolean (*GstValidateExecuteAction) (GstValidateScenario * scenario, Gs
* GstValidateAction: * GstValidateAction:
* @type: The type of the #GstValidateAction, which is the name of the * @type: The type of the #GstValidateAction, which is the name of the
* GstValidateActionType registered with * GstValidateActionType registered with
* #gst_validate_add_action_type * #gst_validate_register_action_type
* @name: The name of the action, set from the user in the scenario * @name: The name of the action, set from the user in the scenario
* @structure: the #GstStructure defining the action * @structure: the #GstStructure defining the action
* *
@ -162,11 +162,11 @@ gst_validate_list_scenarios (gchar **scenarios,
gint num_scenarios, gint num_scenarios,
gchar * output_file); gchar * output_file);
void gst_validate_add_action_type (const gchar *type_name, void gst_validate_register_action_type (const gchar *type_name,
const gchar *implementer_namespace, const gchar *implementer_namespace,
GstValidateExecuteAction function, GstValidateExecuteAction function,
GstValidateActionParameter * parameters, GstValidateActionParameter * parameters,
const gchar *description, gboolean is_config); const gchar *description, gboolean is_config);
gboolean gst_validate_action_get_clocktime (GstValidateScenario * scenario, gboolean gst_validate_action_get_clocktime (GstValidateScenario * scenario,

View File

@ -702,7 +702,7 @@ static void
_register_actions (void) _register_actions (void)
{ {
/* *INDENT-OFF* */ /* *INDENT-OFF* */
gst_validate_add_action_type ("set-restriction", "validate-transcoding", _execute_set_restriction, gst_validate_register_action_type ("set-restriction", "validate-transcoding", _execute_set_restriction,
(GstValidateActionParameter []) { (GstValidateActionParameter []) {
{ {
.name = "restriction-caps", .name = "restriction-caps",
@ -716,7 +716,7 @@ _register_actions (void)
"Change the restriction caps on the fly", "Change the restriction caps on the fly",
FALSE); FALSE);
gst_validate_add_action_type ("video-request-key-unit", "validate-transcoding", gst_validate_register_action_type ("video-request-key-unit", "validate-transcoding",
_execute_request_key_unit, _execute_request_key_unit,
(GstValidateActionParameter []) { (GstValidateActionParameter []) {
{ {

View File

@ -304,7 +304,7 @@ static void
_register_playbin_actions (void) _register_playbin_actions (void)
{ {
/* *INDENT-OFF* */ /* *INDENT-OFF* */
gst_validate_add_action_type ("set-subtitle", "validate-launcher", _execute_set_subtitles, gst_validate_register_action_type ("set-subtitle", "validate-launcher", _execute_set_subtitles,
(GstValidateActionParameter []) { (GstValidateActionParameter []) {
{ {
.name = "subtitle-file", .name = "subtitle-file",
@ -325,7 +325,7 @@ _register_playbin_actions (void)
FALSE); FALSE);
/* Overriding default implementation */ /* Overriding default implementation */
gst_validate_add_action_type ("switch-track", "validate-launcher", _execute_switch_track, gst_validate_register_action_type ("switch-track", "validate-launcher", _execute_switch_track,
(GstValidateActionParameter []) { (GstValidateActionParameter []) {
{ {
.name = "type", .name = "type",