[Bug 790265] v4l2src: Give preference to contiguous memory format over non contiguous one while setting format to /dev/video

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 7 14:28:07 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=790265

--- Comment #15 from Guillaume Desmottes <gdesmott at gnome.org> ---
I'm trying to implement dmabuf export on Zynq gst-omx encoder input and I'm
hitting this problem as well.

The proper fix would be negotiate the memory layout but there are two issues to
sort out:

1) We don't really have any proper API for downstream to communicate its memory
format preference. Olivier's suggestion could work, something like this in
upstream's propose_allocation function:

  params = gst_structure_new ("memory-layout-meta",
      "prefer-single-allocation", G_TYPE_BOOLEAN, TRUE);
  gst_query_add_allocation_meta (query, GST_MEMORY_LAYOUT_META_API_TYPE,
params);

Ideally gst_query_add_allocation_param() could be a better fit but this API
isn't extendable. :(

2) v4l2src currently configure the format when gst_v4l2src_set_caps() is
called. So if we need extra information from the allocation query to pick the
right format we'll have to move this logic gst_v4l2src_decide_allocation().
Would that be a problem?

-- 
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