v4l2_ioctl vidioc_s_fmt/vidioc_try_fmt pix <--> pix_mp conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Could somebody explain to me some strange behavior of v4l2_ioctl call?

When a device supports |V4L2_CAP_VIDEO_OUTPUT_MPLANE capability but does not support ||V4L2_CAP_VIDEO_OUTPUT, the |v4l2_ioctl function converts VIDIOC_S_FMT ioctl call: for example, when the specified buffer type is V4L2_BUF_TYPE_VIDEO_OUTPUT, it is changed to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE. But the num_planes value is not checked after the ioctl call, like after VIDIOC_G_FMT ioctl call is made. Device may change the num_planes value in call, especially since number of planes is determined by pixelformat. For example, V4L2 distinguishes single-plane variant of YUV420 format (V4L2_PIX_FMT_YUV420) from multi-plane one (V4L2_PIX_FMT_YUV420M). If the number of planes is not checked, program may select multi-plane variant, which will not handle correctly. Shouldn't the library check the number of planes after ioctl call?


Rafal




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux