fsphil / fswebcam

A neat and simple webcam app
http://www.sanslogic.co.uk/fswebcam/
GNU General Public License v2.0
415 stars 86 forks source link

add support for BAYER RGGB8 #40

Closed ehristev closed 5 years ago

ehristev commented 5 years ago

This patch adds support for another BAYER format, RGGB8. Another change is the removal of included videodev2.h which was very outdated. Include the kernel file directly. Signed-off-by: Eugen Hristev eugen.hristev@microchip.com

fsphil commented 5 years ago

Thanks for the pull request!

In your patch, SRC_PAL_BAYER and SRC_PAL_SBGGR8 are the same format. I prefer your name, can you replace SRC_PAL_BAYER with SRC_PAL_SBGGR8 everywhere else and remove the duplicate entry?

On videodev2.h it might be better to update it. The V4L2 documentation says

Applications should use their own copy, not include the version in the kernel sources on the system they compile on.

Though I admit I don't understand the logic behind that. Either way can you remove the change from this request, it's unrelated to the new pixel format.

ehristev commented 5 years ago

Hi Phil,

You are right , it's unrelated change. I sent this PR with broken heart since I was not expecting you still look over this project ! Which makes me very happy because I like it very much. I will fix everything and resend the PR. However, I think you should keep BAYER as an alias to the old SBGGR8. It's because many scripts that do camera shots can use this format, and removing it will break them... what do you think ? That was the reason I also added the V4L2 name but also kept your original name.

fsphil commented 5 years ago

Ah yes, that's a fair point. In that case it just needs a comment saying it's intentional.

ehristev commented 5 years ago

Updated, have a look please :+1: