Commit graph

11 commits

Author SHA1 Message Date
Hyunjun Ko
56ab7e0e1d dmabufallocator: adds gst_dmabuf_allocator_alloc_with_flags
If we can guarantee the lifetime of the fd is longer than
the memory, we can use DONT_CLOSE flag not to close when release.
But it's not provided in gstdmabuf yet while gstfdmemory does.

For example, in case of using VA-API or MSDK, we would need this api.
Otherwise we should call dup to duplicate the fd.

https://bugzilla.gnome.org/show_bug.cgi?id=794829
2018-04-26 16:40:54 -04:00
Tim-Philipp Müller
75c32b8afc allocators: GST_EXPORT -> GST_ALLOCATORS_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 10:20:23 +00:00
Nicolas Dufresne
f2726a2b4a doc: Fix since marker in dmabuf to match a stable release 2018-02-14 14:16:14 -05:00
Tim-Philipp Müller
d6a12c0a8f allocators: mark symbols explicitly for export with GST_EXPORT 2017-05-16 01:11:46 +01:00
Nicolas Dufresne
a1a2a33315 dmabuf-allocator: Add missing padding in the class
This class was made subclassable, though for future growth of the code,
it's better if we have some room for add class members. Using the small
padding since this is unlikely.
2016-11-18 14:56:20 -05:00
Julien Isorce
f5eb366335 allocators: define GST_CAPS_FEATURE_MEMORY_DMABUF
Adds "memory:DMABuf" caps feature. Since 1.11 tag.
Useful when the the dma-buf buffer cannot be mapped to CPU for r/w requests.
Example: protected content or platform constraints.

https://bugzilla.gnome.org/show_bug.cgi?id=759358
2016-11-03 13:19:12 -04:00
Nicolas Dufresne
c37b1e8c56 dmabuf: Make the allocator sub-classable
This should allos for cleaner code when implement such allocator.

https://bugzilla.gnome.org/show_bug.cgi?id=768794
2016-11-03 13:19:12 -04:00
Olivier Crête
d6187c00a6 dmabuf: Make it not a singleton
Makes it easier to track how many users there are

Also make it possible to create a dmabuf struct on systems without mmap,
it just won't be possible to map it.

https://bugzilla.gnome.org/show_bug.cgi?id=707793
2013-09-18 15:08:53 -04:00
Benjamin Gaignard
84a0934883 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
2013-07-15 15:43:07 +02:00
Tim-Philipp Müller
320c992b94 allocators: header clean-up 2013-02-19 09:35:10 +00:00
Benjamin Gaignard
ceecdb8e1d allocators: Add dmabuf-based GstMemory and GstAllocator
Create new GstMemory and GstAllocator base on dmabuf.
Memory is not allocated/freed by userland but mapped/unmmaped
from a dmabuf file descriptor when requested.

This allocator is included in a new lib called libgstallocators

https://bugzilla.gnome.org/show_bug.cgi?id=693826
2013-02-19 10:05:38 +01:00