[Bug 790265] New: v4l2src: Give preference to contiguous memory format over non contiguous one while setting format to /dev/video
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Nov 12 21:00:16 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=790265
Bug ID: 790265
Summary: v4l2src: Give preference to contiguous memory format
over non contiguous one while setting format to
/dev/video
Classification: Platform
Product: GStreamer
Version: 1.8.3
OS: Linux
Status: NEW
Severity: enhancement
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: devarsht at xilinx.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 363457
--> https://bugzilla.gnome.org/attachment.cgi?id=363457&action=edit
Patch we made to chage preference order for choosing contiguous video format
over non-contiguous one
Hello,
According to my understanding gstreamer element v4l2src is programmed to prefer
non-contiguous video format over contiguous one, i.e if you specify
GST_VIDEO_FORMAT_NV12 in pipeline, then v4l2src will program the /dev/video
node with V4L2_PIX_FMT_NV12M and not V4L2_PIX_FMT_NV12 if both are available
from capture device point of view.
(I think this preference is set in
https://cgit.freedesktop.org/gstreamer/gst-plugins-
good/tree/sys/v4l2/gstv4l2object.c line 1822)
Now this was breaking the functionality of our use-case as one of the peer
element had some issues with V4L2_PIX_FMT_NV12M so we had to change the
preference order with attached patch and then we were able to use
V4L2_PIX_FMT_NV12.
In my opinion think the better solutino here would be to give flexibility to
user to choose whichever format he/she wants to use (like contiguous or
non-contiguous), so can you please guide me on what is the best way to do this
?
In my view I see below possible things:
1) Add a Boolean property prefer_contiguous_format in v4l2src plugin.
2) Add separate GST_VIDEO_FORMAT macro for multiplanar formats.
3) Add some property in caps through which user can select preference for
contiguous video format if available.
Based upon your suggestion I would try to provide an updated patch.
Thanks,
Devarsh
--
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