Re: vb2_queue type question

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

 



Hi Hans,

On 26/03/2021 12:18, Hans Verkuil wrote:

The only thing that you do is update the queue type when you set the
video or metadata format. When you start allocating buffers the queue type
of the last set format is used. At that moment any attempt to set the format
to another type will fail since vb2_is_busy(queue) will be true.

So only the s_fmt ioctl will change the type. The g/try_fmt ioctls just must
keep working as-is.

I noticed that v4l2-compliance complains about this. It first tests the format ioctls for both video and metadata buffers, and the last s_fmt is for metadata. Then it tests buffer ioctls, and reqbufs for video buffers fails as the queue is in metadata mode, not video mode.

I added a custom .vidioc_reqbufs function to the driver which sets the queue type and then calls vb2_ioctl_reqbufs normally. This makes v4l2-compliance pass.

But is that correct change, or should v4l2-compliance be changed?

 Tomi



[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