mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
query: add allocation query name
Add ALLOCATION query name and guard some functions against invalid queries.
This commit is contained in:
parent
a46c9c2a62
commit
dc520c11bc
1 changed files with 3 additions and 0 deletions
|
@ -103,6 +103,7 @@ static GstQueryTypeDefinition standard_definitions[] = {
|
|||
{GST_QUERY_BUFFERING, "buffering", "Buffering status", 0},
|
||||
{GST_QUERY_CUSTOM, "custom", "Custom query", 0},
|
||||
{GST_QUERY_URI, "uri", "URI of the source or sink", 0},
|
||||
{GST_QUERY_ALLOCATION, "allocation", "Allocation properties", 0},
|
||||
{0, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
|
@ -150,6 +151,7 @@ gst_query_type_get_name (GstQueryType query)
|
|||
const GstQueryTypeDefinition *def;
|
||||
|
||||
def = gst_query_type_get_details (query);
|
||||
g_return_val_if_fail (def != NULL, NULL);
|
||||
|
||||
return def->nick;
|
||||
}
|
||||
|
@ -168,6 +170,7 @@ gst_query_type_to_quark (GstQueryType query)
|
|||
const GstQueryTypeDefinition *def;
|
||||
|
||||
def = gst_query_type_get_details (query);
|
||||
g_return_val_if_fail (def != NULL, 0);
|
||||
|
||||
return def->quark;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue