EXPORT_C #endif void gst_navigation_query_set_commands (GstQuery * query, gint n_cmds, ...) { va_list ap; GValue list = { 0, }; GstStructure *structure; gint i; g_return_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, COMMANDS)); g_value_init (&list, GST_TYPE_LIST); va_start (ap, n_cmds); for (i = 0; i < n_cmds; i++) { GstNavigationCommand val = va_arg (ap, GstNavigationCommand); gst_query_list_add_command (&list, val); } va_end (ap); structure = gst_query_get_structure (query); gst_structure_set_value (structure, "commands", &list); g_value_unset (&list); }
/** * gst_navigation_query_set_commandsv: * @query: a #GstQuery * @n_cmds: the number of commands to set. * @cmds: An array containing @n_cmds @GstNavigationCommand values. * * Set the #GstNavigation command query result fields in @query. The number * of commands passed must be equal to @n_commands. * * Since: 0.10.23 */ void gst_navigation_query_set_commandsv (GstQuery * query, gint n_cmds, GstNavigationCommand * cmds) { GValue list = { 0, }; GstStructure *structure; gint i; g_return_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, COMMANDS)); g_value_init (&list, GST_TYPE_LIST); for (i = 0; i < n_cmds; i++) { gst_query_list_add_command (&list, cmds[i]); } structure = gst_query_get_structure (query); gst_structure_set_value (structure, "commands", &list); g_value_unset (&list); }