robidouille/robidouille — pull request #2 by erget (2013-12-17 16:06:22+00:00)
Title: Changes to make capture resolution adjustable

I really like your library, thanks for putting it on Github!

As I was working with it I noticed that I wasn't using the Pi's full resolution, which was too bad because especially for still pictures it might be desirable to photograph in higher resolution. This pull request makes it possible for the user to request a picture in the dimensions that they need.

*Pros:*
- No code is broken because calls to ``raspiCamCvCreateCameraCapture`` behave the same as they did before.
- The work for making the capture struct is now delegated to a function which is almost identical to the old one, only with the possibility of manually setting the resolution

*Cons:*
You may want to cherrypick this because I wasn't originally planning on contributing to the library, therefore I made a change to the ``Makefile`` which won't match your profile. I also made the Pi's native resolution the standard resolution for the ``RASPIVID_STATE``'s ``default_status``. This has no effect on the behavior of the code itself because the ``default_state`` is now always partially overridden when creating the camera capture. For me, it was just handy to have the native resolution there so that I remember what it is.