Hi all, Hans de Goede had the great idea to make something like we can find for arts, a library that traps open/close/ioctl and mmap calls, see his last message about it: http://marc.info/?l=linux-video&m=121296318123763&w=2
The idea is simple: - it works without modification of the application. The library traps the standard system calls to see if the application accesses a v4l device, intercepts compressed frames coming from the driver and uncompresses in userspace before transmitting them to the application. - it works without modification of the v4l driver. All the conversion job is masked by the library.
You call the application using: LD_PRELOAD=v4l1-compat.so camorama for example. The code is working and can be adapted to any device that need some userspace frame decompression/conversion.
The only disadvantage I saw is that an application that already uses the LD_PRELOAD mechanism for trapping these syscalls, this library will trap again these syscalls but in this case, it should link with a part of this library. Currently, this library does v4l2 driver to v4l1 application translation but the idea is here.
I don't know if you share my point of view but this idea is simple and has a long-term existence as opposed as the initial one.
Cheers, Thierry