structure = gst_structure_new (GST_NAVIGATION_QUERY_NAME,
"type", G_TYPE_STRING, "commands", NULL);
- query = gst_query_new_application (GST_QUERY_CUSTOM, structure);
+ query = gst_query_new_custom (GST_QUERY_CUSTOM, structure);
return query;
}
}
va_end (ap);
- structure = gst_query_get_structure (query);
+ structure = gst_query_writable_structure (query);
gst_structure_set_value (structure, "commands", &list);
g_value_unset (&list);
for (i = 0; i < n_cmds; i++) {
gst_query_list_add_command (&list, cmds[i]);
}
- structure = gst_query_get_structure (query);
+ structure = gst_query_writable_structure (query);
gst_structure_set_value (structure, "commands", &list);
g_value_unset (&list);
gboolean
gst_navigation_query_parse_commands_length (GstQuery * query, guint * n_cmds)
{
- GstStructure *structure;
+ const GstStructure *structure;
const GValue *list;
g_return_val_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, COMMANDS), FALSE);
gst_navigation_query_parse_commands_nth (GstQuery * query, guint nth,
GstNavigationCommand * cmd)
{
- GstStructure *structure;
+ const GstStructure *structure;
const GValue *list;
g_return_val_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, COMMANDS), FALSE);
structure = gst_structure_new (GST_NAVIGATION_QUERY_NAME,
"type", G_TYPE_STRING, "angles", NULL);
- query = gst_query_new_application (GST_QUERY_CUSTOM, structure);
+ query = gst_query_new_custom (GST_QUERY_CUSTOM, structure);
return query;
}
g_return_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, ANGLES));
- structure = gst_query_get_structure (query);
+ structure = gst_query_writable_structure (query);
gst_structure_set (structure,
"angle", G_TYPE_UINT, cur_angle, "angles", G_TYPE_UINT, n_angles, NULL);
}
gst_navigation_query_parse_angles (GstQuery * query, guint * cur_angle,
guint * n_angles)
{
- GstStructure *structure;
+ const GstStructure *structure;
gboolean ret = TRUE;
g_return_val_if_fail (GST_NAVIGATION_QUERY_HAS_TYPE (query, ANGLES), FALSE);