allocators: dmabuf: allow testing allocator type
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 15 Jul 2013 13:23:17 +0000 (15:23 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 15 Jul 2013 13:43:07 +0000 (15:43 +0200)
commit84a09348832407a2f7e21dbae8cfa1e834116ccf
tree0254766ac672fadd9bef8d2074328c0dc0a65224
parent905fe0f4ca3fe6760fb6b4a77bcc5c982605f120
allocators: dmabuf: allow testing allocator type

In decide_allocation function some element may when to test the proposed allocator.
For example like this:
if (gst_query_get_n_allocation_params (query) > 0) {
GstAllocator * allocator;
GstAllocationParams params;
gst_query_parse_nth_allocation_param (query, 0, &allocator, &params);
if (g_strcmp0(allocator->mem_type, GST_ALLOCATOR_DMABUF) == 0)
GST_DEBUG("got dmabuf allocator");
else
GST_DEBUG("got an other allocator");
}

https://bugzilla.gnome.org/show_bug.cgi?id=703659
gst-libs/gst/allocators/gstdmabuf.c
gst-libs/gst/allocators/gstdmabuf.h