mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
query: Add new API to remove allocation params and pools from the allocation query
This commit is contained in:
parent
e460be622d
commit
008b35f6ae
4 changed files with 56 additions and 0 deletions
|
@ -2252,11 +2252,13 @@ gst_query_add_allocation_pool
|
||||||
gst_query_get_n_allocation_pools
|
gst_query_get_n_allocation_pools
|
||||||
gst_query_parse_nth_allocation_pool
|
gst_query_parse_nth_allocation_pool
|
||||||
gst_query_set_nth_allocation_pool
|
gst_query_set_nth_allocation_pool
|
||||||
|
gst_query_remove_nth_allocation_pool
|
||||||
|
|
||||||
gst_query_add_allocation_param
|
gst_query_add_allocation_param
|
||||||
gst_query_get_n_allocation_params
|
gst_query_get_n_allocation_params
|
||||||
gst_query_parse_nth_allocation_param
|
gst_query_parse_nth_allocation_param
|
||||||
gst_query_set_nth_allocation_param
|
gst_query_set_nth_allocation_param
|
||||||
|
gst_query_remove_nth_allocation_param
|
||||||
|
|
||||||
gst_query_add_allocation_meta
|
gst_query_add_allocation_meta
|
||||||
gst_query_get_n_allocation_metas
|
gst_query_get_n_allocation_metas
|
||||||
|
|
|
@ -1623,6 +1623,31 @@ gst_query_set_nth_allocation_pool (GstQuery * query, guint index,
|
||||||
g_array_index (array, AllocationPool, index) = ap;
|
g_array_index (array, AllocationPool, index) = ap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_query_remove_nth_allocation_pool:
|
||||||
|
* @query: a GST_QUERY_ALLOCATION type query #GstQuery
|
||||||
|
* @index: position in the allocation pool array to remove
|
||||||
|
*
|
||||||
|
* Remove the allocation pool at @index of the allocation pool array.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_query_remove_nth_allocation_pool (GstQuery * query, guint index)
|
||||||
|
{
|
||||||
|
GArray *array;
|
||||||
|
GstStructure *structure;
|
||||||
|
|
||||||
|
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION);
|
||||||
|
g_return_if_fail (gst_query_is_writable (query));
|
||||||
|
|
||||||
|
structure = GST_QUERY_STRUCTURE (query);
|
||||||
|
array =
|
||||||
|
ensure_array (structure, GST_QUARK (POOL), sizeof (AllocationPool),
|
||||||
|
(GDestroyNotify) allocation_pool_free);
|
||||||
|
g_return_if_fail (index < array->len);
|
||||||
|
|
||||||
|
g_array_remove_index (array, index);
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GType api;
|
GType api;
|
||||||
|
@ -1940,6 +1965,31 @@ gst_query_set_nth_allocation_param (GstQuery * query, guint index,
|
||||||
g_array_index (array, AllocationParam, index) = ap;
|
g_array_index (array, AllocationParam, index) = ap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_query_remove_nth_allocation_param:
|
||||||
|
* @query: a GST_QUERY_ALLOCATION type query #GstQuery
|
||||||
|
* @index: position in the allocation param array to remove
|
||||||
|
*
|
||||||
|
* Remove the allocation param at @index of the allocation param array.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_query_remove_nth_allocation_param (GstQuery * query, guint index)
|
||||||
|
{
|
||||||
|
GArray *array;
|
||||||
|
GstStructure *structure;
|
||||||
|
|
||||||
|
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION);
|
||||||
|
g_return_if_fail (gst_query_is_writable (query));
|
||||||
|
|
||||||
|
structure = GST_QUERY_STRUCTURE (query);
|
||||||
|
array =
|
||||||
|
ensure_array (structure, GST_QUARK (ALLOCATOR), sizeof (AllocationParam),
|
||||||
|
(GDestroyNotify) allocation_param_free);
|
||||||
|
g_return_if_fail (index < array->len);
|
||||||
|
|
||||||
|
g_array_remove_index (array, index);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_query_new_scheduling:
|
* gst_query_new_scheduling:
|
||||||
*
|
*
|
||||||
|
|
|
@ -411,6 +411,7 @@ void gst_query_set_nth_allocation_pool (GstQuery *query, guint ind
|
||||||
GstBufferPool *pool,
|
GstBufferPool *pool,
|
||||||
guint size, guint min_buffers,
|
guint size, guint min_buffers,
|
||||||
guint max_buffers);
|
guint max_buffers);
|
||||||
|
void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
|
||||||
|
|
||||||
/* allocators */
|
/* allocators */
|
||||||
void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
|
void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
|
||||||
|
@ -422,6 +423,7 @@ void gst_query_parse_nth_allocation_param (GstQuery *query, guint ind
|
||||||
void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
|
void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
|
||||||
GstAllocator *allocator,
|
GstAllocator *allocator,
|
||||||
const GstAllocationParams *params);
|
const GstAllocationParams *params);
|
||||||
|
void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
|
||||||
|
|
||||||
/* metadata */
|
/* metadata */
|
||||||
void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
|
void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
|
||||||
|
|
|
@ -908,6 +908,8 @@ EXPORTS
|
||||||
gst_query_parse_segment
|
gst_query_parse_segment
|
||||||
gst_query_parse_uri
|
gst_query_parse_uri
|
||||||
gst_query_remove_nth_allocation_meta
|
gst_query_remove_nth_allocation_meta
|
||||||
|
gst_query_remove_nth_allocation_param
|
||||||
|
gst_query_remove_nth_allocation_pool
|
||||||
gst_query_set_accept_caps_result
|
gst_query_set_accept_caps_result
|
||||||
gst_query_set_buffering_percent
|
gst_query_set_buffering_percent
|
||||||
gst_query_set_buffering_range
|
gst_query_set_buffering_range
|
||||||
|
|
Loading…
Reference in a new issue