v4l2-ctl: add support for custom bytesperline values.
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 10 Mar 2014 23:53:30 +0000 (00:53 +0100)
committerHans Verkuil <hans.verkuil@cisco.com>
Mon, 10 Mar 2014 23:56:59 +0000 (00:56 +0100)
commit2a28d80fa9b9080f3a4ce62a561ac99b19e626e4
treea8ee0413dcf7a685a3f39eb28d98879604ed37e4
parentae0952d6094730aa0e03c5a00a642a4aec8f03de
v4l2-ctl: add support for custom bytesperline values.

The V4L2 API allows application to select a bytesperline value that's larger
than what the driver gives you, effectively padding each line.

Add support to v4l2-ctl to set custom bytesperline values when trying/setting
new formats.

This also fixes a bug where setting multiplanar formats failed: in the *_cmd
function the is_multiplanar global variable isn't set yet because the device
hasn't been opened. So it always assumed a single planar format.

The fixed code is actually cleaner than what I had before.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
utils/v4l2-ctl/v4l2-ctl-vidout.cpp
utils/v4l2-ctl/v4l2-ctl.cpp
utils/v4l2-ctl/v4l2-ctl.h