[Bug 707534] BufferPool don't buffer GstMemory in 1.x

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Apr 3 08:18:20 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=707534
  GStreamer | gstreamer (core) | git

--- Comment #11 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2014-04-03 15:18:17 UTC ---
Sorry, I should have updated this bug. Basically, I don't think that has to be
generic, since not all buffer pool need to track memories. Having to track
memory seems so far specific to OMX and V4L2, while, as an example, with VDPAU
it's not needed.

So I'm not sure if I could just rename this bug into a v4l2 specific one. The
design I'm implementing, which I've discuss with Wim already is the following:

In v4l2 I introduce
GstV4l2Allocator
  GstV4l2MemoryGroup
  GstV4l2Memory

The MemoryGroup ended up replacing the meta. It stores the v4l2_buffer and
v4l2_plane array. A group is the only thing you can actually be allocated from
the allocator (I set the CUSTOM_ALLOC flag).

The Memory object, keeps a pointer to the MemoryGroup, in a way that one can
get the group from the first memory and validate all the other memory (if there
is more then one) using that.

The Allocator become responsible for REQBUF/CREATE_BUFS, QBUFS/DQBUFS and with
mmap/unmmap() or EXPBUF. It also tracks each memory, and put the group back on
the free_queue when all references has been dropped. So far I'm doing it
lockless (with help from atomic_queue) and didn't find any problem yet.

I have a mmap only WIP, my intention is to port the buffer pool to that today
and start testing. One can give a looks at the WIP at (note, I already have
more changes today):

http://cgit.collabora.com/git/user/nicolas/gst-plugins-good.git/log/?h=v4l2-allocator

It's currently on top of another of my branches, though I'm working on
splitting this up. The bottom part of that branch being general bugfix around
the newly introduces decoder. There is a lot of work in correctly handling the
error cases. The rest (except the allocator) is the addition of a transform
element currently doing color transform.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list