I'm using a custom Linux built using Buildroot for a SoC Allwinner A20. This SoC have 4 analog video inputs which I need to use. The problem is that there is not a decent driver for this video input, so I'm fixing the single one I was able to find over the internet. It is a V4L2 driver for this device.
This device can capture video from more than one of the video inputs at the same time, and combine them in one single image, splitting the image in 2 or 4 parts, displaying the video from each camera in a different part.
However, the driver is very basic, and it is not prepared to configure this yet. It only capture from the video input #1. What I want to do is to modify this driver so it allows to configure how many inputs do you cant to enable (1, 2 or 4 inputs) and which ones (for example: enable inputs #2 and #4 and combine them into a video split in 2 parts).
First thing I though was to do this using the VIDIOC_S_INPUT ioctl because this is what it is supposed to do: selecting what input you want to use from a device with more than one input. However, this would work great if I just had to choose one of the 4 inputs, but I don't know how to use it to enable 2 or 4 inputs, and less what inputs must be enabled in this case, and in what order.
How can achieve this in a 4vl2 compliant way? I would like to use it with standard software like ffmpeg and gstreamer.