v4l2 decode is absolutely horrible to work with.

Every part of it is so badly designed.

CAPTURE being the destination and OUTPUT being the source makes no sense.

The fact that that a buffer in a queue is completely immutable until the buffer is ready to dequeue is insane.

There is just no real way to get feedback about how you fucked up. It's not like there's validation layers or any decent logging aside from kernel dynamic debugging logs. x_x

It's just a terribly designed mess of crap. As usual, drivers doing anything remotely complex should mainly be in userspace. This is another prime example.

v4l2 should have been left to die all those years ago.